Wi5 / odin-wi5-agent

Click-based odin agent that runs on access points
2 stars 7 forks source link

Some question about maximum available bit rate #29

Closed peterrz closed 7 years ago

peterrz commented 7 years ago

Hi, I notice when client want to associate it consume more bitrate my question is how I obtain maximum available bitrate? Formula or any Code? and also I need information about this code: void OdinAgent::recv_assoc_request (Packet *p) { ... Vector<int> basic_rates; Vector<int> rates; Vector<int> all_rates; if (rates_l) {

for (int x = 0; x < WIFI_MIN((int)rates_l[1], WIFI_RATES_MAXSIZE); x++) {
    uint8_t rate = rates_l[x + 2];`

    if (rate & WIFI_RATE_BASIC) {
  basic_rates.push_back((int)(rate & WIFI_RATE_VAL));
    } else {
  rates.push_back((int)(rate & WIFI_RATE_VAL));
    }
      all_rates.push_back((int)(rate & WIFI_RATE_VAL));
}

} I know about Fittingness Factor,I need more information like what is all_rates and what do ? thanks!

josemariasaldana commented 7 years ago

Hi,

This part of the code was written by Lalith (see https://github.com/Wi5/odin-wi5-agent/blame/master/src/odinagent.cc).

We don't exactly know what it does. In our version, we are just using one rate for everything. The rate is always in the global variable "_tx_rate", which is read from the .cli file:

https://github.com/Wi5/odin-wi5-agent/blame/master/src/odinagent.cc#L166