lldp_ext_dot3.c File Reference

IEEE 802.3 LLDP extension. More...

#include "core/net.h"
#include "lldp/lldp.h"
#include "lldp/lldp_ext_dot3.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 lldpDot3SetLocalMacPhyConfigStatus (LldpAgentContext *context, uint_t portIndex, uint8_t autoNegSupportStatus, uint16_t pmdAutoNegAdvCap, uint16_t operationalMauType)
 Set MAC/PHY configuration/status. More...
 
error_t lldpDot3SetLocalPowerViaMdi (LldpAgentContext *context, uint_t portIndex, uint8_t mdiPowerSupport, LldpDot3PsePowerPair psePowerPair, LldpDot3PowerClass powerClass, const LldpDot3DllClassExt *dllClassExt, const LldpDot3Type34Ext *type34Ext)
 Set power-via-MDI. More...
 
error_t lldpDot3SetLocalLinkAggregation (LldpAgentContext *context, uint_t portIndex, uint8_t aggregationStatus, uint32_t aggregatedPortId)
 Set Link aggregation. More...
 
error_t lldpDot3SetLocalMaxFrameSize (LldpAgentContext *context, uint_t portIndex, uint16_t maxFrameSize)
 Set maximum frame size. More...
 
error_t lldpDot3SetLocalPowerViaMdiMeas (LldpAgentContext *context, uint_t portIndex, uint8_t measurements[20], uint16_t psePowerPriceIndex)
 Set power-via-MDI measurements. More...
 
error_t lldpDot3DeleteLocalTlv (LldpAgentContext *context, LldpDot3Subtype subtype)
 Remove all IEEE 802.3 specific TLVs with specified subtype. More...
 

Detailed Description

IEEE 802.3 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_dot3.c.

Macro Definition Documentation

◆ TRACE_LEVEL

#define TRACE_LEVEL   LLDP_TRACE_LEVEL

Definition at line 32 of file lldp_ext_dot3.c.

Function Documentation

◆ lldpDot3DeleteLocalTlv()

error_t lldpDot3DeleteLocalTlv ( LldpAgentContext context,
LldpDot3Subtype  subtype 
)

Remove all IEEE 802.3 specific TLVs with specified subtype.

Parameters
[in]contextPointer to the LLDP agent context
[in]subtypeTLV subtype
Returns
Error code

Definition at line 442 of file lldp_ext_dot3.c.

◆ lldpDot3SetLocalLinkAggregation()

error_t lldpDot3SetLocalLinkAggregation ( LldpAgentContext context,
uint_t  portIndex,
uint8_t  aggregationStatus,
uint32_t  aggregatedPortId 
)

Set Link aggregation.

Parameters
[in]contextPointer to the LLDP agent context
[in]portIndexPort index
[in]aggregationStatusBit-map of the link aggregation capabilities and the current aggregation status of the link
[in]aggregatedPortIdIEEE 802.3 aggregated port identifier,
Returns
Error code

Definition at line 244 of file lldp_ext_dot3.c.

◆ lldpDot3SetLocalMacPhyConfigStatus()

error_t lldpDot3SetLocalMacPhyConfigStatus ( LldpAgentContext context,
uint_t  portIndex,
uint8_t  autoNegSupportStatus,
uint16_t  pmdAutoNegAdvCap,
uint16_t  operationalMauType 
)

Set MAC/PHY configuration/status.

Parameters
[in]contextPointer to the LLDP agent context
[in]portIndexPort index
[in]autoNegSupportStatusBit-map that identifies the auto-negotiation support and current status of the local 802.3 LAN station
[in]pmdAutoNegAdvCapPMD auto-negotiation advertised capability
[in]operationalMauTypeMAU type of the sending device
Returns
Error code

Definition at line 57 of file lldp_ext_dot3.c.

◆ lldpDot3SetLocalMaxFrameSize()

error_t lldpDot3SetLocalMaxFrameSize ( LldpAgentContext context,
uint_t  portIndex,
uint16_t  maxFrameSize 
)

Set maximum frame size.

Parameters
[in]contextPointer to the LLDP agent context
[in]portIndexPort index
[in]maxFrameSizeMaximum supported frame size, in octets
Returns
Error code

Definition at line 310 of file lldp_ext_dot3.c.

◆ lldpDot3SetLocalPowerViaMdi()

error_t lldpDot3SetLocalPowerViaMdi ( LldpAgentContext context,
uint_t  portIndex,
uint8_t  mdiPowerSupport,
LldpDot3PsePowerPair  psePowerPair,
LldpDot3PowerClass  powerClass,
const LldpDot3DllClassExt dllClassExt,
const LldpDot3Type34Ext type34Ext 
)

Set power-via-MDI.

Parameters
[in]contextPointer to the LLDP agent context
[in]portIndexPort index
[in]mdiPowerSupportBit-map of the MDI power capabilities and status
[in]psePowerPairPSE power pair
[in]powerClassPSE power classification
[in]dllClassExtDLL classification extension (optional parameter)
[in]type34ExtType 3 and Type 4 extension (optional parameter)
Returns
Error code

Definition at line 130 of file lldp_ext_dot3.c.

◆ lldpDot3SetLocalPowerViaMdiMeas()

error_t lldpDot3SetLocalPowerViaMdiMeas ( LldpAgentContext context,
uint_t  portIndex,
uint8_t  measurements[20],
uint16_t  psePowerPriceIndex 
)

Set power-via-MDI measurements.

Parameters
[in]contextPointer to the LLDP agent context
[in]portIndexPort index
[in]measurementsMeasured values
[in]psePowerPriceIndexIndex of the current price of electricity compared to what the PSE considers the nominal electricity price
Returns
Error code

Definition at line 376 of file lldp_ext_dot3.c.