wlantest_ctrl.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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. };
  37. enum wlantest_ctrl_attr {
  38. WLANTEST_ATTR_BSSID,
  39. WLANTEST_ATTR_STA_ADDR,
  40. WLANTEST_ATTR_STA_COUNTER,
  41. WLANTEST_ATTR_BSS_COUNTER,
  42. WLANTEST_ATTR_COUNTER,
  43. WLANTEST_ATTR_INJECT_FRAME,
  44. WLANTEST_ATTR_INJECT_SENDER_AP,
  45. WLANTEST_ATTR_INJECT_PROTECTION,
  46. WLANTEST_ATTR_VERSION,
  47. WLANTEST_ATTR_PASSPHRASE,
  48. };
  49. enum wlantest_bss_counter {
  50. WLANTEST_BSS_COUNTER_VALID_BIP_MMIE,
  51. WLANTEST_BSS_COUNTER_INVALID_BIP_MMIE,
  52. WLANTEST_BSS_COUNTER_MISSING_BIP_MMIE,
  53. NUM_WLANTEST_BSS_COUNTER
  54. };
  55. enum wlantest_sta_counter {
  56. WLANTEST_STA_COUNTER_AUTH_TX,
  57. WLANTEST_STA_COUNTER_AUTH_RX,
  58. WLANTEST_STA_COUNTER_ASSOCREQ_TX,
  59. WLANTEST_STA_COUNTER_REASSOCREQ_TX,
  60. WLANTEST_STA_COUNTER_PTK_LEARNED,
  61. WLANTEST_STA_COUNTER_VALID_DEAUTH_TX,
  62. WLANTEST_STA_COUNTER_VALID_DEAUTH_RX,
  63. WLANTEST_STA_COUNTER_INVALID_DEAUTH_TX,
  64. WLANTEST_STA_COUNTER_INVALID_DEAUTH_RX,
  65. WLANTEST_STA_COUNTER_VALID_DISASSOC_TX,
  66. WLANTEST_STA_COUNTER_VALID_DISASSOC_RX,
  67. WLANTEST_STA_COUNTER_INVALID_DISASSOC_TX,
  68. WLANTEST_STA_COUNTER_INVALID_DISASSOC_RX,
  69. WLANTEST_STA_COUNTER_VALID_SAQUERYREQ_TX,
  70. WLANTEST_STA_COUNTER_VALID_SAQUERYREQ_RX,
  71. WLANTEST_STA_COUNTER_INVALID_SAQUERYREQ_TX,
  72. WLANTEST_STA_COUNTER_INVALID_SAQUERYREQ_RX,
  73. WLANTEST_STA_COUNTER_VALID_SAQUERYRESP_TX,
  74. WLANTEST_STA_COUNTER_VALID_SAQUERYRESP_RX,
  75. WLANTEST_STA_COUNTER_INVALID_SAQUERYRESP_TX,
  76. WLANTEST_STA_COUNTER_INVALID_SAQUERYRESP_RX,
  77. NUM_WLANTEST_STA_COUNTER
  78. };
  79. enum wlantest_inject_frame {
  80. WLANTEST_FRAME_AUTH,
  81. WLANTEST_FRAME_ASSOCREQ,
  82. WLANTEST_FRAME_REASSOCREQ,
  83. WLANTEST_FRAME_DEAUTH,
  84. WLANTEST_FRAME_DISASSOC,
  85. WLANTEST_FRAME_SAQUERYREQ,
  86. };
  87. /**
  88. * enum wlantest_inject_protection - WLANTEST_CTRL_INJECT protection
  89. * @WLANTEST_INJECT_NORMAL: Use normal rules (protect if key is set)
  90. * @WLANTEST_INJECT_PROTECTED: Force protection (fail if not possible)
  91. * @WLANTEST_INJECT_UNPROTECTED: Force unprotected
  92. * @WLANTEST_INJECT_INCORRECT_KEY: Force protection with incorrect key
  93. */
  94. enum wlantest_inject_protection {
  95. WLANTEST_INJECT_NORMAL,
  96. WLANTEST_INJECT_PROTECTED,
  97. WLANTEST_INJECT_UNPROTECTED,
  98. WLANTEST_INJECT_INCORRECT_KEY,
  99. };
  100. #endif /* WLANTEST_CTRL_H */