|
AM243x MCU+ SDK
08.06.00
|
|
Go to the documentation of this file.
58 #if __BYTE_ORDER == __LITTLE_ENDIAN
60 #define OS_HostToNet16(x) ((((x) & 0x00ff) << 8) | \
61 (((x) & 0xff00) >> 8))
63 #define OS_NetToHost16(x) ((((x) & 0x00ff) << 8) | \
64 (((x) & 0xff00) >> 8))
66 #define OS_HostToNet32(x) ((((x) & 0x000000ff) << 24) | \
67 (((x) & 0x0000ff00) << 8) | \
68 (((x) & 0x00ff0000) >> 8) | \
69 (((x) & 0xff000000) >> 24))
72 #define OS_NetToHost32(x) ((((x) & 0x000000ff) << 24) | \
73 (((x) & 0x0000ff00) << 8) | \
74 (((x) & 0x00ff0000) >> 8) | \
75 (((x) & 0xff000000) >> 24))
78 #define RED_SUP_SIZE ( 52 )
79 #define RED_SUP_PATH ( 0 )
80 #define RED_SUP_VER ( 1 )
81 #define RED_SUP_PAD ( 24 )
83 #define ETHER_ADDR_LEN ( 6 )
85 #define ETHER_TYPE_ARP ( 0x0806 )
86 #define ETHER_TYPE_VLAN ( 0x8100 )
87 #define ETHER_TYPE_RED_SUP ( 0x88FB )
88 #define ETHER_TYPE_RED_SUP_BIG_ENDIEN ( 0xFB88 )
89 #define ETHER_TYPE_SIZE ( 2 )
90 #define ETHER_HEADER_LEN ( 14 )
91 #define ETHER_VLAN_PT_LEN ( 4 )
93 #define ETHER_TYPE_OFFSET ( 12 )
95 #define ARP_IP_SRC_OFFSET ( 28 )
96 #define ARP_IP_DST_OFFSET ( 38 )
98 #define RED_FRAME_MIN_SIZE ( 66 )
99 #define RED_FRAME_VLAN_MIN_SIZE ( 70 )
101 #define RED_TLV2_TYPE ( 30 )
103 #define ICSS_EMAC_MAXMTU_HSR 1528
106 typedef struct _SUP_TAG
116 typedef struct _TLV1_TAG
126 typedef struct _TLV2_TAG
136 typedef struct _TLV0_TAG
145 typedef struct _RED_FRAME
376 typedef struct _RED_STATISTICS
466 typedef struct _RED_INDEX_ARRAY_ENTRY
480 typedef struct _RED_BIN_ARRAY_ENTRY
492 typedef struct _RED_NODE_TABLE_ENTRY
513 typedef struct _RED_NODE_TABLE
534 #define RED_DEBUG_MSG(...) printf(__VA_ARGS__)
536 #define RED_DEBUG_MSG(...)
@ LRE_IF_STATS_CNT_TX_B
Definition: hsrPrp_red_common.h:328
uint32_t cntUniqueA
Definition: hsrPrp_red_common.h:403
@ LRE_IF_STATS_CNT_NODES
Definition: hsrPrp_red_common.h:339
@ SN_HSR_REDBOX_SAN
Definition: hsrPrp_red_common.h:269
uint32_t cntRxA
Definition: hsrPrp_red_common.h:498
@ RED_OK
Definition: hsrPrp_red_common.h:528
LreNodeType_t
LRE Node Type.
Definition: hsrPrp_red_common.h:174
@ RED_REM_NODE_TYPE_REDBOXP
Definition: hsrPrp_red_common.h:363
@ LRE_IF_STATS_CNT_UNIQUE_C
Definition: hsrPrp_red_common.h:343
@ LRE_IF_STATS_CNT_ERR_WRONG_LAN_B
Definition: hsrPrp_red_common.h:331
@ LRE_IF_STATS_CNT_MULTI_C
Definition: hsrPrp_red_common.h:349
uint8_t state
Definition: hsrPrp_red_common.h:496
uint32_t TX_UC_FRAMES
Definition: hsrPrp_red_common.h:427
LreTruthValue_t
LRE Truth Value.
Definition: hsrPrp_red_common.h:304
@ LRE_IF_STATS_CNT_TX_C
Definition: hsrPrp_red_common.h:329
uint32_t DEBUG_1
Definition: hsrPrp_red_common.h:455
uint32_t cntOwnRxB
Definition: hsrPrp_red_common.h:419
uint32_t RXA_OVERFLOW
Definition: hsrPrp_red_common.h:446
uint16_t ether_type
Definition: hsrPrp_red_common.h:109
LreTableOperation_t
LRE Table Operation.
Definition: hsrPrp_red_common.h:315
@ HSR_COMMON_MODE_T
Definition: hsrPrp_red_common.h:254
LreRedBoxIdentity_t
LRE RedBox Identity.
Definition: hsrPrp_red_common.h:281
RemNodeType_t
Remote Node Type.
Definition: hsrPrp_red_common.h:360
Definition: hsrPrp_red_common.h:107
HSRMode_t
LRE HSR Mode.
Definition: hsrPrp_red_common.h:250
uint32_t cntErrWrongLanC
Definition: hsrPrp_red_common.h:387
LreRowStatus_t
LRE Row Status.
Definition: hsrPrp_red_common.h:159
uint32_t cntDuplicateA
Definition: hsrPrp_red_common.h:408
uint32_t cntErrWrongLanA
Definition: hsrPrp_red_common.h:385
uint32_t errRxB
Definition: hsrPrp_red_common.h:501
@ REDBOX_ID2A
Definition: hsrPrp_red_common.h:285
uint32_t cntMultiB
Definition: hsrPrp_red_common.h:414
@ SN_NON_BRIDGING_NODE
Definition: hsrPrp_red_common.h:266
@ SN_HSR_NODE
Definition: hsrPrp_red_common.h:270
@ LRE_IF_STATS_CNT_ERRORS_B
Definition: hsrPrp_red_common.h:337
uint32_t cntRxA
Definition: hsrPrp_red_common.h:390
#define ETHER_ADDR_LEN
Definition: hsrPrp_red_common.h:83
uint8_t cntRxSupA
Definition: hsrPrp_red_common.h:502
@ REDBOX_ID7B
Definition: hsrPrp_red_common.h:296
Node Table Entry.
Definition: hsrPrp_red_common.h:493
uint16_t vlanTagSize
Definition: hsrPrp_red_common.h:150
uint32_t cntTxA
Definition: hsrPrp_red_common.h:380
@ LRE_IF_STATS_CNT_ERR_WRONG_LAN_C
Definition: hsrPrp_red_common.h:332
@ LRE_ROW_STATUS_CREATE_AND_WAIT
Definition: hsrPrp_red_common.h:165
@ LRE_IF_STATS_CNT_DUPLICATE_C
Definition: hsrPrp_red_common.h:346
@ RED_PORT_A
Definition: hsrPrp_red_common.h:197
@ SN_BRIDGING_UNSPECIFIED
Definition: hsrPrp_red_common.h:267
uint32_t RXA_FWD_FAILACQU_QUEUE
Definition: hsrPrp_red_common.h:452
uint16_t path_and_ver
Definition: hsrPrp_red_common.h:110
@ RED_REM_NODE_TYPE_DANP
Definition: hsrPrp_red_common.h:362
uint32_t cntOwnRxA
Definition: hsrPrp_red_common.h:418
@ REDBOX_ID4A
Definition: hsrPrp_red_common.h:289
@ REDBOX_ID1A
Definition: hsrPrp_red_common.h:283
@ RED_REM_NODE_TYPE_VDANP
Definition: hsrPrp_red_common.h:364
uint32_t RXA_FAILACQU_QUEUE
Definition: hsrPrp_red_common.h:450
Bin array Entry.
Definition: hsrPrp_red_common.h:481
uint32_t RXB_BC_FRAMES
Definition: hsrPrp_red_common.h:441
@ SN_PRP_NODE
Definition: hsrPrp_red_common.h:268
uint16_t bin_offset
Definition: hsrPrp_red_common.h:470
uint16_t nodetable_offset
Definition: hsrPrp_red_common.h:484
@ LRE_IF_STATS_CNT_RX_C
Definition: hsrPrp_red_common.h:335
uint32_t RXB_UC_FRAMES
Definition: hsrPrp_red_common.h:443
uint32_t cntUniqueB
Definition: hsrPrp_red_common.h:404
uint8_t cntRxSupB
Definition: hsrPrp_red_common.h:503
Definition: hsrPrp_red_common.h:117
uint32_t RXB_OVERFLOW
Definition: hsrPrp_red_common.h:447
@ LRE_IF_STATS_CNT_RX_A
Definition: hsrPrp_red_common.h:333
uint32_t cntRxB
Definition: hsrPrp_red_common.h:499
@ LRE_PORT_ACTIVE
Definition: hsrPrp_red_common.h:209
uint32_t errRxA
Definition: hsrPrp_red_common.h:500
uint32_t TX_MC_FRAMES
Definition: hsrPrp_red_common.h:426
RedPort_t
RED Port.
Definition: hsrPrp_red_common.h:195
#define ICSS_EMAC_PORT_2
Used to specify physical port 2 MII 1 (tx)
Definition: icss_emac.h:274
uint32_t TXB_BYTE_CNT
Definition: hsrPrp_red_common.h:439
uint32_t RXB_FWD_OVERFLOW
Definition: hsrPrp_red_common.h:449
@ RED_REM_NODE_TYPE_UNKNOWN
Definition: hsrPrp_red_common.h:369
@ LRE_LINK_DOWN
Definition: hsrPrp_red_common.h:220
@ LRE_TRUE
Definition: hsrPrp_red_common.h:307
uint32_t cntRxB
Definition: hsrPrp_red_common.h:391
RED_NODE_TABLE_ENTRY * entries
Definition: hsrPrp_red_common.h:516
@ RED_REM_NODE_TYPE_VDANH
Definition: hsrPrp_red_common.h:367
LreDuplicateDiscard_t
LRE Duplicate Discard.
Definition: hsrPrp_red_common.h:228
uint16_t timeLasSeenS
Definition: hsrPrp_red_common.h:504
LreTransparentReception_t
LRE Transparent Reception.
Definition: hsrPrp_red_common.h:239
@ LRE_FALSE
Definition: hsrPrp_red_common.h:306
LRE Interface Statistics.
Definition: hsrPrp_red_common.h:377
uint16_t paddingSize
Definition: hsrPrp_red_common.h:151
uint32_t cntDuplicateB
Definition: hsrPrp_red_common.h:409
uint32_t RX_UC_FRAMES
Definition: hsrPrp_red_common.h:433
uint32_t cntErrorsC
Definition: hsrPrp_red_common.h:397
@ HSR_COMMON_MODE_N
Definition: hsrPrp_red_common.h:253
uint32_t RXA_FWD_OVERFLOW
Definition: hsrPrp_red_common.h:448
uint32_t RX_MC_FRAMES
Definition: hsrPrp_red_common.h:432
@ RED_ERR
Definition: hsrPrp_red_common.h:529
@ LRE_IF_STATS_CNT_PROXY_NODES
Definition: hsrPrp_red_common.h:340
@ LRE_TR_PASS_RCT
Definition: hsrPrp_red_common.h:242
@ REDBOX_ID5B
Definition: hsrPrp_red_common.h:292
@ REDBOX_ID3A
Definition: hsrPrp_red_common.h:287
@ REDBOX_ID5A
Definition: hsrPrp_red_common.h:291
uint32_t cntErrorsB
Definition: hsrPrp_red_common.h:396
@ LRE_ROW_STATUS_NOT_READY
Definition: hsrPrp_red_common.h:163
uint32_t RXB_FWD_FAILACQU_QUEUE
Definition: hsrPrp_red_common.h:453
uint32_t cntMultiC
Definition: hsrPrp_red_common.h:415
uint32_t RXB_FAILACQU_QUEUE
Definition: hsrPrp_red_common.h:451
uint32_t TXB_UC_FRAMES
Definition: hsrPrp_red_common.h:437
@ LRE_ROW_STATUS_ACTIVE
Definition: hsrPrp_red_common.h:161
uint32_t hostCntRx
Definition: hsrPrp_red_common.h:421
uint32_t cntErrorsA
Definition: hsrPrp_red_common.h:395
uint32_t cntUniqueC
Definition: hsrPrp_red_common.h:405
@ LRE_ROW_STATUS_CREATE_AND_GO
Definition: hsrPrp_red_common.h:164
@ LRE_IF_STATS_CNT_UNIQUE_A
Definition: hsrPrp_red_common.h:341
uint8_t bitLinBin
Definition: hsrPrp_red_common.h:473
@ LRE_IF_STATS_CNT_ERR_WRONG_LAN_A
Definition: hsrPrp_red_common.h:330
uint32_t TX_BYTE_CNT
Definition: hsrPrp_red_common.h:429
@ RED_REM_NODE_TYPE_DANH
Definition: hsrPrp_red_common.h:365
uint16_t seq_nr
Definition: hsrPrp_red_common.h:111
@ LRE_IF_STATS_CNT_OWN_RX_A
Definition: hsrPrp_red_common.h:350
MAC Address.
Definition: hsrPrp_red_common.h:185
@ SN_HSR_REDBOX_PRP_B
Definition: hsrPrp_red_common.h:273
RED_STATUS
RED Status.
Definition: hsrPrp_red_common.h:526
uint8_t type
Definition: hsrPrp_red_common.h:129
uint32_t RX_BC_FRAMES
Definition: hsrPrp_red_common.h:431
LreIfStat_t
LRE Interface Statistics Entry.
Definition: hsrPrp_red_common.h:326
uint32_t cntNodes
Definition: hsrPrp_red_common.h:399
uint16_t binNoEntries
Definition: hsrPrp_red_common.h:472
uint32_t cntMultiA
Definition: hsrPrp_red_common.h:413
@ REDBOX_ID3B
Definition: hsrPrp_red_common.h:288
#define ICSS_EMAC_PORT_1
Used to specify physical port 1 MII 0 (tx)
Definition: icss_emac.h:269
uint32_t DEBUG_4
Definition: hsrPrp_red_common.h:459
@ LRE_IF_STATS_CNT_DUPLICATE_A
Definition: hsrPrp_red_common.h:344
SwitchingEndNode_t
The switching end node functionality.
Definition: hsrPrp_red_common.h:264
uint32_t DEBUG_3
Definition: hsrPrp_red_common.h:458
uint32_t max
Definition: hsrPrp_red_common.h:518
Definition: hsrPrp_red_common.h:127
@ LRE_IF_STATS_CNT_OWN_RX_B
Definition: hsrPrp_red_common.h:351
uint32_t cntRxC
Definition: hsrPrp_red_common.h:392
@ LRE_IF_STATS_CNT_DUPLICATE_B
Definition: hsrPrp_red_common.h:345
@ LRE_IF_STATS_CNT_MULTI_A
Definition: hsrPrp_red_common.h:347
uint32_t TXB_MC_FRAMES
Definition: hsrPrp_red_common.h:436
uint8_t mac_length
Definition: hsrPrp_red_common.h:120
@ HSR_COMMON_MODE_H
Definition: hsrPrp_red_common.h:252
uint8_t type
Definition: hsrPrp_red_common.h:119
uint16_t bufferLen
Definition: hsrPrp_red_common.h:149
@ RED_PORT_B
Definition: hsrPrp_red_common.h:198
uint32_t tx_bc_frames
Definition: hsrPrp_red_common.h:425
@ SN_HSR_REDBOX_PRP_A
Definition: hsrPrp_red_common.h:272
@ LRE_NODE_TYPE_PRP_MODE_1
Definition: hsrPrp_red_common.h:176
@ HSR_COMMON_MODE_U
Definition: hsrPrp_red_common.h:255
uint8_t * pDataBuffer
Definition: hsrPrp_red_common.h:148
Definition: hsrPrp_red_common.h:137
@ LRE_IF_STATS_CNT_MULTI_B
Definition: hsrPrp_red_common.h:348
uint32_t cntErrWrongLanB
Definition: hsrPrp_red_common.h:386
uint32_t DEBUG_2
Definition: hsrPrp_red_common.h:456
@ SN_HSR_REDBOX_HSR
Definition: hsrPrp_red_common.h:271
@ REDBOX_ID2B
Definition: hsrPrp_red_common.h:286
@ LRE_IF_STATS_CNT_RX_B
Definition: hsrPrp_red_common.h:334
@ LRE_IF_STATS_CNT_ERRORS_A
Definition: hsrPrp_red_common.h:336
uint32_t RXB_MC_FRAMES
Definition: hsrPrp_red_common.h:442
@ REDBOX_ID6B
Definition: hsrPrp_red_common.h:294
@ REDBOX_ID6A
Definition: hsrPrp_red_common.h:293
@ LRE_TABLE_NO_OP
Definition: hsrPrp_red_common.h:317
@ LRE_ROW_STATUS_NOT_IN_SERVICE
Definition: hsrPrp_red_common.h:162
uint32_t TXB_BC_FRAMES
Definition: hsrPrp_red_common.h:435
Definition: hsrPrp_red_common.h:146
uint16_t timeLasSeenA
Definition: hsrPrp_red_common.h:505
uint32_t cntProxyNodes
Definition: hsrPrp_red_common.h:400
@ LRE_TABLE_CLEAR
Definition: hsrPrp_red_common.h:318
@ LRE_PORT_NOT_ACTIVE
Definition: hsrPrp_red_common.h:208
@ REDBOX_ID7A
Definition: hsrPrp_red_common.h:295
@ LRE_IF_STATS_CNT_TX_A
Definition: hsrPrp_red_common.h:327
@ RED_REM_NODE_TYPE_SAN
Definition: hsrPrp_red_common.h:368
Index array Entry.
Definition: hsrPrp_red_common.h:467
uint32_t cntDuplicateC
Definition: hsrPrp_red_common.h:410
uint32_t cntTxC
Definition: hsrPrp_red_common.h:382
@ LRE_LINK_UP
Definition: hsrPrp_red_common.h:219
LrePortAdminState_t
LRE Port Admin State.
Definition: hsrPrp_red_common.h:206
@ LRE_IF_STATS_CNT_ERRORS_C
Definition: hsrPrp_red_common.h:338
@ LRE_IF_STATS_CNT_UNIQUE_B
Definition: hsrPrp_red_common.h:342
@ LRE_NODE_TYPE_HSR
Definition: hsrPrp_red_common.h:177
@ REDBOX_ID4B
Definition: hsrPrp_red_common.h:290
uint16_t timeLasSeenB
Definition: hsrPrp_red_common.h:506
uint8_t type
Definition: hsrPrp_red_common.h:139
Node Table.
Definition: hsrPrp_red_common.h:514
uint8_t status
Definition: hsrPrp_red_common.h:497
@ REDBOX_ID1B
Definition: hsrPrp_red_common.h:284
@ LRE_DD_DISCARD
Definition: hsrPrp_red_common.h:231
@ LRE_DD_DO_NOT_DISCARD
Definition: hsrPrp_red_common.h:230
uint8_t length
Definition: hsrPrp_red_common.h:140
@ HSR_COMMON_MODE_M
Definition: hsrPrp_red_common.h:256
uint8_t mac_length
Definition: hsrPrp_red_common.h:130
LreLinkStatus_t
LRE Link Status.
Definition: hsrPrp_red_common.h:217
uint32_t cntTxB
Definition: hsrPrp_red_common.h:381
@ LRE_TR_REMOVE_RCT
Definition: hsrPrp_red_common.h:241
uint32_t cnt
Definition: hsrPrp_red_common.h:517
uint32_t NODE_TABLE_INSERTION_ERROR
Definition: hsrPrp_red_common.h:445
@ LRE_ROW_STATUS_DESTROY
Definition: hsrPrp_red_common.h:166
@ RED_REM_NODE_TYPE_REDBOXH
Definition: hsrPrp_red_common.h:366