rstp_bpdu.c
error_t rstpProcessBpdu(RstpBridgePort *port, const RstpBpdu *bpdu, size_t length)
Process incoming bridge protocol data unit.
Definition: rstp_bpdu.c:134
RSTP state machine conditions.
error_t ethSendFrame(NetInterface *interface, const MacAddr *destAddr, uint16_t type, NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary)
Send an Ethernet frame.
Definition: ethernet.c:399
int_t rstpCompareBridgeAddr(const MacAddr *addr1, const MacAddr *addr2)
Compare bridge addresses.
Definition: rstp_misc.c:256
RSTP helper functions.
error_t rstpSendBpdu(RstpBridgePort *port, const RstpBpdu *bpdu, size_t length)
Send bridge protocol data unit.
Definition: rstp_bpdu.c:308
RSTP (Rapid Spanning Tree Protocol)
char_t * macAddrToString(const MacAddr *macAddr, char_t *str)
Convert a MAC address to a dash delimited string.
Definition: ethernet.c:919
int_t rstpComparePortNum(uint16_t portId1, uint16_t portId2)
Compare port numbers.
Definition: rstp_misc.c:219
bool_t stpVersion(RstpBridgeContext *context)
stpVersion condition (17.20.12)
Definition: rstp_conditions.c:292
error_t netBufferAppend(NetBuffer *dest, const void *src, size_t length)
Append data a multi-part buffer.
Definition: net_mem.c:604
error_t rstpValidateConfigBpdu(RstpBridgePort *port, const RstpBpdu *bpdu, size_t length)
Validate Configuration BPDU.
Definition: rstp_bpdu.c:271
error_t rstpDumpBpdu(const RstpBpdu *bpdu, size_t length)
Dump BPDU for debugging purpose.
Definition: rstp_bpdu.c:389
void rstpProcessLlcFrame(NetInterface *interface, EthHeader *ethHeader, const uint8_t *data, size_t length, NetRxAncillary *ancillary, void *param)
Process incoming LLC frame.
Definition: rstp_bpdu.c:75
void * netBufferAt(const NetBuffer *buffer, size_t offset, size_t length)
Returns a pointer to a data segment.
Definition: net_mem.c:418
NetBuffer * ethAllocBuffer(size_t length, size_t *offset)
Allocate a buffer to hold an Ethernet frame.
Definition: ethernet.c:777
BPDU processing.
void rstpFsm(RstpBridgeContext *context)
RSTP state machine implementation.
Definition: rstp_fsm.c:152
const char_t * rstpGetParamName(uint_t value, const RstpParamName *paramList, size_t paramListLen)
Convert a parameter to string representation.
Definition: rstp_misc.c:883
Debugging facilities.
Rapid Spanning Tree state machines.