diff options
author | Michael Brown <mcb30@ipxe.org> | 2023-02-05 13:07:30 +0000 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2023-02-05 18:18:02 +0000 |
commit | dc16de3204d1956d4fd17808e6d34ac926bbe932 (patch) | |
tree | da7fdb7b513690b3c51876674d273874bd144104 /src/include/ipxe/neighbour.h | |
parent | 6c0335adf66cf58133ab2a1662d1b26f20000767 (diff) | |
download | ipxe-lldp.zip ipxe-lldp.tar.gz ipxe-lldp.tar.bz2 |
[lldp] Add support for the Link Layer Discovery Protocollldp
Add support for recording LLDP packets and exposing TLV values via the
settings mechanism. LLDP settings are encoded as
${netX.lldp/<prefix>.<type>.<index>.<offset>.<length>}
where
<type> is the TLV type
<offset> is the starting offset within the TLV value
<length> is the length (or zero to read the from <offset> to the end)
<prefix>, if it has a non-zero value, is the subtype byte string of
length <offset> to match at the start of the TLV value, up to a
maximum matched length of 4 bytes
<index> is the index of the entry matching <type> and <prefix> to be
accessed, with zero indicating the first matching entry
The <prefix> is designed to accommodate both matching of the OUI
within an organization-specific TLV (e.g. 0x0080c2 for IEEE 802.1
TLVs) and of a subtype byte as found within many TLVs.
This encoding allows most LLDP values to be extracted easily. For
example
System name: ${netX.lldp/5.0.0.0:string}
System description: ${netX.lldp/6.0.0.0:string}
Port description: ${netX.lldp/4.0.0.0:string}
Port interface name: ${netX.lldp/5.2.0.1.0:string}
Chassis MAC address: ${netX.lldp/4.1.0.1.0:hex}
Management IPv4 address: ${netX.lldp/5.1.8.0.2.4:ipv4}
Port VLAN ID: ${netX.lldp/0x0080c2.1.127.0.4.2:int16}
Port VLAN name: ${netX.lldp/0x0080c2.3.127.0.7.0:string}
Maximum frame size: ${netX.lldp/0x00120f.4.127.0.4.2:uint16}
Originally-implemented-by: Marin Hannache <git@mareo.fr>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/neighbour.h')
0 files changed, 0 insertions, 0 deletions