homeplug.h 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. /*====================================================================*
  2. *
  3. * Copyright (c) 2013 Qualcomm Atheros, Inc.
  4. *
  5. * All rights reserved.
  6. *
  7. * Redistribution and use in source and binary forms, with or
  8. * without modification, are permitted (subject to the limitations
  9. * in the disclaimer below) provided that the following conditions
  10. * are met:
  11. *
  12. * * Redistributions of source code must retain the above copyright
  13. * notice, this list of conditions and the following disclaimer.
  14. *
  15. * * Redistributions in binary form must reproduce the above
  16. * copyright notice, this list of conditions and the following
  17. * disclaimer in the documentation and/or other materials
  18. * provided with the distribution.
  19. *
  20. * * Neither the name of Qualcomm Atheros nor the names of
  21. * its contributors may be used to endorse or promote products
  22. * derived from this software without specific prior written
  23. * permission.
  24. *
  25. * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
  26. * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE
  27. * COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
  28. * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  29. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  30. * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
  31. * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  32. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  33. * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  34. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  35. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  36. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
  37. * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  38. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  39. *
  40. *--------------------------------------------------------------------*/
  41. /*====================================================================*
  42. *
  43. * homeplug.h - HomePlug Definitions and Declarations;
  44. *
  45. *. Qualcomm Atheros HomePlug AV Powerline Toolkit
  46. *: Copyright (c) 2009-2013 by Qualcomm Atheros Inc. ALL RIGHTS RESERVED;
  47. *; For demonstration and evaluation only; Not for production use.
  48. *
  49. * Contributor(s):
  50. * Charles Maier
  51. * Alex Vasquez
  52. *
  53. *--------------------------------------------------------------------*/
  54. #ifndef HOMEPLUG_HEADER
  55. #define HOMEPLUG_HEADER
  56. /*====================================================================*
  57. * HomePlug AV Constants;
  58. *--------------------------------------------------------------------*/
  59. #define HOMEPLUG_MMV 0x01
  60. #define HOMEPLUG_MMTYPE 0x0000
  61. /*====================================================================*
  62. * HomePlug Management Message Ranges for Information Only;
  63. *--------------------------------------------------------------------*/
  64. #define CC_MMTYPE_MIN 0x0000
  65. #define CC_MMTYPE_MAX 0x1FFF
  66. #define CP_MMTYPE_MIN 0x2000
  67. #define CP_MMTYPE_MAX 0x3FFF
  68. #define NN_MMTYPE_MIN 0x4000
  69. #define NN_MMTYPE_MAX 0x5FFF
  70. #define CM_MMTYPE_MIN 0x6000
  71. #define CM_MMTYPE_MAX 0x7FFF
  72. #define MS_MMTYPE_MIN 0x8000
  73. #define MS_MMTYPE_MAX 0x9FFF
  74. #define VS_MMTYPE_MIN 0xA000
  75. #define VS_MMTYPE_MAX 0xBFFF
  76. #define HA_MMTYPE_MIN 0xC000
  77. #define HA_MMTYPE_MAX 0xFFFF
  78. /*====================================================================*
  79. * HomePlug AV MMEs have 4 variants indicated by the 2 MMTYPE LSBs;
  80. *--------------------------------------------------------------------*/
  81. #define MMTYPE_CC 0x0000
  82. #define MMTYPE_CP 0x2000
  83. #define MMTYPE_NN 0x4000
  84. #define MMTYPE_CM 0x6000
  85. #define MMTYPE_MS 0x8000
  86. #define MMTYPE_VS 0xA000
  87. #define MMTYPE_XX 0xC000
  88. #ifndef IHPAPI_HEADER
  89. #define MMTYPE_REQ 0x0000
  90. #define MMTYPE_CNF 0x0001
  91. #define MMTYPE_IND 0x0002
  92. #define MMTYPE_RSP 0x0003
  93. #define MMTYPE_MODE (MMTYPE_REQ|MMTYPE_CNF|MMTYPE_IND|MMTYPE_RSP)
  94. #define MMTYPE_MASK ~(MMTYPE_REQ|MMTYPE_CNF|MMTYPE_IND|MMTYPE_RSP)
  95. #endif
  96. /*====================================================================*
  97. * HomePlug AV Management Message Types;
  98. *--------------------------------------------------------------------*/
  99. #define CC_CCO_APPOINT 0x0000
  100. #define CC_BACKUP_APPOINT 0x0004
  101. #define CC_LINK_INFO 0x0008
  102. #define CC_HANDOVER 0x000C
  103. #define CC_HANDOVER_INFO 0x0010
  104. #define CC_DISCOVER_LIST 0x0014
  105. #define CC_LINK_NEW 0x0018
  106. #define CC_LINK_MOD 0x001C
  107. #define CC_LINK_SQZ 0x0020
  108. #define CC_LINK_REL 0x0024
  109. #define CC_DETECT_REPORT 0x0028
  110. #define CC_WHO_RU 0x002C
  111. #define CC_ASSOC 0x0030
  112. #define CC_LEAVE 0x0034
  113. #define CC_SET_TEI_MAP 0x0038
  114. #define CC_RELAY 0x003C
  115. #define CC_BEACON_RELIABILITY 0x0040
  116. #define CC_ALLOC_MOVE 0x0044
  117. #define CC_ACCESS_NEW 0x0048
  118. #define CC_ACCESS_REL 0x004C
  119. #define CC_DCPPC 0x0050
  120. #define CC_HP1_DET 0x0054
  121. #define CC_BLE_UPDATE 0x0058
  122. #define CP_PROXY_APPOINT 0x2000
  123. #define PH_PROXY_APPOINT 0x2004
  124. #define CP_PROXY_WAKE 0x2008
  125. #define NN_INL 0x4000
  126. #define NN_NEW_NET 0x4004
  127. #define NN_ADD_ALLOC 0x4008
  128. #define NN_REL_ALLOC 0x400C
  129. #define NN_REL_NET 0x4010
  130. #define CM_ASSOCIATED_STA 0x6000
  131. #define CM_ENCRYPTED_PAYLOAD 0x6004
  132. #define CM_SET_KEY 0x6008
  133. #define CM_GET_KEY 0x600C
  134. #define CM_SC_JOIN 0x6010
  135. #define CM_CHAN_EST 0x6014
  136. #define CM_TM_UPDATE 0x6018
  137. #define CM_AMP_MAP 0x601C
  138. #define CM_BRG_INFO 0x6020
  139. #define CM_CONN_NEW 0x6024
  140. #define CM_CONN_REL 0x6028
  141. #define CM_CONN_MOD 0x602C
  142. #define CM_CONN_INFO 0x6030
  143. #define CM_STA_CAP 0x6034
  144. #define CM_NW_INFO 0x6038
  145. #define CM_GET_BEACON 0x603C
  146. #define CM_HFID 0x6040
  147. #define CM_MME_ERROR 0x6044
  148. #define CM_NW_STATS 0x6048
  149. #define CM_SLAC_PARAM 0x6064
  150. #define CM_START_ATTEN_CHAR 0x6068
  151. #define CM_ATTEN_CHAR 0x606C
  152. #define CM_PKCS_CERT 0x6070
  153. #define CM_MNBC_SOUND 0x6074
  154. #define CM_VALIDATE 0x6078
  155. #define CM_SLAC_MATCH 0x607C
  156. #define CM_SLAC_USER_DATA 0x6080
  157. #define CM_ATTEN_PROFILE 0x6084
  158. /*====================================================================*
  159. *
  160. *--------------------------------------------------------------------*/
  161. #endif