wlantest_ctrl.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. /*
  2. * wlantest control interface
  3. * Copyright (c) 2010-2013, Jouni Malinen <j@w1.fi>
  4. *
  5. * This software may be distributed under the terms of the BSD license.
  6. * See README for more details.
  7. */
  8. #ifndef WLANTEST_CTRL_H
  9. #define WLANTEST_CTRL_H
  10. #define WLANTEST_SOCK_NAME "w1.fi.wlantest"
  11. #define WLANTEST_CTRL_MAX_CMD_LEN 1000
  12. #define WLANTEST_CTRL_MAX_RESP_LEN 1000
  13. enum wlantest_ctrl_cmd {
  14. WLANTEST_CTRL_SUCCESS,
  15. WLANTEST_CTRL_FAILURE,
  16. WLANTEST_CTRL_INVALID_CMD,
  17. WLANTEST_CTRL_UNKNOWN_CMD,
  18. WLANTEST_CTRL_PING,
  19. WLANTEST_CTRL_TERMINATE,
  20. WLANTEST_CTRL_LIST_BSS,
  21. WLANTEST_CTRL_LIST_STA,
  22. WLANTEST_CTRL_FLUSH,
  23. WLANTEST_CTRL_CLEAR_STA_COUNTERS,
  24. WLANTEST_CTRL_CLEAR_BSS_COUNTERS,
  25. WLANTEST_CTRL_GET_STA_COUNTER,
  26. WLANTEST_CTRL_GET_BSS_COUNTER,
  27. WLANTEST_CTRL_INJECT,
  28. WLANTEST_CTRL_VERSION,
  29. WLANTEST_CTRL_ADD_PASSPHRASE,
  30. WLANTEST_CTRL_INFO_STA,
  31. WLANTEST_CTRL_INFO_BSS,
  32. WLANTEST_CTRL_SEND,
  33. WLANTEST_CTRL_CLEAR_TDLS_COUNTERS,
  34. WLANTEST_CTRL_GET_TDLS_COUNTER,
  35. WLANTEST_CTRL_RELOG,
  36. WLANTEST_CTRL_GET_TX_TID,
  37. WLANTEST_CTRL_GET_RX_TID,
  38. };
  39. enum wlantest_ctrl_attr {
  40. WLANTEST_ATTR_BSSID,
  41. WLANTEST_ATTR_STA_ADDR,
  42. WLANTEST_ATTR_STA_COUNTER,
  43. WLANTEST_ATTR_BSS_COUNTER,
  44. WLANTEST_ATTR_COUNTER,
  45. WLANTEST_ATTR_INJECT_FRAME,
  46. WLANTEST_ATTR_INJECT_SENDER_AP,
  47. WLANTEST_ATTR_INJECT_PROTECTION,
  48. WLANTEST_ATTR_VERSION,
  49. WLANTEST_ATTR_PASSPHRASE,
  50. WLANTEST_ATTR_STA_INFO,
  51. WLANTEST_ATTR_BSS_INFO,
  52. WLANTEST_ATTR_INFO,
  53. WLANTEST_ATTR_FRAME,
  54. WLANTEST_ATTR_TDLS_COUNTER,
  55. WLANTEST_ATTR_STA2_ADDR,
  56. WLANTEST_ATTR_WEPKEY,
  57. WLANTEST_ATTR_TID,
  58. };
  59. enum wlantest_bss_counter {
  60. WLANTEST_BSS_COUNTER_VALID_BIP_MMIE,
  61. WLANTEST_BSS_COUNTER_INVALID_BIP_MMIE,
  62. WLANTEST_BSS_COUNTER_MISSING_BIP_MMIE,
  63. WLANTEST_BSS_COUNTER_BIP_DEAUTH,
  64. WLANTEST_BSS_COUNTER_BIP_DISASSOC,
  65. WLANTEST_BSS_COUNTER_PROBE_RESPONSE,
  66. NUM_WLANTEST_BSS_COUNTER
  67. };
  68. enum wlantest_sta_counter {
  69. WLANTEST_STA_COUNTER_AUTH_TX,
  70. WLANTEST_STA_COUNTER_AUTH_RX,
  71. WLANTEST_STA_COUNTER_ASSOCREQ_TX,
  72. WLANTEST_STA_COUNTER_REASSOCREQ_TX,
  73. WLANTEST_STA_COUNTER_PTK_LEARNED,
  74. WLANTEST_STA_COUNTER_VALID_DEAUTH_TX,
  75. WLANTEST_STA_COUNTER_VALID_DEAUTH_RX,
  76. WLANTEST_STA_COUNTER_INVALID_DEAUTH_TX,
  77. WLANTEST_STA_COUNTER_INVALID_DEAUTH_RX,
  78. WLANTEST_STA_COUNTER_VALID_DISASSOC_TX,
  79. WLANTEST_STA_COUNTER_VALID_DISASSOC_RX,
  80. WLANTEST_STA_COUNTER_INVALID_DISASSOC_TX,
  81. WLANTEST_STA_COUNTER_INVALID_DISASSOC_RX,
  82. WLANTEST_STA_COUNTER_VALID_SAQUERYREQ_TX,
  83. WLANTEST_STA_COUNTER_VALID_SAQUERYREQ_RX,
  84. WLANTEST_STA_COUNTER_INVALID_SAQUERYREQ_TX,
  85. WLANTEST_STA_COUNTER_INVALID_SAQUERYREQ_RX,
  86. WLANTEST_STA_COUNTER_VALID_SAQUERYRESP_TX,
  87. WLANTEST_STA_COUNTER_VALID_SAQUERYRESP_RX,
  88. WLANTEST_STA_COUNTER_INVALID_SAQUERYRESP_TX,
  89. WLANTEST_STA_COUNTER_INVALID_SAQUERYRESP_RX,
  90. WLANTEST_STA_COUNTER_PING_OK,
  91. WLANTEST_STA_COUNTER_ASSOCRESP_COMEBACK,
  92. WLANTEST_STA_COUNTER_REASSOCRESP_COMEBACK,
  93. WLANTEST_STA_COUNTER_PING_OK_FIRST_ASSOC,
  94. WLANTEST_STA_COUNTER_VALID_DEAUTH_RX_ACK,
  95. WLANTEST_STA_COUNTER_VALID_DISASSOC_RX_ACK,
  96. WLANTEST_STA_COUNTER_INVALID_DEAUTH_RX_ACK,
  97. WLANTEST_STA_COUNTER_INVALID_DISASSOC_RX_ACK,
  98. WLANTEST_STA_COUNTER_DEAUTH_RX_ASLEEP,
  99. WLANTEST_STA_COUNTER_DEAUTH_RX_AWAKE,
  100. WLANTEST_STA_COUNTER_DISASSOC_RX_ASLEEP,
  101. WLANTEST_STA_COUNTER_DISASSOC_RX_AWAKE,
  102. WLANTEST_STA_COUNTER_PROT_DATA_TX,
  103. WLANTEST_STA_COUNTER_DEAUTH_RX_RC6,
  104. WLANTEST_STA_COUNTER_DEAUTH_RX_RC7,
  105. WLANTEST_STA_COUNTER_DISASSOC_RX_RC6,
  106. WLANTEST_STA_COUNTER_DISASSOC_RX_RC7,
  107. NUM_WLANTEST_STA_COUNTER
  108. };
  109. enum wlantest_tdls_counter {
  110. WLANTEST_TDLS_COUNTER_VALID_DIRECT_LINK,
  111. WLANTEST_TDLS_COUNTER_INVALID_DIRECT_LINK,
  112. WLANTEST_TDLS_COUNTER_VALID_AP_PATH,
  113. WLANTEST_TDLS_COUNTER_INVALID_AP_PATH,
  114. WLANTEST_TDLS_COUNTER_SETUP_REQ,
  115. WLANTEST_TDLS_COUNTER_SETUP_RESP_OK,
  116. WLANTEST_TDLS_COUNTER_SETUP_RESP_FAIL,
  117. WLANTEST_TDLS_COUNTER_SETUP_CONF_OK,
  118. WLANTEST_TDLS_COUNTER_SETUP_CONF_FAIL,
  119. WLANTEST_TDLS_COUNTER_TEARDOWN,
  120. NUM_WLANTEST_TDLS_COUNTER
  121. };
  122. enum wlantest_inject_frame {
  123. WLANTEST_FRAME_AUTH,
  124. WLANTEST_FRAME_ASSOCREQ,
  125. WLANTEST_FRAME_REASSOCREQ,
  126. WLANTEST_FRAME_DEAUTH,
  127. WLANTEST_FRAME_DISASSOC,
  128. WLANTEST_FRAME_SAQUERYREQ,
  129. };
  130. /**
  131. * enum wlantest_inject_protection - WLANTEST_CTRL_INJECT protection
  132. * @WLANTEST_INJECT_NORMAL: Use normal rules (protect if key is set)
  133. * @WLANTEST_INJECT_PROTECTED: Force protection (fail if not possible)
  134. * @WLANTEST_INJECT_UNPROTECTED: Force unprotected
  135. * @WLANTEST_INJECT_INCORRECT_KEY: Force protection with incorrect key
  136. */
  137. enum wlantest_inject_protection {
  138. WLANTEST_INJECT_NORMAL,
  139. WLANTEST_INJECT_PROTECTED,
  140. WLANTEST_INJECT_UNPROTECTED,
  141. WLANTEST_INJECT_INCORRECT_KEY,
  142. };
  143. enum wlantest_sta_info {
  144. WLANTEST_STA_INFO_PROTO,
  145. WLANTEST_STA_INFO_PAIRWISE,
  146. WLANTEST_STA_INFO_KEY_MGMT,
  147. WLANTEST_STA_INFO_RSN_CAPAB,
  148. WLANTEST_STA_INFO_STATE,
  149. WLANTEST_STA_INFO_GTK,
  150. };
  151. enum wlantest_bss_info {
  152. WLANTEST_BSS_INFO_PROTO,
  153. WLANTEST_BSS_INFO_PAIRWISE,
  154. WLANTEST_BSS_INFO_GROUP,
  155. WLANTEST_BSS_INFO_GROUP_MGMT,
  156. WLANTEST_BSS_INFO_KEY_MGMT,
  157. WLANTEST_BSS_INFO_RSN_CAPAB,
  158. };
  159. #endif /* WLANTEST_CTRL_H */