experiment4.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. #ifndef CFUZZ_H_
  2. #define CFUZZ_H_
  3. //the int len_* fields are only used for copying the data to a packet,
  4. //so no fuzzing on those fields! Fuzzing should only be done on u_char datatypes
  5. //Information element
  6. typedef struct {
  7. u_char id;
  8. u_char len;
  9. int len_data;
  10. u_char *data;
  11. } infoElem;
  12. //Probe response frame
  13. typedef struct {
  14. int len_radioTapHdr; //usually 32 bytes
  15. u_char *radioTapHdr;
  16. int len_type; //1 byte
  17. u_char *type; //Protocol version, type and subtype
  18. int len_flags; //1 byte
  19. u_char *flags; //to DS, from DS, more Frag, Retry, Pwr Mgt, more Data, WEP, Order
  20. int len_duration; //2 bytes
  21. u_char *duration;
  22. int len_destAddr; //6 bytes
  23. u_char *destAddr;
  24. int len_sourceAddr; //6 bytes
  25. u_char *sourceAddr;
  26. int len_bssAddr; //6 bytes
  27. u_char *bssAddr;
  28. int len_seqNr; //2 bytes
  29. u_char *seqNr;
  30. int len_timeStamp; //8 bytes
  31. u_char *timeStamp;
  32. int len_beaconInterval; //2 bytes
  33. u_char *beaconInterval;
  34. int len_capabInfo; //2 bytes
  35. u_char *capabInfo;
  36. int len_taggedParams; //variable size
  37. infoElem *taggedParams;
  38. int len_fsc; //4 bytes
  39. u_char *fsc;
  40. } probeResponse;
  41. //Authentication frame
  42. typedef struct {
  43. int len_radioTapHdr; //usually 32 bytes
  44. u_char *radioTapHdr;
  45. int len_type; //1 byte
  46. u_char *type; //Protocol version, type and subtype
  47. int len_flags; //1 byte
  48. u_char *flags; //to DS, from DS, more Frag, Retry, Pwr Mgt, more Data, WEP, Order
  49. int len_duration; //2 bytes
  50. u_char *duration;
  51. int len_destAddr; //6 bytes
  52. u_char *destAddr;
  53. int len_sourceAddr; //6 bytes
  54. u_char *sourceAddr;
  55. int len_bssAddr; //6 bytes
  56. u_char *bssAddr;
  57. int len_seqNr; //2 bytes
  58. u_char *seqNr;
  59. int len_authAlg; //2 bytes
  60. u_char *authAlg;
  61. int len_authSeq; //2 bytes
  62. u_char *authSeq;
  63. int len_status; //2 bytes
  64. u_char *status;
  65. int len_fsc; //4 bytes
  66. u_char *fsc;
  67. } authResponse;
  68. //Association response frame
  69. typedef struct {
  70. int len_radioTapHdr; //usually 32 bytes
  71. u_char *radioTapHdr;
  72. int len_type; //1 byte
  73. u_char *type; //Protocol version, type and subtype
  74. int len_flags; //1 byte
  75. u_char *flags; //to DS, from DS, more Frag, Retry, Pwr Mgt, more Data, WEP, Order
  76. int len_duration; //2 bytes
  77. u_char *duration;
  78. int len_destAddr; //6 bytes
  79. u_char *destAddr;
  80. int len_sourceAddr; //6 bytes
  81. u_char *sourceAddr;
  82. int len_bssAddr; //6 bytes
  83. u_char *bssAddr;
  84. int len_seqNr; //2 bytes
  85. u_char *seqNr;
  86. int len_capabInfo; //2 bytes
  87. u_char *capabInfo;
  88. int len_status; //2 bytes
  89. u_char *status;
  90. int len_assId; //2 bytes
  91. u_char *assId;
  92. int len_taggedParams; //variable size
  93. infoElem *taggedParams;
  94. int len_fsc; //4 bytes
  95. u_char *fsc;
  96. } assResponse;
  97. #endif