Bug 471 - [PATCH] access point address manager
[PATCH] access point address manager
Product: ns-3
Classification: Unclassified
Component: wifi
All All
: P3 normal
Assigned To: Mathieu Lacage
Depends on:
  Show dependency treegraph
Reported: 2009-01-16 16:37 EST by Tom Henderson
Modified: 2009-11-17 04:50 EST (History)
2 users (show)

See Also:

ap address manager implementation (.cc) file (6.86 KB, text/plain)
2009-01-16 16:38 EST, Tom Henderson
ap address manager header (.h) file (2.75 KB, text/plain)
2009-01-16 16:39 EST, Tom Henderson

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Henderson 2009-01-16 16:37:48 EST
This contribution is from Francesco Malandrino, 1/5/09 ns-3-users post.


Attached the "magic DHCP" I was talking about.
Functions are (shortly) documented with comments; you basically do the 
1. add APs, stating base (network) address, e.g. "192.168.1." and first 
available IP (eg. 2 if the AP has Note that only /24 
networks are supported;
2. add stations.

The manager takes care for both addressing and routing. Additionally, 
you may specify one or more multicast route, in case you use it (by 
default, multicast frames sent from your stations won't be automatically 

Also note that if you use this component you do NOT have to call 
Ah, stations (more correctly: WifiNetDevices of stations) do need to 
have a (any, possibly a bogus one) address when they are not associated, 
so please make sure not to Add WifiNetDevices without an address, or 
Send from your applications will fail.

Comments or suggestions are welcome (especially if you want to turn this 
stuff into a DHCP implementation ;))

Comment 1 Tom Henderson 2009-01-16 16:38:48 EST
Created attachment 351 [details]
ap address manager implementation (.cc) file
Comment 2 Tom Henderson 2009-01-16 16:39:13 EST
Created attachment 352 [details]
ap address manager header (.h) file
Comment 3 Francesco Malandrino 2009-01-19 05:23:37 EST
I have written a variant of the Ns2MobilityHelper, suitable to read ns-2
mobility traces like the following one (generated by the Random Trip
implementation, see http://lrcwww.epfl.ch/RandomTrip/ and

$node_(0) set X_ 28.675920486450
$node_(0) set Y_ 13.803303718567
$node_(0) set Z_ 0.000000000000
$ns_ at 4.634906291962 "$node_(0) set X_ 28.675920486450"
$ns_ at 4.634906291962 "$node_(0) set Y_ 13.803303718567"
$ns_ at 4.634906291962 "$node_(0) set Z_ 0.000000000000"
$ns_ at 4.634906291962 "$node_(0) setdest 44.610576629639
52.860397338867 0.917085826397"
[omissis, full test trace attached]

It assumes the semantic of setdest to be "setdest dest_x, dest_y,
speed", i.e. it only applies to 2d model. However, it can read a wider
set of formats respect to the original ones, namely:

$node_(1) set X_ 50 #initial position
$ns_ at 4.634906291962 "$node_(0) set Y_ 13.803303718567" #schedule position
$ns_ at 55.137107849121 "$node_(0) setdest 65.125175476074
80.098602294922 1.097754716873" #schedule setdest

Additionally, it can skip the comments and the parsing seems to me
somewhat more robust than the original one.

I attach it here as it may be useful for someone else (put the files in
src/helper/, and remember to edit src/helper/wscript). Unfortunately, I
could not follow the ns-3 coding style (e.g. the properties should
become attributes, I guess). 
Comment 4 Francesco Malandrino 2009-01-19 05:25:45 EST
Sorry, posted on the wrong bug... could admins delete this?
Comment 5 Tom Henderson 2009-01-19 23:57:45 EST
(In reply to comment #4)
> Sorry, posted on the wrong bug... could admins delete this?

I'd rather leave it in here for now than edit the database-- I see you started bug473 for this one.
Comment 6 Francesco Malandrino 2009-01-20 01:42:58 EST
> I'd rather leave it in here for now than edit the database-- I see you started
> bug473 for this one.

Yes, it was a copy-paste mismatch ;)
Comment 7 Rajib Bhattacharjea 2009-01-28 14:48:08 EST
Mathieu, can you comment?
Comment 8 Mathieu Lacage 2009-02-24 02:35:20 EST
I looked a bit at the API: it clearly is not a real DHCP so, if you want to push this forward for integration, I would support moving it to src/contrib once the coding style is fixed to align with the ns-3 coding style :)
Comment 9 Tom Henderson 2009-07-10 17:34:18 EDT
changing subject so it is flagged as a pending code contribution
Comment 10 Faker Moatamri 2009-10-23 10:15:41 EDT
Hi all,
Did you fix coding style of the files? is it ready to add to src/contrib? any patch based on the latest ns-3-dev?
Best regards
Comment 11 Faker Moatamri 2009-11-17 04:50:27 EST
The patch is obsolete and it doesn't work anymore with current ns-3-dev, it needs more work to be up to date. We decided to put it in the contributed code not maintained by the project and to close the bug. 
Here is the link for the code:
It contains the files ap-address-manager.cc/h and also a link to this bug report that gives details about the enhancement.