lldp_ext_dot1.c File Reference

IEEE 802.1 LLDP extension. More...

#include "core/net.h"
#include "lldp/lldp.h"
#include "lldp/lldp_ext_dot1.h"
#include "lldp/lldp_misc.h"
#include "lldp/lldp_debug.h"
#include "debug.h"

Go to the source code of this file.

Macros

#define TRACE_LEVEL   LLDP_TRACE_LEVEL
 

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...
 

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.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
2.4.4

Definition in file lldp_ext_dot1.c.

Macro Definition Documentation

◆ TRACE_LEVEL

#define TRACE_LEVEL   LLDP_TRACE_LEVEL

Definition at line 32 of file lldp_ext_dot1.c.

Function Documentation

◆ lldpDot1DeleteLocalTlv()

error_t lldpDot1DeleteLocalTlv ( LldpAgentContext context,
LldpDot1Subtype  subtype 
)

Remove all IEEE 802.1 specific TLVs with specified subtype.

Parameters
[in]contextPointer to the LLDP agent context
[in]subtypeTLV 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]contextPointer to the LLDP agent context
[in]portIndexPort index
[in]flagsBit-map indicating the port and protocol VLAN capability and status
[in]ppvidPPVID 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]contextPointer to the LLDP agent context
[in]portIndexPort index
[in]pvidPort 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]contextPointer to the LLDP agent context
[in]portIndexPort index
[in]protocolIdFirst n octets of the protocol after the layer 2 addresses
[in]protocolIdLenLength 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]contextPointer to the LLDP agent context
[in]portIndexPort index
[in]vlanIdVID number associated with the VLAN name
[in]vlanNameVLAN's name
Returns
Error code

Definition at line 231 of file lldp_ext_dot1.c.