1
0

frameDefinitions.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  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. //Authentication frame
  45. typedef struct {
  46. int len_radioTapHdr; //usually 32 bytes
  47. u_char *radioTapHdr;
  48. int len_type; //1 byte
  49. u_char *type; //Protocol version, type and subtype
  50. int len_flags; //1 byte
  51. u_char *flags; //to DS, from DS, more Frag, Retry, Pwr Mgt, more Data, WEP, Order
  52. int len_duration; //2 bytes
  53. u_char *duration;
  54. int len_destAddr; //6 bytes
  55. u_char *destAddr;
  56. int len_sourceAddr; //6 bytes
  57. u_char *sourceAddr;
  58. int len_bssAddr; //6 bytes
  59. u_char *bssAddr;
  60. int len_seqNr; //2 bytes
  61. u_char *seqNr;
  62. int len_authAlg; //2 bytes
  63. u_char *authAlg;
  64. int len_authSeq; //2 bytes
  65. u_char *authSeq;
  66. int len_status; //2 bytes
  67. u_char *status;
  68. int len_taggedParams; //variable size
  69. infoElem *taggedParams;
  70. int len_fsc; //4 bytes
  71. u_char *fsc;
  72. } authResponse;
  73. //Association response frame
  74. typedef struct {
  75. int len_radioTapHdr; //usually 32 bytes
  76. u_char *radioTapHdr;
  77. int len_type; //1 byte
  78. u_char *type; //Protocol version, type and subtype
  79. int len_flags; //1 byte
  80. u_char *flags; //to DS, from DS, more Frag, Retry, Pwr Mgt, more Data, WEP, Order
  81. int len_duration; //2 bytes
  82. u_char *duration;
  83. int len_destAddr; //6 bytes
  84. u_char *destAddr;
  85. int len_sourceAddr; //6 bytes
  86. u_char *sourceAddr;
  87. int len_bssAddr; //6 bytes
  88. u_char *bssAddr;
  89. int len_seqNr; //2 bytes
  90. u_char *seqNr;
  91. int len_capabInfo; //2 bytes
  92. u_char *capabInfo;
  93. int len_status; //2 bytes
  94. u_char *status;
  95. int len_assId; //2 bytes
  96. u_char *assId;
  97. int len_taggedParams; //variable size
  98. infoElem *taggedParams;
  99. int len_fsc; //4 bytes
  100. u_char *fsc;
  101. } assResponse;
  102. //Association response frame
  103. typedef struct {
  104. int len_radioTapHdr; //usually 32 bytes
  105. u_char *radioTapHdr;
  106. int len_type; //1 byte
  107. u_char *type; //Protocol version, type and subtype
  108. int len_flags; //1 byte
  109. u_char *flags; //to DS, from DS, more Frag, Retry, Pwr Mgt, more Data, WEP, Order
  110. int len_duration; //2 bytes
  111. u_char *duration;
  112. int len_destAddr; //6 bytes
  113. u_char *destAddr;
  114. int len_sourceAddr; //6 bytes
  115. u_char *sourceAddr;
  116. int len_bssAddr; //6 bytes
  117. u_char *bssAddr;
  118. int len_seqNr; //2 bytes
  119. u_char *seqNr;
  120. int len_reasonCode; //2 bytes
  121. u_char *reasonCode;
  122. int len_fsc; //4 bytes
  123. u_char *fsc;
  124. } disAss;
  125. #endif