mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-11-01 18:04:12 +08:00
lldp: send the port name as the port description
A port named in the CLI or the web UI (port <n> name ...) now carries that name in a Port Description TLV, so a neighbour sees "Uplink" next to "Port 9". The tail of the frame is built per port, since the TLV length differs from port to port; ports without a name send no TLV.
This commit is contained in:
1 parent
9a61e471ea
commit
3dd60f6b13
2 files changed
+39
-19
No files matched your search
@@ -24,6 +24,7 @@
|
||||
#define LLDP_CHASSIS_ID_TLV_LENGTH 7
|
||||
#define LLDP_CHASSIS_ID_TLV_SUBTYPE 4
|
||||
|
||||
#define LLDP_PORT_DESC_TLV_TYPE 4
|
||||
#define LLDP_SYSNAME_TLV_TYPE 5
|
||||
#define LLDP_SYSDESC_TLV_TYPE 6
|
||||
|
||||
@@ -47,5 +48,6 @@ void lldp_set_addresses(void) __banked;
|
||||
void lldp_set_rtl_wrapper(void) __banked;
|
||||
uint8_t lldp_sysname(__xdata uint8_t *p) __banked;
|
||||
uint8_t lldp_sysdesc(__xdata uint8_t *p) __banked;
|
||||
uint8_t lldp_portdesc(__xdata uint8_t *p, uint8_t port) __banked;
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user