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 ....

  1. 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.
  2. 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 class ieee80211beaconframebody in file ieee80211mgmtframes.msg , correct length in ieee80211beaconframe definition
  • in ieee80211serializer.cc after else 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 in deserialize add deserialization of new field, after case 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

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -