prism54.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. #ifndef PRISM54_H
  2. #define PRISM54_H
  3. struct ieee802_3_hdr_s {
  4. unsigned char da[6];
  5. unsigned char sa[6];
  6. unsigned short type;
  7. } __attribute__ ((packed));
  8. typedef struct ieee802_3_hdr_s ieee802_3_hdr;
  9. #define PIMOP_GET 0
  10. #define PIMOP_SET 1
  11. #define PIMOP_RESPONSE 2
  12. #define PIMOP_ERROR 3
  13. #define PIMOP_TRAP 4
  14. struct pimdev_hdr_s {
  15. int op;
  16. unsigned long oid;
  17. } __attribute__ ((packed));
  18. typedef struct pimdev_hdr_s pimdev_hdr;
  19. #define DOT11_OID_ATTACHMENT 0x19000003
  20. /* really need to check */
  21. #define DOT11_PKT_BEACON 0x80
  22. #define DOT11_PKT_ASSOC_RESP 0x10
  23. #define DOT11_PKT_REASSOC_RESP 0x30
  24. #define DOT11_PKT_PROBE_RESP 0x50
  25. struct obj_attachment_hdr {
  26. char type;
  27. char reserved;
  28. short id;
  29. short size;
  30. } __attribute__ ((packed));
  31. struct obj_attachment {
  32. char type;
  33. char reserved;
  34. short id;
  35. short size;
  36. char data[1];
  37. } __attribute__ ((packed));
  38. #define DOT11_OID_MLMEAUTOLEVEL 0x19000001
  39. #define DOT11_MLME_AUTO 0
  40. #define DOT11_MLME_INTERMEDIATE 0x01000000
  41. #define DOT11_MLME_EXTENDED 0x02000000
  42. #define DOT11_OID_DEAUTHENTICATE 0x18000000
  43. #define DOT11_OID_AUTHENTICATE 0x18000001
  44. #define DOT11_OID_DISASSOCIATE 0x18000002
  45. #define DOT11_OID_ASSOCIATE 0x18000003
  46. #define DOT11_OID_BEACON 0x18000005
  47. #define DOT11_OID_PROBE 0x18000006
  48. #define DOT11_OID_REASSOCIATE 0x1800000b
  49. struct obj_mlme {
  50. char address[6];
  51. short id;
  52. short state;
  53. short code;
  54. } __attribute__ ((packed));
  55. #define DOT11_OID_DEAUTHENTICATEEX 0x18000007
  56. #define DOT11_OID_AUTHENTICATEEX 0x18000008
  57. #define DOT11_OID_DISASSOCIATEEX 0x18000009
  58. #define DOT11_OID_ASSOCIATEEX 0x1800000a
  59. #define DOT11_OID_REASSOCIATEEX 0x1800000c
  60. struct obj_mlmeex {
  61. char address[6];
  62. short id;
  63. short state;
  64. short code;
  65. short size;
  66. char data[1];
  67. } __attribute__ ((packed));
  68. #define DOT11_OID_STAKEY 0x12000008
  69. #define DOT11_PRIV_WEP 0
  70. #define DOT11_PRIV_TKIP 1
  71. /* endian reversed to bigger endian */
  72. #define DOT11_STAKEY_OPTION_DEFAULTKEY 0x100
  73. struct obj_stakey {
  74. char address[6];
  75. char keyid;
  76. char reserved;
  77. short options;
  78. char type;
  79. char length;
  80. char key[32];
  81. } __attribute__ ((packed));
  82. #define DOT11_OID_DEFKEYID 0x12000003
  83. #define DOT11_OID_DEFKEY1 0x12000004
  84. #define DOT11_OID_DEFKEY2 0x12000005
  85. #define DOT11_OID_DEFKEY3 0x12000006
  86. #define DOT11_OID_DEFKEY4 0x12000007
  87. struct obj_key {
  88. char type;
  89. char length;
  90. char key[32];
  91. } __attribute__ ((packed));
  92. #define DOT11_OID_STASC 0x1200000a
  93. struct obj_stasc {
  94. char address[6];
  95. char keyid;
  96. char tx_sc;
  97. unsigned long sc_high;
  98. unsigned short sc_low;
  99. } __attribute__ ((packed));
  100. #define DOT11_OID_CLIENTS 0x15000001
  101. #define DOT11_OID_CLIENTSASSOCIATED 0x15000002
  102. #define DOT11_OID_CLIENTST 0x15000003
  103. #define DOT11_OID_CLIENTEND 0x150007d9
  104. #define DOT11_OID_CLIENTFIND 0x150007db
  105. #define DOT11_NODE_UNKNOWN
  106. #define DOT11_NODE_CLIENT
  107. #define DOT11_NODE_AP
  108. /* endian reversed to bigger endian */
  109. #define DOT11_STATE_NONE 0
  110. #define DOT11_STATE_AUTHING 0x100
  111. #define DOT11_STATE_AUTH 0x200
  112. #define DOT11_STATE_ASSOCING 0x300
  113. #define DOT11_STATE_REASSOCING 0x400
  114. #define DOT11_STATE_ASSOC 0x500
  115. #define DOT11_STATE_WDS 0x600
  116. struct obj_sta {
  117. char address[6];
  118. char pad[2];
  119. char state;
  120. char node;
  121. short age;
  122. char reserved1;
  123. char rssi;
  124. char rate;
  125. char reserved2;
  126. } __attribute__ ((packed));
  127. #define DOT11_OID_SSID 0x10000002
  128. #define DOT11_OID_SSIDOVERRIDE 0x10000006
  129. struct obj_ssid {
  130. char length;
  131. char octets[33];
  132. } __attribute__ ((packed));
  133. #define DOT11_OID_EAPAUTHSTA 0x150007de
  134. #define DOT11_OID_EAPUNAUTHSTA 0x150007df
  135. /* not in 38801 datasheet??? */
  136. #define DOT11_OID_DOT1XENABLE 0x150007e0
  137. #define DOT11_OID_MICFAILURE 0x150007e1
  138. #define DOT11_OID_AUTHENABLE 0x12000000
  139. #define DOT11_OID_PRIVACYINVOKED 0x12000001
  140. #define DOT11_OID_EXUNENCRYPTED 0x12000002
  141. #define DOT11_AUTH_OS 0x01000000
  142. #define DOT11_AUTH_SK 0x02000000
  143. #define DOT11_AUTH_BOTH 0x03000000
  144. #define DOT11_BOOL_TRUE 0x01000000
  145. #endif /* PRISM54_H */