Common definitions for LRE (Link Redundancy Entity)
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of Texas Instruments Incorporated nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Go to the source code of this file.
Data Structures | |
| struct | lreStatistics |
| LRE Interface Statistics. More... | |
| struct | SUP_TAG |
| Supervision Frame Tag. More... | |
| struct | TLV1_TAG |
| TLV1 Tag. More... | |
| struct | TLV2_TAG |
| TLV2 Tag. More... | |
| struct | TLV0_TAG |
| TLV0 Tag. More... | |
| struct | __attribute__ |
| Supervision frame with no VLAN tag. More... | |
| struct | Lre_supervisionObj |
| Object for supervision frame handling. More... | |
| struct | NodeInfo |
| Structure to hold information about a single node. More... | |
| struct | NodeBucket |
| Structure for a single bucket in the hash table. More... | |
| struct | NodesTable |
| Structure for the nodestable hash table. More... | |
| struct | Lre_nodestableObj |
| Structure for the complete nodestable handling. More... | |
| struct | Lre_statisticsObj |
| Structure for statistics counters. More... | |
| struct | Lre_Obj |
| Structure for HSR/PRP redundancy handle members. More... | |
Macros | |
| #define | LRE_MANUFACTURER "Texas Instruments" |
| #define | LRE_VERSION_NAME "1.0.0.1" |
| #define | LRE_NODE_NAME "TI" |
| #define | LRE_SUP_SEND_HANDLER_TASK_PRIORITY (7U) |
| #define | LRE_SUP_SEND_HANDLER_TASK_STACK (3 * 1024) |
| #define | LRE_SUP_RCV_HANDLER_TASK_PRIORITY (7U) |
| #define | LRE_SUP_RCV_HANDLER_TASK_STACK (8 * 1024) |
| #define | ETHER_TYPE_LRE_SUP ( 0x88FB ) |
| #define | LRE_FRAME_MIN_SIZE ( 66 ) |
| #define | LRE_FRAME_VLAN_MIN_SIZE ( 70 ) |
| #define | ICSS_EMAC_MAXMTU_HSR 1528 |
| #define | LRE_SUP_PATH_VERSION ( 0x0001 ) |
| Path field is unused, set to 0 (MSB 4bits). Protocol version = 1. More... | |
| #define | LRE_TLV1_TYPE_PRP_DUP_DISCARD ( 20 ) |
| PRP node in Duplicate Discard mode. More... | |
| #define | LRE_TLV1_TYPE_PRP_DUP_ACCEPT ( 21 ) |
| PRP node in Duplicate Accept mode. More... | |
| #define | LRE_TLV1_TYPE_HSR ( 23 ) |
| HSR node in normal operation. More... | |
| #define | LRE_TLV2_TYPE_REDBOX_MAC ( 30 ) |
| Indicates that the source node is a RedBox. More... | |
| #define | LRE_TLV0_TYPE ( 0 ) |
| Closing TLV, set to 0. More... | |
| #define | LRE_TLV0_LENGTH ( 0 ) |
| Closing TLV, set to 0. More... | |
| #define | NT_TOTAL_ENTRIES 256 |
| #define | NT_BUCKET_SIZE 8 |
| #define | NT_NUM_OF_BUCKETS (NT_TOTAL_ENTRIES/NT_BUCKET_SIZE) |
| #define | LRE_NODE_FORGET_TIME 60 |
| #define | LRE_PORT_A 0U |
| #define | LRE_PORT_B 1U |
| #define | LRE_NODESTABLE_ENTRY_INVALID 0U |
| #define | LRE_NODESTABLE_ENTRY_VALID 1U |
Typedefs | |
| typedef struct Lre_Obj_s * | Lre_Handle |
| LRE hsr-prp driver handle. More... | |
Enumerations | |
| enum | Lre_Mode { LRE_MODE_PRP_DUP_DISCARD, LRE_MODE_PRP_DUP_ACCEPT, LRE_MODE_HSR } |
| LRE Mode Enum. More... | |
| enum | Lre_NodeType { NT_NODE_PRP_TYPE_DAN_DUP_ACCEPT, NT_NODE_PRP_TYPE_DAN_DUP_DISCARD, NT_NODE_PRP_TYPE_REDBOX_DUP_ACCEPT, NT_NODE_PRP_TYPE_REDBOX_DUP_DISCARD, NT_NODE_PRP_TYPE_VDAN_DUP_ACCEPT, NT_NODE_PRP_TYPE_VDAN_DUP_DISCARD, NT_NODE_HSR_TYPE_DAN, NT_NODE_HSR_TYPE_VDAN, NT_NODE_HSR_TYPE_REDBOX, NT_NODE_TYPE_SANA, NT_NODE_TYPE_SANB, NT_NODE_TYPE_SANAB, NT_NODE_TYPE_END } |
| LRE Remote Node Entry Type Enum. More... | |
Functions | |
| void | LRE_open (Lre_Handle lreHandle) |
| Opens the LRE driver. More... | |
| int32_t | LRE_supervisionInit (Lre_Handle lreHandle) |
| Initializes the LRE supervision object. More... | |
| void | LRE_nodesTableInit (Lre_nodestableObj *ntObj) |
| Initializes the nodestable. More... | |
| void | LRE_updateNodeEntry (NodesTable *table, const uint8_t *src_mac, uint16_t sequence_number, uint8_t port, Lre_NodeType node_type) |
| Updates the node entry in the node table. More... | |
| void | LRE_checkNodeTimeouts (NodesTable *table) |
| Checks the node timeouts. More... | |
| void | LRE_printNodesTable (Lre_Handle lreHandle) |
| Prints the current state of the node table. More... | |
| void | LRE_supervisionDeinit (Lre_Handle lreHandle) |
| Deinitializes the supervision module. More... | |
| void | LRE_statisticsInit (Lre_Handle lreHandle) |
| Initializes the statistics object. More... | |
| void | LRE_getStatistics (Lre_Handle lreHandle) |
| Updates the LRE statistics. More... | |