wlantest_ctrl.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. /*
  2. * wlantest control interface
  3. * Copyright (c) 2010, Jouni Malinen <j@w1.fi>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License version 2 as
  7. * published by the Free Software Foundation.
  8. *
  9. * Alternatively, this software may be distributed under the terms of BSD
  10. * license.
  11. *
  12. * See README and COPYING for more details.
  13. */
  14. #ifndef WLANTEST_CTRL_H
  15. #define WLANTEST_CTRL_H
  16. #define WLANTEST_SOCK_NAME "w1.fi.wlantest"
  17. #define WLANTEST_CTRL_MAX_CMD_LEN 1000
  18. #define WLANTEST_CTRL_MAX_RESP_LEN 1000
  19. enum wlantest_ctrl_cmd {
  20. WLANTEST_CTRL_SUCCESS,
  21. WLANTEST_CTRL_FAILURE,
  22. WLANTEST_CTRL_INVALID_CMD,
  23. WLANTEST_CTRL_UNKNOWN_CMD,
  24. WLANTEST_CTRL_PING,
  25. WLANTEST_CTRL_TERMINATE,
  26. WLANTEST_CTRL_LIST_BSS,
  27. WLANTEST_CTRL_LIST_STA,
  28. WLANTEST_CTRL_FLUSH,
  29. WLANTEST_CTRL_CLEAR_STA_COUNTERS,
  30. WLANTEST_CTRL_CLEAR_BSS_COUNTERS,
  31. WLANTEST_CTRL_GET_STA_COUNTER,
  32. WLANTEST_CTRL_GET_BSS_COUNTER,
  33. WLANTEST_CTRL_INJECT,
  34. WLANTEST_CTRL_VERSION,
  35. WLANTEST_CTRL_ADD_PASSPHRASE,
  36. WLANTEST_CTRL_INFO_STA,
  37. WLANTEST_CTRL_INFO_BSS,
  38. WLANTEST_CTRL_SEND,
  39. };
  40. enum wlantest_ctrl_attr {
  41. WLANTEST_ATTR_BSSID,
  42. WLANTEST_ATTR_STA_ADDR,
  43. WLANTEST_ATTR_STA_COUNTER,
  44. WLANTEST_ATTR_BSS_COUNTER,
  45. WLANTEST_ATTR_COUNTER,
  46. WLANTEST_ATTR_INJECT_FRAME,
  47. WLANTEST_ATTR_INJECT_SENDER_AP,
  48. WLANTEST_ATTR_INJECT_PROTECTION,
  49. WLANTEST_ATTR_VERSION,
  50. WLANTEST_ATTR_PASSPHRASE,
  51. WLANTEST_ATTR_STA_INFO,
  52. WLANTEST_ATTR_BSS_INFO,
  53. WLANTEST_ATTR_INFO,
  54. WLANTEST_ATTR_FRAME,
  55. };
  56. enum wlantest_bss_counter {
  57. WLANTEST_BSS_COUNTER_VALID_BIP_MMIE,
  58. WLANTEST_BSS_COUNTER_INVALID_BIP_MMIE,
  59. WLANTEST_BSS_COUNTER_MISSING_BIP_MMIE,
  60. WLANTEST_BSS_COUNTER_BIP_DEAUTH,
  61. WLANTEST_BSS_COUNTER_BIP_DISASSOC,
  62. NUM_WLANTEST_BSS_COUNTER
  63. };
  64. enum wlantest_sta_counter {
  65. WLANTEST_STA_COUNTER_AUTH_TX,
  66. WLANTEST_STA_COUNTER_AUTH_RX,
  67. WLANTEST_STA_COUNTER_ASSOCREQ_TX,
  68. WLANTEST_STA_COUNTER_REASSOCREQ_TX,
  69. WLANTEST_STA_COUNTER_PTK_LEARNED,
  70. WLANTEST_STA_COUNTER_VALID_DEAUTH_TX,
  71. WLANTEST_STA_COUNTER_VALID_DEAUTH_RX,
  72. WLANTEST_STA_COUNTER_INVALID_DEAUTH_TX,
  73. WLANTEST_STA_COUNTER_INVALID_DEAUTH_RX,
  74. WLANTEST_STA_COUNTER_VALID_DISASSOC_TX,
  75. WLANTEST_STA_COUNTER_VALID_DISASSOC_RX,
  76. WLANTEST_STA_COUNTER_INVALID_DISASSOC_TX,
  77. WLANTEST_STA_COUNTER_INVALID_DISASSOC_RX,
  78. WLANTEST_STA_COUNTER_VALID_SAQUERYREQ_TX,
  79. WLANTEST_STA_COUNTER_VALID_SAQUERYREQ_RX,
  80. WLANTEST_STA_COUNTER_INVALID_SAQUERYREQ_TX,
  81. WLANTEST_STA_COUNTER_INVALID_SAQUERYREQ_RX,
  82. WLANTEST_STA_COUNTER_VALID_SAQUERYRESP_TX,
  83. WLANTEST_STA_COUNTER_VALID_SAQUERYRESP_RX,
  84. WLANTEST_STA_COUNTER_INVALID_SAQUERYRESP_TX,
  85. WLANTEST_STA_COUNTER_INVALID_SAQUERYRESP_RX,
  86. WLANTEST_STA_COUNTER_PING_OK,
  87. WLANTEST_STA_COUNTER_ASSOCRESP_COMEBACK,
  88. WLANTEST_STA_COUNTER_REASSOCRESP_COMEBACK,
  89. NUM_WLANTEST_STA_COUNTER
  90. };
  91. enum wlantest_inject_frame {
  92. WLANTEST_FRAME_AUTH,
  93. WLANTEST_FRAME_ASSOCREQ,
  94. WLANTEST_FRAME_REASSOCREQ,
  95. WLANTEST_FRAME_DEAUTH,
  96. WLANTEST_FRAME_DISASSOC,
  97. WLANTEST_FRAME_SAQUERYREQ,
  98. };
  99. /**
  100. * enum wlantest_inject_protection - WLANTEST_CTRL_INJECT protection
  101. * @WLANTEST_INJECT_NORMAL: Use normal rules (protect if key is set)
  102. * @WLANTEST_INJECT_PROTECTED: Force protection (fail if not possible)
  103. * @WLANTEST_INJECT_UNPROTECTED: Force unprotected
  104. * @WLANTEST_INJECT_INCORRECT_KEY: Force protection with incorrect key
  105. */
  106. enum wlantest_inject_protection {
  107. WLANTEST_INJECT_NORMAL,
  108. WLANTEST_INJECT_PROTECTED,
  109. WLANTEST_INJECT_UNPROTECTED,
  110. WLANTEST_INJECT_INCORRECT_KEY,
  111. };
  112. enum wlantest_sta_info {
  113. WLANTEST_STA_INFO_PROTO,
  114. WLANTEST_STA_INFO_PAIRWISE,
  115. WLANTEST_STA_INFO_KEY_MGMT,
  116. WLANTEST_STA_INFO_RSN_CAPAB,
  117. WLANTEST_STA_INFO_STATE,
  118. };
  119. enum wlantest_bss_info {
  120. WLANTEST_BSS_INFO_PROTO,
  121. WLANTEST_BSS_INFO_PAIRWISE,
  122. WLANTEST_BSS_INFO_GROUP,
  123. WLANTEST_BSS_INFO_GROUP_MGMT,
  124. WLANTEST_BSS_INFO_KEY_MGMT,
  125. WLANTEST_BSS_INFO_RSN_CAPAB,
  126. };
  127. #endif /* WLANTEST_CTRL_H */