IxEthDB.h 107 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349
  1. /** @file IxEthDB.h
  2. *
  3. * @brief this file contains the public API of @ref IxEthDB component
  4. *
  5. *
  6. * @par
  7. * IXP400 SW Release version 2.0
  8. *
  9. * -- Copyright Notice --
  10. *
  11. * @par
  12. * Copyright 2001-2005, Intel Corporation.
  13. * All rights reserved.
  14. *
  15. * @par
  16. * SPDX-License-Identifier: BSD-3-Clause
  17. * @par
  18. * -- End of Copyright Notice --
  19. *
  20. */
  21. #ifndef IxEthDB_H
  22. #define IxEthDB_H
  23. #include <IxOsBuffMgt.h>
  24. #include <IxTypes.h>
  25. /**
  26. * @defgroup IxEthDB IXP400 Ethernet Database (IxEthDB) API
  27. *
  28. * @brief ethDB is a library that does provides a MAC address database learning/filtering capability
  29. *
  30. *@{
  31. */
  32. #define INLINE __inline__
  33. #define IX_ETH_DB_PRIVATE PRIVATE /* imported from IxTypes.h */
  34. #define IX_ETH_DB_PUBLIC PUBLIC
  35. /**
  36. * @brief port ID => message handler NPE id conversion (0 => NPE_B, 1 => NPE_C)
  37. */
  38. #define IX_ETH_DB_PORT_ID_TO_NPE(id) (id == 0 ? 1 : (id == 1 ? 2 : (id == 2 ? 0 : -1)))
  39. /**
  40. * @def IX_ETH_DB_NPE_TO_PORT_ID(npe)
  41. * @brief message handler NPE id => port ID conversion (NPE_B => 0, NPE_C => 1)
  42. */
  43. #define IX_ETH_DB_NPE_TO_PORT_ID(npe) (npe == 0 ? 2 : (npe == 1 ? 0 : (npe == 2 ? 1 : -1)))
  44. /* temporary define - won't work for Azusa */
  45. #define IX_ETH_DB_PORT_ID_TO_NPE_LOGICAL_ID(id) (IX_ETH_DB_PORT_ID_TO_NPE(id) << 4)
  46. #define IX_ETH_DB_NPE_LOGICAL_ID_TO_PORT_ID(id) (IX_ETH_DB_NPE_TO_PORT_ID(id >> 4))
  47. /**
  48. * @def IX_IEEE803_MAC_ADDRESS_SIZE
  49. * @brief The size of the MAC address
  50. */
  51. #define IX_IEEE803_MAC_ADDRESS_SIZE (6)
  52. /**
  53. * @def IX_IEEE802_1Q_QOS_PRIORITY_COUNT
  54. * @brief Number of QoS priorities defined by IEEE802.1Q
  55. */
  56. #define IX_IEEE802_1Q_QOS_PRIORITY_COUNT (8)
  57. /**
  58. * @enum IxEthDBStatus
  59. * @brief Ethernet Database API return values
  60. */
  61. typedef enum /* IxEthDBStatus */
  62. {
  63. IX_ETH_DB_SUCCESS = IX_SUCCESS, /**< Success */
  64. IX_ETH_DB_FAIL = IX_FAIL, /**< Failure */
  65. IX_ETH_DB_INVALID_PORT, /**< Invalid port */
  66. IX_ETH_DB_PORT_UNINITIALIZED, /**< Port not initialized */
  67. IX_ETH_DB_MAC_UNINITIALIZED, /**< MAC not initialized */
  68. IX_ETH_DB_INVALID_ARG, /**< Invalid argument */
  69. IX_ETH_DB_NO_SUCH_ADDR, /**< Address not found for search or delete operations */
  70. IX_ETH_DB_NOMEM, /**< Learning database memory full */
  71. IX_ETH_DB_BUSY, /**< Learning database cannot complete operation, access temporarily blocked */
  72. IX_ETH_DB_END, /**< Database browser passed the end of the record set */
  73. IX_ETH_DB_INVALID_VLAN, /**< Invalid VLAN ID (valid range is 0..4094, 0 signifies no VLAN membership, used for priority tagged frames) */
  74. IX_ETH_DB_INVALID_PRIORITY, /**< Invalid QoS priority/traffic class (valid range for QoS priority is 0..7, valid range for traffic class depends on run-time configuration) */
  75. IX_ETH_DB_NO_PERMISSION, /**< No permission for attempted operation */
  76. IX_ETH_DB_FEATURE_UNAVAILABLE, /**< Feature not available (or not enabled) */
  77. IX_ETH_DB_INVALID_KEY, /**< Invalid search key */
  78. IX_ETH_DB_INVALID_RECORD_TYPE /**< Invalid record type */
  79. } IxEthDBStatus;
  80. /** @brief VLAN ID type, valid range is 0..4094, 0 signifying no VLAN membership */
  81. typedef UINT32 IxEthDBVlanId;
  82. /** @brief 802.1Q VLAN tag, contains 3 bits user priority, 1 bit CFI, 12 bits VLAN ID */
  83. typedef UINT32 IxEthDBVlanTag;
  84. /** @brief QoS priority/traffic class type, valid range is 0..7, 0 being the lowest */
  85. typedef UINT32 IxEthDBPriority;
  86. /** @brief Priority mapping table; 0..7 QoS priorities used to index, table contains traffic classes */
  87. typedef UINT8 IxEthDBPriorityTable[8];
  88. /** @brief A 4096 bit array used to map the complete VLAN ID range */
  89. typedef UINT8 IxEthDBVlanSet[512];
  90. #define IX_ETH_DB_802_1Q_VLAN_MASK (0xFFF)
  91. #define IX_ETH_DB_802_1Q_QOS_MASK (0x7)
  92. #define IX_ETH_DB_802_1Q_MAX_VLAN_ID (0xFFE)
  93. /**
  94. * @def IX_ETH_DB_SET_VLAN_ID
  95. * @brief returns the given 802.1Q tag with the VLAN ID field substituted with the given VLAN ID
  96. *
  97. * This macro is used to change the VLAN ID in a 802.1Q tag.
  98. *
  99. * Example:
  100. *
  101. * tag = IX_ETH_DB_SET_VLAN_ID(tag, 32)
  102. *
  103. * inserts the VLAN ID "32" in the given tag.
  104. */
  105. #define IX_ETH_DB_SET_VLAN_ID(vlanTag, vlanID) (((vlanTag) & 0xF000) | ((vlanID) & IX_ETH_DB_802_1Q_VLAN_MASK))
  106. /**
  107. * @def IX_ETH_DB_GET_VLAN_ID
  108. * @brief returns the VLAN ID from the given 802.1Q tag
  109. */
  110. #define IX_ETH_DB_GET_VLAN_ID(vlanTag) ((vlanTag) & IX_ETH_DB_802_1Q_VLAN_MASK)
  111. #define IX_ETH_DB_GET_QOS_PRIORITY(vlanTag) (((vlanTag) >> 13) & IX_ETH_DB_802_1Q_QOS_MASK)
  112. #define IX_ETH_DB_SET_QOS_PRIORITY(vlanTag, priority) (((vlanTag) & 0x1FFF) | (((priority) & IX_ETH_DB_802_1Q_QOS_MASK) << 13))
  113. #define IX_ETH_DB_CHECK_VLAN_TAG(vlanTag) { if(((vlanTag & 0xFFFF0000) != 0) || (IX_ETH_DB_GET_VLAN_ID(vlanTag) > 4094)) return IX_ETH_DB_INVALID_VLAN; }
  114. #define IX_ETH_DB_CHECK_VLAN_ID(vlanId) { if (vlanId > IX_ETH_DB_802_1Q_MAX_VLAN_ID) return IX_ETH_DB_INVALID_VLAN; }
  115. #define IX_IEEE802_1Q_VLAN_TPID (0x8100)
  116. typedef enum
  117. {
  118. IX_ETH_DB_UNTAGGED_FRAMES = 0x1, /**< Accepts untagged frames */
  119. IX_ETH_DB_VLAN_TAGGED_FRAMES = 0x2, /**< Accepts tagged frames */
  120. IX_ETH_DB_PRIORITY_TAGGED_FRAMES = 0x4, /**< Accepts tagged frames with VLAN ID set to 0 (no VLAN membership) */
  121. IX_ETH_DB_ACCEPT_ALL_FRAMES =
  122. IX_ETH_DB_UNTAGGED_FRAMES | IX_ETH_DB_VLAN_TAGGED_FRAMES /**< Accepts all the frames */
  123. } IxEthDBFrameFilter;
  124. typedef enum
  125. {
  126. IX_ETH_DB_PASS_THROUGH = 0x1, /**< Leave frame as-is */
  127. IX_ETH_DB_ADD_TAG = 0x2, /**< Add default port VLAN tag */
  128. IX_ETH_DB_REMOVE_TAG = 0x3 /**< Remove VLAN tag from frame */
  129. } IxEthDBTaggingAction;
  130. typedef enum
  131. {
  132. IX_ETH_DB_FIREWALL_WHITE_LIST = 0x1, /**< Firewall operates in white-list mode (MAC address based admission) */
  133. IX_ETH_DB_FIREWALL_BLACK_LIST = 0x2 /**< Firewall operates in black-list mode (MAC address based blocking) */
  134. } IxEthDBFirewallMode;
  135. typedef enum
  136. {
  137. IX_ETH_DB_FILTERING_RECORD = 0x01, /**< <table><caption> Filtering record </caption>
  138. * <tr><td> MAC address <td> static/dynamic type <td> age
  139. * </table>
  140. */
  141. IX_ETH_DB_FILTERING_VLAN_RECORD = 0x02, /**< <table><caption> VLAN-enabled filtering record </caption>
  142. * <tr><td> MAC address <td> static/dynamic type <td> age <td> 802.1Q tag
  143. * </table>
  144. */
  145. IX_ETH_DB_WIFI_RECORD = 0x04, /**< <table><caption> WiFi header conversion record </caption>
  146. * <tr><td> MAC address <td> optional gateway MAC address <td>
  147. * </table>
  148. */
  149. IX_ETH_DB_FIREWALL_RECORD = 0x08, /**< <table><caption> Firewall record </caption>
  150. * <tr><td> MAC address
  151. * </table>
  152. */
  153. IX_ETH_DB_GATEWAY_RECORD = 0x10, /**< <i>For internal use only</i> */
  154. IX_ETH_DB_MAX_RECORD_TYPE_INDEX = 0x10, /**< <i>For internal use only</i> */
  155. IX_ETH_DB_NO_RECORD_TYPE = 0, /**< None of the registered record types */
  156. IX_ETH_DB_ALL_FILTERING_RECORDS = IX_ETH_DB_FILTERING_RECORD | IX_ETH_DB_FILTERING_VLAN_RECORD, /**< All the filtering records */
  157. IX_ETH_DB_ALL_RECORD_TYPES = IX_ETH_DB_FILTERING_RECORD | IX_ETH_DB_FILTERING_VLAN_RECORD |
  158. IX_ETH_DB_WIFI_RECORD | IX_ETH_DB_FIREWALL_RECORD /**< All the record types registered within EthDB */
  159. } IxEthDBRecordType;
  160. typedef enum
  161. {
  162. IX_ETH_DB_LEARNING = 0x01, /**< Learning feature; enables EthDB to learn MAC address (filtering) records, including 802.1Q enabled records */
  163. IX_ETH_DB_FILTERING = 0x02, /**< Filtering feature; enables EthDB to communicate with the NPEs for downloading filtering information in the NPEs; depends on the learning feature */
  164. IX_ETH_DB_VLAN_QOS = 0x04, /**< VLAN/QoS feature; enables EthDB to configure NPEs to operate in VLAN/QoS aware modes */
  165. IX_ETH_DB_FIREWALL = 0x08, /**< Firewall feature; enables EthDB to configure NPEs to operate in firewall mode, using white/black address lists */
  166. IX_ETH_DB_SPANNING_TREE_PROTOCOL = 0x10, /**< Spanning tree protocol feature; enables EthDB to configure the NPEs as STP nodes */
  167. IX_ETH_DB_WIFI_HEADER_CONVERSION = 0x20 /**< WiFi 802.3 to 802.11 header conversion feature; enables EthDB to handle WiFi conversion data */
  168. } IxEthDBFeature;
  169. typedef UINT32 IxEthDBProperty; /**< Property ID type */
  170. typedef enum
  171. {
  172. IX_ETH_DB_INTEGER_PROPERTY = 0x1, /**< 4 byte unsigned integer type */
  173. IX_ETH_DB_STRING_PROPERTY = 0x2, /**< NULL-terminated string type of maximum 255 characters (including the terminator) */
  174. IX_ETH_DB_MAC_ADDR_PROPERTY = 0x3, /**< 6 byte MAC address type */
  175. IX_ETH_DB_BOOL_PROPERTY = 0x4 /**< 4 byte boolean type; can contain only true and false values */
  176. } IxEthDBPropertyType;
  177. /* list of supported properties for the IX_ETH_DB_VLAN_QOS feature */
  178. #define IX_ETH_DB_QOS_TRAFFIC_CLASS_COUNT_PROPERTY (0x01) /**< Property identifying number the supported number of traffic classes */
  179. #define IX_ETH_DB_QOS_TRAFFIC_CLASS_0_RX_QUEUE_PROPERTY (0x10) /**< Rx queue assigned to traffic class 0 */
  180. #define IX_ETH_DB_QOS_TRAFFIC_CLASS_1_RX_QUEUE_PROPERTY (0x11) /**< Rx queue assigned to traffic class 1 */
  181. #define IX_ETH_DB_QOS_TRAFFIC_CLASS_2_RX_QUEUE_PROPERTY (0x12) /**< Rx queue assigned to traffic class 2 */
  182. #define IX_ETH_DB_QOS_TRAFFIC_CLASS_3_RX_QUEUE_PROPERTY (0x13) /**< Rx queue assigned to traffic class 3 */
  183. #define IX_ETH_DB_QOS_TRAFFIC_CLASS_4_RX_QUEUE_PROPERTY (0x14) /**< Rx queue assigned to traffic class 4 */
  184. #define IX_ETH_DB_QOS_TRAFFIC_CLASS_5_RX_QUEUE_PROPERTY (0x15) /**< Rx queue assigned to traffic class 5 */
  185. #define IX_ETH_DB_QOS_TRAFFIC_CLASS_6_RX_QUEUE_PROPERTY (0x16) /**< Rx queue assigned to traffic class 6 */
  186. #define IX_ETH_DB_QOS_TRAFFIC_CLASS_7_RX_QUEUE_PROPERTY (0x17) /**< Rx queue assigned to traffic class 7 */
  187. /* private property used by EthAcc to indicate queue configuration complete */
  188. #define IX_ETH_DB_QOS_QUEUE_CONFIGURATION_COMPLETE (0x18)
  189. /**
  190. *
  191. * @brief The IEEE 802.3 Ethernet MAC address structure.
  192. *
  193. * The data should be packed with bytes xx:xx:xx:xx:xx:xx
  194. *
  195. * @note The data must be packed in network byte order.
  196. */
  197. typedef struct
  198. {
  199. UINT8 macAddress[IX_IEEE803_MAC_ADDRESS_SIZE];
  200. } IxEthDBMacAddr;
  201. /**
  202. * @ingroup IxEthDB
  203. *
  204. * @brief Definition of an IXP400 port.
  205. */
  206. typedef UINT32 IxEthDBPortId;
  207. /**
  208. * @ingroup IxEthDB
  209. *
  210. * @brief Port dependency map definition
  211. */
  212. typedef UINT8 IxEthDBPortMap[32];
  213. /**
  214. * @ingroup IxEthDB
  215. *
  216. * @fn IxEthDBStatus ixEthDBInit(void)
  217. *
  218. * @brief Initializes the Ethernet learning/filtering database
  219. *
  220. * @note calling this function multiple times does not constitute an error;
  221. * redundant calls will be ignored, returning IX_ETH_DB_SUCCESS
  222. *
  223. * @retval IX_ETH_DB_SUCCESS initialization was successful
  224. * @retval IX_ETH_DB_FAIL initialization failed (OS error)
  225. */
  226. IX_ETH_DB_PUBLIC
  227. IxEthDBStatus ixEthDBInit(void);
  228. /**
  229. * @ingroup IxEthDB
  230. *
  231. * @fn IxEthDBStatus ixEthDBUnload(void)
  232. *
  233. * @brief Stops and prepares the EthDB component for unloading.
  234. *
  235. * @retval IX_ETH_DB_SUCCESS de-initialization was successful
  236. * @retval IX_ETH_DB_BUSY de-initialization failed, ports must be disabled first
  237. * @retval IX_ETH_DB_FAIL de-initialization failed (OS error)
  238. */
  239. IX_ETH_DB_PUBLIC
  240. IxEthDBStatus ixEthDBUnload(void);
  241. /**
  242. * @ingroup IxEthDB
  243. *
  244. * @fn void ixEthDBPortInit(IxEthDBPortId portID)
  245. *
  246. * @brief Initializes a port
  247. *
  248. * This function is called automatically by the Ethernet Access
  249. * ixEthAccPortInit() routine for Ethernet NPE ports and should be manually
  250. * called for any user-defined port (any port that is not one of
  251. * the two Ethernet NPEs).
  252. *
  253. * @param portID @ref IxEthDBPortId [in] - ID of the port to be initialized
  254. *
  255. * @see IxEthDBPortDefs.h for port definitions
  256. *
  257. * @note calling this function multiple times does not constitute an error;
  258. * redundant calls will be ignored
  259. */
  260. IX_ETH_DB_PUBLIC
  261. void ixEthDBPortInit(IxEthDBPortId portID);
  262. /**
  263. * @ingroup IxEthDB
  264. *
  265. * @fn IxEthDBStatus ixEthDBPortEnable(IxEthDBPortId portID)
  266. *
  267. * @brief Enables a port
  268. *
  269. * This function is called automatically from the Ethernet Access component
  270. * ixEthAccPortEnable() routine for Ethernet NPE ports and should be manually
  271. * called for any user-defined port (any port that is not one of
  272. * the Ethernet NPEs).
  273. *
  274. * @param portID @ref IxEthDBPortId [in] - ID of the port to enable processing on
  275. *
  276. * @retval IX_ETH_DB_SUCCESS if enabling is successful
  277. * @retval IX_ETH_DB_FAIL if the enabling was not successful due to
  278. * a message handler error
  279. * @retval IX_ETH_DB_MAC_UNINITIALIZED the MAC address of this port was
  280. * not initialized (only for Ethernet NPEs)
  281. * @retval IX_ETH_DB_INVALID_PORT if portID is invalid
  282. *
  283. * @pre ixEthDBPortAddressSet needs to be called prior to enabling the port events
  284. * for Ethernet NPEs
  285. *
  286. * @see ixEthDBPortAddressSet
  287. *
  288. * @see IxEthDBPortDefs.h for port definitions
  289. *
  290. * @note calling this function multiple times does not constitute an error;
  291. * redundant calls will be ignored
  292. */
  293. IX_ETH_DB_PUBLIC
  294. IxEthDBStatus ixEthDBPortEnable(IxEthDBPortId portID);
  295. /**
  296. * @ingroup IxEthDB
  297. *
  298. * @fn IxEthDBStatus ixEthDBPortDisable(IxEthDBPortId portID)
  299. *
  300. * @brief Disables processing on a port
  301. *
  302. * This function is called automatically from the Ethernet Access component
  303. * ixEthAccPortDisable() routine for Ethernet NPE ports and should be manually
  304. * called for any user-defined port (any port that is not one of
  305. * the Ethernet NPEs).
  306. *
  307. * @note Calling ixEthAccPortDisable() will disable the respective Ethernet NPE.
  308. * After Ethernet NPEs are disabled they are stopped therefore
  309. * when re-enabled they need to be reset, downloaded with microcode and started.
  310. * For learning to restart working the user needs to call again
  311. * ixEthAccPortUnicastMacAddressSet or ixEthDBUnicastAddressSet
  312. * with the respective port MAC address.
  313. * Residual MAC addresses learnt before the port was disabled are deleted as soon
  314. * as the port is disabled. This only applies to dynamic (learnt) entries, static
  315. * entries do not dissapear when the port is disabled.
  316. *
  317. * @param portID @ref IxEthDBPortId [in] - ID of the port to disable processing on
  318. *
  319. * @retval IX_ETH_DB_SUCCESS if disabling is successful
  320. * @retval IX_ETH_DB_FAIL if the disabling was not successful due to
  321. * a message handler error
  322. * @retval IX_ETH_DB_INVALID_PORT if portID is invalid
  323. *
  324. * @note calling this function multiple times after the first time completed successfully
  325. * does not constitute an error; redundant calls will be ignored and return IX_ETH_DB_SUCCESS
  326. */
  327. IX_ETH_DB_PUBLIC
  328. IxEthDBStatus ixEthDBPortDisable(IxEthDBPortId portID);
  329. /**
  330. * @ingroup IxEthDB
  331. *
  332. * @fn IxEthDBStatus ixEthDBPortAddressSet(IxEthDBPortId portID, IxEthDBMacAddr *macAddr)
  333. *
  334. * @brief Sets the port MAC address
  335. *
  336. * This function is to be called from the Ethernet Access component top-level
  337. * ixEthDBUnicastAddressSet(). Event processing cannot be enabled for a port
  338. * until its MAC address has been set.
  339. *
  340. * @param portID @ref IxEthDBPortId [in] - ID of the port whose MAC address is set
  341. * @param macAddr @ref IxEthDBMacAddr [in] - port MAC address
  342. *
  343. * @retval IX_ETH_DB_SUCCESS MAC address was set successfully
  344. * @retval IX_ETH_DB_FAIL MAC address was not set due to a message handler failure
  345. * @retval IX_ETH_DB_INVALID_PORT if the port is not an Ethernet NPE
  346. *
  347. * @see IxEthDBPortDefs.h for port definitions
  348. */
  349. IX_ETH_DB_PUBLIC
  350. IxEthDBStatus ixEthDBPortAddressSet(IxEthDBPortId portID, IxEthDBMacAddr *macAddr);
  351. /**
  352. * @ingroup IxEthDB
  353. *
  354. * @fn IxEthDBStatus ixEthDBFilteringPortMaximumFrameSizeSet(IxEthDBPortId portID, UINT32 maximumFrameSize)
  355. *
  356. * @brief Set the maximum frame size supported on the given port ID
  357. *
  358. * This functions set the maximum frame size supported on a specific port ID
  359. *
  360. * - Reentrant - yes
  361. * - ISR Callable - no
  362. *
  363. * @param portID @ref IxEthDBPortId [in] - port ID to configure
  364. * @param maximumFrameSize UINT32 [in] - maximum frame size to configure
  365. *
  366. * @retval IX_ETH_DB_SUCCESS the port is configured
  367. * @retval IX_ETH_DB_PORT_UNINITIALIZED the port has not been initialized
  368. * @retval IX_ETH_DB_INVALID_PORT portID is invalid
  369. * @retval IX_ETH_DB_INVALID_ARG size parameter is out of range
  370. * @retval IX_ETH_DB_NO_PERMISSION selected port is not an Ethernet NPE
  371. * @retval IX_FAIL unknown OS or NPE communication error
  372. *
  373. * @note
  374. * This maximum frame size is used to filter the frames based on their
  375. * destination addresses and the capabilities of the destination port.
  376. * The mximum value that can be set for a NPE port is 16320.
  377. * (IX_ETHNPE_ACC_FRAME_LENGTH_MAX)
  378. */
  379. IX_ETH_DB_PUBLIC
  380. IxEthDBStatus ixEthDBFilteringPortMaximumFrameSizeSet(IxEthDBPortId portID, UINT32 maximumFrameSize);
  381. /**
  382. * @ingroup IxEthDB
  383. *
  384. * @fn IxEthDBStatus ixEthDBFilteringStaticEntryProvision(IxEthDBPortId portID, IxEthDBMacAddr *macAddr)
  385. *
  386. * @brief Populate the Ethernet learning/filtering database with a static MAC address
  387. *
  388. * Populates the Ethernet learning/filtering database with a static MAC address. The entry will not be subject to aging.
  389. * If there is an entry (static or dynamic) with the corresponding MAC address on any port this entry will take precedence.
  390. * Any other entry with the same MAC address will be removed.
  391. *
  392. * - Reentrant - yes
  393. * - ISR Callable - yes
  394. *
  395. * @param portID @ref IxEthDBPortId [in] - port ID to add the static address to
  396. * @param macAddr @ref IxEthDBMacAddr [in] - static MAC address to add
  397. *
  398. * @retval IX_ETH_DB_SUCCESS the add was successful
  399. * @retval IX_ETH_DB_FAIL failed to populate the database entry
  400. * @retval IX_ETH_DB_BUSY failed due to a temporary busy condition (i.e. lack of CPU cycles), try again later
  401. * @retval IX_ETH_DB_INVALID_PORT portID is invalid
  402. * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
  403. * @retval IX_ETH_DB_INVALID_ARG invalid <i>macAddr</i> pointer argument
  404. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE learning feature is disabled
  405. */
  406. IX_ETH_DB_PUBLIC
  407. IxEthDBStatus ixEthDBFilteringStaticEntryProvision(IxEthDBPortId portID, IxEthDBMacAddr *macAddr);
  408. /**
  409. * @ingroup IxEthDB
  410. *
  411. * @fn IxEthDBStatus ixEthDBFilteringDynamicEntryProvision(IxEthDBPortId portID, IxEthDBMacAddr *macAddr)
  412. *
  413. * @brief Populate the Ethernet learning/filtering database with a dynamic MAC address
  414. *
  415. * Populates the Ethernet learning/filtering database with a dynamic MAC address. This entry will be subject to normal
  416. * aging function, if aging is enabled on its port.
  417. * If there is an entry (static or dynamic) with the same MAC address on any port this entry will take precedence.
  418. * Any other entry with the same MAC address will be removed.
  419. *
  420. * - Reentrant - yes
  421. * - ISR Callable - yes
  422. *
  423. * @param portID @ref IxEthDBPortId [in] - port ID to add the dynamic address to
  424. * @param macAddr @ref IxEthDBMacAddr [in] - static MAC address to add
  425. *
  426. * @retval IX_ETH_DB_SUCCESS the add was successful
  427. * @retval IX_ETH_DB_FAIL failed to populate the database entry
  428. * @retval IX_ETH_DB_BUSY failed due to a temporary busy condition (i.e. lack of CPU cycles), try again later
  429. * @retval IX_ETH_DB_INVALID_PORT portID is invalid
  430. * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
  431. * @retval IX_ETH_DB_INVALID_ARG invalid <i>macAddr</i> pointer argument
  432. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE learning feature is disabled
  433. */
  434. IX_ETH_DB_PUBLIC
  435. IxEthDBStatus ixEthDBFilteringDynamicEntryProvision(IxEthDBPortId portID, IxEthDBMacAddr *macAddr);
  436. /**
  437. * @ingroup IxEthDB
  438. *
  439. * @fn IxEthDBStatus ixEthDBFilteringEntryDelete(IxEthDBMacAddr *macAddr)
  440. *
  441. * @brief Removes a MAC address entry from the Ethernet learning/filtering database
  442. *
  443. * @param macAddr IxEthDBMacAddr [in] - MAC address to remove
  444. *
  445. * - Reentrant - yes
  446. * - ISR Callable - no
  447. *
  448. * @retval IX_ETH_DB_SUCCESS the removal was successful
  449. * @retval IX_ETH_DB_NO_SUCH_ADDR failed to remove the address (not in the database)
  450. * @retval IX_ETH_DB_INVALID_ARG invalid <i>macAddr</i> pointer argument
  451. * @retval IX_ETH_DB_BUSY failed due to a temporary busy condition (i.e. lack of CPU cycles), try again later
  452. */
  453. IX_ETH_DB_PUBLIC
  454. IxEthDBStatus ixEthDBFilteringEntryDelete(IxEthDBMacAddr *macAddr);
  455. /**
  456. * @ingroup IxEthDB
  457. *
  458. * @fn IxEthDBStatus ixEthDBFilteringPortSearch(IxEthDBPortId portID, IxEthDBMacAddr *macAddr)
  459. *
  460. * @brief Search the Ethernet learning/filtering database for the given MAC address and port ID
  461. *
  462. * This functions searches the database for a specific port ID and MAC address. Both the port ID
  463. * and the MAC address have to match in order for the record to be reported as found.
  464. *
  465. * - Reentrant - yes
  466. * - ISR Callable - no
  467. *
  468. * @param portID @ref IxEthDBPortId [in] - port ID to search for
  469. * @param macAddr @ref IxEthDBMacAddr [in] - MAC address to search for
  470. *
  471. * @retval IX_ETH_DB_SUCCESS the record exists in the database
  472. * @retval IX_ETH_DB_INVALID_ARG invalid macAddr pointer argument
  473. * @retval IX_ETH_DB_NO_SUCH_ADDR the record was not found in the database
  474. * @retval IX_ETH_DB_INVALID_PORT portID is invalid
  475. * @retval IX_ETH_DB_PORT_UNINITIALIZED port ID is not initialized
  476. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE learning feature is disabled
  477. */
  478. IX_ETH_DB_PUBLIC
  479. IxEthDBStatus ixEthDBFilteringPortSearch(IxEthDBPortId portID, IxEthDBMacAddr *macAddr);
  480. /**
  481. * @ingroup IxEthDB
  482. *
  483. * @fn IxEthDBStatus ixEthDBFilteringDatabaseSearch(IxEthDBPortId *portID, IxEthDBMacAddr *macAddr)
  484. *
  485. * @brief Search the Ethernet learning/filtering database for a MAC address and return the port ID
  486. *
  487. * Searches the database for a MAC address. The function returns the portID for the
  488. * MAC address record, if found. If no match is found the function returns IX_ETH_DB_NO_SUCH_ADDR.
  489. * The portID is only valid if the function finds a match.
  490. *
  491. * - Reentrant - yes
  492. * - ISR Callable - no
  493. *
  494. * @param portID @ref IxEthDBPortId [in] - port ID the address belongs to (populated only on a successful search)
  495. * @param macAddr @ref IxEthDBMacAddr [in] - MAC address to search for
  496. *
  497. * @retval IX_ETH_DB_SUCCESS the record exists in the database
  498. * @retval IX_ETH_DB_NO_SUCH_ADDR the record was not found in the database
  499. * @retval IX_ETH_DB_INVALID_ARG invalid macAddr or portID pointer argument(s)
  500. */
  501. IX_ETH_DB_PUBLIC
  502. IxEthDBStatus ixEthDBFilteringDatabaseSearch(IxEthDBPortId *portID, IxEthDBMacAddr *macAddr);
  503. /**
  504. * @ingroup IxEthDB
  505. *
  506. * @fn IxEthDBStatus ixEthDBFilteringPortUpdatingSearch(IxEthDBPortId *portID, IxEthDBMacAddr *macAddr)
  507. *
  508. * @brief Search the filtering database for a MAC address, return the port ID and reset the record age
  509. *
  510. * Searches the database for a MAC address. The function returns the portID for the
  511. * MAC address record and resets the entry age to 0, if found.
  512. * If no match is found the function returns IX_ETH_DB_NO_SUCH_ADDR.
  513. * The portID is only valid if the function finds a match.
  514. *
  515. * - Reentrant - yes
  516. * - ISR Callable - no
  517. *
  518. * @retval IX_ETH_DB_SUCCESS the MAC address was found
  519. * @retval IX_ETH_DB_NO_SUCH_ADDR the MAC address was not found
  520. * @retval IX_ETH_DB_INVALID_ARG invalid macAddr or portID pointer argument(s)
  521. */
  522. IX_ETH_DB_PUBLIC
  523. IxEthDBStatus ixEthDBFilteringPortUpdatingSearch(IxEthDBPortId *portID, IxEthDBMacAddr *macAddr);
  524. /**
  525. * @ingroup IxEthDB
  526. *
  527. * @def IX_ETH_DB_MAINTENANCE_TIME
  528. *
  529. * @brief The @ref ixEthDBDatabaseMaintenance must be called by the user at a frequency of
  530. * IX_ETH_DB_MAINTENANCE_TIME
  531. *
  532. */
  533. #define IX_ETH_DB_MAINTENANCE_TIME (1 * 60) /* 1 Minute */
  534. /**
  535. * @ingroup IxEthDB
  536. *
  537. * @def IX_ETH_DB_LEARNING_ENTRY_AGE_TIME
  538. *
  539. * @brief The define specifies the filtering database age entry time. Static entries older than
  540. * IX_ETH_DB_LEARNING_ENTRY_AGE_TIME +/- IX_ETH_DB_MAINTENANCE_TIME shall be removed.
  541. *
  542. */
  543. #define IX_ETH_DB_LEARNING_ENTRY_AGE_TIME (15 * 60 ) /* 15 Mins */
  544. /**
  545. * @ingroup IxEthDB
  546. *
  547. * @fn IxEthDBStatus ixEthDBPortAgingDisable(IxEthDBPortId portID)
  548. *
  549. * @brief Disable the aging function for a specific port
  550. *
  551. * @param portID @ref IxEthDBPortId [in] - port ID to disable aging on
  552. *
  553. * - Reentrant - yes
  554. * - ISR Callable - no
  555. *
  556. * @retval IX_ETH_DB_SUCCESS aging disabled successfully
  557. * @retval IX_ETH_DB_INVALID_PORT portID is invalid
  558. * @retval IX_ETH_DB_PORT_UNINITIALIZED port ID is not initialized
  559. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE learning feature is disabled
  560. */
  561. IX_ETH_DB_PUBLIC
  562. IxEthDBStatus ixEthDBPortAgingDisable(IxEthDBPortId portID);
  563. /**
  564. * @ingroup IxEthDB
  565. *
  566. * @fn IxEthDBStatus ixEthDBPortAgingEnable(IxEthDBPortId portID)
  567. *
  568. * @brief Enable the aging function for a specific port
  569. *
  570. * Enables the aging of dynamic MAC address entries stored in the learning/filtering database
  571. *
  572. * @note The aging function relies on the @ref ixEthDBDatabaseMaintenance being called with a period of
  573. * @ref IX_ETH_DB_MAINTENANCE_TIME seconds.
  574. *
  575. * - Reentrant - yes
  576. * - ISR Callable - no
  577. *
  578. * @param portID @ref IxEthDBPortId [in] - port ID to enable aging on
  579. *
  580. * @retval IX_ETH_DB_SUCCESS aging enabled successfully
  581. * @retval IX_ETH_DB_INVALID_PORT portID is invalid
  582. * @retval IX_ETH_DB_PORT_UNINITIALIZED port ID is not initialized
  583. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE learning feature is disabled
  584. */
  585. IX_ETH_DB_PUBLIC
  586. IxEthDBStatus ixEthDBPortAgingEnable(IxEthDBPortId portID);
  587. /**
  588. * @ingroup IxEthDB
  589. *
  590. * @fn void ixEthDBDatabaseMaintenance(void)
  591. *
  592. * @brief Performs a maintenance operation on the Ethernet learning/filtering database
  593. *
  594. * In order to perform a database maintenance this function must be called every
  595. * @ref IX_ETH_DB_MAINTENANCE_TIME seconds. It should be called regardless of whether learning is
  596. * enabled or not.
  597. *
  598. * - Reentrant - no
  599. * - ISR Callable - no
  600. *
  601. * @note this function call will be ignored if the learning feature is disabled
  602. */
  603. IX_ETH_DB_PUBLIC
  604. void ixEthDBDatabaseMaintenance(void);
  605. /**
  606. * @ingroup IxEthDB
  607. *
  608. * @fn IxEthDBStatus ixEthDBFilteringDatabaseShow(IxEthDBPortId portID)
  609. *
  610. * @brief This function displays the Mac Ethernet MAC address filtering tables.
  611. *
  612. * It displays the MAC address, port ID, entry type (dynamic/static),and age for
  613. * the given port ID.
  614. *
  615. * - Reentrant - no
  616. * - ISR Callable - no
  617. *
  618. * @param portID @ref IxEthDBPortId [in] - port ID to display the MAC address entries
  619. *
  620. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  621. * @retval IX_ETH_DB_INVALID_PORT portID is invalid
  622. * @retval IX_ETH_DB_PORT_UNINITIALIZED port ID is not initialized
  623. * @retval IX_ETH_DB_FAIL record browser failed due to an internal busy or lock condition
  624. *
  625. * @note this function is deprecated and kept for compatibility reasons; use @ref ixEthDBFilteringDatabaseShowRecords instead
  626. *
  627. * @see ixEthDBFilteringDatabaseShowRecords
  628. */
  629. IX_ETH_DB_PUBLIC
  630. IxEthDBStatus ixEthDBFilteringDatabaseShow(IxEthDBPortId portID);
  631. /**
  632. * @ingroup IxEthDB
  633. *
  634. * @fn void ixEthDBFilteringDatabaseShowAll(void)
  635. *
  636. * @brief Displays the MAC address recorded in the filtering database for all registered
  637. * ports (see IxEthDBPortDefs.h), grouped by port ID.
  638. *
  639. * - Reentrant - no
  640. * - ISR Callable - no
  641. *
  642. * @retval void
  643. *
  644. * @note this function is deprecated and kept for compatibility reasons; use @ref ixEthDBFilteringDatabaseShowRecords instead
  645. *
  646. * @see ixEthDBFilteringDatabaseShowRecords
  647. */
  648. IX_ETH_DB_PUBLIC
  649. void ixEthDBFilteringDatabaseShowAll(void);
  650. /**
  651. * @ingroup IxEthDB
  652. *
  653. * @fn IxEthDBStatus ixEthDBFilteringDatabaseShowRecords(IxEthDBPortId portID, IxEthDBRecordType recordFilter)
  654. *
  655. * @brief This function displays per port database records, given a record type filter
  656. *
  657. * The supported record type filters are:
  658. *
  659. * - IX_ETH_DB_FILTERING_RECORD - displays the non-VLAN filtering records (MAC address, age, static/dynamic)
  660. * - IX_ETH_DB_FILTERING_VLAN_RECORD - displays the VLAN filtering records (MAC address, age, static/dynamic, VLAN ID, CFI, QoS class)
  661. * - IX_ETH_DB_FILTERING_RECORD | IX_ETH_DB_FILTERING_VLAN_RECORD - displays the previous two types of records
  662. * - IX_ETH_DB_WIFI_RECORD - displays the WiFi header conversion records (MAC address, optional gateway MAC address) and WiFi header conversion parameters (BBSID, Duration/ID)
  663. * - IX_ETH_DB_FIREWALL_RECORD - displays the firewall MAC address table and firewall operating mode (white list/black list)
  664. * - IX_ETH_DB_ALL_RECORD_TYPES - displays all the record types
  665. * - IX_ETH_DB_NO_RECORD_TYPE - displays only the port status (no records are displayed)
  666. *
  667. * Additionally, the status of each port will be displayed, containg the following information: type, capabilities, enabled status,
  668. * aging enabled status, group membership and maximum frame size.
  669. *
  670. * The port ID can either be an actual port or IX_ETH_DB_ALL_PORTS, in which case the requested information
  671. * will be displayed for all the ports (grouped by port)
  672. *
  673. * - Reentrant - no
  674. * - ISR Callable - no
  675. *
  676. * @param portID ID of the port to display information on (use IX_ETH_DB_ALL_PORTS for all the ports)
  677. * @param recordFilter record type filter
  678. *
  679. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  680. * @retval IX_ETH_DB_INVALID_PORT portID is invalid
  681. * @retval IX_ETH_DB_PORT_UNINITIALIZED port ID is not initialized
  682. */
  683. IX_ETH_DB_PUBLIC
  684. IxEthDBStatus ixEthDBFilteringDatabaseShowRecords(IxEthDBPortId portID, IxEthDBRecordType recordFilter);
  685. /**
  686. * @ingroup IxEthDB
  687. *
  688. * @fn IxEthDBStatus ixEthDBPortDependencyMapSet(IxEthDBPortId portID, IxEthDBPortMap dependencyPortMap)
  689. *
  690. * @brief Sets the dependency port map for a port
  691. *
  692. * @param portID ID of the port to set the dependency map to
  693. * @param dependencyPortMap new dependency map (as bitmap, each bit set indicates a port being included)
  694. *
  695. * This function is used to share filtering information between ports.
  696. * By adding a port into another port's dependency map the target port
  697. * filtering data will import the filtering data from the port it depends on.
  698. * Any changes to filtering data for a port - such as adding, updating or removing records -
  699. * will trigger updates in the filtering information for all the ports depending on
  700. * on the updated port.
  701. *
  702. * For example, if ports 2 and 3 are set in the port 0 dependency map the filtering
  703. * information for port 0 will also include the filtering information from ports 2 and 3.
  704. * Adding a record to port 2 will also trigger an update not only on port 2 but also on
  705. * port 0.
  706. *
  707. * The dependency map is a 256 bit array where each bit corresponds to a port corresponding to the
  708. * bit offset (bit 0 - port 0, bit 1 - port 1 etc). Setting a bit to 1 indicates that the corresponding
  709. * port is the port map. For example, a dependency port map of 0x14 consists in the ports with IDs 2 and 4.
  710. * Note that the last bit (offset 255) is reserved and should never be set (it will be automatically
  711. * cleared by the function).
  712. *
  713. * By default, each port has a dependency port map consisting only of itself, i.e.
  714. *
  715. * @verbatim
  716. IxEthDBPortMap portMap;
  717. // clear all ports from port map
  718. memset(portMap, 0, sizeof (portMap));
  719. // include portID in port map
  720. portMap[portID / 8] = 1 << (portID % 8);
  721. @endverbatim
  722. *
  723. * - Reentrant - no
  724. * - ISR Callable - no
  725. *
  726. * @note Setting dependency maps is useful for NPE ports, which benefit from automatic updates
  727. * of filtering information. Setting dependency maps for user-defined ports is not an error
  728. * but will have no actual effect.
  729. *
  730. * @note Including a port in its own dependency map is not compulsory, however note that
  731. * in this case updating the port will not trigger an update on the port itself, which
  732. * might not be the intended behavior
  733. *
  734. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  735. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  736. * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
  737. * @retval IX_ETH_DB_INVALID_ARG invalid <i>dependencyPortMap</i> pointer
  738. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE Filtering is not available or not enabled for the port
  739. */
  740. IX_ETH_DB_PUBLIC
  741. IxEthDBStatus ixEthDBPortDependencyMapSet(IxEthDBPortId portID, IxEthDBPortMap dependencyPortMap);
  742. /**
  743. * @ingroup IxEthDB
  744. *
  745. * @fn IxEthDBStatus ixEthDBPortDependencyMapGet(IxEthDBPortId portID, IxEthDBPortMap dependencyPortMap)
  746. *
  747. * @brief Retrieves the dependency port map for a port
  748. *
  749. * @param portID ID of the port to set the dependency map to
  750. * @param dependencyPortMap location where the port dependency map is to be copied
  751. *
  752. * This function will copy the port dependency map to a user specified location.
  753. *
  754. * - Reentrant - no
  755. * - ISR Callable - no
  756. *
  757. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  758. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  759. * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
  760. * @retval IX_ETH_DB_INVALID_ARG invalid <i>dependencyPortMap</i> pointer
  761. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE Filtering is not available or not enabled for the port
  762. */
  763. IX_ETH_DB_PUBLIC
  764. IxEthDBStatus ixEthDBPortDependencyMapGet(IxEthDBPortId portID, IxEthDBPortMap dependencyPortMap);
  765. /**
  766. * @ingroup IxEthDB
  767. *
  768. * @fn IxEthDBStatus ixEthDBPortVlanTagSet(IxEthDBPortId portID, IxEthDBVlanTag vlanTag)
  769. *
  770. * @brief Sets the default 802.1Q VLAN tag for a given port
  771. *
  772. * @param portID @ref IxEthDBPortId [in] - ID of the port to set the default VLAN tag to
  773. * @param vlanTag @ref IxEthDBVlanTag [in] - default 802.1Q VLAN tag
  774. *
  775. * The tag format has 16 bits and it is defined in the IEEE802.1Q specification.
  776. * This tag will be used for tagging untagged frames (if enabled) and classifying
  777. * unexpedited traffic into an internal traffic class (using the user priority field).
  778. *
  779. * <table border="1"> <caption> 802.1Q tag format </caption>
  780. * <tr> <td> <b> 3 bits <td> <b> 1 bit <td> <b> 12 bits </b>
  781. * <tr> <td> user priority <td> CFI <td> VID
  782. * </table>
  783. *
  784. * User Priority : Defines user priority, giving eight (2^3) priority levels. IEEE 802.1P defines
  785. * the operation for these 3 user priority bits
  786. *
  787. * CFI : Canonical Format Indicator is always set to zero for Ethernet switches. CFI is used for
  788. * compatibility reason between Ethernet type network and Token Ring type network. If a frame received
  789. * at an Ethernet port has a CFI set to 1, then that frame should not be forwarded as it is to an untagged port.
  790. *
  791. * VID : VLAN ID is the identification of the VLAN, which is basically used by the standard 802.1Q.
  792. * It has 12 bits and allow the id entification of 4096 (2^12) VLANs. Of the 4096 possible VIDs, a VID of 0
  793. * is used to identify priority frames and value 4095 (FFF) is reserved, so the maximum possible VLAN
  794. * configurations are 4,094.
  795. *
  796. * - Reentrant - no
  797. * - ISR Callable - no
  798. *
  799. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  800. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  801. * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
  802. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
  803. * @retval IX_ETH_DB_INVALID_VLAN <i>vlanTag</i> argument does not parse to a valid 802.1Q VLAN tag
  804. *
  805. * @note a VLAN ID value of 0 indicates that the port is not part of any VLAN
  806. * @note the value of the cannonical frame indicator (CFI) field is ignored, the
  807. * field being used only in frame tagging operations
  808. */
  809. IX_ETH_DB_PUBLIC
  810. IxEthDBStatus ixEthDBPortVlanTagSet(IxEthDBPortId portID, IxEthDBVlanTag vlanTag);
  811. /**
  812. * @ingroup IxEthDB
  813. *
  814. * @fn IxEthDBStatus ixEthDBPortVlanTagGet(IxEthDBPortId portID, IxEthDBVlanTag *vlanTag)
  815. *
  816. * @brief Retrieves the default 802.1Q port VLAN tag for a given port (see also @ref ixEthDBPortVlanTagSet)
  817. *
  818. * @param portID @ref IxEthDBPortId [in] - ID of the port to retrieve the default VLAN tag from
  819. * @param vlanTag @ref IxEthDBVlanTag [out] - location to write the default port 802.1Q VLAN tag to
  820. *
  821. * - Reentrant - no
  822. * - ISR Callable - no
  823. *
  824. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  825. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  826. * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
  827. * @retval IX_ETH_DB_INVALID_ARG invalid vlanTag pointer
  828. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
  829. */
  830. IX_ETH_DB_PUBLIC
  831. IxEthDBStatus ixEthDBPortVlanTagGet(IxEthDBPortId portID, IxEthDBVlanTag *vlanTag);
  832. /**
  833. * @ingroup IxEthDB
  834. *
  835. * @fn IxEthDBStatus ixEthDBVlanTagSet(IxEthDBMacAddr *macAddr, IxEthDBVlanTag vlanTag)
  836. *
  837. * @brief Sets the 802.1Q VLAN tag for a database record
  838. *
  839. * @param macAddr MAC address
  840. * @param vlanTag 802.1Q VLAN tag
  841. *
  842. * This function is used together with @ref ixEthDBVlanTagGet to provide MAC-based VLAN classification support.
  843. * Please note that the bridging application must contain specific code to make use of this feature (see below).
  844. *
  845. * VLAN tags can be set only in IX_ETH_DB_FILTERING_RECORD or IX_ETH_DB_FILTERING_VLAN_RECORD type records.
  846. * If to an IX_ETH_DB_FILTERING_RECORD type record is added a VLAN tag the record type is automatically
  847. * changed to IX_ETH_DB_FILTERING_VLAN_RECORD. Once this has occurred the record type will never
  848. * revert to a non-VLAN type (unless deleted and re-added).
  849. *
  850. * Record types used for different purposes (such as IX_ETH_DB_WIFI_RECORD) will be ignored by
  851. * this function.
  852. *
  853. * After using this function to associate a VLAN ID with a MAC address the VLAN ID can be extracted knowing the
  854. * MAC address using @ref ixEthDBVlanTagGet. This mechanism can be used to implement MAC-based VLAN classification
  855. * if a bridging application searches for the VLAN tag when receiving a frame based on the source MAC address
  856. * (contained in the <i>ixp_ne_src_mac</i> field of the buffer header).
  857. * If found in the database, the application can instruct the NPE to tag the frame by writing the VLAN tag
  858. * in the <i>ixp_ne_vlan_tci</i> field of the buffer header. This way the NPE will inspect the Egress tagging
  859. * rule associated with the given VLAN ID on the Tx port and tag the frame if Egress tagging on the VLAN is
  860. * allowed. Additionally, Egress tagging can be forced by setting the <i>ixp_ne_tx_flags.tag_over</i> and
  861. * <i>ixp_ne_tx_flags.tag_mode</i> flags in the buffer header.
  862. *
  863. * - Reentrant - no
  864. * - ISR Callable - no
  865. *
  866. * @note this function will <b>not</b> add a filtering record, it can only be used to update an existing one
  867. *
  868. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  869. * @retval IX_ETH_DB_INVALID_ARG invalid <i>macAddr</i> pointer
  870. * @retval IX_ETH_DB_NO_SUCH_ADDR a filtering record with the specified MAC address was not found
  871. * @retval IX_ETH_DB_INVALID_VLAN <i>vlanTag</i> argument does not parse to a valid 802.1Q VLAN tag
  872. */
  873. IX_ETH_DB_PUBLIC
  874. IxEthDBStatus ixEthDBVlanTagSet(IxEthDBMacAddr *macAddr, IxEthDBVlanTag vlanTag);
  875. /**
  876. * @ingroup IxEthDB
  877. *
  878. * @fn ixEthDBVlanTagGet(IxEthDBMacAddr *macAddr, IxEthDBVlanTag *vlanTag)
  879. *
  880. * @brief Retrieves the 802.1Q VLAN tag from a database record given the record MAC address
  881. *
  882. * @param macAddr MAC address
  883. * @param vlanTag location to write the record 802.1Q VLAN tag to
  884. *
  885. * @note VLAN tags can be retrieved only from IX_ETH_DB_FILTERING_VLAN_RECORD type records
  886. *
  887. * This function is used together with ixEthDBVlanTagSet to provide MAC-based VLAN classification support.
  888. * Please note that the bridging application must contain specific code to make use of this feature (see @ref ixEthDBVlanTagSet).
  889. *
  890. * - Reentrant - no
  891. * - ISR Callable - no
  892. *
  893. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  894. * @retval IX_ETH_DB_INVALID_ARG invalid <i>macAddr</i> or <i>vlanTag</i> pointer
  895. * @retval IX_ETH_DB_NO_SUCH_ADDR a filtering record with the specified MAC address was not found
  896. */
  897. IX_ETH_DB_PUBLIC
  898. IxEthDBStatus ixEthDBVlanTagGet(IxEthDBMacAddr *macAddr, IxEthDBVlanTag *vlanTag);
  899. /**
  900. * @ingroup IxEthDB
  901. *
  902. * @fn IxEthDBStatus ixEthDBPortVlanMembershipAdd(IxEthDBPortId portID, IxEthDBVlanId vlanID)
  903. *
  904. * @brief Adds a VLAN ID to a port's VLAN membership table
  905. *
  906. * Adding a VLAN ID to a port's VLAN membership table will cause frames tagged with the specified
  907. * VLAN ID to be accepted by the frame filter, if Ingress VLAN membership filtering is enabled.
  908. *
  909. * - Reentrant - no
  910. * - ISR Callable - no
  911. *
  912. * @param portID @ref IxEthDBPortId [in] - ID of the port to add the VLAN ID membership to
  913. * @param vlanID @ref IxEthDBVlanId [in] - VLAN ID to be added to the port membership table
  914. *
  915. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  916. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  917. * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
  918. * @retval IX_ETH_DB_INVALID_VLAN vlanID is not a valid VLAN ID
  919. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
  920. * @retval IX_FAIL unknown OS or NPE communication error
  921. *
  922. * @note A port's default VLAN ID is always in its own membership table, hence there
  923. * is no need to explicitly add it using this function (although it is not an error
  924. * to do so)
  925. */
  926. IX_ETH_DB_PUBLIC
  927. IxEthDBStatus ixEthDBPortVlanMembershipAdd(IxEthDBPortId portID, IxEthDBVlanId vlanID);
  928. /**
  929. * @ingroup IxEthDB
  930. *
  931. * @fn IxEthDBStatus ixEthDBPortVlanMembershipRangeAdd(IxEthDBPortId portID, IxEthDBVlanId vlanIDMin, IxEthDBVlanId vlanIDMax)
  932. *
  933. * @brief Adds a VLAN ID range to a port's VLAN membership table
  934. *
  935. * All the VLAN IDs in the specified range will be added to the port VLAN
  936. * membership table, including the range start and end VLAN IDs. Tagged frames with
  937. * VLAN IDs in the specified range will be accepted by the frame filter, if Ingress VLAN
  938. * membership filtering is enabled.
  939. *
  940. * - Reentrant - no
  941. * - ISR Callable - no
  942. *
  943. * @param portID @ref IxEthDBPortId [in] - port ID to add the VLAN membership range into
  944. * @param vlanIDMin @ref IxEthDBVlanId [in] - start of the VLAN ID range
  945. * @param vlanIDMax @ref IxEthDBVlanId [in] - end of the VLAN ID range
  946. *
  947. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  948. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  949. * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
  950. * @retval IX_ETH_DB_INVALID_VLAN the specified VLAN IDs are invalid or do not constitute a range
  951. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
  952. * @retval IX_FAIL unknown OS or NPE communication error
  953. *
  954. * @note Is is valid to use the same VLAN ID for both vlanIDMin and vlanIDMax, in which case this
  955. * function will behave as @ref ixEthDBPortVlanMembershipAdd
  956. *
  957. * @note A port's default VLAN ID is always in its own membership table, hence there is no need
  958. * to explicitly add it using this function (although it is not an error to do so)
  959. */
  960. IX_ETH_DB_PUBLIC
  961. IxEthDBStatus ixEthDBPortVlanMembershipRangeAdd(IxEthDBPortId portID, IxEthDBVlanId vlanIDMin, IxEthDBVlanId vlanIDMax);
  962. /**
  963. * @ingroup IxEthDB
  964. *
  965. * @fn IxEthDBStatus ixEthDBPortVlanMembershipRemove(IxEthDBPortId portID, IxEthDBVlanId vlanID)
  966. *
  967. * @brief Removes a VLAN ID from a port's VLAN membership table
  968. *
  969. * Frames tagged with a VLAN ID which is not in a port's VLAN membership table
  970. * will be discarded by the frame filter, if Ingress membership filtering is enabled.
  971. *
  972. * - Reentrant - no
  973. * - ISR Callable - no
  974. *
  975. * @param portID @ref IxEthDBPortId [in] - ID of the port to remove the VLAN ID membership from
  976. * @param vlanID @ref IxEthDBVlanId [in] - VLAN ID to be removed from the port membership table
  977. *
  978. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  979. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  980. * @retval IX_ETH_DB_INVALID_VLAN vlanID is not a valid VLAN ID
  981. * @retval IX_ETH_DB_NO_PERMISSION attempted to remove the default VLAN ID
  982. * from the port membership table (vlanID was set to the default port VLAN ID)
  983. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
  984. * @retval IX_FAIL unknown OS or NPE communication error
  985. *
  986. * @note A port's default VLAN ID cannot be removed from the port's membership
  987. * table; attempting it will return IX_ETH_DB_NO_PERMISSION
  988. */
  989. IX_ETH_DB_PUBLIC
  990. IxEthDBStatus ixEthDBPortVlanMembershipRemove(IxEthDBPortId portID, IxEthDBVlanId vlanID);
  991. /**
  992. * @ingroup IxEthDB
  993. *
  994. * @fn IxEthDBStatus ixEthDBPortVlanMembershipRangeRemove(IxEthDBPortId portID, IxEthDBVlanId vlanIDMin, IxEthDBVlanId vlanIDMax)
  995. *
  996. * @brief Removes a VLAN ID range from a port's VLAN membership table
  997. *
  998. * All the VLAN IDs in the specified range will be removed from the port VLAN
  999. * membership table, including the range start and end VLAN IDs. Tagged frames
  1000. * with VLAN IDs in the range will be discarded by the frame filter, if Ingress
  1001. * membership filtering is enabled.
  1002. *
  1003. * - Reentrant - no
  1004. * - ISR Callable - no
  1005. *
  1006. * @param portID @ref IxEthDBPortId [in] - ID of the port to remove the VLAN membership range from
  1007. * @param vlanIDMin @ref IxEthDBVlanId [in] - start of the VLAN ID range
  1008. * @param vlanIDMax @ref IxEthDBVlanId [in] - end of the VLAN ID range
  1009. *
  1010. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  1011. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  1012. * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
  1013. * @retval IX_ETH_DB_INVALID_VLAN the specified VLAN IDs are invalid or do not constitute a range
  1014. * @retval IX_ETH_DB_NO_PERMISSION attempted to remove the default VLAN ID
  1015. * from the port membership table (both vlanIDMin and vlanIDMax were set to the default port VLAN ID)
  1016. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
  1017. * @retval IX_FAIL unknown OS or NPE communication error
  1018. *
  1019. * @note Is is valid to use the same VLAN ID for both vlanIDMin and vlanIDMax, in which case
  1020. * function will behave as @ref ixEthDBPortVlanMembershipRemove
  1021. *
  1022. * @note If the given range overlaps the default port VLAN ID this function
  1023. * will remove all the VLAN IDs in the range except for the port VLAN ID from its
  1024. * own membership table. This situation will be silently dealt with (no error message
  1025. * will be returned) as long as the range contains more than one value (i.e. at least
  1026. * one other value, apart from the default port VLAN ID). If the function is called
  1027. * with the vlanIDMin and vlanIDMax parameters both set to the port default VLAN ID, the
  1028. * function will infer that an attempt was specifically made to remove the default port
  1029. * VLAN ID from the port membership table, in which case the return value will be
  1030. * IX_ETH_DB_NO_PERMISSION.
  1031. */
  1032. IX_ETH_DB_PUBLIC
  1033. IxEthDBStatus ixEthDBPortVlanMembershipRangeRemove(IxEthDBPortId portID, IxEthDBVlanId vlanIDMin, IxEthDBVlanId vlanIDMax);
  1034. /**
  1035. * @ingroup IxEthDB
  1036. *
  1037. * @fn IxEthDBStatus ixEthDBPortVlanMembershipSet(IxEthDBPortId portID, IxEthDBVlanSet vlanSet)
  1038. *
  1039. * @brief Sets a port's VLAN membership table
  1040. *
  1041. * Sets a port's VLAN membership table from a complete VLAN table containing all the possible
  1042. * 4096 VLAN IDs. The table format is an array containing 4096 bits (512 bytes), where each bit
  1043. * indicates whether the VLAN at that bit index is in the port's membership list (if set) or
  1044. * not (unset).
  1045. *
  1046. * The bit at index 0, indicating VLAN ID 0, indicates no VLAN membership and therefore no
  1047. * other bit must be set if bit 0 is set.
  1048. *
  1049. * The bit at index 4095 is reserved and should never be set (it will be ignored if set).
  1050. *
  1051. * The bit referencing the same VLAN ID as the default port VLAN ID should always be set, as
  1052. * the membership list must contain at least the default port VLAN ID.
  1053. *
  1054. * - Reentrant - no
  1055. * - ISR Callable - no
  1056. *
  1057. * @param portID @ref IxEthDBPortId [in] - port ID to set the VLAN membership table to
  1058. * @param vlanSet @ref IxEthDBVlanSet [in] - pointer to the VLAN membership table
  1059. *
  1060. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  1061. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  1062. * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
  1063. * @retval IX_ETH_DB_INVALID_ARG invalid <i>vlanSet</i> pointer
  1064. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
  1065. * @retval IX_FAIL unknown OS or NPE communication error
  1066. */
  1067. IX_ETH_DB_PUBLIC
  1068. IxEthDBStatus ixEthDBPortVlanMembershipSet(IxEthDBPortId portID, IxEthDBVlanSet vlanSet);
  1069. /**
  1070. * @ingroup IxEthDB
  1071. *
  1072. * @fn IxEthDBStatus ixEthDBPortVlanMembershipGet(IxEthDBPortId portID, IxEthDBVlanSet vlanSet)
  1073. *
  1074. * @brief Retrieves a port's VLAN membership table
  1075. *
  1076. * Retrieves the complete VLAN membership table from a port, containing all the possible
  1077. * 4096 VLAN IDs. The table format is an array containing 4096 bits (512 bytes), where each bit
  1078. * indicates whether the VLAN at that bit index is in the port's membership list (if set) or
  1079. * not (unset).
  1080. *
  1081. * The bit at index 0, indicating VLAN ID 0, indicates no VLAN membership and therefore no
  1082. * other bit will be set if bit 0 is set.
  1083. *
  1084. * The bit at index 4095 is reserved and will not be set (it will be ignored if set).
  1085. *
  1086. * The bit referencing the same VLAN ID as the default port VLAN ID will always be set, as
  1087. * the membership list must contain at least the default port VLAN ID.
  1088. *
  1089. * - Reentrant - no
  1090. * - ISR Callable - no
  1091. *
  1092. * @param portID @ref IxEthDBPortId [in] - port ID to retrieve the VLAN membership table from
  1093. * @param vlanSet @ref IxEthDBVlanSet [out] - pointer a location where the VLAN membership table will be
  1094. * written to
  1095. *
  1096. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  1097. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  1098. * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
  1099. * @retval IX_ETH_DB_INVALID_ARG invalid <i>vlanSet</i> pointer
  1100. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
  1101. */
  1102. IX_ETH_DB_PUBLIC
  1103. IxEthDBStatus ixEthDBPortVlanMembershipGet(IxEthDBPortId portID, IxEthDBVlanSet vlanSet);
  1104. /**
  1105. * @ingroup IxEthDB
  1106. *
  1107. * @fn IxEthDBStatus ixEthDBAcceptableFrameTypeSet(IxEthDBPortId portID, IxEthDBFrameFilter frameFilter)
  1108. *
  1109. * @brief Sets a port's acceptable frame type filter
  1110. *
  1111. * The acceptable frame type is one (or a combination) of the following values:
  1112. * - IX_ETH_DB_ACCEPT_ALL_FRAMES - accepts all the frames
  1113. * - IX_ETH_DB_UNTAGGED_FRAMES - accepts untagged frames
  1114. * - IX_ETH_DB_VLAN_TAGGED_FRAMES - accepts tagged frames
  1115. * - IX_ETH_DB_PRIORITY_TAGGED_FRAMES - accepts tagged frames with VLAN ID set to 0 (no VLAN membership)
  1116. *
  1117. * Except for using the exact values given above only the following combinations are valid:
  1118. * - IX_ETH_DB_UNTAGGED_FRAMES | IX_ETH_DB_VLAN_TAGGED_FRAMES
  1119. * - IX_ETH_DB_UNTAGGED_FRAMES | IX_ETH_DB_PRIORITY_TAGGED_FRAMES
  1120. *
  1121. * Please note that IX_ETH_DB_UNTAGGED_FRAMES | IX_ETH_DB_VLAN_TAGGED_FRAMES is equivalent
  1122. * to IX_ETH_DB_ACCEPT_ALL_FRAMES.
  1123. *
  1124. * - Reentrant - no
  1125. * - ISR Callable - no
  1126. *
  1127. * @note by default the acceptable frame type filter is set to IX_ETH_DB_ACCEPT_ALL_FRAMES
  1128. *
  1129. * @note setting the acceptable frame type to PRIORITY_TAGGED_FRAMES is internally
  1130. * accomplished by changing the frame filter to VLAN_TAGGED_FRAMES and setting the
  1131. * VLAN membership list to include only VLAN ID 0; the membership list will need
  1132. * to be restored manually to an appropriate value if the acceptable frame type
  1133. * filter is changed back to ACCEPT_ALL_FRAMES or VLAN_TAGGED_FRAMES; failure to do so
  1134. * will filter all VLAN traffic bar frames tagged with VLAN ID 0
  1135. *
  1136. * @param portID @ref IxEthDBPortId [in] - port ID to set the acceptable frame type filter to
  1137. * @param frameFilter @ref IxEthDBFrameFilter [in] - acceptable frame type filter
  1138. *
  1139. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  1140. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  1141. * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
  1142. * @retval IX_ETH_DB_INVALID_ARG invalid frame type filter
  1143. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
  1144. * @retval IX_FAIL unknown OS or NPE communication error
  1145. */
  1146. IX_ETH_DB_PUBLIC
  1147. IxEthDBStatus ixEthDBAcceptableFrameTypeSet(IxEthDBPortId portID, IxEthDBFrameFilter frameFilter);
  1148. /**
  1149. * @ingroup IxEthDB
  1150. *
  1151. * @fn IxEthDBStatus ixEthDBAcceptableFrameTypeGet(IxEthDBPortId portID, IxEthDBFrameFilter *frameFilter)
  1152. *
  1153. * @brief Retrieves a port's acceptable frame type filter
  1154. *
  1155. * For a description of the acceptable frame types see @ref ixEthDBAcceptableFrameTypeSet
  1156. *
  1157. * - Reentrant - no
  1158. * - ISR Callable - no
  1159. *
  1160. * @param portID @ref IxEthDBPortId [in] - port ID to retrieve the acceptable frame type filter from
  1161. * @param frameFilter @ref IxEthDBFrameFilter [out] - location to store the acceptable frame type filter
  1162. *
  1163. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  1164. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  1165. * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
  1166. * @retval IX_ETH_DB_INVALID_ARG invalid <i>frameFilter</i> pointer argument
  1167. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
  1168. */
  1169. IX_ETH_DB_PUBLIC
  1170. IxEthDBStatus ixEthDBAcceptableFrameTypeGet(IxEthDBPortId portID, IxEthDBFrameFilter *frameFilter);
  1171. /**
  1172. * @ingroup IxEthDB
  1173. *
  1174. * @fn IxEthDBStatus ixEthDBPriorityMappingTableSet(IxEthDBPortId portID, IxEthDBPriorityTable priorityTable)
  1175. *
  1176. * @brief Sets a port's priority mapping table
  1177. *
  1178. * The priority mapping table is an 8x2 table mapping a QoS (user) priority into an internal
  1179. * traffic class. There are 8 valid QoS priorities (0..7, 0 being the lowest) which can be
  1180. * mapped into one of the 4 available traffic classes (0..3, 0 being the lowest).
  1181. * If a custom priority mapping table is not specified using this function the following
  1182. * default priority table will be used (as per IEEE 802.1Q and IEEE 802.1D):
  1183. *
  1184. * <table border="1"> <caption> QoS traffic classes </caption>
  1185. * <tr> <td> <b> QoS priority <td> <b> Default traffic class <td> <b> Traffic type </b>
  1186. * <tr> <td> 0 <td> 1 <td> Best effort, default class for unexpedited traffic
  1187. * <tr> <td> 1 <td> 0 <td> Background traffic
  1188. * <tr> <td> 2 <td> 0 <td> Spare bandwidth
  1189. * <tr> <td> 3 <td> 1 <td> Excellent effort
  1190. * <tr> <td> 4 <td> 2 <td> Controlled load
  1191. * <tr> <td> 5 <td> 2 <td> Video traffic
  1192. * <tr> <td> 6 <td> 3 <td> Voice traffic
  1193. * <tr> <td> 7 <td> 3 <td> Network control
  1194. * </table>
  1195. *
  1196. * - Reentrant - no
  1197. * - ISR Callable - no
  1198. *
  1199. * @param portID @ref IxEthDBPortId [in] - port ID of the port to set the priority mapping table to
  1200. * @param priorityTable @ref IxEthDBPriorityTable [in] - location of the user priority table
  1201. *
  1202. * @note The provided table will be copied into internal data structures in EthDB and
  1203. * can be deallocated by the called after this function has completed its execution, if
  1204. * so desired
  1205. *
  1206. * @warning The number of available traffic classes differs depending on the NPE images
  1207. * and queue configuration. Check IxEthDBQoS.h for up-to-date information on the availability of
  1208. * traffic classes. Note that specifiying a traffic class in the priority map which exceeds
  1209. * the system availability will produce an IX_ETH_DB_INVALID_PRIORITY return error code and no
  1210. * priority will be remapped.
  1211. *
  1212. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  1213. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  1214. * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
  1215. * @retval IX_ETH_DB_INVALID_ARG invalid <i>priorityTable</i> pointer
  1216. * @retval IX_ETH_DB_INVALID_PRIORITY at least one priority value exceeds
  1217. * the current number of available traffic classes
  1218. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
  1219. * @retval IX_FAIL unknown OS or NPE communication error
  1220. */
  1221. IX_ETH_DB_PUBLIC
  1222. IxEthDBStatus ixEthDBPriorityMappingTableSet(IxEthDBPortId portID, IxEthDBPriorityTable priorityTable);
  1223. /**
  1224. * @ingroup IxEthDB
  1225. *
  1226. * @fn IxEthDBStatus ixEthDBPriorityMappingTableGet(IxEthDBPortId portID, IxEthDBPriorityTable priorityTable)
  1227. *
  1228. * @brief Retrieves a port's priority mapping table
  1229. *
  1230. * The priority mapping table for the given port will be copied in the location
  1231. * specified by the caller using "priorityTable"
  1232. *
  1233. * - Reentrant - no
  1234. * - ISR Callable - no
  1235. *
  1236. * @param portID ID @ref IxEthDBPortId [in] - of the port to retrieve the priority mapping table from
  1237. * @param priorityTable @ref IxEthDBPriorityTable [out] - pointer to a user specified location where the table will be copied to
  1238. *
  1239. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  1240. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  1241. * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
  1242. * @retval IX_ETH_DB_INVALID_ARG invalid priorityTable pointer
  1243. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
  1244. */
  1245. IX_ETH_DB_PUBLIC
  1246. IxEthDBStatus ixEthDBPriorityMappingTableGet(IxEthDBPortId portID, IxEthDBPriorityTable priorityTable);
  1247. /**
  1248. * @ingroup IxEthDB
  1249. *
  1250. * @fn IxEthDBStatus ixEthDBPriorityMappingClassSet(IxEthDBPortId portID, IxEthDBPriority userPriority, IxEthDBPriority trafficClass)
  1251. *
  1252. * @brief Sets one QoS/user priority => traffic class mapping in a port's priority mapping table
  1253. *
  1254. * This function establishes a mapping between a user (QoS) priority and an internal traffic class.
  1255. * The mapping will be saved in the port's priority mapping table. Use this function when not all
  1256. * the QoS priorities need remapping (see also @ref ixEthDBPriorityMappingTableSet)
  1257. *
  1258. * - Reentrant - no
  1259. * - ISR Callable - no
  1260. *
  1261. * @param portID @ref IxEthDBPortId [in] - ID of the port to set the mapping to
  1262. * @param userPriority @ref IxEthDBPriority [in] - user (QoS) priority, between 0 and 7 (0 being the lowest)
  1263. * @param trafficClass @ref IxEthDBPriority [in] - internal traffic class, between 0 and 3 (0 being the lowest)
  1264. *
  1265. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  1266. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  1267. * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
  1268. * @retval IX_ETH_DB_INVALID_PRIORITY <i>userPriority</i> out of range or
  1269. * <i>trafficClass</i> is beyond the number of currently available traffic classes
  1270. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
  1271. * @retval IX_FAIL unknown OS or NPE communication error
  1272. */
  1273. IX_ETH_DB_PUBLIC
  1274. IxEthDBStatus ixEthDBPriorityMappingClassSet(IxEthDBPortId portID, IxEthDBPriority userPriority, IxEthDBPriority trafficClass);
  1275. /**
  1276. * @ingroup IxEthDB
  1277. *
  1278. * @fn IxEthDBStatus ixEthDBPriorityMappingClassGet(IxEthDBPortId portID, IxEthDBPriority userPriority, IxEthDBPriority *trafficClass)
  1279. *
  1280. * @brief Retrieves one QoS/user priority => traffic class mapping in a port's priority mapping table
  1281. *
  1282. * This function retrieves the internal traffic class associated with a QoS (user) priority from a given
  1283. * port's priority mapping table. Use this function when not all the QoS priority mappings are
  1284. * required (see also @ref ixEthDBPriorityMappingTableGet)
  1285. *
  1286. * - Reentrant - no
  1287. * - ISR Callable - no
  1288. *
  1289. * @param portID @ref IxEthDBPortId [in] - ID of the port to set the mapping to
  1290. * @param userPriority @ref IxEthDBPriority [in] - user (QoS) priority, between 0 and 7 (0 being the lowest)
  1291. * @param trafficClass @ref IxEthDBPriority [out] - location to write the corresponding internal traffic class to
  1292. *
  1293. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  1294. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  1295. * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
  1296. * @retval IX_ETH_DB_INVALID_PRIORITY invalid userPriority value (out of range)
  1297. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
  1298. * @retval IX_ETH_DB_INVALID_ARG invalid <i>trafficClass</i> pointer argument
  1299. */
  1300. IX_ETH_DB_PUBLIC
  1301. IxEthDBStatus ixEthDBPriorityMappingClassGet(IxEthDBPortId portID, IxEthDBPriority userPriority, IxEthDBPriority *trafficClass);
  1302. /**
  1303. * @ingroup IxEthDB
  1304. *
  1305. * @fn IxEthDBStatus ixEthDBEgressVlanEntryTaggingEnabledSet(IxEthDBPortId portID, IxEthDBVlanId vlanID, BOOL enabled)
  1306. *
  1307. * @brief Enables or disables Egress VLAN tagging for a port and a given VLAN
  1308. *
  1309. * This function enables or disables Egress VLAN tagging for the given port and VLAN ID.
  1310. * If the VLAN tagging for a certain VLAN ID is enabled then all the frames to be
  1311. * transmitted on the given port tagged with the same VLAN ID will be transmitted in a tagged format.
  1312. * If tagging is not enabled for the given VLAN ID, the VLAN tag from the frames matching
  1313. * this VLAN ID will be removed (the frames will be untagged).
  1314. *
  1315. * VLAN ID 4095 is reserved and should never be used with this function.
  1316. * VLAN ID 0 has the special meaning of "No VLAN membership" and it is used in this
  1317. * context to allow the port to send priority-tagged frames or not.
  1318. *
  1319. * By default, no Egress VLAN tagging is enabled on any port.
  1320. *
  1321. * - Reentrant - no
  1322. * - ISR Callable - no
  1323. *
  1324. * @param portID @ref IxEthDBPortId [in] - ID of the port to enable or disable the VLAN ID Egress tagging on
  1325. * @param vlanID @ref IxEthDBVlanId [in] - VLAN ID to be matched against outgoing frames
  1326. * @param enabled BOOL [in] - true to enable Egress VLAN tagging on the port and given VLAN, and
  1327. * false to disable Egress VLAN tagging
  1328. *
  1329. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  1330. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  1331. * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
  1332. * @retval IX_ETH_DB_INVALID_VLAN invalid VLAN ID (out of range)
  1333. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
  1334. * @retval IX_FAIL unknown OS or NPE communication error
  1335. */
  1336. IX_ETH_DB_PUBLIC
  1337. IxEthDBStatus ixEthDBEgressVlanEntryTaggingEnabledSet(IxEthDBPortId portID, IxEthDBVlanId vlanID, BOOL enabled);
  1338. /**
  1339. * @ingroup IxEthDB
  1340. *
  1341. * @fn IxEthDBStatus ixEthDBEgressVlanEntryTaggingEnabledGet(IxEthDBPortId portID, IxEthDBVlanId vlanID, BOOL *enabled)
  1342. *
  1343. * @brief Retrieves the Egress VLAN tagging enabling status for a port and VLAN ID
  1344. *
  1345. * @param portID [in] - ID of the port to extract the Egress VLAN ID tagging status from
  1346. * @param vlanID VLAN [in] - ID whose tagging status is to be extracted
  1347. * @param enabled [in] - user-specifed location where the status is copied to; following
  1348. * the successfull execution of this function the value will be true if Egress VLAN
  1349. * tagging is enabled for the given port and VLAN ID, and false otherwise
  1350. *
  1351. * - Reentrant - no
  1352. * - ISR Callable - no
  1353. *
  1354. * @see ixEthDBEgressVlanEntryTaggingEnabledGet
  1355. *
  1356. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  1357. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  1358. * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
  1359. * @retval IX_ETH_DB_INVALID_VLAN invalid VLAN ID (out of range)
  1360. * @retval IX_ETH_DB_INVALID_ARG invalid <i>enabled</i> argument pointer
  1361. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
  1362. */
  1363. IX_ETH_DB_PUBLIC
  1364. IxEthDBStatus ixEthDBEgressVlanEntryTaggingEnabledGet(IxEthDBPortId portID, IxEthDBVlanId vlanID, BOOL *enabled);
  1365. /**
  1366. * @ingroup IxEthDB
  1367. *
  1368. * @fn IxEthDBStatus ixEthDBEgressVlanRangeTaggingEnabledSet(IxEthDBPortId portID, IxEthDBVlanId vlanIDMin, IxEthDBVlanId vlanIDMax, BOOL enabled)
  1369. *
  1370. * @brief Enables or disables Egress VLAN tagging for a port and given VLAN range
  1371. *
  1372. * This function is very similar to @ref ixEthDBEgressVlanEntryTaggingEnabledSet with the
  1373. * difference that it can manipulate the Egress tagging status on multiple VLAN IDs,
  1374. * defined by a contiguous range. Note that both limits in the range are explicitly
  1375. * included in the execution of this function.
  1376. *
  1377. * - Reentrant - no
  1378. * - ISR Callable - no
  1379. *
  1380. * @param portID @ref IxEthDBPortId [in] - ID of the port to enable or disable the VLAN ID Egress tagging on
  1381. * @param vlanIDMin @ref IxEthDBVlanId [in] - start of the VLAN range to be matched against outgoing frames
  1382. * @param vlanIDMax @ref IxEthDBVlanId [in] - end of the VLAN range to be matched against outgoing frames
  1383. * @param enabled BOOL [in] - true to enable Egress VLAN tagging on the port and given VLAN range,
  1384. * and false to disable Egress VLAN tagging
  1385. *
  1386. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  1387. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  1388. * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
  1389. * @retval IX_ETH_DB_INVALID_VLAN invalid VLAN ID (out of range), or do not constitute a range
  1390. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
  1391. * @retval IX_ETH_DB_NO_PERMISSION attempted to explicitly remove the default port VLAN ID from the tagging table
  1392. * @retval IX_FAIL unknown OS or NPE communication error
  1393. *
  1394. * @note Specifically removing the default port VLAN ID from the Egress tagging table by setting both vlanIDMin and vlanIDMax
  1395. * to the VLAN ID portion of the PVID is not allowed by this function and will return IX_ETH_DB_NO_PERMISSION.
  1396. * However, this can be circumvented, should the user specifically desire this, by either using a
  1397. * larger range (vlanIDMin < vlanIDMax) or by using ixEthDBEgressVlanEntryTaggingEnabledSet.
  1398. */
  1399. IX_ETH_DB_PUBLIC
  1400. IxEthDBStatus ixEthDBEgressVlanRangeTaggingEnabledSet(IxEthDBPortId portID, IxEthDBVlanId vlanIDMin, IxEthDBVlanId vlanIDMax, BOOL enabled);
  1401. /**
  1402. * @ingroup IxEthDB
  1403. *
  1404. * @fn IxEthDBStatus ixEthDBEgressVlanTaggingEnabledSet(IxEthDBPortId portID, IxEthDBVlanSet vlanSet)
  1405. *
  1406. * @brief Sets the complete Egress VLAN tagging table for a port
  1407. *
  1408. * This function is used to set the VLAN tagging/untagging per VLAN ID for a given port
  1409. * covering the entire VLAN ID range (0..4094). The <i>vlanSet</i> parameter is a 4096
  1410. * bit array, each bit indicating the Egress behavior for the corresponding VLAN ID.
  1411. * If a bit is set then outgoing frames with the corresponding VLAN ID will be transmitted
  1412. * with the VLAN tag, otherwise the frame will be transmitted without the VLAN tag.
  1413. *
  1414. * Bit 0 has a special significance, indicating tagging or tag removal for priority-tagged
  1415. * frames.
  1416. *
  1417. * Bit 4095 is reserved and should never be set (it will be ignored if set).
  1418. *
  1419. * - Reentrant - no
  1420. * - ISR Callable - no
  1421. *
  1422. * @param portID @ref IxEthDBPortId [in] - ID of the port whose Egress VLAN tagging behavior is set
  1423. * @param vlanSet @ref IxEthDBVlanSet [in] - 4096 bit array controlling per-VLAN tagging and untagging
  1424. *
  1425. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  1426. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  1427. * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
  1428. * @retval IX_ETH_DB_INVALID_ARG invalid <i>vlanSet</i> pointer
  1429. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
  1430. * @retval IX_FAIL unknown OS or NPE communication error
  1431. *
  1432. * @warning This function will automatically add the default port VLAN ID to the Egress tagging table
  1433. * every time it is called. The user should manually call ixEthDBEgressVlanEntryTaggingEnabledSet to
  1434. * prevent tagging on the default port VLAN ID if the default behavior is not intended.
  1435. */
  1436. IX_ETH_DB_PUBLIC
  1437. IxEthDBStatus ixEthDBEgressVlanTaggingEnabledSet(IxEthDBPortId portID, IxEthDBVlanSet vlanSet);
  1438. /**
  1439. * @ingroup IxEthDB
  1440. *
  1441. * @fn IxEthDBStatus ixEthDBEgressVlanTaggingEnabledGet(IxEthDBPortId portID, IxEthDBVlanSet vlanSet)
  1442. *
  1443. * @brief Retrieves the complete Egress VLAN tagging table from a port
  1444. *
  1445. * This function copies the 4096 bit table controlling the Egress VLAN tagging into a user specified
  1446. * area. Each bit in the array indicates whether tagging for the corresponding VLAN (the bit position
  1447. * in the array) is enabled (the bit is set) or not (the bit is unset).
  1448. *
  1449. * Bit 4095 is reserved and should not be set (it will be ignored if set).
  1450. *
  1451. * @see ixEthDBEgressVlanTaggingEnabledSet
  1452. *
  1453. * @param portID @ref IxEthDBPortId [in] - ID of the port whose Egress VLAN tagging behavior is retrieved
  1454. * @param vlanSet @ref IxEthDBVlanSet [out] - user location to copy the Egress tagging table into; should have
  1455. * room to store 4096 bits (512 bytes)
  1456. *
  1457. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  1458. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  1459. * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
  1460. * @retval IX_ETH_DB_INVALID_ARG invalid <i>vlanSet</i> pointer
  1461. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
  1462. */
  1463. IX_ETH_DB_PUBLIC
  1464. IxEthDBStatus ixEthDBEgressVlanTaggingEnabledGet(IxEthDBPortId portID, IxEthDBVlanSet vlanSet);
  1465. /**
  1466. * @ingroup IxEthDB
  1467. *
  1468. * @fn IxEthDBStatus ixEthDBIngressVlanTaggingEnabledSet(IxEthDBPortId portID, IxEthDBTaggingAction taggingAction)
  1469. *
  1470. * @brief Sets the Ingress VLAN tagging behavior for a port
  1471. *
  1472. * A port's Ingress tagging behavior is controlled by the taggingAction parameter,
  1473. * which can take one of the following values:
  1474. *
  1475. * - IX_ETH_DB_PASS_THROUGH - leaves the frame unchanged (does not add or remove the VLAN tag)
  1476. * - IX_ETH_DB_ADD_TAG - adds the VLAN tag if not present, using the default port VID
  1477. * - IX_ETH_DB_REMOVE_TAG - removes the VLAN tag if present
  1478. *
  1479. * @param portID @ref IxEthDBPortId [in] - ID of the port whose Ingress VLAN tagging behavior is set
  1480. * @param taggingAction @ref IxEthDBTaggingAction [in] - tagging behavior for the port
  1481. *
  1482. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  1483. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  1484. * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
  1485. * @retval IX_ETH_DB_INVALID_ARG invalid <i>taggingAction</i> argument
  1486. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
  1487. * @retval IX_FAIL unknown OS or NPE communication error
  1488. */
  1489. IX_ETH_DB_PUBLIC
  1490. IxEthDBStatus ixEthDBIngressVlanTaggingEnabledSet(IxEthDBPortId portID, IxEthDBTaggingAction taggingAction);
  1491. /**
  1492. * @ingroup IxEthDB
  1493. *
  1494. * @fn IxEthDBStatus ixEthDBIngressVlanTaggingEnabledGet(IxEthDBPortId portID, IxEthDBTaggingAction *taggingAction)
  1495. *
  1496. * @brief Retrieves the Ingress VLAN tagging behavior from a port (see @ref ixEthDBIngressVlanTaggingEnabledSet)
  1497. *
  1498. * @param portID @ref IxEthDBPortId [in] - ID of the port whose Ingress VLAN tagging behavior is set
  1499. * @param taggingAction @ref IxEthDBTaggingAction [out] - location where the tagging behavior for the port is written to
  1500. *
  1501. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  1502. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  1503. * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
  1504. * @retval IX_ETH_DB_INVALID_ARG invalid <i>taggingAction</i> pointer argument
  1505. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
  1506. */
  1507. IX_ETH_DB_PUBLIC
  1508. IxEthDBStatus ixEthDBIngressVlanTaggingEnabledGet(IxEthDBPortId portID, IxEthDBTaggingAction *taggingAction);
  1509. /**
  1510. * @ingroup IxEthDB
  1511. *
  1512. * @fn IxEthDBStatus ixEthDBVlanPortExtractionEnable(IxEthDBPortId portID, BOOL enable)
  1513. *
  1514. * @brief Enables or disables port ID extraction
  1515. *
  1516. * This feature can be used in the situation when a multi-port device (e.g. a switch)
  1517. * is connected to an IXP4xx port and the device can provide incoming frame port
  1518. * identification by tagging the TPID field in the Ethernet frame. Enabling
  1519. * port extraction will instruct the NPE to copy the TPID field from the frame and
  1520. * place it in the <i>ixp_ne_src_port</i> of the <i>ixp_buf</i> header. In addition,
  1521. * the NPE restores the TPID field to 0.
  1522. *
  1523. * If the frame is not tagged the NPE will fill the <i>ixp_ne_src_port</i> with the
  1524. * port ID of the MII interface the frame was received from.
  1525. *
  1526. * The TPID field is the least significant byte of the type/length field, which is
  1527. * normally set to 0x8100 for 802.1Q-tagged frames.
  1528. *
  1529. * This feature is disabled by default.
  1530. *
  1531. * @param portID ID of the port to configure port ID extraction on
  1532. * @param enable true to enable port ID extraction and false to disable it
  1533. *
  1534. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  1535. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  1536. * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
  1537. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE VLAN/QoS feature is not available or not enabled for the port
  1538. * @retval IX_FAIL unknown OS or NPE communication error
  1539. */
  1540. IX_ETH_DB_PUBLIC
  1541. IxEthDBStatus ixEthDBVlanPortExtractionEnable(IxEthDBPortId portID, BOOL enable);
  1542. /**
  1543. * @ingroup IxEthDB
  1544. *
  1545. * @fn IxEthDBStatus ixEthDBFeatureCapabilityGet(IxEthDBPortId portID, IxEthDBFeature *featureSet)
  1546. *
  1547. * @brief Retrieves the feature capability set for a port
  1548. *
  1549. * This function retrieves the feature capability set for a port or the common capabilities shared between all
  1550. * the ports, writing the feature capability set in a user specified location.
  1551. *
  1552. * The feature capability set will consist of a set formed by OR-ing one or more of the following values:
  1553. * - IX_ETH_DB_LEARNING - Learning feature; enables EthDB to learn MAC address (filtering) records, including 802.1Q enabled records
  1554. * - IX_ETH_DB_FILTERING - Filtering feature; enables EthDB to communicate with the NPEs for downloading filtering information in the NPEs; depends on the learning feature
  1555. * - IX_ETH_DB_VLAN_QOS - VLAN/QoS feature; enables EthDB to configure NPEs to operate in VLAN/QoS aware modes
  1556. * - IX_ETH_DB_FIREWALL - Firewall feature; enables EthDB to configure NPEs to operate in firewall mode, using white/black address lists
  1557. * - IX_ETH_DB_SPANNING_TREE_PROTOCOL - Spanning tree protocol feature; enables EthDB to configure the NPEs as STP nodes
  1558. * - IX_ETH_DB_WIFI_HEADER_CONVERSION - WiFi 802.3 to 802.11 header conversion feature; enables EthDB to handle WiFi conversion data
  1559. *
  1560. * Note that EthDB provides only the LEARNING feature for non-NPE ports.
  1561. *
  1562. * @param portID @ref IxEthDBPortId [in] - ID of the port to retrieve the capability set for
  1563. * (use IX_ETH_DB_ALL_PORTS to retrieve the common capabilities shared between all the ports)
  1564. * @param featureSet @ref IxEthDBFeature [out] - location where the capability set will be written to
  1565. *
  1566. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  1567. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  1568. * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
  1569. * @retval IX_ETH_DB_INVALID_ARG invalid <i>featureSet</i> pointer
  1570. */
  1571. IX_ETH_DB_PUBLIC
  1572. IxEthDBStatus ixEthDBFeatureCapabilityGet(IxEthDBPortId portID, IxEthDBFeature *featureSet);
  1573. /**
  1574. * @ingroup IxEthDB
  1575. *
  1576. * @fn IxEthDBStatus ixEthDBFeatureEnable(IxEthDBPortId portID, IxEthDBFeature feature, BOOL enabled)
  1577. *
  1578. * @brief Enables or disables one or more EthDB features
  1579. *
  1580. * Selects one or more features (see @ref ixEthDBFeatureCapabilityGet for a description of the supported
  1581. * features) to be enabled or disabled on the selected port (or all the ports).
  1582. *
  1583. * Note that some features are mutually incompatible:
  1584. * - IX_ETH_DB_FILTERING is incompatible with IX_ETH_DB_WIFI_HEADER_CONVERSION
  1585. *
  1586. * Also note that some features require other features to be enabled:
  1587. * - IX_ETH_DB_FILTERING requires IX_ETH_DB_LEARNING
  1588. *
  1589. * This function will either enable the entire selected feature set for the selected port (or all the ports),
  1590. * in which case it will return IX_ETH_DB_SUCCESS, or in case of error it will not enable any feature at all
  1591. * and return an appropriate error message.
  1592. *
  1593. * The following features are enabled by default (for ports with the respective capability),
  1594. * for compatibility reasons with previous versions of CSR:
  1595. * - IX_ETH_DB_LEARNING
  1596. * - IX_ETH_DB_FILTERING
  1597. *
  1598. * All other features are disabled by default and require manual enabling using ixEthDBFeatureEnable.
  1599. *
  1600. * <b>Default settings for VLAN, QoS, Firewall and WiFi header conversion features:</b>
  1601. *
  1602. * <i>VLAN</i>
  1603. *
  1604. * When the VLAN/QoS feature is enabled for a port for the first time the default VLAN behavior
  1605. * of the port is set to be as <b>permissive</b> (it will accept all the frames) and
  1606. * <b>non-interferential</b> (it will not change any frames) as possible:
  1607. * - the port VLAN ID (VID) is set to 0
  1608. * - the Ingress acceptable frame filter is set to accept all frames
  1609. * - the VLAN port membership is set to the complete VLAN range (0 - 4094)
  1610. * - the Ingress tagging mode is set to pass-through (will not change frames)
  1611. * - the Egress tagging mode is to send tagged frames in the entire VLAN range (0 - 4094)
  1612. *
  1613. * Note that further disabling and re-enabling the VLAN feature for a given port will not reset the port VLAN behavior
  1614. * to the settings listed above. Any VLAN settings made by the user are kept.
  1615. *
  1616. * <i>QoS</i>
  1617. *
  1618. * The following default priority mapping table will be used (as per IEEE 802.1Q and IEEE 802.1D):
  1619. *
  1620. * <table border="1"> <caption> QoS traffic classes </caption>
  1621. * <tr> <td> <b> QoS priority <td> <b> Default traffic class <td> <b> Traffic type </b>
  1622. * <tr> <td> 0 <td> 1 <td> Best effort, default class for unexpedited traffic
  1623. * <tr> <td> 1 <td> 0 <td> Background traffic
  1624. * <tr> <td> 2 <td> 0 <td> Spare bandwidth
  1625. * <tr> <td> 3 <td> 1 <td> Excellent effort
  1626. * <tr> <td> 4 <td> 2 <td> Controlled load
  1627. * <tr> <td> 5 <td> 2 <td> Video traffic
  1628. * <tr> <td> 6 <td> 3 <td> Voice traffic
  1629. * <tr> <td> 7 <td> 3 <td> Network control
  1630. * </table>
  1631. *
  1632. * <i> Firewall </i>
  1633. *
  1634. * The port firewall is configured by default in <b>black-list mode</b>, and the firewall address table is empty.
  1635. * This means the firewall will not filter any frames until the feature is configured and the firewall table is
  1636. * downloaded to the NPE.
  1637. *
  1638. * <i> Spanning Tree </i>
  1639. *
  1640. * The port is set to <b>STP unblocked mode</b>, therefore it will accept all frames until re-configured.
  1641. *
  1642. * <i> WiFi header conversion </i>
  1643. *
  1644. * The WiFi header conversion database is empty, therefore no actual header conversion will take place until this
  1645. * feature is configured and the conversion table downloaded to the NPE.
  1646. *
  1647. * @param portID @ref IxEthDBPortId [in] - ID of the port to enable or disable the features on (use IX_ETH_DB_ALL_PORTS for all the ports)
  1648. * @param feature @ref IxEthDBFeature [in] - feature or feature set to enable or disable
  1649. * @param enabled BOOL [in] - true to enable the feature and false to disable it
  1650. *
  1651. * @note Certain features, from a functional point of view, cannot be disabled as such at NPE level;
  1652. * when such features are set to <i>disabled</i> using the EthDB API they will be configured in such
  1653. * a way to determine a behavior equivalent to the feature being disabled. As well as this, disabled
  1654. * features cannot be configured or accessed via the EthDB API (except for getting their status).
  1655. *
  1656. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  1657. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  1658. * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
  1659. * @retval IX_ETH_DB_NO_PERMISSION attempted to enable mutually exclusive features,
  1660. * or a feature that depends on another feature which is not present or enabled
  1661. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE at least one of the features selected is unavailable
  1662. * @retval IX_FAIL unknown OS or NPE communication error
  1663. */
  1664. IX_ETH_DB_PUBLIC
  1665. IxEthDBStatus ixEthDBFeatureEnable(IxEthDBPortId portID, IxEthDBFeature feature, BOOL enabled);
  1666. /**
  1667. * @ingroup IxEthDB
  1668. *
  1669. * @fn IxEthDBStatus ixEthDBFeatureStatusGet(IxEthDBPortId portID, IxEthDBFeature feature, BOOL *present, BOOL *enabled)
  1670. *
  1671. * @brief Retrieves the availability and status of a feature set
  1672. *
  1673. * This function returns the availability and status for a feature set.
  1674. * Note that if more than one feature is selected (e.g. IX_ETH_DB_LEARNING | IX_ETH_DB_FILTERING)
  1675. * the "present" and "enabled" return values will be set to true only if all the features in the
  1676. * feature set are present and enabled (not only some).
  1677. *
  1678. * @param portID @ref IxEthDBPortId [in] - ID of the port
  1679. * @param feature @ref IxEthDBFeature [in] - identifier of the feature to retrieve the status for
  1680. * @param present BOOL [out] - location where a boolean flag indicating whether this feature is present will be written to
  1681. * @param enabled BOOL [out] - location where a boolean flag indicating whether this feature is enabled will be written to
  1682. *
  1683. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  1684. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  1685. * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
  1686. * @retval IX_ETH_DB_INVALID_ARG either <i>present</i> or <i>enabled</i> pointer argument is invalid
  1687. */
  1688. IX_ETH_DB_PUBLIC
  1689. IxEthDBStatus ixEthDBFeatureStatusGet(IxEthDBPortId portID, IxEthDBFeature feature, BOOL *present, BOOL *enabled);
  1690. /**
  1691. * @ingroup IxEthDB
  1692. *
  1693. * @fn IxEthDBStatus ixEthDBFeaturePropertyGet(IxEthDBPortId portID, IxEthDBFeature feature, IxEthDBProperty property, IxEthDBPropertyType *type, void *value)
  1694. *
  1695. * @brief Retrieves the value of a feature property
  1696. *
  1697. * The EthDB features usually contain feature-specific properties describing or
  1698. * controlling how the feature operates. While essential properties (e.g. the
  1699. * firewall operating mode) have their own API, secondary properties can be
  1700. * retrieved using this function.
  1701. *
  1702. * Properties can be read-only or read-write. ixEthDBFeaturePropertyGet operates with
  1703. * both types of features.
  1704. *
  1705. * Properties have types associated with them. A descriptor indicating the property
  1706. * type is returned in the <i>type</i> argument for convenience.
  1707. *
  1708. * The currently supported properties and their corresponding features are as follows:
  1709. *
  1710. * <table border="1"> <caption> Properties for IX_ETH_DB_VLAN_QOS </caption>
  1711. * <tr> <td> <b> Property identifier <td> <b> Property type <td> <b> Property value <td> <b> Read-Only </b>
  1712. * <tr> <td> IX_ETH_DB_QOS_TRAFFIC_CLASS_COUNT_PROPERTY <td> IX_ETH_DB_INTEGER_PROPERTY <td> number of internal traffic classes <td> Yes
  1713. * <tr> <td> IX_ETH_DB_QOS_TRAFFIC_CLASS_0_RX_QUEUE_PROPERTY <td> IX_ETH_DB_INTEGER_PROPERTY <td> queue assignment for traffic class 0 <td> Yes
  1714. * <tr> <td> IX_ETH_DB_QOS_TRAFFIC_CLASS_1_RX_QUEUE_PROPERTY <td> IX_ETH_DB_INTEGER_PROPERTY <td> queue assignment for traffic class 1 <td> Yes
  1715. * <tr> <td> IX_ETH_DB_QOS_TRAFFIC_CLASS_2_RX_QUEUE_PROPERTY <td> IX_ETH_DB_INTEGER_PROPERTY <td> queue assignment for traffic class 2 <td> Yes
  1716. * <tr> <td> IX_ETH_DB_QOS_TRAFFIC_CLASS_3_RX_QUEUE_PROPERTY <td> IX_ETH_DB_INTEGER_PROPERTY <td> queue assignment for traffic class 3 <td> Yes
  1717. * <tr> <td> IX_ETH_DB_QOS_TRAFFIC_CLASS_4_RX_QUEUE_PROPERTY <td> IX_ETH_DB_INTEGER_PROPERTY <td> queue assignment for traffic class 4 <td> Yes
  1718. * <tr> <td> IX_ETH_DB_QOS_TRAFFIC_CLASS_5_RX_QUEUE_PROPERTY <td> IX_ETH_DB_INTEGER_PROPERTY <td> queue assignment for traffic class 5 <td> Yes
  1719. * <tr> <td> IX_ETH_DB_QOS_TRAFFIC_CLASS_6_RX_QUEUE_PROPERTY <td> IX_ETH_DB_INTEGER_PROPERTY <td> queue assignment for traffic class 6 <td> Yes
  1720. * <tr> <td> IX_ETH_DB_QOS_TRAFFIC_CLASS_7_RX_QUEUE_PROPERTY <td> IX_ETH_DB_INTEGER_PROPERTY <td> queue assignment for traffic class 7 <td> Yes
  1721. * </table>
  1722. *
  1723. * @see ixEthDBFeaturePropertySet
  1724. *
  1725. * @param portID @ref IxEthDBPortId [in] - ID of the port
  1726. * @param feature @ref IxEthDBFeature [in] - EthDB feature for which the property is retrieved
  1727. * @param property @ref IxEthDBProperty [in] - property identifier
  1728. * @param type @ref IxEthDBPropertyType [out] - location where the property type will be stored
  1729. * @param value void [out] - location where the property value will be stored
  1730. *
  1731. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  1732. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  1733. * @retval IX_ETH_DB_INVALID_ARG invalid property identifier, <i>type</i> or <i>value</i> pointer arguments
  1734. * @retval IX_ETH_DB_FAIL incorrect property value or unknown error
  1735. */
  1736. IX_ETH_DB_PUBLIC
  1737. IxEthDBStatus ixEthDBFeaturePropertyGet(IxEthDBPortId portID, IxEthDBFeature feature, IxEthDBProperty property, IxEthDBPropertyType *type, void *value);
  1738. /**
  1739. * @ingroup IxEthDB
  1740. *
  1741. * @fn IxEthDBStatus ixEthDBFeaturePropertySet(IxEthDBPortId portID, IxEthDBFeature feature, IxEthDBProperty property, void *value)
  1742. *
  1743. * @brief Sets the value of a feature property
  1744. *
  1745. * Unlike @ref ixEthDBFeaturePropertyGet, this function operates only with read-write properties
  1746. *
  1747. * The currently supported properties and their corresponding features are as follows:
  1748. *
  1749. * - IX_ETH_DB_QOS_QUEUE_CONFIGURATION_COMPLETE (for IX_ETH_DB_VLAN_QOS): freezes the availability of traffic classes
  1750. * to the number of traffic classes currently in use
  1751. *
  1752. * Note that this function creates deep copies of the property values; once the function is invoked the client
  1753. * can free or reuse the memory area containing the original property value.
  1754. *
  1755. * Copy behavior for different property types is defined as follows:
  1756. *
  1757. * - IX_ETH_DB_INTEGER_PROPERTY - 4 bytes are copied from the source location
  1758. * - IX_ETH_DB_STRING_PROPERTY - the source string will be copied up to the NULL '\0' string terminator, maximum of 255 characters
  1759. * - IX_ETH_DB_MAC_ADDR_PROPERTY - 6 bytes are copied from the source location
  1760. * - IX_ETH_DB_BOOL_PROPERTY - 4 bytes are copied from the source location; the only allowed values are true (1L) and false (0L)
  1761. *
  1762. * @see ixEthDBFeaturePropertySet
  1763. *
  1764. * @warning IX_ETH_DB_QOS_QUEUE_CONFIGURATION_COMPLETE is provided for EthAcc internal use;
  1765. * do not attempt to set this property directly
  1766. *
  1767. * @param portID @ref IxEthDBPortId [in] - ID of the port
  1768. * @param feature @ref IxEthDBFeature [in] - EthDB feature for which the property is set
  1769. * @param property @ref IxEthDBProperty [in] - property identifier
  1770. * @param value void [in] - location where the property value is to be copied from
  1771. *
  1772. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  1773. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  1774. * @retval IX_ETH_DB_INVALID_ARG invalid property identifier, <i>value</i> pointer, or invalid property value
  1775. */
  1776. IX_ETH_DB_PUBLIC
  1777. IxEthDBStatus ixEthDBFeaturePropertySet(IxEthDBPortId portID, IxEthDBFeature feature, IxEthDBProperty property, void *value);
  1778. /**
  1779. * @ingroup IxEthDB
  1780. *
  1781. * @fn IxEthDBStatus ixEthDBDatabaseClear(IxEthDBPortId portID, IxEthDBRecordType recordType)
  1782. *
  1783. * @brief Deletes a set of record types from the Ethernet Database
  1784. *
  1785. * This function deletes all the records of certain types (specified in the recordType filter)
  1786. * associated with a port. Additionally, the IX_ETH_DB_ALL_PORTS value can be used as port ID
  1787. * to indicate that the specified record types should be deleted for all the ports.
  1788. *
  1789. * The record type filter can be an ORed combination of the following types:
  1790. *
  1791. * <caption> Record types </caption>
  1792. * - IX_ETH_DB_FILTERING_RECORD <table><caption> Filtering record </caption>
  1793. * <tr><td> MAC address <td> static/dynamic type <td> age </tr>
  1794. * </table>
  1795. *
  1796. * - IX_ETH_DB_FILTERING_VLAN_RECORD <table><caption> VLAN-enabled filtering record </caption>
  1797. * <tr><td> MAC address <td> static/dynamic type <td> age <td> 802.1Q tag </tr>
  1798. * </table>
  1799. *
  1800. * - IX_ETH_DB_WIFI_RECORD <table><caption> WiFi header conversion record </caption>
  1801. * <tr><td> MAC address <td> optional gateway MAC address <td> </tr>
  1802. * </table>
  1803. *
  1804. * - IX_ETH_DB_FIREWALL_RECORD <table><caption> Firewall record </caption>
  1805. * <tr><td> MAC address </tr>
  1806. * </table>
  1807. * - IX_ETH_DB_ALL_RECORD_TYPES
  1808. *
  1809. * Any combination of the above types is valid e.g.
  1810. *
  1811. * (IX_ETH_DB_FILTERING_RECORD | IX_ETH_DB_FILTERING_VLAN_RECORD | IX_ETH_DB_FIREWALL_RECORD),
  1812. *
  1813. * although some might be redundant (it is not an error to do so) e.g.
  1814. *
  1815. * (IX_ETH_DB_FILTERING_RECORD | IX_ETH_DB_ALL_RECORD_TYPES)
  1816. *
  1817. * @param portID @ref IxEthDBPortId [in] - ID of the port
  1818. * @param recordType @ref IxEthDBRecordType [in] - record type filter
  1819. *
  1820. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  1821. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  1822. * @retval IX_ETH_DB_INVALID_ARG invalid <i>recordType</i> filter
  1823. *
  1824. * @note If the record type filter contains any unrecognized value (hence the
  1825. * IX_ETH_DB_INVALID_ARG error value is returned) no actual records will be deleted.
  1826. */
  1827. IX_ETH_DB_PUBLIC
  1828. IxEthDBStatus ixEthDBDatabaseClear(IxEthDBPortId portID, IxEthDBRecordType recordType);
  1829. /**
  1830. * @ingroup IxEthDB
  1831. *
  1832. * @fn IxEthDBStatus ixEthDBWiFiStationEntryAdd(IxEthDBPortId portID, IxEthDBMacAddr *macAddr)
  1833. *
  1834. * @brief Adds an "Access Point to Station" record to the database, for 802.3 => 802.11 frame
  1835. * header conversion
  1836. *
  1837. * Frame header conversion is controlled by the set of MAC addresses
  1838. * added using @ref ixEthDBWiFiStationEntryAdd and @ref ixEthDBWiFiAccessPointEntryAdd.
  1839. * Conversion arguments are added using @ref ixEthDBWiFiFrameControlSet,
  1840. * @ref ixEthDBWiFiDurationIDSet and @ref ixEthDBWiFiBBSIDSet.
  1841. *
  1842. * Note that adding the same MAC address twice will not return an error
  1843. * (but will not accomplish anything either), while re-adding a record previously added
  1844. * as an "Access Point to Access Point" will migrate the record to the "Access Point
  1845. * to Station" type.
  1846. *
  1847. * @param portID @ref IxEthDBPortId [in] - ID of the port
  1848. * @param macAddr @ref IxEthDBMacAddr [in] - MAC address to add
  1849. *
  1850. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  1851. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  1852. * @retval IX_ETH_DB_INVALID_ARG macAddr is an invalid pointer
  1853. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE WiFi feature not enabled
  1854. * @retval IX_ETH_DB_INVALID_ARG invalid <i>macAddr</i> pointer argument
  1855. * @retval IX_ETH_DB_NOMEM maximum number of records reached
  1856. * @retval IX_ETH_DB_BUSY lock condition or transaction in progress, try again later
  1857. */
  1858. IX_ETH_DB_PUBLIC
  1859. IxEthDBStatus ixEthDBWiFiStationEntryAdd(IxEthDBPortId portID, IxEthDBMacAddr *macAddr);
  1860. /**
  1861. * @ingroup IxEthDB
  1862. *
  1863. * @fn IxEthDBStatus ixEthDBWiFiAccessPointEntryAdd(IxEthDBPortId portID, IxEthDBMacAddr *macAddr, IxEthDBMacAddr *gatewayMacAddr)
  1864. *
  1865. * @brief Adds an "Access Point to Access Point" record to the database
  1866. *
  1867. * @see ixEthDBWiFiStationEntryAdd
  1868. *
  1869. * Note that adding the same MAC address twice will simply overwrite the previously
  1870. * defined gateway MAC address value in the same record, if the record was previously of the
  1871. * "Access Point to Access Point" type.
  1872. *
  1873. * Re-adding a MAC address as "Access Point to Access Point", which was previously added as
  1874. * "Access Point to Station" will migrate the record type to "Access Point to Access Point" and
  1875. * record the gateway MAC address.
  1876. *
  1877. * @param portID @ref IxEthDBPortId [in] - ID of the port
  1878. * @param macAddr @ref IxEthDBMacAddr [in] - MAC address to add
  1879. * @param gatewayMacAddr @ref IxEthDBMacAddr [in] - MAC address of the gateway Access Point
  1880. *
  1881. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  1882. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  1883. * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
  1884. * @retval IX_ETH_DB_INVALID_ARG macAddr is an invalid pointer
  1885. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE WiFi feature not enabled
  1886. * @retval IX_ETH_DB_INVALID_ARG invalid <i>macAddr</i> or <i>gatewayMacAddr</i> pointer argument
  1887. * @retval IX_ETH_DB_NOMEM maximum number of records reached
  1888. * @retval IX_ETH_DB_BUSY lock condition or transaction in progress, try again later
  1889. */
  1890. IX_ETH_DB_PUBLIC
  1891. IxEthDBStatus ixEthDBWiFiAccessPointEntryAdd(IxEthDBPortId portID, IxEthDBMacAddr *macAddr, IxEthDBMacAddr *gatewayMacAddr);
  1892. /**
  1893. * @ingroup IxEthDB
  1894. *
  1895. * @fn IxEthDBStatus ixEthDBWiFiEntryRemove(IxEthDBPortId portID, IxEthDBMacAddr *macAddr)
  1896. *
  1897. * @brief Removes a WiFi station record
  1898. *
  1899. * This function removes both types of WiFi records ("Access Point to Station" and
  1900. * "Access Point to Access Point").
  1901. *
  1902. * @param portID @ref IxEthDBPortId [in] - ID of the port
  1903. * @param macAddr @ref IxEthDBMacAddr [in] - MAC address to remove
  1904. *
  1905. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  1906. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  1907. * @retval IX_ETH_DB_PORT_UNINITIALIZED port is not initialized
  1908. * @retval IX_ETH_DB_INVALID_ARG invalid <i>macAddr</i> pointer argument
  1909. * @retval IX_ETH_DB_NO_SUCH_ADDR specified address was not found in the database
  1910. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE WiFi feature not enabled
  1911. * @retval IX_ETH_DB_BUSY lock condition or transaction in progress, try again later
  1912. */
  1913. IX_ETH_DB_PUBLIC
  1914. IxEthDBStatus ixEthDBWiFiEntryRemove(IxEthDBPortId portID, IxEthDBMacAddr *macAddr);
  1915. /**
  1916. * @ingroup IxEthDB
  1917. *
  1918. * @fn IxEthDBStatus ixEthDBWiFiConversionTableDownload(IxEthDBPortId portID)
  1919. *
  1920. * @brief Downloads the MAC address table for 802.3 => 802.11 frame header
  1921. * conversion to the NPE
  1922. *
  1923. * Note that the frame conversion MAC address table must be individually downloaded
  1924. * to each NPE for which the frame header conversion feature is enabled (i.e. it
  1925. * is not possible to specify IX_ETH_DB_ALL_PORTS).
  1926. *
  1927. * @param portID @ref IxEthDBPortId [in] - ID of the port
  1928. *
  1929. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  1930. * @retval IX_ETH_DB_PORT_UNINITIALIZED port not initialized
  1931. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  1932. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE WiFi feature not enabled
  1933. * @retval IX_ETH_DB_FAIL unknown OS or NPE communication error
  1934. */
  1935. IX_ETH_DB_PUBLIC
  1936. IxEthDBStatus ixEthDBWiFiConversionTableDownload(IxEthDBPortId portID);
  1937. /**
  1938. * @ingroup IxEthDB
  1939. *
  1940. * @fn IxEthDBStatus ixEthDBWiFiFrameControlSet(IxEthDBPortId portID, UINT16 frameControl)
  1941. *
  1942. * @brief Sets the GlobalFrameControl field
  1943. *
  1944. * The GlobalFrameControl field is a 2-byte value inserted in the <i>Frame Control</i>
  1945. * field for all 802.3 to 802.11 frame header conversions
  1946. *
  1947. * @param portID @ref IxEthDBPortId [in] - ID of the port
  1948. * @param frameControl UINT16 [in] - GlobalFrameControl value
  1949. *
  1950. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  1951. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  1952. * @retval IX_ETH_DB_PORT_UNINITIALIZED port not initialized
  1953. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE WiFi feature not enabled
  1954. * @retval IX_ETH_DB_FAIL unknown OS or NPE communication error
  1955. */
  1956. IX_ETH_DB_PUBLIC
  1957. IxEthDBStatus ixEthDBWiFiFrameControlSet(IxEthDBPortId portID, UINT16 frameControl);
  1958. /**
  1959. * @ingroup IxEthDB
  1960. *
  1961. * @fn IxEthDBStatus ixEthDBWiFiDurationIDSet(IxEthDBPortId portID, UINT16 durationID)
  1962. *
  1963. * @brief Sets the GlobalDurationID field
  1964. *
  1965. * The GlobalDurationID field is a 2-byte value inserted in the <i>Duration/ID</i>
  1966. * field for all 802.3 to 802.11 frame header conversions
  1967. *
  1968. * @param portID @ref IxEthDBPortId [in] - ID of the port
  1969. * @param durationID UINT16 [in] - GlobalDurationID field
  1970. *
  1971. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  1972. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  1973. * @retval IX_ETH_DB_PORT_UNINITIALIZED port not initialized
  1974. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE WiFi feature not enabled
  1975. * @retval IX_ETH_DB_FAIL unknown OS or NPE communication error
  1976. */
  1977. IX_ETH_DB_PUBLIC
  1978. IxEthDBStatus ixEthDBWiFiDurationIDSet(IxEthDBPortId portID, UINT16 durationID);
  1979. /**
  1980. * @ingroup IxEthDB
  1981. *
  1982. * @fn IxEthDBStatus ixEthDBWiFiBBSIDSet(IxEthDBPortId portID, IxEthDBMacAddr *bbsid)
  1983. *
  1984. * @brief Sets the BBSID field
  1985. *
  1986. * The BBSID field is a 6-byte value which
  1987. * identifies the infrastructure of the service set managed
  1988. * by the Access Point having the IXP400 as its processor. The value
  1989. * is written in the <i>BBSID</i> field of the 802.11 frame header.
  1990. * The BBSID value is the MAC address of the Access Point.
  1991. *
  1992. * @param portID @ref IxEthDBPortId [in] - ID of the port
  1993. * @param bbsid @ref IxEthDBMacAddr [in] - pointer to 6 bytes containing the BSSID
  1994. *
  1995. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  1996. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  1997. * @retval IX_ETH_DB_PORT_UNINITIALIZED port not initialized
  1998. * @retval IX_ETH_DB_INVALID_ARG invalid <i>bbsid</i> pointer argument
  1999. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE WiFi feature not enabled
  2000. * @retval IX_ETH_DB_FAIL unknown OS or NPE communication error
  2001. */
  2002. IX_ETH_DB_PUBLIC
  2003. IxEthDBStatus ixEthDBWiFiBBSIDSet(IxEthDBPortId portID, IxEthDBMacAddr *bbsid);
  2004. /**
  2005. * @ingroup IxEthDB
  2006. *
  2007. * @fn IxEthDBStatus ixEthDBSpanningTreeBlockingStateSet(IxEthDBPortId portID, BOOL blocked)
  2008. *
  2009. * @brief Sets the STP blocked/unblocked state for a port
  2010. *
  2011. * @param portID @ref IxEthDBPortId [in] - ID of the port
  2012. * @param blocked BOOL [in] - true to set the port as STP blocked, false to set it as unblocked
  2013. *
  2014. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  2015. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  2016. * @retval IX_ETH_DB_PORT_UNINITIALIZED port not initialized
  2017. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE Spanning Tree Protocol feature not enabled
  2018. * @retval IX_ETH_DB_FAIL unknown OS or NPE communication error
  2019. */
  2020. IX_ETH_DB_PUBLIC
  2021. IxEthDBStatus ixEthDBSpanningTreeBlockingStateSet(IxEthDBPortId portID, BOOL blocked);
  2022. /**
  2023. * @ingroup IxEthDB
  2024. *
  2025. * @fn IxEthDBStatus ixEthDBSpanningTreeBlockingStateGet(IxEthDBPortId portID, BOOL *blocked)
  2026. *
  2027. * @brief Retrieves the STP blocked/unblocked state for a port
  2028. *
  2029. * @param portID @ref IxEthDBPortId [in] - ID of the port
  2030. * @param blocked BOOL * [in] - set to true if the port is STP blocked, false otherwise
  2031. *
  2032. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  2033. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  2034. * @retval IX_ETH_DB_PORT_UNINITIALIZED port not initialized
  2035. * @retval IX_ETH_DB_INVALID_ARG invalid <i>blocked</i> pointer argument
  2036. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE Spanning Tree Protocol feature not enabled
  2037. */
  2038. IX_ETH_DB_PUBLIC
  2039. IxEthDBStatus ixEthDBSpanningTreeBlockingStateGet(IxEthDBPortId portID, BOOL *blocked);
  2040. /**
  2041. * @ingroup IxEthDB
  2042. *
  2043. * @fn IxEthDBStatus ixEthDBFirewallModeSet(IxEthDBPortId portID, IxEthDBFirewallMode mode)
  2044. *
  2045. * @brief Sets the firewall mode to use white or black listing
  2046. *
  2047. * When enabled, the NPE MAC address based firewall support operates in two modes:
  2048. *
  2049. * - white-list mode (MAC address based admission)
  2050. * - <i>mode</i> set to IX_ETH_DB_FIREWALL_WHITE_LIST
  2051. * - only packets originating from MAC addresses contained in the firewall address list
  2052. * are allowed on the Rx path
  2053. * - black-list mode (MAC address based blocking)
  2054. * - <i>mode</i> set to IX_ETH_DB_FIREWALL_BLACK_LIST
  2055. * - packets originating from MAC addresses contained in the firewall address list
  2056. * are discarded
  2057. *
  2058. * @param portID @ref IxEthDBPortId [in] - ID of the port
  2059. * @param mode @ref IxEthDBFirewallMode [in] - firewall mode (IX_ETH_DB_FIREWALL_WHITE_LIST or IX_ETH_DB_FIREWALL_BLACK_LIST)
  2060. *
  2061. * @note by default the firewall operates in black-list mode with an empty address
  2062. * list, hence it doesn't filter any packets
  2063. *
  2064. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  2065. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  2066. * @retval IX_ETH_DB_PORT_UNINITIALIZED port not initialized
  2067. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE Firewall feature not enabled
  2068. * @retval IX_ETH_DB_INVALID_ARGUMENT <i>mode</i> argument is not a valid firewall configuration mode
  2069. * @retval IX_ETH_DB_FAIL unknown OS or NPE communication error
  2070. */
  2071. IX_ETH_DB_PUBLIC
  2072. IxEthDBStatus ixEthDBFirewallModeSet(IxEthDBPortId portID, IxEthDBFirewallMode mode);
  2073. /**
  2074. * @ingroup IxEthDB
  2075. *
  2076. * @fn ixEthDBFirewallInvalidAddressFilterEnable(IxEthDBPortId portID, BOOL enable)
  2077. *
  2078. * @brief Enables or disables invalid MAC address filtering
  2079. *
  2080. * According to IEEE802 it is illegal for a source address to be a multicast
  2081. * or broadcast address. If this feature is enabled the NPE inspects the source
  2082. * MAC addresses of incoming frames and discards them if invalid addresses are
  2083. * detected.
  2084. *
  2085. * By default this service is enabled, if the firewall feature is supported by the
  2086. * NPE image.
  2087. *
  2088. * @param portID ID of the port
  2089. * @param enable true to enable invalid MAC address filtering and false to disable it
  2090. *
  2091. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  2092. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  2093. * @retval IX_ETH_DB_PORT_UNINITIALIZED port not initialized
  2094. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE Firewall feature not enabled
  2095. * @retval IX_ETH_DB_FAIL unknown OS or NPE communication error
  2096. */
  2097. IX_ETH_DB_PUBLIC
  2098. IxEthDBStatus ixEthDBFirewallInvalidAddressFilterEnable(IxEthDBPortId portID, BOOL enable);
  2099. /**
  2100. * @ingroup IxEthDB
  2101. *
  2102. * @fn IxEthDBStatus ixEthDBFirewallEntryAdd(IxEthDBPortId portID, IxEthDBMacAddr *macAddr)
  2103. *
  2104. * @brief Adds a MAC address to the firewall address list
  2105. *
  2106. * Note that adding the same MAC address twice will not return an error
  2107. * but will not actually accomplish anything.
  2108. *
  2109. * The firewall MAC address list has a limited number of entries; once
  2110. * the maximum number of entries has been reached this function will failed
  2111. * to add more addresses, returning IX_ETH_DB_NOMEM.
  2112. *
  2113. * @param portID @ref IxEthDBPortId [in] - ID of the port
  2114. * @param macAddr @ref IxEthDBMacAddr [in] - MAC address to be added
  2115. *
  2116. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  2117. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  2118. * @retval IX_ETH_DB_PORT_UNINITIALIZED port not initialized
  2119. * @retval IX_ETH_DB_INVALID_ARG invalid <i>macAddr</i> pointer argument
  2120. * @retval IX_ETH_DB_NOMEM maximum number of records reached
  2121. * @retval IX_ETH_DB_BUSY lock condition or transaction in progress, try again later
  2122. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE Firewall feature not enabled
  2123. */
  2124. IX_ETH_DB_PUBLIC
  2125. IxEthDBStatus ixEthDBFirewallEntryAdd(IxEthDBPortId portID, IxEthDBMacAddr *macAddr);
  2126. /**
  2127. * @ingroup IxEthDB
  2128. *
  2129. * @fn IxEthDBStatus ixEthDBFirewallEntryRemove(IxEthDBPortId portID, IxEthDBMacAddr *macAddr)
  2130. *
  2131. * @brief Removes a MAC address from the firewall address list
  2132. *
  2133. * @param portID @ref IxEthDBPortId [in] - ID of the port
  2134. * @param macAddr @ref IxEthDBMacAddr [in] - MAC address to be removed
  2135. *
  2136. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  2137. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  2138. * @retval IX_ETH_DB_PORT_UNINITIALIZED port not initialized
  2139. * @retval IX_ETH_DB_INVALID_ARG invalid <i>macAddr</i> pointer argument
  2140. * @retval IX_ETH_DB_NO_SUCH_ADDR address not found
  2141. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE Firewall feature not enabled
  2142. */
  2143. IX_ETH_DB_PUBLIC
  2144. IxEthDBStatus ixEthDBFirewallEntryRemove(IxEthDBPortId portID, IxEthDBMacAddr *macAddr);
  2145. /**
  2146. * @ingroup IxEthDB
  2147. *
  2148. * @fn IxEthDBStatus ixEthDBFirewallTableDownload(IxEthDBPortId portID)
  2149. *
  2150. * @brief Downloads the MAC firewall table to a port
  2151. *
  2152. * @param portID ID of the port
  2153. *
  2154. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  2155. * @retval IX_ETH_DB_INVALID_PORT portID is not a valid port identifier
  2156. * @retval IX_ETH_DB_PORT_UNINITIALIZED port not initialized
  2157. * @retval IX_ETH_DB_FEATURE_UNAVAILABLE Firewall feature not enabled
  2158. * @retval IX_ETH_DB_FAIL unknown OS or NPE communication error
  2159. */
  2160. IX_ETH_DB_PUBLIC
  2161. IxEthDBStatus ixEthDBFirewallTableDownload(IxEthDBPortId portID);
  2162. /**
  2163. * @ingroup IxEthDB
  2164. *
  2165. * @fn IxEthDBStatus ixEthDBUserFieldSet(IxEthDBRecordType recordType, IxEthDBMacAddr *macAddr, IxEthDBPortId portID, IxEthDBVlanId vlanID, void *field)
  2166. *
  2167. * @brief Adds a user-defined field to a database record
  2168. *
  2169. * This function associates a user-defined field to a database record.
  2170. * The user-defined field is passed as a <i>(void *)</i> parameter, hence it can be used
  2171. * for any purpose (such as identifying a structure). Retrieving the user-defined field from
  2172. * a record is done using @ref ixEthDBUserFieldGet. Note that EthDB never uses the user-defined
  2173. * field for any internal operation and it is not aware of the significance of its contents. The
  2174. * field is only stored as a pointer.
  2175. *
  2176. * The database record is identified using a combination of the given parameters, depending on the record type.
  2177. * All the record types require the record MAC address.
  2178. *
  2179. * - IX_ETH_DB_FILTERING_RECORD requires only the MAC address
  2180. * - IX_ETH_DB_VLAN_FILTERING_RECORD requires the MAC address and the VLAN ID
  2181. * - IX_ETH_DB_WIFI_RECORD requires the MAC address and the portID
  2182. * - IX_ETH_DB_FIREWALL_RECORD requires the MAC address and the portID
  2183. *
  2184. * Please note that if a parameter is not required it is completely ignored (it does not undergo parameter checking).
  2185. * The user-defined field can be cleared using a <b>NULL</b> <i>field</i> parameter.
  2186. *
  2187. * @param recordType @ref IxEthDBRecordType [in] - type of record (can be IX_ETH_DB_FILTERING_RECORD,
  2188. * IX_ETH_DB_FILTERING_VLAN_RECORD, IX_ETH_DB_WIFI_RECORD or IX_ETH_DB_FIREWALL_RECORD)
  2189. * @param portID @ref IxEthDBPortId [in] - ID of the port (required only for WIFI and FIREWALL records)
  2190. * @param macAddr @ref IxEthDBMacAddr * [in] - MAC address of the record
  2191. * @param vlanID @ref IxEthDBVlanId [in] - VLAN ID of the record (required only for FILTERING_VLAN records)
  2192. * @param field void * [in] - user defined field
  2193. *
  2194. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  2195. * @retval IX_ETH_DB_INVALID_PORT portID was required but it is not a valid port identifier
  2196. * @retval IX_ETH_DB_INVALID_ARG invalid <i>macAddr</i> pointer argument
  2197. * @retval IX_ETH_DB_NO_SUCH_ADDR record not found
  2198. */
  2199. IX_ETH_DB_PUBLIC
  2200. IxEthDBStatus ixEthDBUserFieldSet(IxEthDBRecordType recordType, IxEthDBMacAddr *macAddr, IxEthDBPortId portID, IxEthDBVlanId vlanID, void *field);
  2201. /**
  2202. * @ingroup IxEthDB
  2203. *
  2204. * @fn IxEthDBStatus ixEthDBUserFieldGet(IxEthDBRecordType recordType, IxEthDBMacAddr *macAddr, IxEthDBPortId portID, IxEthDBVlanId vlanID, void **field)
  2205. *
  2206. * @brief Retrieves a user-defined field from a database record
  2207. *
  2208. * The database record is identified using a combination of the given parameters, depending on the record type.
  2209. * All the record types require the record MAC address.
  2210. *
  2211. * - IX_ETH_DB_FILTERING_RECORD requires only the MAC address
  2212. * - IX_ETH_DB_VLAN_FILTERING_RECORD requires the MAC address and the VLAN ID
  2213. * - IX_ETH_DB_WIFI_RECORD requires the MAC address and the portID
  2214. * - IX_ETH_DB_FIREWALL_RECORD requires the MAC address and the portID
  2215. *
  2216. * Please note that if a parameter is not required it is completely ignored (it does not undergo parameter checking).
  2217. *
  2218. * If no user-defined field was registered with the specified record then <b>NULL</b> will be written
  2219. * at the location specified by <i>field</i>.
  2220. *
  2221. * @param recordType type of record (can be IX_ETH_DB_FILTERING_RECORD, IX_ETH_DB_FILTERING_VLAN_RECORD, IX_ETH_DB_WIFI_RECORD
  2222. * or IX_ETH_DB_FIREWALL_RECORD)
  2223. * @param portID ID of the port (required only for WIFI and FIREWALL records)
  2224. * @param macAddr MAC address of the record
  2225. * @param vlanID VLAN ID of the record (required only for FILTERING_VLAN records)
  2226. * @param field location to write the user defined field into
  2227. *
  2228. * @retval IX_ETH_DB_SUCCESS operation completed successfully
  2229. * @retval IX_ETH_DB_INVALID_PORT portID was required but it is not a valid port identifier
  2230. * @retval IX_ETH_DB_INVALID_ARG invalid <i>macAddr</i> or <i>field</i> pointer arguments
  2231. * @retval IX_ETH_DB_NO_SUCH_ADDR record not found
  2232. */
  2233. IX_ETH_DB_PUBLIC
  2234. IxEthDBStatus ixEthDBUserFieldGet(IxEthDBRecordType recordType, IxEthDBMacAddr *macAddr, IxEthDBPortId portId, IxEthDBVlanId vlanID, void **field);
  2235. /**
  2236. * @}
  2237. */
  2238. #endif /* IxEthDB_H */