Skip to content
Commit 59827626 authored by Jesus Sanchez-Palencia's avatar Jesus Sanchez-Palencia Committed by Jukka Rissanen
Browse files

net: l2: Add support for Link Layer Discovery Protocol (LLDP)



The LLDP protocol defines 2 separate agents, the Transmitters and
the Receivers. For the context of Zephyr, we are only interested in
the Tx agent, thus we drop any LLDP frames received by Zephyr.

LLDP frames are basically composed by an ethernet header followed by
the LLDP Protocol Data Unit (LLDPDU). The LLDPDU is composed by several
TLVs, some of them being mandatory and some optional.

Our approach here is having TLVs fully configured from Kconfig, thus
having the entire LLDPDU constructed on build time.

The commit adds NET_ETH_PTYPE_LLDP definition and related handling.

If CONFIG_NET_LLDP is enabled then ethernet_context has a pointer to
the struct net_lldpdu that belongs to that ethernet interface. Also
when CONFIG_NET_LLDP is enabled, the LLDP state machine will start to
send packets when network interface is coming up.

Currently the LLDP state machine is just a k_delayed_work() sending the
LLDPDU at a given period (defined by CONFIG_NET_LLDP_TX_INTERVAL).

Fixes #3233

Signed-off-by: default avatarJesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
Signed-off-by: default avatarJukka Rissanen <jukka.rissanen@linux.intel.com>
parent 6750b8d2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment