LLDP (Link Layer Discovery Protocol) More...
#include "core/net.h"
#include "lldp/lldp.h"
#include "lldp/lldp_mgmt.h"
#include "lldp/lldp_fsm.h"
#include "lldp/lldp_misc.h"
#include "debug.h"
Go to the source code of this file.
Macros | |
#define | TRACE_LEVEL LLDP_TRACE_LEVEL |
Functions | |
void | lldpGetDefaultSettings (LldpAgentSettings *settings) |
Initialize settings with default values. More... | |
error_t | lldpInit (LldpAgentContext *context, const LldpAgentSettings *settings) |
LLDP agent initialization. More... | |
error_t | lldpStart (LldpAgentContext *context) |
Start LLDP agent. More... | |
error_t | lldpStop (LldpAgentContext *context) |
Stop LLDP agent. More... | |
error_t | lldpSetPortAddr (LldpAgentContext *context, uint_t portIndex, const MacAddr *macAddr) |
Set port address. More... | |
error_t | lldpSetMsgTxInterval (LldpAgentContext *context, uint_t msgTxInterval) |
Set transmit interval. More... | |
error_t | lldpSetMsgTxHold (LldpAgentContext *context, uint_t msgTxHold) |
Set transmit hold multiplier. More... | |
error_t | lldpSetReinitDelay (LldpAgentContext *context, uint_t reinitDelay) |
Set re-initialization delay. More... | |
error_t | lldpSetTxDelay (LldpAgentContext *context, uint_t txDelay) |
Set transmit delay. More... | |
error_t | lldpSetAdminStatus (LldpAgentContext *context, uint_t portIndex, LldpAdminStatus adminStatus) |
Set administrative status. More... | |
error_t | lldpSetBasicTlvFilter (LldpAgentContext *context, uint_t portIndex, uint8_t mask) |
Set the list of TLVs enabled for transmission. More... | |
error_t | lldpSetMgmtAddrFilter (LldpAgentContext *context, uint_t portIndex, uint32_t mask) |
Set the list of management addresses enabled for transmission. More... | |
error_t | lldpSetLocalChassisId (LldpAgentContext *context, LldpChassisIdSubtype chassisIdSubtype, const void *chassisId, size_t chassisIdLen) |
Set chassis ID. More... | |
error_t | lldpSetLocalPortId (LldpAgentContext *context, uint_t portIndex, LldpPortIdSubtype portIdSubtype, const void *portId, size_t portIdLen) |
Set port ID. More... | |
error_t | lldpSetLocalPortDesc (LldpAgentContext *context, uint_t portIndex, const char_t *portDesc) |
Set port description. More... | |
error_t | lldpSetLocalSysName (LldpAgentContext *context, const char_t *sysName) |
Set system name. More... | |
error_t | lldpSetLocalSysDesc (LldpAgentContext *context, const char_t *sysDesc) |
Set system description. More... | |
error_t | lldpSetLocalSysCap (LldpAgentContext *context, uint16_t supportedCap, uint16_t enabledCap) |
Set system capabilities. More... | |
error_t | lldpSetLocalMgmtAddr (LldpAgentContext *context, uint_t index, LldpMgmtAddrSubtype mgmtAddrSubtype, const void *mgmtAddr, size_t mgmtAddrLen, LldpIfNumSubtype ifNumSubtype, uint32_t ifNum, const uint8_t *oid, size_t oidLen) |
Set management address. More... | |
error_t | lldpDeleteLocalTlv (LldpAgentContext *context, LldpTlvType type) |
Remove all TLVs with specified type. More... | |
void | lldpTask (LldpAgentContext *context) |
LLDP agent task. More... | |
void | lldpDeinit (LldpAgentContext *context) |
Release LLDP agent context. More... | |
Detailed Description
LLDP (Link Layer Discovery Protocol)
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.c.
Macro Definition Documentation
◆ TRACE_LEVEL
Function Documentation
◆ lldpDeinit()
void lldpDeinit | ( | LldpAgentContext * | context | ) |
◆ lldpDeleteLocalTlv()
error_t lldpDeleteLocalTlv | ( | LldpAgentContext * | context, |
LldpTlvType | type | ||
) |
◆ lldpGetDefaultSettings()
void lldpGetDefaultSettings | ( | LldpAgentSettings * | settings | ) |
◆ lldpInit()
error_t lldpInit | ( | LldpAgentContext * | context, |
const LldpAgentSettings * | settings | ||
) |
◆ lldpSetAdminStatus()
error_t lldpSetAdminStatus | ( | LldpAgentContext * | context, |
uint_t | portIndex, | ||
LldpAdminStatus | adminStatus | ||
) |
◆ lldpSetBasicTlvFilter()
error_t lldpSetBasicTlvFilter | ( | LldpAgentContext * | context, |
uint_t | portIndex, | ||
uint8_t | mask | ||
) |
◆ lldpSetLocalChassisId()
error_t lldpSetLocalChassisId | ( | LldpAgentContext * | context, |
LldpChassisIdSubtype | chassisIdSubtype, | ||
const void * | chassisId, | ||
size_t | chassisIdLen | ||
) |
Set chassis ID.
- Parameters
-
[in] context Pointer to the LLDP agent context [in] chassisIdSubtype Type of identifier used for the chassis [in] chassisId Administratively assigned name that identifies the chassis [in] chassisIdLen Length of the chassis ID, in bytes
- Returns
- Error code
◆ lldpSetLocalMgmtAddr()
error_t lldpSetLocalMgmtAddr | ( | LldpAgentContext * | context, |
uint_t | index, | ||
LldpMgmtAddrSubtype | mgmtAddrSubtype, | ||
const void * | mgmtAddr, | ||
size_t | mgmtAddrLen, | ||
LldpIfNumSubtype | ifNumSubtype, | ||
uint32_t | ifNum, | ||
const uint8_t * | oid, | ||
size_t | oidLen | ||
) |
Set management address.
- Parameters
-
[in] context Pointer to the LLDP agent context [in] index Zero-based index identifying a management address [in] mgmtAddrSubtype Type of management address [in] mgmtAddr Octet string indicating a particular management address [in] mgmtAddrLen Length of the management address, in bytes [in] ifNumSubtype Numbering method used for defining the interface number [in] ifNum Number within the system that identifies the specific interface associated with this management address [in] oid OID that identifies the type of hardware component or protocol entity associated with the indicated management address [in] oidLen Length of the OID, in bytes
- Returns
- Error code
◆ lldpSetLocalPortDesc()
error_t lldpSetLocalPortDesc | ( | LldpAgentContext * | context, |
uint_t | portIndex, | ||
const char_t * | portDesc | ||
) |
◆ lldpSetLocalPortId()
error_t lldpSetLocalPortId | ( | LldpAgentContext * | context, |
uint_t | portIndex, | ||
LldpPortIdSubtype | portIdSubtype, | ||
const void * | portId, | ||
size_t | portIdLen | ||
) |
Set port ID.
- Parameters
-
[in] context Pointer to the LLDP agent context [in] portIndex Port index [in] portIdSubtype Type of identifier used for the port [in] portId Administratively assigned name that identifies the port [in] portIdLen Length of the port ID, in bytes
- Returns
- Error code
◆ lldpSetLocalSysCap()
error_t lldpSetLocalSysCap | ( | LldpAgentContext * | context, |
uint16_t | supportedCap, | ||
uint16_t | enabledCap | ||
) |
◆ lldpSetLocalSysDesc()
error_t lldpSetLocalSysDesc | ( | LldpAgentContext * | context, |
const char_t * | sysDesc | ||
) |
◆ lldpSetLocalSysName()
error_t lldpSetLocalSysName | ( | LldpAgentContext * | context, |
const char_t * | sysName | ||
) |
◆ lldpSetMgmtAddrFilter()
error_t lldpSetMgmtAddrFilter | ( | LldpAgentContext * | context, |
uint_t | portIndex, | ||
uint32_t | mask | ||
) |
◆ lldpSetMsgTxHold()
error_t lldpSetMsgTxHold | ( | LldpAgentContext * | context, |
uint_t | msgTxHold | ||
) |
◆ lldpSetMsgTxInterval()
error_t lldpSetMsgTxInterval | ( | LldpAgentContext * | context, |
uint_t | msgTxInterval | ||
) |
◆ lldpSetPortAddr()
error_t lldpSetPortAddr | ( | LldpAgentContext * | context, |
uint_t | portIndex, | ||
const MacAddr * | macAddr | ||
) |
◆ lldpSetReinitDelay()
error_t lldpSetReinitDelay | ( | LldpAgentContext * | context, |
uint_t | reinitDelay | ||
) |
◆ lldpSetTxDelay()
error_t lldpSetTxDelay | ( | LldpAgentContext * | context, |
uint_t | txDelay | ||
) |
◆ lldpStart()
error_t lldpStart | ( | LldpAgentContext * | context | ) |
◆ lldpStop()
error_t lldpStop | ( | LldpAgentContext * | context | ) |
◆ lldpTask()
void lldpTask | ( | LldpAgentContext * | context | ) |