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
stalist
map. 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 classieee80211beaconframebody
in fileieee80211mgmtframes.msg
, correct length inieee80211beaconframe
definition in
ieee80211serializer.cc
afterelse 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 length
in
ieee80211serializer.cc
indeserialize
add deserialization of new field, aftercase 0x80: //st_beacon
example:
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