|
iPXE
|
Link Layer Discovery Protocol. More...
#include <stdlib.h>#include <string.h>#include <errno.h>#include <byteswap.h>#include <ipxe/iobuf.h>#include <ipxe/netdevice.h>#include <ipxe/if_ether.h>#include <ipxe/settings.h>#include <ipxe/lldp.h>Go to the source code of this file.
Data Structures | |
| struct | lldp_settings |
| An LLDP settings block. More... | |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| FILE_SECBOOT (PERMITTED) | |
| static int | lldp_applies (struct settings *settings __unused, const struct setting *setting) |
| Check applicability of LLDP setting. | |
| static int | lldp_fetch (struct settings *settings, struct setting *setting, void *buf, size_t len) |
| Fetch value of LLDP setting. | |
| static int | lldp_rx (struct io_buffer *iobuf, struct net_device *netdev, const void *ll_dest, const void *ll_source, unsigned int flags __unused) |
| Process LLDP packet. | |
| static int | lldp_probe (struct net_device *netdev, void *priv) |
| Create LLDP settings block. | |
| static void | lldp_remove (struct net_device *netdev __unused, void *priv) |
| Remove LLDP settings block. | |
Variables | |
| struct net_driver lldp_driver | __net_driver |
| LLDP driver. | |
| static const struct settings_scope | lldp_settings_scope |
| LLDP settings scope. | |
| static struct settings_operations | lldp_settings_operations |
| LLDP settings operations. | |
| struct net_protocol lldp_protocol | __net_protocol |
| LLDP protocol. | |
Link Layer Discovery Protocol.
Definition in file lldp.c.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
| FILE_SECBOOT | ( | PERMITTED | ) |
Check applicability of LLDP setting.
| settings | Settings block |
| setting | Setting to fetch |
| applies | Setting applies within this settings block |
Definition at line 68 of file lldp.c.
References __unused, lldp_settings_scope, and setting::scope.
|
static |
Fetch value of LLDP setting.
| settings | Settings block |
| setting | Setting to fetch |
| buf | Buffer to fill with setting data |
| len | Length of buffer |
| len | Length of setting data, or negative error |
Definition at line 83 of file lldp.c.
References container_of, data, lldp_settings::data, DBGC, DBGC2, DBGC2_HDA, DBGC_HDA, ENOENT, high, htonl, len, lldp_settings::len, LLDP_TLV_LEN, LLDP_TLV_TYPE, LLDP_TYPE_END, memcmp(), memcpy(), lldp_settings::name, ntohs, raw, setting::tag, and setting::type.
|
static |
Process LLDP packet.
| iobuf | I/O buffer |
| netdev | Network device |
| ll_dest | Link-layer destination address |
| ll_source | Link-layer source address |
| flags | Packet flags |
| rc | Return status code |
Definition at line 205 of file lldp.c.
References __unused, data, io_buffer::data, lldp_settings::data, DBGC2, DBGC2_HDA, ENOMEM, flags, free, free_iob(), iob_len(), len, lldp_settings::len, malloc(), memcpy(), lldp_settings::name, netdev, netdev_priv(), NULL, and rc.
|
static |
Create LLDP settings block.
| netdev | Network device |
| priv | Private data |
| rc | Return status code |
Definition at line 260 of file lldp.c.
References assert, lldp_settings::data, DBGC, LLDP_SETTINGS_NAME, lldp_settings_operations, lldp_settings_scope, lldp_settings::name, netdev, netdev_settings(), NULL, priv, rc, register_settings(), lldp_settings::settings, settings_init(), strerror(), and unregister_settings().
|
static |
Remove LLDP settings block.
| netdev | Network device |
| priv | Private data |
Definition at line 293 of file lldp.c.
References __unused, lldp_settings::data, DBGC, free, lldp_settings::name, netdev, NULL, priv, lldp_settings::settings, and unregister_settings().
| struct net_driver lldp_driver __net_driver |
LLDP driver.
|
static |
LLDP settings scope.
Definition at line 59 of file lldp.c.
Referenced by lldp_applies(), and lldp_probe().
|
static |
LLDP settings operations.
Definition at line 190 of file lldp.c.
Referenced by lldp_probe().
| struct net_protocol lldp_protocol __net_protocol |
LLDP protocol.
AoE protocol.