codedwrench/xlinkhandheldassistant

Improve the packetconverter code, by preloading data per packet

Closed this issue · 2 comments

In the packetconverter code, updating the after radiotap index happens per function. This was done so functions would always be safe to use. But this is very inefficient.

It would probably be preferable to have this happen once per new packet.

The way to do this needs to be thought about, updating the radiotap index once per cycle is easy enough by not calling it in the other functions, but there is a lot of information we could probably preload as well, information that is likely needed in that cycle.

The following things come to mind:

  • All flags in the radiotap header probably including everything else due to the nature of the header
  • Source MAC, the destination MAC and BSSID.
  • What kind of packet we are dealing with, possibly in an enum instead of as separate functions as is the case now.
  • In case of a beacon frame, the fixedparameters (fill into a WifiInformation struct) maybe even move the SSID filtering to packetconverter?

Another thing to consider:

  • Should the packetconverter code be split up in 802.3 / 802.11?

Partially done so far with: 95db79c

It uses an Update() when each new packet arrives to set the radiotap index now. Some small readability improvements have been made too.

Will have to preload more data, and probably split 802.3 from 802.11

Done in feature branch