frameDefinitions.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. Defines structs for frame types.
  3. */
  4. #ifndef FRAMEDEFINITIONS_H_
  5. #define FRAMEDEFINITIONS_H_
  6. //the int len_* fields are only used for copying the data to a packet,
  7. //so no fuzzing on those fields! Fuzzing should only be done on u_char datatypes
  8. //Information element
  9. typedef struct {
  10. u_char id;
  11. u_char len;
  12. int len_data;
  13. u_char *data;
  14. } infoElem;
  15. //Probe response frame
  16. typedef struct {
  17. int len_radioTapHdr; //usually 32 bytes
  18. u_char *radioTapHdr;
  19. int len_type; //1 byte
  20. u_char *type; //Protocol version, type and subtype
  21. int len_flags; //1 byte
  22. u_char *flags; //to DS, from DS, more Frag, Retry, Pwr Mgt, more Data, WEP, Order
  23. int len_duration; //2 bytes
  24. u_char *duration;
  25. int len_destAddr; //6 bytes
  26. u_char *destAddr;
  27. int len_sourceAddr; //6 bytes
  28. u_char *sourceAddr;
  29. int len_bssAddr; //6 bytes
  30. u_char *bssAddr;
  31. int len_seqNr; //2 bytes
  32. u_char *seqNr;
  33. int len_timeStamp; //8 bytes
  34. u_char *timeStamp;
  35. int len_beaconInterval; //2 bytes
  36. u_char *beaconInterval;
  37. int len_capabInfo; //2 bytes
  38. u_char *capabInfo;
  39. int len_taggedParams; //variable size
  40. infoElem *taggedParams;
  41. int len_fsc; //4 bytes
  42. u_char *fsc;
  43. } probeResponse;
  44. #endif