c++ - Is there is a way to get the associated MN's to an access point? -
i'm using inet , want simulate scenario consist of 3 access points (ap)and 1 mobile node (mn), may each ap has other associated mns on range, want : while mn (in scenario) move around , beacons aps, before association aps can number of other mns associated each ap? explored many source codes , found macaddresstable , stalist in ieee80211mgmtap ,are useful me? , use them total number of associated mns, how can evaluate length of stalist? or macaddresstable?
else must put counter count @ on ap side , emit through beacon frame? if please give me guides or shortcuts regards ....
- in ieee 802.11 ap does not send information number of associated stations. therefore in order broadcast information have introduce own modification/extension ieee 802.11 protocols, example new field in beacon frame.
in inet model ap stores own stations in
stalistmap. locally calculate current number of associated station can use following code:stalist::const_iterator it; int assocsta = 0; (it = stalist.begin(); != stalist.end(); ++it) { if (it->second.status == associated) assocsta++; }
if want modify standard beacon frame, firstly, have assume want add new field in beacon frame, e.g. after existing field, size filed should have. then:
- add new filed (for example
int noofassociatedstas;) in classieee80211beaconframebodyin fileieee80211mgmtframes.msg, correct length inieee80211beaconframedefinition in
ieee80211serializer.ccafterelse if (dynamic_cast<const ieee80211beaconframe *>(pkt))add serialization of new field, example:unsigned int numsta = frame->getbody().getnoofassociatedstas(); b.writebyte(numsta); // assuming new field 1 byte lengthin
ieee80211serializer.ccindeserializeadd deserialization of new field, aftercase 0x80: //st_beaconexample:
unsigned int numsta = b.readbyte();
please note place of adding new filed (second bullet) must match place of reading (third bullet).
Comments
Post a Comment