AM64x MCU+ SDK  08.02.00
hsrPrp_red_hsr.h
Go to the documentation of this file.
1 
38 #ifndef RED_HSR_H_
39 #define RED_HSR_H_
40 
41 /* ========================================================================== */
42 /* Include Files */
43 /* ========================================================================== */
44 
45 #include "hsrPrp_red_common.h"
46 #include "hsrPrp_handle.h"
47 /* ========================================================================== */
48 /* Macros & Typedefs */
49 /* ========================================================================== */
50 
51 #define ETHER_TYPE_HSR ( 0x892F )
52 #define ETHER_TYPE_HSR_SUP ( ETHER_TYPE_RED_SUP )
53 
54 #define HSR_TAG_SIZE ( 6 )
55 #define HSR_TAG_PATHID_OFFSET ( 2 )
56 #define HSR_LAN_A_MAGIC ( 0x00 )
57 #define HSR_LAN_B_MAGIC ( 0x01 )
59 #define HSR_TLV1_TYPE ( 23 )
61 #define HSR_SUP_SIZE ( RED_SUP_SIZE )
62 #define HSR_SUP_PATH ( RED_SUP_PATH )
63 #define HSR_SUP_VER ( RED_SUP_VER )
64 #define HSR_SUP_PAD ( RED_SUP_PAD )
65 
67 typedef struct _HSR_TAG
68 {
69 
70  uint16_t ether_type;
71  uint16_t path_and_size;
72  uint16_t seq_nr;
74 } HSR_TAG;
75 
77 typedef struct _HSR_SUP_FRAME
78 {
79 
80  uint8_t dst[ETHER_ADDR_LEN];
81  uint8_t src[ETHER_ADDR_LEN];
87  uint8_t padding[HSR_SUP_PAD];
90 
91 /* ========================================================================== */
92 /* Function Declarations */
93 /* ========================================================================== */
107  const uint8_t *pFrame,
108  int32_t frameSize);
117 void HsrFrameUpdatePathId(RED_FRAME *pRedFrame, uint16_t pathId);
133 void HsrSupFrameUpdateSrcAdd(RED_FRAME *pRedFrame, uint8_t *srcAdd);
143 void HsrSupFrameUpdatePathId(RED_FRAME *pRedFrame, uint16_t pathId);
160 
163 #endif /* RED_HSR_H_ */
HsrSupFrameUpdateSrcAdd
void HsrSupFrameUpdateSrcAdd(RED_FRAME *pRedFrame, uint8_t *srcAdd)
Updates Source Address of a HSR Supervision frame.
HsrSupFrameAllocate
RED_FRAME * HsrSupFrameAllocate(hsrPrpHandle *)
Allocates a RED_FRAME that holds HSR Supervision frame.
SUP_TAG
Definition: hsrPrp_red_common.h:101
HSR_TAG
Definition: hsrPrp_red_hsr.h:68
ETHER_ADDR_LEN
#define ETHER_ADDR_LEN
Definition: hsrPrp_red_common.h:77
TLV1_TAG
Definition: hsrPrp_red_common.h:111
HSR_SUP_PAD
#define HSR_SUP_PAD
Definition: hsrPrp_red_hsr.h:64
hsrPrpHandle
struct hsrPrp_Config_s hsrPrpHandle
Definition: hsrPrp_handle.h:86
HSR_SUP_FRAME::tlv2_tag
TLV2_TAG tlv2_tag
Definition: hsrPrp_red_hsr.h:85
HSR_TAG::seq_nr
uint16_t seq_nr
Definition: hsrPrp_red_hsr.h:72
HSR_SUP_FRAME
Definition: hsrPrp_red_hsr.h:78
HSR_SUP_FRAME::hsr_tag
HSR_TAG hsr_tag
Definition: hsrPrp_red_hsr.h:82
hsrPrp_red_common.h
Commonly used Macros, structures and Offsets.
HsrFrameFill
void HsrFrameFill(hsrPrpHandle *, RED_FRAME *pRedFrame, const uint8_t *pFrame, int32_t frameSize)
HsrSupFrameUpdatePathId
void HsrSupFrameUpdatePathId(RED_FRAME *pRedFrame, uint16_t pathId)
TLV2_TAG
Definition: hsrPrp_red_common.h:121
HSR_TAG::ether_type
uint16_t ether_type
Definition: hsrPrp_red_hsr.h:70
hsrPrp_handle.h
Include file for hsrPrp_red_hsr.c.
HSR_SUP_FRAME::tlv0_tag
TLV0_TAG tlv0_tag
Definition: hsrPrp_red_hsr.h:86
HsrFrameUpdatePathId
void HsrFrameUpdatePathId(RED_FRAME *pRedFrame, uint16_t pathId)
Updates PATH ID of a RED_FRAME.
TLV0_TAG
Definition: hsrPrp_red_common.h:131
HsrSupFrameUpdateSeqNr
void HsrSupFrameUpdateSeqNr(hsrPrpHandle *, RED_FRAME *pRedFrame)
RED_FRAME
Definition: hsrPrp_red_common.h:140
HsrSupFrameIncrementSeqNr
void HsrSupFrameIncrementSeqNr(hsrPrpHandle *)
HSR_SUP_FRAME::sup_tag
SUP_TAG sup_tag
Definition: hsrPrp_red_hsr.h:83
HSR_TAG::path_and_size
uint16_t path_and_size
Definition: hsrPrp_red_hsr.h:71
HSR_SUP_FRAME::tlv1_tag
TLV1_TAG tlv1_tag
Definition: hsrPrp_red_hsr.h:84