hostapd_ioctl.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. /*
  2. * Host AP (software wireless LAN access point) user space daemon for
  3. * Host AP kernel driver
  4. * Copyright 2002-2003, Jouni Malinen <jkmaline@cc.hut.fi>
  5. * Copyright 2002-2004, Instant802 Networks, Inc.
  6. * Copyright 2005, Devicescape Software, Inc.
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. */
  12. #ifndef HOSTAPD_IOCTL_H
  13. #define HOSTAPD_IOCTL_H
  14. #ifdef __KERNEL__
  15. #include <linux/types.h>
  16. #endif /* __KERNEL__ */
  17. #define PRISM2_IOCTL_PRISM2_PARAM (SIOCIWFIRSTPRIV + 0)
  18. #define PRISM2_IOCTL_GET_PRISM2_PARAM (SIOCIWFIRSTPRIV + 1)
  19. #define PRISM2_IOCTL_HOSTAPD (SIOCIWFIRSTPRIV + 3)
  20. /* PRISM2_IOCTL_PRISM2_PARAM ioctl() subtypes:
  21. * This table is no longer added to, the whole sub-ioctl
  22. * mess shall be deleted completely. */
  23. enum {
  24. PRISM2_PARAM_IEEE_802_1X = 23,
  25. PRISM2_PARAM_ANTSEL_TX = 24,
  26. PRISM2_PARAM_ANTSEL_RX = 25,
  27. /* Instant802 additions */
  28. PRISM2_PARAM_CTS_PROTECT_ERP_FRAMES = 1001,
  29. PRISM2_PARAM_DROP_UNENCRYPTED = 1002,
  30. PRISM2_PARAM_PREAMBLE = 1003,
  31. PRISM2_PARAM_SHORT_SLOT_TIME = 1006,
  32. PRISM2_PARAM_NEXT_MODE = 1008,
  33. PRISM2_PARAM_CLEAR_KEYS = 1009,
  34. PRISM2_PARAM_RADIO_ENABLED = 1010,
  35. PRISM2_PARAM_ANTENNA_MODE = 1013,
  36. PRISM2_PARAM_STAT_TIME = 1016,
  37. PRISM2_PARAM_STA_ANTENNA_SEL = 1017,
  38. PRISM2_PARAM_FORCE_UNICAST_RATE = 1018,
  39. PRISM2_PARAM_RATE_CTRL_NUM_UP = 1019,
  40. PRISM2_PARAM_RATE_CTRL_NUM_DOWN = 1020,
  41. PRISM2_PARAM_MAX_RATECTRL_RATE = 1021,
  42. PRISM2_PARAM_TX_POWER_REDUCTION = 1022,
  43. PRISM2_PARAM_KEY_TX_RX_THRESHOLD = 1024,
  44. PRISM2_PARAM_DEFAULT_WEP_ONLY = 1026,
  45. PRISM2_PARAM_WIFI_WME_NOACK_TEST = 1033,
  46. PRISM2_PARAM_SCAN_FLAGS = 1035,
  47. PRISM2_PARAM_HW_MODES = 1036,
  48. PRISM2_PARAM_CREATE_IBSS = 1037,
  49. PRISM2_PARAM_WMM_ENABLED = 1038,
  50. PRISM2_PARAM_MIXED_CELL = 1039,
  51. PRISM2_PARAM_RADAR_DETECT = 1043,
  52. PRISM2_PARAM_SPECTRUM_MGMT = 1044,
  53. };
  54. enum {
  55. IEEE80211_KEY_MGMT_NONE = 0,
  56. IEEE80211_KEY_MGMT_IEEE8021X = 1,
  57. IEEE80211_KEY_MGMT_WPA_PSK = 2,
  58. IEEE80211_KEY_MGMT_WPA_EAP = 3,
  59. };
  60. /* Data structures used for get_hw_features ioctl */
  61. struct hostapd_ioctl_hw_modes_hdr {
  62. int mode;
  63. int num_channels;
  64. int num_rates;
  65. };
  66. struct ieee80211_channel_data {
  67. short chan; /* channel number (IEEE 802.11) */
  68. short freq; /* frequency in MHz */
  69. int flag; /* flag for hostapd use (IEEE80211_CHAN_*) */
  70. };
  71. struct ieee80211_rate_data {
  72. int rate; /* rate in 100 kbps */
  73. int flags; /* IEEE80211_RATE_ flags */
  74. };
  75. /* ADD_IF, REMOVE_IF, and UPDATE_IF 'type' argument */
  76. enum {
  77. HOSTAP_IF_WDS = 1, HOSTAP_IF_VLAN = 2, HOSTAP_IF_BSS = 3,
  78. HOSTAP_IF_STA = 4
  79. };
  80. struct hostapd_if_wds {
  81. u8 remote_addr[ETH_ALEN];
  82. };
  83. struct hostapd_if_vlan {
  84. u8 id;
  85. };
  86. struct hostapd_if_bss {
  87. u8 bssid[ETH_ALEN];
  88. };
  89. struct hostapd_if_sta {
  90. };
  91. #endif /* HOSTAPD_IOCTL_H */