Bugzilla – Bug 471
[PATCH] access point address manager
Last modified: 2009-11-17 04:50:27 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 192.168.1.1). 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 ;))
Created attachment 351 [details]
ap address manager implementation (.cc) file
Created attachment 352 [details]
ap address manager header (.h) file
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
[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).
Sorry, posted on the wrong bug... could admins delete this?
(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.
> 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 ;)
Mathieu, can you comment?
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 :)
changing subject so it is flagged as a pending code contribution
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?
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.