opengnsys_ipxe/src/net
Michael Brown dc16de3204 [lldp] Add support for the Link Layer Discovery Protocol
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>
2023-02-05 18:18:02 +00:00
..
80211 [crypto] Simplify internal HMAC API 2022-10-10 12:21:54 +01:00
infiniband [xsigo] Avoid storing unused uninitialised fields in gateway address 2022-02-16 13:29:53 +00:00
oncrpc [nfs] Rewrite NFS URI handling 2014-05-18 21:53:39 +01:00
tcp [uri] Retain original encodings for path, query, and fragment fields 2021-11-12 09:58:29 +00:00
udp [dhcp] Ignore DHCPNAK unless originating from the selected DHCP server 2023-02-03 19:51:58 +00:00
aoe.c [aoe] Allow AoE device to be described using an EFI device path 2020-10-19 14:45:49 +01:00
arp.c [arp] Validate length of ARP packet 2016-03-12 01:24:03 +00:00
dhcpopts.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:50:42 +00:00
dhcppkt.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
eap.c [eap] Treat an EAP Request-Identity as indicating a blocked link 2021-01-19 13:01:46 +00:00
eapol.c [eap] Treat an EAP Request-Identity as indicating a blocked link 2021-01-19 13:01:46 +00:00
eth_slow.c [lacp] Ignore (and do not echo) trailing padding on received packets 2020-10-14 14:18:49 +01:00
ethernet.c [ethernet] Avoid false positive Coverity warning 2019-08-17 17:30:09 +01:00
fakedhcp.c [pxe] Populate ciaddr in fake PXE Boot Server ACK packet 2015-09-01 21:24:02 +01:00
fc.c [build] Fix the REQUIRE_SYMBOL mechanism 2015-03-05 00:59:38 +00:00
fcels.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
fcns.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
fcoe.c [time] Allow timer to be selected at runtime 2017-01-26 08:17:37 +00:00
fcp.c [fcp] Allow Fibre Channel device to be described using an EFI device path 2020-10-22 14:16:55 +01:00
fragment.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
icmp.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
icmpv4.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
icmpv6.c [ipv6] Disambiguate received ICMPv6 errors 2015-05-11 12:45:14 +01:00
infiniband.c [infiniband] Require drivers to specify the number of ports 2021-01-27 01:15:35 +00:00
iobpad.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
ipv4.c [netdevice] Separate concept of scope ID from network device name index 2023-01-14 00:09:20 +00:00
ipv6.c [netdevice] Separate concept of scope ID from network device name index 2023-01-14 00:09:20 +00:00
lldp.c [lldp] Add support for the Link Layer Discovery Protocol 2023-02-05 18:18:02 +00:00
ndp.c [netdevice] Separate concept of scope ID from network device name index 2023-01-14 00:09:20 +00:00
neighbour.c [neighbour] Return success when deferring a packet 2015-05-20 15:29:36 +01:00
netdev_settings.c [netdevice] Ensure consistent interpretation of "netX" device name 2023-01-17 12:42:46 +00:00
netdevice.c [netdevice] Allow duplicate MAC addresses 2023-01-15 00:42:52 +00:00
nullnet.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
pccrc.c [crypto] Simplify internal HMAC API 2022-10-10 12:21:54 +01:00
pccrd.c [peerdist] Add support for constructing and decoding discovery messages 2015-07-28 16:09:14 +01:00
peerblk.c [crypto] Allow initialisation vector length to vary from cipher blocksize 2022-10-25 13:21:28 +01:00
peerdisc.c [netdevice] Separate concept of scope ID from network device name index 2023-01-14 00:09:20 +00:00
peerdist.c [peerdist] Allow PeerDist to be globally enabled or disabled 2019-12-13 14:44:22 +00:00
peermux.c [peerdist] Gather and report peer statistics during download 2017-09-05 23:23:22 +01:00
ping.c [xfer] Remove address family from definition of a socket opener 2020-07-15 18:46:58 +01:00
rarp.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
retry.c [retry] Colourise debug output 2015-03-05 11:25:54 +00:00
rndis.c [rndis] Clean up error handling path in register_rndis() 2018-07-09 10:35:57 +01:00
socket.c [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
stp.c [time] Allow timer to be selected at runtime 2017-01-26 08:17:37 +00:00
tcp.c [xfer] Remove address family from definition of a socket opener 2020-07-15 18:46:58 +01:00
tcpip.c [netdevice] Limit MTU by hardware maximum frame length 2017-01-25 14:55:09 +00:00
tls.c [tls] Allow handshake digest algorithm to be specified by cipher suite 2022-11-09 14:49:42 +00:00
udp.c [xfer] Remove address family from definition of a socket opener 2020-07-15 18:46:58 +01:00
validator.c [x509] Make root of trust a reference-counted structure 2020-12-09 16:45:50 +00:00
vlan.c [vlan] Support automatic VLAN device creation 2023-01-15 22:35:44 +00:00