lldp: advertise system capabilities and the management address

Neighbours could not tell a bridge from a host and had no address to
reach us on. Add the System Capabilities TLV (bridge, enabled) and a
Management Address TLV with the IPv4 address, left out while the
address is still 0.0.0.0. Size the payload buffer for the frame it can
now hold: 64 bytes did not cover a 23 character hostname next to the
longer model names.
This commit is contained in:
d00f committed 2026-10-13 04:00:17 +02:00
1 parent 677536dd74
commit 0e2d940765
2 files changed
+37 -1

No files matched your search

+12
View File
@@ -27,6 +27,18 @@
#define LLDP_SYSNAME_TLV_TYPE 5
#define LLDP_SYSDESC_TLV_TYPE 6
#define LLDP_CAPABILITIES_TLV_TYPE 7
#define LLDP_CAPABILITIES_TLV_LENGTH 4
#define LLDP_CAPABILITY_BRIDGE 0x0004
#define LLDP_MGMT_ADDR_TLV_TYPE 8
#define LLDP_MGMT_ADDR_TLV_LENGTH 12
#define LLDP_MGMT_ADDR_STR_LENGTH 5
#define LLDP_MGMT_ADDR_SUBTYPE_IPV4 1
#define LLDP_MGMT_IF_NUMBERING_UNKNOWN 1
#define LLDP_MAX_PAYLOAD 128
void lldp_init(void) __banked;
void lldp_tick(void) __banked;
void lldp_send(void) __banked;