nl802154.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. /*
  2. * nl802154.h
  3. *
  4. * Copyright (C) 2007, 2008, 2009 Siemens AG
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2
  8. * as published by the Free Software Foundation.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License along
  16. * with this program; if not, write to the Free Software Foundation, Inc.,
  17. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  18. *
  19. */
  20. #ifndef NL802154_H
  21. #define NL802154_H
  22. #define IEEE802154_NL_NAME "802.15.4 MAC"
  23. #define IEEE802154_MCAST_COORD_NAME "coordinator"
  24. #define IEEE802154_MCAST_BEACON_NAME "beacon"
  25. enum {
  26. __IEEE802154_ATTR_INVALID,
  27. IEEE802154_ATTR_DEV_NAME,
  28. IEEE802154_ATTR_DEV_INDEX,
  29. IEEE802154_ATTR_STATUS,
  30. IEEE802154_ATTR_SHORT_ADDR,
  31. IEEE802154_ATTR_HW_ADDR,
  32. IEEE802154_ATTR_PAN_ID,
  33. IEEE802154_ATTR_CHANNEL,
  34. IEEE802154_ATTR_COORD_SHORT_ADDR,
  35. IEEE802154_ATTR_COORD_HW_ADDR,
  36. IEEE802154_ATTR_COORD_PAN_ID,
  37. IEEE802154_ATTR_SRC_SHORT_ADDR,
  38. IEEE802154_ATTR_SRC_HW_ADDR,
  39. IEEE802154_ATTR_SRC_PAN_ID,
  40. IEEE802154_ATTR_DEST_SHORT_ADDR,
  41. IEEE802154_ATTR_DEST_HW_ADDR,
  42. IEEE802154_ATTR_DEST_PAN_ID,
  43. IEEE802154_ATTR_CAPABILITY,
  44. IEEE802154_ATTR_REASON,
  45. IEEE802154_ATTR_SCAN_TYPE,
  46. IEEE802154_ATTR_CHANNELS,
  47. IEEE802154_ATTR_DURATION,
  48. IEEE802154_ATTR_ED_LIST,
  49. IEEE802154_ATTR_BCN_ORD,
  50. IEEE802154_ATTR_SF_ORD,
  51. IEEE802154_ATTR_PAN_COORD,
  52. IEEE802154_ATTR_BAT_EXT,
  53. IEEE802154_ATTR_COORD_REALIGN,
  54. IEEE802154_ATTR_SEC,
  55. IEEE802154_ATTR_PAGE,
  56. IEEE802154_ATTR_CHANNEL_PAGE_LIST,
  57. IEEE802154_ATTR_PHY_NAME,
  58. __IEEE802154_ATTR_MAX,
  59. };
  60. #define IEEE802154_ATTR_MAX (__IEEE802154_ATTR_MAX - 1)
  61. extern const struct nla_policy ieee802154_policy[];
  62. /* commands */
  63. /* REQ should be responded with CONF
  64. * and INDIC with RESP
  65. */
  66. enum {
  67. __IEEE802154_COMMAND_INVALID,
  68. IEEE802154_ASSOCIATE_REQ,
  69. IEEE802154_ASSOCIATE_CONF,
  70. IEEE802154_DISASSOCIATE_REQ,
  71. IEEE802154_DISASSOCIATE_CONF,
  72. IEEE802154_GET_REQ,
  73. IEEE802154_GET_CONF,
  74. IEEE802154_RESET_REQ,
  75. IEEE802154_RESET_CONF,
  76. IEEE802154_SCAN_REQ,
  77. IEEE802154_SCAN_CONF,
  78. IEEE802154_SET_REQ,
  79. IEEE802154_SET_CONF,
  80. IEEE802154_START_REQ,
  81. IEEE802154_START_CONF,
  82. IEEE802154_SYNC_REQ,
  83. IEEE802154_POLL_REQ,
  84. IEEE802154_POLL_CONF,
  85. IEEE802154_ASSOCIATE_INDIC,
  86. IEEE802154_ASSOCIATE_RESP,
  87. IEEE802154_DISASSOCIATE_INDIC,
  88. IEEE802154_BEACON_NOTIFY_INDIC,
  89. IEEE802154_ORPHAN_INDIC,
  90. IEEE802154_ORPHAN_RESP,
  91. IEEE802154_COMM_STATUS_INDIC,
  92. IEEE802154_SYNC_LOSS_INDIC,
  93. IEEE802154_GTS_REQ, /* Not supported yet */
  94. IEEE802154_GTS_INDIC, /* Not supported yet */
  95. IEEE802154_GTS_CONF, /* Not supported yet */
  96. IEEE802154_RX_ENABLE_REQ, /* Not supported yet */
  97. IEEE802154_RX_ENABLE_CONF, /* Not supported yet */
  98. IEEE802154_LIST_IFACE,
  99. IEEE802154_LIST_PHY,
  100. IEEE802154_ADD_IFACE,
  101. IEEE802154_DEL_IFACE,
  102. __IEEE802154_CMD_MAX,
  103. };
  104. #define IEEE802154_CMD_MAX (__IEEE802154_CMD_MAX - 1)
  105. #endif