skrlmt.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563
  1. /******************************************************************************
  2. *
  3. * Name: skrlmt.h
  4. * Project: GEnesis, PCI Gigabit Ethernet Adapter
  5. * Version: $Revision: 1.35 $
  6. * Date: $Date: 2003/01/31 14:12:41 $
  7. * Purpose: Header file for Redundant Link ManagemenT.
  8. *
  9. ******************************************************************************/
  10. /******************************************************************************
  11. *
  12. * (C)Copyright 1998-2001 SysKonnect GmbH.
  13. *
  14. * This program is free software; you can redistribute it and/or modify
  15. * it under the terms of the GNU General Public License as published by
  16. * the Free Software Foundation; either version 2 of the License, or
  17. * (at your option) any later version.
  18. *
  19. * The information in this file is provided "AS IS" without warranty.
  20. *
  21. ******************************************************************************/
  22. /******************************************************************************
  23. *
  24. * History:
  25. *
  26. * $Log: skrlmt.h,v $
  27. * Revision 1.35 2003/01/31 14:12:41 mkunz
  28. * single port adapter runs now with two identical MAC addresses
  29. *
  30. * Revision 1.34 2002/09/23 15:13:41 rwahl
  31. * Editorial changes.
  32. *
  33. * Revision 1.33 2001/07/03 12:16:48 mkunz
  34. * New Flag ChgBcPrio (Change priority of last broadcast received)
  35. *
  36. * Revision 1.32 2001/02/14 14:06:31 rassmann
  37. * Editorial changes.
  38. *
  39. * Revision 1.31 2001/02/05 14:25:26 rassmann
  40. * Prepared RLMT for transparent operation.
  41. *
  42. * Revision 1.30 2001/01/22 13:41:39 rassmann
  43. * Supporting two nets on dual-port adapters.
  44. *
  45. * Revision 1.29 2000/11/17 08:58:00 rassmann
  46. * Moved CheckSwitch from SK_RLMT_PACKET_RECEIVED to SK_RLMT_TIM event.
  47. *
  48. * Revision 1.28 2000/11/09 12:24:34 rassmann
  49. * Editorial changes.
  50. *
  51. * Revision 1.27 1999/11/22 13:59:56 cgoos
  52. * Changed license header to GPL.
  53. *
  54. * Revision 1.26 1999/10/04 14:01:19 rassmann
  55. * Corrected reaction to reception of BPDU frames (#10441).
  56. *
  57. * Revision 1.25 1999/07/20 12:53:39 rassmann
  58. * Fixed documentation errors for lookahead macros.
  59. *
  60. * Revision 1.24 1999/05/28 11:15:56 rassmann
  61. * Changed behaviour to reflect Design Spec v1.2.
  62. * Controlling Link LED(s).
  63. * Introduced RLMT Packet Version field in RLMT Packet.
  64. * Newstyle lookahead macros (checking meta-information before looking at
  65. * the packet).
  66. *
  67. * Revision 1.23 1999/01/28 12:50:42 rassmann
  68. * Not using broadcast time stamps in CheckLinkState mode.
  69. *
  70. * Revision 1.22 1999/01/27 14:13:04 rassmann
  71. * Monitoring broadcast traffic.
  72. * Switching more reliably and not too early if switch is
  73. * configured for spanning tree.
  74. *
  75. * Revision 1.21 1998/12/08 13:11:25 rassmann
  76. * Stopping SegTimer at RlmtStop.
  77. *
  78. * Revision 1.20 1998/11/24 12:37:33 rassmann
  79. * Implemented segmentation check.
  80. *
  81. * Revision 1.19 1998/11/17 13:43:06 rassmann
  82. * Handling (logical) tx failure.
  83. * Sending packet on logical address after PORT_SWITCH.
  84. *
  85. * Revision 1.18 1998/11/13 16:56:56 rassmann
  86. * Added macro version of SkRlmtLookaheadPacket.
  87. *
  88. * Revision 1.17 1998/11/06 18:06:05 rassmann
  89. * Corrected timing when RLMT checks fail.
  90. * Clearing tx counter earlier in periodical checks.
  91. *
  92. * Revision 1.16 1998/11/03 13:53:50 rassmann
  93. * RLMT should switch now (at least in mode 3).
  94. *
  95. * Revision 1.15 1998/10/22 11:39:52 rassmann
  96. * Corrected signed/unsigned mismatches.
  97. * Corrected receive list handling and address recognition.
  98. *
  99. * Revision 1.14 1998/10/15 15:16:36 rassmann
  100. * Finished Spanning Tree checking.
  101. * Checked with lint.
  102. *
  103. * Revision 1.13 1998/09/24 19:16:08 rassmann
  104. * Code cleanup.
  105. * Introduced Timer for PORT_DOWN due to no RX.
  106. *
  107. * Revision 1.12 1998/09/16 11:09:52 rassmann
  108. * Syntax corrections.
  109. *
  110. * Revision 1.11 1998/09/15 11:28:50 rassmann
  111. * Syntax corrections.
  112. *
  113. * Revision 1.10 1998/09/14 17:07:38 rassmann
  114. * Added code for port checking via LAN.
  115. * Changed Mbuf definition.
  116. *
  117. * Revision 1.9 1998/09/07 11:14:15 rassmann
  118. * Syntax corrections.
  119. *
  120. * Revision 1.8 1998/09/07 09:06:08 rassmann
  121. * Syntax corrections.
  122. *
  123. * Revision 1.7 1998/09/04 19:41:34 rassmann
  124. * Syntax corrections.
  125. * Started entering code for checking local links.
  126. *
  127. * Revision 1.6 1998/09/04 12:14:28 rassmann
  128. * Interface cleanup.
  129. *
  130. * Revision 1.5 1998/09/02 16:55:29 rassmann
  131. * Updated to reflect new DRV/HWAC/RLMT interface.
  132. *
  133. * Revision 1.4 1998/09/02 07:26:02 afischer
  134. * typedef for SK_RLMT_PORT
  135. *
  136. * Revision 1.3 1998/08/27 14:29:03 rassmann
  137. * Code cleanup.
  138. *
  139. * Revision 1.2 1998/08/27 14:26:25 rassmann
  140. * Updated interface.
  141. *
  142. * Revision 1.1 1998/08/21 08:29:10 rassmann
  143. * First public version.
  144. *
  145. ******************************************************************************/
  146. /******************************************************************************
  147. *
  148. * Description:
  149. *
  150. * This is the header file for Redundant Link ManagemenT.
  151. *
  152. * Include File Hierarchy:
  153. *
  154. * "skdrv1st.h"
  155. * ...
  156. * "sktypes.h"
  157. * "skqueue.h"
  158. * "skaddr.h"
  159. * "skrlmt.h"
  160. * ...
  161. * "skdrv2nd.h"
  162. *
  163. ******************************************************************************/
  164. #ifndef __INC_SKRLMT_H
  165. #define __INC_SKRLMT_H
  166. #ifdef __cplusplus
  167. #error C++ is not yet supported.
  168. extern "C" {
  169. #endif /* cplusplus */
  170. /* defines ********************************************************************/
  171. #define SK_RLMT_NET_DOWN_TEMP 1 /* NET_DOWN due to last port down. */
  172. #define SK_RLMT_NET_DOWN_FINAL 2 /* NET_DOWN due to RLMT_STOP. */
  173. /* ----- Default queue sizes - must be multiples of 8 KB ----- */
  174. /* Less than 8 KB free in RX queue => pause frames. */
  175. #define SK_RLMT_STANDBY_QRXSIZE 128 /* Size of rx standby queue in KB. */
  176. #define SK_RLMT_STANDBY_QXASIZE 32 /* Size of async standby queue in KB. */
  177. #define SK_RLMT_STANDBY_QXSSIZE 0 /* Size of sync standby queue in KB. */
  178. #define SK_RLMT_MAX_TX_BUF_SIZE 60 /* Maximum RLMT transmit size. */
  179. /* ----- PORT states ----- */
  180. #define SK_RLMT_PS_INIT 0 /* Port state: Init. */
  181. #define SK_RLMT_PS_LINK_DOWN 1 /* Port state: Link down. */
  182. #define SK_RLMT_PS_DOWN 2 /* Port state: Port down. */
  183. #define SK_RLMT_PS_GOING_UP 3 /* Port state: Going up. */
  184. #define SK_RLMT_PS_UP 4 /* Port state: Up. */
  185. /* ----- RLMT states ----- */
  186. #define SK_RLMT_RS_INIT 0 /* RLMT state: Init. */
  187. #define SK_RLMT_RS_NET_DOWN 1 /* RLMT state: Net down. */
  188. #define SK_RLMT_RS_NET_UP 2 /* RLMT state: Net up. */
  189. /* ----- PORT events ----- */
  190. #define SK_RLMT_LINK_UP 1001 /* Link came up. */
  191. #define SK_RLMT_LINK_DOWN 1002 /* Link went down. */
  192. #define SK_RLMT_PORT_ADDR 1003 /* Port address changed. */
  193. /* ----- RLMT events ----- */
  194. #define SK_RLMT_START 2001 /* Start RLMT. */
  195. #define SK_RLMT_STOP 2002 /* Stop RLMT. */
  196. #define SK_RLMT_PACKET_RECEIVED 2003 /* Packet was received for RLMT. */
  197. #define SK_RLMT_STATS_CLEAR 2004 /* Clear statistics. */
  198. #define SK_RLMT_STATS_UPDATE 2005 /* Update statistics. */
  199. #define SK_RLMT_PREFPORT_CHANGE 2006 /* Change preferred port. */
  200. #define SK_RLMT_MODE_CHANGE 2007 /* New RlmtMode. */
  201. #define SK_RLMT_SET_NETS 2008 /* Number of Nets (1 or 2). */
  202. /* ----- RLMT mode bits ----- */
  203. /*
  204. * CAUTION: These defines are private to RLMT.
  205. * Please use the RLMT mode defines below.
  206. */
  207. #define SK_RLMT_CHECK_LINK 1 /* Check Link. */
  208. #define SK_RLMT_CHECK_LOC_LINK 2 /* Check other link on same adapter. */
  209. #define SK_RLMT_CHECK_SEG 4 /* Check segmentation. */
  210. #ifndef RLMT_CHECK_REMOTE
  211. #define SK_RLMT_CHECK_OTHERS SK_RLMT_CHECK_LOC_LINK
  212. #else /* RLMT_CHECK_REMOTE */
  213. #define SK_RLMT_CHECK_REM_LINK 8 /* Check link(s) on other adapter(s). */
  214. #define SK_RLMT_MAX_REMOTE_PORTS_CHECKED 3
  215. #define SK_RLMT_CHECK_OTHERS \
  216. (SK_RLMT_CHECK_LOC_LINK | SK_RLMT_CHECK_REM_LINK)
  217. #endif /* RLMT_CHECK_REMOTE */
  218. #ifndef SK_RLMT_ENABLE_TRANSPARENT
  219. #define SK_RLMT_TRANSPARENT 0 /* RLMT transparent - inactive. */
  220. #else /* SK_RLMT_ENABLE_TRANSPARENT */
  221. #define SK_RLMT_TRANSPARENT 128 /* RLMT transparent. */
  222. #endif /* SK_RLMT_ENABLE_TRANSPARENT */
  223. /* ----- RLMT modes ----- */
  224. /* Check Link State. */
  225. #define SK_RLMT_MODE_CLS (SK_RLMT_CHECK_LINK)
  226. /* Check Local Ports: check other links on the same adapter. */
  227. #define SK_RLMT_MODE_CLP (SK_RLMT_CHECK_LINK | SK_RLMT_CHECK_LOC_LINK)
  228. /* Check Local Ports and Segmentation Status. */
  229. #define SK_RLMT_MODE_CLPSS \
  230. (SK_RLMT_CHECK_LINK | SK_RLMT_CHECK_LOC_LINK | SK_RLMT_CHECK_SEG)
  231. #ifdef RLMT_CHECK_REMOTE
  232. /* Check Local and Remote Ports: check links (local or remote). */
  233. Name of define TBD!
  234. #define SK_RLMT_MODE_CRP \
  235. (SK_RLMT_CHECK_LINK | SK_RLMT_CHECK_LOC_LINK | SK_RLMT_CHECK_REM_LINK)
  236. /* Check Local and Remote Ports and Segmentation Status. */
  237. Name of define TBD!
  238. #define SK_RLMT_MODE_CRPSS \
  239. (SK_RLMT_CHECK_LINK | SK_RLMT_CHECK_LOC_LINK | \
  240. SK_RLMT_CHECK_REM_LINK | SK_RLMT_CHECK_SEG)
  241. #endif /* RLMT_CHECK_REMOTE */
  242. /* ----- RLMT lookahead result bits ----- */
  243. #define SK_RLMT_RX_RLMT 1 /* Give packet to RLMT. */
  244. #define SK_RLMT_RX_PROTOCOL 2 /* Give packet to protocol. */
  245. /* Macros */
  246. #if 0
  247. SK_AC *pAC /* adapter context */
  248. SK_U32 PortNum /* receiving port */
  249. unsigned PktLen /* received packet's length */
  250. SK_BOOL IsBc /* Flag: packet is broadcast */
  251. unsigned *pOffset /* offs. of bytes to present to SK_RLMT_LOOKAHEAD */
  252. unsigned *pNumBytes /* #Bytes to present to SK_RLMT_LOOKAHEAD */
  253. #endif /* 0 */
  254. #define SK_RLMT_PRE_LOOKAHEAD(pAC,PortNum,PktLen,IsBc,pOffset,pNumBytes) { \
  255. SK_AC *_pAC; \
  256. SK_U32 _PortNum; \
  257. _pAC = (pAC); \
  258. _PortNum = (SK_U32)(PortNum); \
  259. /* _pAC->Rlmt.Port[_PortNum].PacketsRx++; */ \
  260. _pAC->Rlmt.Port[_PortNum].PacketsPerTimeSlot++; \
  261. if (_pAC->Rlmt.RlmtOff) { \
  262. *(pNumBytes) = 0; \
  263. } \
  264. else {\
  265. if ((_pAC->Rlmt.Port[_PortNum].Net->RlmtMode & SK_RLMT_TRANSPARENT) != 0) { \
  266. *(pNumBytes) = 0; \
  267. } \
  268. else if (IsBc) { \
  269. if (_pAC->Rlmt.Port[_PortNum].Net->RlmtMode != SK_RLMT_MODE_CLS) { \
  270. *(pNumBytes) = 6; \
  271. *(pOffset) = 6; \
  272. } \
  273. else { \
  274. *(pNumBytes) = 0; \
  275. } \
  276. } \
  277. else { \
  278. if ((PktLen) > SK_RLMT_MAX_TX_BUF_SIZE) { \
  279. /* _pAC->Rlmt.Port[_PortNum].DataPacketsPerTimeSlot++; */ \
  280. *(pNumBytes) = 0; \
  281. } \
  282. else { \
  283. *(pNumBytes) = 6; \
  284. *(pOffset) = 0; \
  285. } \
  286. } \
  287. } \
  288. }
  289. #if 0
  290. SK_AC *pAC /* adapter context */
  291. SK_U32 PortNum /* receiving port */
  292. SK_U8 *pLaPacket, /* received packet's data (points to pOffset) */
  293. SK_BOOL IsBc /* Flag: packet is broadcast */
  294. SK_BOOL IsMc /* Flag: packet is multicast */
  295. unsigned *pForRlmt /* Result: bits SK_RLMT_RX_RLMT, SK_RLMT_RX_PROTOCOL */
  296. SK_RLMT_LOOKAHEAD() expects *pNumBytes from
  297. packet offset *pOffset (s.a.) at *pLaPacket.
  298. If you use SK_RLMT_LOOKAHEAD in a path where you already know if the packet is
  299. BC, MC, or UC, you should use constants for IsBc and IsMc, so that your compiler
  300. can trash unneeded parts of the if construction.
  301. #endif /* 0 */
  302. #define SK_RLMT_LOOKAHEAD(pAC,PortNum,pLaPacket,IsBc,IsMc,pForRlmt) { \
  303. SK_AC *_pAC; \
  304. SK_U32 _PortNum; \
  305. SK_U8 *_pLaPacket; \
  306. _pAC = (pAC); \
  307. _PortNum = (SK_U32)(PortNum); \
  308. _pLaPacket = (SK_U8 *)(pLaPacket); \
  309. if (IsBc) {\
  310. if (!SK_ADDR_EQUAL(_pLaPacket, _pAC->Addr.Net[_pAC->Rlmt.Port[ \
  311. _PortNum].Net->NetNumber].CurrentMacAddress.a)) { \
  312. _pAC->Rlmt.Port[_PortNum].BcTimeStamp = SkOsGetTime(_pAC); \
  313. _pAC->Rlmt.CheckSwitch = SK_TRUE; \
  314. } \
  315. /* _pAC->Rlmt.Port[_PortNum].DataPacketsPerTimeSlot++; */ \
  316. *(pForRlmt) = SK_RLMT_RX_PROTOCOL; \
  317. } \
  318. else if (IsMc) { \
  319. if (SK_ADDR_EQUAL(_pLaPacket, BridgeMcAddr.a)) { \
  320. _pAC->Rlmt.Port[_PortNum].BpduPacketsPerTimeSlot++; \
  321. if (_pAC->Rlmt.Port[_PortNum].Net->RlmtMode & SK_RLMT_CHECK_SEG) { \
  322. *(pForRlmt) = SK_RLMT_RX_RLMT | SK_RLMT_RX_PROTOCOL; \
  323. } \
  324. else { \
  325. *(pForRlmt) = SK_RLMT_RX_PROTOCOL; \
  326. } \
  327. } \
  328. else if (SK_ADDR_EQUAL(_pLaPacket, SkRlmtMcAddr.a)) { \
  329. *(pForRlmt) = SK_RLMT_RX_RLMT; \
  330. } \
  331. else { \
  332. /* _pAC->Rlmt.Port[_PortNum].DataPacketsPerTimeSlot++; */ \
  333. *(pForRlmt) = SK_RLMT_RX_PROTOCOL; \
  334. } \
  335. } \
  336. else { \
  337. if (SK_ADDR_EQUAL( \
  338. _pLaPacket, \
  339. _pAC->Addr.Port[_PortNum].CurrentMacAddress.a)) { \
  340. *(pForRlmt) = SK_RLMT_RX_RLMT; \
  341. } \
  342. else { \
  343. /* _pAC->Rlmt.Port[_PortNum].DataPacketsPerTimeSlot++; */ \
  344. *(pForRlmt) = SK_RLMT_RX_PROTOCOL; \
  345. } \
  346. } \
  347. }
  348. #ifdef SK_RLMT_FAST_LOOKAHEAD
  349. Error: SK_RLMT_FAST_LOOKAHEAD no longer used. Use new macros for lookahead.
  350. #endif /* SK_RLMT_FAST_LOOKAHEAD */
  351. #ifdef SK_RLMT_SLOW_LOOKAHEAD
  352. Error: SK_RLMT_SLOW_LOOKAHEAD no longer used. Use new macros for lookahead.
  353. #endif /* SK_RLMT_SLOW_LOOKAHEAD */
  354. /* typedefs *******************************************************************/
  355. #ifdef SK_RLMT_MBUF_PRIVATE
  356. typedef struct s_RlmtMbuf {
  357. some content
  358. } SK_RLMT_MBUF;
  359. #endif /* SK_RLMT_MBUF_PRIVATE */
  360. #ifdef SK_LA_INFO
  361. typedef struct s_Rlmt_PacketInfo {
  362. unsigned PacketLength; /* Length of packet. */
  363. unsigned PacketType; /* Directed/Multicast/Broadcast. */
  364. } SK_RLMT_PINFO;
  365. #endif /* SK_LA_INFO */
  366. typedef struct s_RootId {
  367. SK_U8 Id[8]; /* Root Bridge Id. */
  368. } SK_RLMT_ROOT_ID;
  369. typedef struct s_port {
  370. SK_MAC_ADDR CheckAddr;
  371. SK_BOOL SuspectTx;
  372. } SK_PORT_CHECK;
  373. typedef struct s_RlmtNet SK_RLMT_NET;
  374. typedef struct s_RlmtPort {
  375. /* ----- Public part (read-only) ----- */
  376. SK_U8 PortState; /* Current state of this port. */
  377. /* For PNMI */
  378. SK_BOOL LinkDown;
  379. SK_BOOL PortDown;
  380. SK_U8 Align01;
  381. SK_U32 PortNumber; /* Number of port on adapter. */
  382. SK_RLMT_NET * Net; /* Net port belongs to. */
  383. SK_U64 TxHelloCts;
  384. SK_U64 RxHelloCts;
  385. SK_U64 TxSpHelloReqCts;
  386. SK_U64 RxSpHelloCts;
  387. /* ----- Private part ----- */
  388. /* SK_U64 PacketsRx; */ /* Total packets received. */
  389. SK_U32 PacketsPerTimeSlot; /* Packets rxed between TOs. */
  390. /* SK_U32 DataPacketsPerTimeSlot; */ /* Data packets ... */
  391. SK_U32 BpduPacketsPerTimeSlot; /* BPDU packets rxed in TS. */
  392. SK_U64 BcTimeStamp; /* Time of last BC receive. */
  393. SK_U64 GuTimeStamp; /* Time of entering GOING_UP. */
  394. SK_TIMER UpTimer; /* Timer struct Link/Port up. */
  395. SK_TIMER DownRxTimer; /* Timer struct down rx. */
  396. SK_TIMER DownTxTimer; /* Timer struct down tx. */
  397. SK_U32 CheckingState; /* Checking State. */
  398. SK_ADDR_PORT * AddrPort;
  399. SK_U8 Random[4]; /* Random value. */
  400. unsigned PortsChecked; /* #ports checked. */
  401. unsigned PortsSuspect; /* #ports checked that are s. */
  402. SK_PORT_CHECK PortCheck[1];
  403. /* SK_PORT_CHECK PortCheck[SK_MAX_MACS - 1]; */
  404. SK_BOOL PortStarted; /* Port is started. */
  405. SK_BOOL PortNoRx; /* NoRx for >= 1 time slot. */
  406. SK_BOOL RootIdSet;
  407. SK_RLMT_ROOT_ID Root; /* Root Bridge Id. */
  408. } SK_RLMT_PORT;
  409. struct s_RlmtNet {
  410. /* ----- Public part (read-only) ----- */
  411. SK_U32 NetNumber; /* Number of net. */
  412. SK_RLMT_PORT * Port[SK_MAX_MACS]; /* Ports that belong to this net. */
  413. SK_U32 NumPorts; /* Number of ports. */
  414. SK_U32 PrefPort; /* Preferred port. */
  415. /* For PNMI */
  416. SK_U32 ChgBcPrio; /* Change Priority of last broadcast received */
  417. SK_U32 RlmtMode; /* Check ... */
  418. SK_U32 ActivePort; /* Active port. */
  419. SK_U32 Preference; /* 0xFFFFFFFF: Automatic. */
  420. SK_U8 RlmtState; /* Current RLMT state. */
  421. /* ----- Private part ----- */
  422. SK_BOOL RootIdSet;
  423. SK_U16 Align01;
  424. int LinksUp; /* #Links up. */
  425. int PortsUp; /* #Ports up. */
  426. SK_U32 TimeoutValue; /* RLMT timeout value. */
  427. SK_U32 CheckingState; /* Checking State. */
  428. SK_RLMT_ROOT_ID Root; /* Root Bridge Id. */
  429. SK_TIMER LocTimer; /* Timer struct. */
  430. SK_TIMER SegTimer; /* Timer struct. */
  431. };
  432. typedef struct s_Rlmt {
  433. /* ----- Public part (read-only) ----- */
  434. SK_U32 NumNets; /* Number of nets. */
  435. SK_U32 NetsStarted; /* Number of nets started. */
  436. SK_RLMT_NET Net[SK_MAX_NETS]; /* Array of available nets. */
  437. SK_RLMT_PORT Port[SK_MAX_MACS]; /* Array of available ports. */
  438. /* ----- Private part ----- */
  439. SK_BOOL CheckSwitch;
  440. SK_BOOL RlmtOff; /* set to zero if the Mac addresses
  441. are equal or the second one
  442. is zero */
  443. SK_U16 Align01;
  444. } SK_RLMT;
  445. extern SK_MAC_ADDR BridgeMcAddr;
  446. extern SK_MAC_ADDR SkRlmtMcAddr;
  447. /* function prototypes ********************************************************/
  448. #ifndef SK_KR_PROTO
  449. /* Functions provided by SkRlmt */
  450. /* ANSI/C++ compliant function prototypes */
  451. extern void SkRlmtInit(
  452. SK_AC *pAC,
  453. SK_IOC IoC,
  454. int Level);
  455. extern int SkRlmtEvent(
  456. SK_AC *pAC,
  457. SK_IOC IoC,
  458. SK_U32 Event,
  459. SK_EVPARA Para);
  460. #else /* defined(SK_KR_PROTO) */
  461. /* Non-ANSI/C++ compliant function prototypes */
  462. #error KR-style function prototypes are not yet provided.
  463. #endif /* defined(SK_KR_PROTO)) */
  464. #ifdef __cplusplus
  465. }
  466. #endif /* __cplusplus */
  467. #endif /* __INC_SKRLMT_H */