IEEE 802.1 LLDP extension. More...
Go to the source code of this file.
Macros | |
#define | LLDP_DOT1_MIN_VLAN_NAME_LEN 1 |
#define | LLDP_DOT1_MAX_VLAN_NAME_LEN 31 |
#define | LLDP_DOT1_MIN_PROTOCOL_ID_LEN 1 |
#define | LLDP_DOT1_MAX_PROTOCOL_ID_LEN 255 |
Enumerations | |
enum | LldpDot1Subtype { LLDP_DOT1_SUBTYPE_RESERVED = 0, LLDP_DOT1_SUBTYPE_PORT_VLAN_ID = 1, LLDP_DOT1_SUBTYPE_PORT_PROTO_VLAN_ID = 2, LLDP_DOT1_SUBTYPE_VLAN_NAME = 3, LLDP_DOT1_SUBTYPE_PROTOCOL_ID = 4 } |
IEEE 802.1 subtypes. More... | |
enum | LldpDot1PortProtoFlags { LLDP_DOT1_PORT_PROTO_FLAG_RESERVED = 0x01, LLDP_DOT1_PORT_PROTO_FLAG_SUPPORTED = 0x02, LLDP_DOT1_PORT_PROTO_FLAG_ENABLED = 0x04 } |
Port and protocol capability/status flags. More... | |
Functions | |
error_t | lldpDot1SetLocalPortVlanId (LldpAgentContext *context, uint_t portIndex, uint16_t pvid) |
Set port VLAN ID. More... | |
error_t | lldpDot1SetLocalPortProtoVlanId (LldpAgentContext *context, uint_t portIndex, uint8_t flags, uint16_t ppvid) |
Set port and protocol VLAN ID. More... | |
error_t | lldpDot1SetLocalVlanName (LldpAgentContext *context, uint_t portIndex, uint16_t vlanId, const char_t *vlanName) |
Set VLAN name. More... | |
error_t | lldpDot1SetLocalProtocolId (LldpAgentContext *context, uint_t portIndex, const uint8_t *protocolId, size_t protocolIdLen) |
Set protocol identity. More... | |
error_t | lldpDot1DeleteLocalTlv (LldpAgentContext *context, LldpDot1Subtype subtype) |
Remove all IEEE 802.1 specific TLVs with specified subtype. More... | |
Variables | |
typedef | __packed_struct |
Port VLAN ID TLV. More... | |
LldpDot1PortVlanIdTlv | |
uint16_t | ppvid |
LldpDot1PortProtoVlanIdTlv | |
uint8_t | vlanNameLen |
char_t | vlanName [] |
LldpDot1VlanNameTlv | |
uint8_t | protocolId [] |
LldpDot1ProtocolIdTlv | |
Detailed Description
IEEE 802.1 LLDP extension.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2024 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneTCP Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- Version
- 2.4.4
Definition in file lldp_ext_dot1.h.
Macro Definition Documentation
◆ LLDP_DOT1_MAX_PROTOCOL_ID_LEN
#define LLDP_DOT1_MAX_PROTOCOL_ID_LEN 255 |
Definition at line 46 of file lldp_ext_dot1.h.
◆ LLDP_DOT1_MAX_VLAN_NAME_LEN
#define LLDP_DOT1_MAX_VLAN_NAME_LEN 31 |
Definition at line 41 of file lldp_ext_dot1.h.
◆ LLDP_DOT1_MIN_PROTOCOL_ID_LEN
#define LLDP_DOT1_MIN_PROTOCOL_ID_LEN 1 |
Definition at line 44 of file lldp_ext_dot1.h.
◆ LLDP_DOT1_MIN_VLAN_NAME_LEN
#define LLDP_DOT1_MIN_VLAN_NAME_LEN 1 |
Definition at line 39 of file lldp_ext_dot1.h.
Enumeration Type Documentation
◆ LldpDot1PortProtoFlags
Port and protocol capability/status flags.
Enumerator | |
---|---|
LLDP_DOT1_PORT_PROTO_FLAG_RESERVED | Reserved. |
LLDP_DOT1_PORT_PROTO_FLAG_SUPPORTED | Port and protocol VLAN supported. |
LLDP_DOT1_PORT_PROTO_FLAG_ENABLED | Port and protocol VLAN enabled. |
Definition at line 72 of file lldp_ext_dot1.h.
◆ LldpDot1Subtype
enum LldpDot1Subtype |
IEEE 802.1 subtypes.
Definition at line 58 of file lldp_ext_dot1.h.
Function Documentation
◆ lldpDot1DeleteLocalTlv()
error_t lldpDot1DeleteLocalTlv | ( | LldpAgentContext * | context, |
LldpDot1Subtype | subtype | ||
) |
Remove all IEEE 802.1 specific TLVs with specified subtype.
- Parameters
-
[in] context Pointer to the LLDP agent context [in] subtype TLV subtype
- Returns
- Error code
Definition at line 465 of file lldp_ext_dot1.c.
◆ lldpDot1SetLocalPortProtoVlanId()
error_t lldpDot1SetLocalPortProtoVlanId | ( | LldpAgentContext * | context, |
uint_t | portIndex, | ||
uint8_t | flags, | ||
uint16_t | ppvid | ||
) |
Set port and protocol VLAN ID.
- Parameters
-
[in] context Pointer to the LLDP agent context [in] portIndex Port index [in] flags Bit-map indicating the port and protocol VLAN capability and status [in] ppvid PPVID number for this LAN station
- Returns
- Error code
Definition at line 120 of file lldp_ext_dot1.c.
◆ lldpDot1SetLocalPortVlanId()
error_t lldpDot1SetLocalPortVlanId | ( | LldpAgentContext * | context, |
uint_t | portIndex, | ||
uint16_t | pvid | ||
) |
Set port VLAN ID.
- Parameters
-
[in] context Pointer to the LLDP agent context [in] portIndex Port index [in] pvid Port VLAN identifier
- Returns
- Error code
Definition at line 54 of file lldp_ext_dot1.c.
◆ lldpDot1SetLocalProtocolId()
error_t lldpDot1SetLocalProtocolId | ( | LldpAgentContext * | context, |
uint_t | portIndex, | ||
const uint8_t * | protocolId, | ||
size_t | protocolIdLen | ||
) |
Set protocol identity.
- Parameters
-
[in] context Pointer to the LLDP agent context [in] portIndex Port index [in] protocolId First n octets of the protocol after the layer 2 addresses [in] protocolIdLen Length of the protocol identity, in bytes
- Returns
- Error code
Definition at line 356 of file lldp_ext_dot1.c.
◆ lldpDot1SetLocalVlanName()
error_t lldpDot1SetLocalVlanName | ( | LldpAgentContext * | context, |
uint_t | portIndex, | ||
uint16_t | vlanId, | ||
const char_t * | vlanName | ||
) |
Set VLAN name.
- Parameters
-
[in] context Pointer to the LLDP agent context [in] portIndex Port index [in] vlanId VID number associated with the VLAN name [in] vlanName VLAN's name
- Returns
- Error code
Definition at line 231 of file lldp_ext_dot1.c.
Variable Documentation
◆ __packed_struct
typedef __packed_struct |
Port VLAN ID TLV.
Protocol Identity TLV.
VLAN Name TLV.
Port And Protocol VLAN ID TLV.
Definition at line 92 of file lldp_ext_dot1.h.
◆ LldpDot1PortProtoVlanIdTlv
LldpDot1PortProtoVlanIdTlv |
Definition at line 106 of file lldp_ext_dot1.h.
◆ LldpDot1PortVlanIdTlv
LldpDot1PortVlanIdTlv |
Definition at line 95 of file lldp_ext_dot1.h.
◆ LldpDot1ProtocolIdTlv
LldpDot1ProtocolIdTlv |
Definition at line 129 of file lldp_ext_dot1.h.
◆ LldpDot1VlanNameTlv
LldpDot1VlanNameTlv |
Definition at line 118 of file lldp_ext_dot1.h.
◆ ppvid
uint16_t ppvid |
Definition at line 105 of file lldp_ext_dot1.h.
◆ protocolId
uint8_t protocolId |
Definition at line 128 of file lldp_ext_dot1.h.
◆ vlanName
char_t vlanName[] |
Definition at line 117 of file lldp_ext_dot1.h.
◆ vlanNameLen
uint8_t vlanNameLen |
Definition at line 116 of file lldp_ext_dot1.h.