versadac  1
versadac - Scalable Recorder Firmware
lldptx.h
1 #ifndef _LLDPTX_H
2 #define _LLDPTX_H
3 
4 
5 
6 #define SET_CURRENT_PTR(a, b) (a)->stLldpTx.lpbyCurrentFrameBuffer = b
7 #define GET_CURRENT_PTR(a) (a)->stLldpTx.lpbyCurrentFrameBuffer
8 #define UPDATE_CURRENT_PTR(a, b) (a)->stLldpTx.lpbyCurrentFrameBuffer = (a)->stLldpTx.lpbyCurrentFrameBuffer + b;\
9  (a)->stLldpTx.wTxFrameLen = (APP_WORD)((a)->stLldpTx.wTxFrameLen + b)
10 
11 
12 
13 #define GET_BASE_BUF_PTR(a) (a)->stLldpTx.lpbyTxFrameBuffer
14 #define GET_BUF_LEN(a) (a)->stLldpTx.wTxFrameLen
15 #define CLEAR_BUF_LEN(a) (a)->stLldpTx.wTxFrameLen = 0
16 
17 
18 
19 /* Tx state machine */
20 #define ST_TX_LLDP_INITIALIZE 0
21 #define ST_TX_LLDP_IDLE 1
22 #define ST_TX_LLDP_INFO_FRAME 2
23 #define ST_TX_LLDP_SHUTDOWN_FRAME 3
24 #define ST_TX_LLDP_WAIT_SHUTDOWN_WHILE 4
25 
26 
27 
28 /* LLDP Tx Timers */
29 typedef struct _LLDP_TX_TIMERS {
30 
31  APP_WORD wTxShutdownWhile; /* 802.1AB 10.5.3.1*/
32  APP_WORD wTxDelayWhile; /* 802.1AB 10.5.3.1*/
33  APP_WORD wTxTTR; /* 802.1AB 10.5.3.1*/
35 
36 /* LLDP Tx Stat */
37 typedef struct _LLDP_TX_STATS {
38 
39  APP_DWORD dwStatsFrameOutTotal; /* 802.1AB 10.5.2.1*/
41 
42 /* LLDP TX State Machine */
43 typedef struct _LLDP_TX_SM {
44  /* 802.1AB 10.5.4.1*/
45  APP_BYTE byTxState;
46  APP_BYTE bySomethingChangeLocal;
47  APP_WORD wTxTTL; /* 802.1AB 10.5.4.1 */
48  APP_LPBYTE lpbyTxFrameBuffer;
49  APP_LPBYTE lpbyCurrentFrameBuffer;
50  APP_WORD wTxFrameLen;
51 
52  ST_LLDP_TX_STATS stLldpTxStats;
53  ST_LLDP_TX_TIMERS stLLDPTXTimers;
54 }ST_LLDP_TX_SM, APP_FAR * LPST_LLDP_TX_SM;
55 
56 
57 #endif
58 
59 
60 
61 
Definition: lldptx.h:43
Definition: lldptx.h:37
Definition: lldptx.h:29