lldp.h File Reference

LLDP (Link Layer Discovery Protocol) More...

#include "core/net.h"
#include "lldp/lldp_rx_fsm.h"
#include "lldp/lldp_tx_fsm.h"
#include "lldp/lldp_tlv.h"

Go to the source code of this file.

Data Structures

struct  _LldpDataUnit
 LLDP data unit. More...
 
struct  LldpMsapId
 MSAP identifier. More...
 
struct  LldpNeighborEntry
 LLDP neighbor entry. More...
 
struct  _LldpPortEntry
 LLDP port entry. More...
 
struct  LldpAgentSettings
 LLDP agent settings. More...
 
struct  _LldpAgentContext
 LLDP agent context. More...
 

Macros

#define LldpDataUnit   struct _LldpDataUnit
 
#define LldpAgentContext   struct _LldpAgentContext
 
#define LldpPortEntry   struct _LldpPortEntry
 
#define LLDP_SUPPORT   DISABLED
 
#define LLDP_TX_MODE_SUPPORT   ENABLED
 
#define LLDP_RX_MODE_SUPPORT   ENABLED
 
#define LLDP_TASK_STACK_SIZE   500
 
#define LLDP_TASK_PRIORITY   OS_TASK_PRIORITY_NORMAL
 
#define LLDP_TICK_INTERVAL   1000
 
#define LLDP_MAX_LLDPDU_SIZE   500
 
#define LLDP_MAX_MGMT_ADDRS   10
 
#define LLDP_MIN_MSG_TX_INTERVAL   1
 
#define LLDP_DEFAULT_MSG_TX_INTERVAL   30
 
#define LLDP_MAX_MSG_TX_INTERVAL   3600
 
#define LLDP_MIN_MSG_TX_HOLD   1
 
#define LLDP_DEFAULT_MSG_TX_HOLD   4
 
#define LLDP_MAX_MSG_TX_HOLD   100
 
#define LLDP_MIN_REINIT_DELAY   1
 
#define LLDP_DEFAULT_REINIT_DELAY   2
 
#define LLDP_MAX_REINIT_DELAY   10
 
#define LLDP_MIN_TX_DELAY   1
 
#define LLDP_DEFAULT_TX_DELAY   2
 
#define LLDP_MAX_TX_DELAY   900
 
#define LLDP_MIN_NOTIFICATION_INTERVAL   5
 
#define LLDP_DEFAULT_NOTIFICATION_INTERVAL   5
 
#define LLDP_MAX_NOTIFICATION_INTERVAL   3600
 
#define LLDP_MGMT_ADDR_FILTER_0   0x00000001
 
#define LLDP_MGMT_ADDR_FILTER_1   0x00000002
 
#define LLDP_MGMT_ADDR_FILTER_2   0x00000004
 
#define LLDP_MGMT_ADDR_FILTER_3   0x00000008
 
#define LLDP_MGMT_ADDR_FILTER_4   0x00000010
 
#define LLDP_MGMT_ADDR_FILTER_5   0x00000020
 
#define LLDP_MGMT_ADDR_FILTER_6   0x00000040
 
#define LLDP_MGMT_ADDR_FILTER_7   0x00000080
 
#define LLDP_MGMT_ADDR_FILTER_8   0x00000100
 
#define LLDP_MGMT_ADDR_FILTER_9   0x00000200
 
#define LLDP_MGMT_ADDR_FILTER_10   0x00000400
 
#define LLDP_MGMT_ADDR_FILTER_11   0x00000800
 
#define LLDP_MGMT_ADDR_FILTER_12   0x00001000
 
#define LLDP_MGMT_ADDR_FILTER_13   0x00002000
 
#define LLDP_MGMT_ADDR_FILTER_14   0x00004000
 
#define LLDP_MGMT_ADDR_FILTER_15   0x00008000
 
#define LLDP_MGMT_ADDR_FILTER_16   0x00010000
 
#define LLDP_MGMT_ADDR_FILTER_17   0x00020000
 
#define LLDP_MGMT_ADDR_FILTER_18   0x00040000
 
#define LLDP_MGMT_ADDR_FILTER_19   0x00080000
 
#define LLDP_MGMT_ADDR_FILTER_20   0x00100000
 
#define LLDP_MGMT_ADDR_FILTER_21   0x00200000
 
#define LLDP_MGMT_ADDR_FILTER_22   0x00400000
 
#define LLDP_MGMT_ADDR_FILTER_23   0x00800000
 
#define LLDP_MGMT_ADDR_FILTER_24   0x01000000
 
#define LLDP_MGMT_ADDR_FILTER_25   0x02000000
 
#define LLDP_MGMT_ADDR_FILTER_26   0x04000000
 
#define LLDP_MGMT_ADDR_FILTER_27   0x08000000
 
#define LLDP_MGMT_ADDR_FILTER_28   0x10000000
 
#define LLDP_MGMT_ADDR_FILTER_29   0x20000000
 
#define LLDP_MGMT_ADDR_FILTER_30   0x40000000
 
#define LLDP_MGMT_ADDR_FILTER_31   0x80000000
 
#define LLDP_MGMT_ADDR_FILTER_ALL   0xFFFFFFFF
 

Typedefs

typedef void(* LldpSendCallback) (LldpPortEntry *port, LldpDataUnit *lldpdu)
 LLDP frame transmission callback function. More...
 
typedef void(* LldpReceiveCallback) (LldpPortEntry *port, LldpDataUnit *lldpdu)
 LLDP frame reception callback function. More...
 
typedef void(* LldpTickCallback) (LldpAgentContext *context)
 Tick callback function. More...
 

Enumerations

enum  LldpAdminStatus { LLDP_ADMIN_STATUS_DISABLED = 0, LLDP_ADMIN_STATUS_ENABLED_TX_ONLY = 1, LLDP_ADMIN_STATUS_ENABLED_RX_ONLY = 2, LLDP_ADMIN_STATUS_ENABLED_TX_RX = 3 }
 Administrative status. More...
 
enum  LldpBasicTlvFilter {
  LLDP_BASIC_TLV_FILTER_PORT_DESC = 0x01, LLDP_BASIC_TLV_FILTER_SYS_NAME = 0x02, LLDP_BASIC_TLV_FILTER_SYS_DESC = 0x04, LLDP_BASIC_TLV_FILTER_SYS_CAP = 0x08,
  LLDP_BASIC_TLV_FILTER_ALL = 0x0F
}
 Basic TLV filter. More...
 

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

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

Definition in file lldp.h.

Macro Definition Documentation

◆ LLDP_DEFAULT_MSG_TX_HOLD

#define LLDP_DEFAULT_MSG_TX_HOLD   4

Definition at line 116 of file lldp.h.

◆ LLDP_DEFAULT_MSG_TX_INTERVAL

#define LLDP_DEFAULT_MSG_TX_INTERVAL   30

Definition at line 109 of file lldp.h.

◆ LLDP_DEFAULT_NOTIFICATION_INTERVAL

#define LLDP_DEFAULT_NOTIFICATION_INTERVAL   5

Definition at line 137 of file lldp.h.

◆ LLDP_DEFAULT_REINIT_DELAY

#define LLDP_DEFAULT_REINIT_DELAY   2

Definition at line 123 of file lldp.h.

◆ LLDP_DEFAULT_TX_DELAY

#define LLDP_DEFAULT_TX_DELAY   2

Definition at line 130 of file lldp.h.

◆ LLDP_MAX_LLDPDU_SIZE

#define LLDP_MAX_LLDPDU_SIZE   500

Definition at line 94 of file lldp.h.

◆ LLDP_MAX_MGMT_ADDRS

#define LLDP_MAX_MGMT_ADDRS   10

Definition at line 101 of file lldp.h.

◆ LLDP_MAX_MSG_TX_HOLD

#define LLDP_MAX_MSG_TX_HOLD   100

Definition at line 118 of file lldp.h.

◆ LLDP_MAX_MSG_TX_INTERVAL

#define LLDP_MAX_MSG_TX_INTERVAL   3600

Definition at line 111 of file lldp.h.

◆ LLDP_MAX_NOTIFICATION_INTERVAL

#define LLDP_MAX_NOTIFICATION_INTERVAL   3600

Definition at line 139 of file lldp.h.

◆ LLDP_MAX_REINIT_DELAY

#define LLDP_MAX_REINIT_DELAY   10

Definition at line 125 of file lldp.h.

◆ LLDP_MAX_TX_DELAY

#define LLDP_MAX_TX_DELAY   900

Definition at line 132 of file lldp.h.

◆ LLDP_MGMT_ADDR_FILTER_0

#define LLDP_MGMT_ADDR_FILTER_0   0x00000001

Definition at line 142 of file lldp.h.

◆ LLDP_MGMT_ADDR_FILTER_1

#define LLDP_MGMT_ADDR_FILTER_1   0x00000002

Definition at line 143 of file lldp.h.

◆ LLDP_MGMT_ADDR_FILTER_10

#define LLDP_MGMT_ADDR_FILTER_10   0x00000400

Definition at line 152 of file lldp.h.

◆ LLDP_MGMT_ADDR_FILTER_11

#define LLDP_MGMT_ADDR_FILTER_11   0x00000800

Definition at line 153 of file lldp.h.

◆ LLDP_MGMT_ADDR_FILTER_12

#define LLDP_MGMT_ADDR_FILTER_12   0x00001000

Definition at line 154 of file lldp.h.

◆ LLDP_MGMT_ADDR_FILTER_13

#define LLDP_MGMT_ADDR_FILTER_13   0x00002000

Definition at line 155 of file lldp.h.

◆ LLDP_MGMT_ADDR_FILTER_14

#define LLDP_MGMT_ADDR_FILTER_14   0x00004000

Definition at line 156 of file lldp.h.

◆ LLDP_MGMT_ADDR_FILTER_15

#define LLDP_MGMT_ADDR_FILTER_15   0x00008000

Definition at line 157 of file lldp.h.

◆ LLDP_MGMT_ADDR_FILTER_16

#define LLDP_MGMT_ADDR_FILTER_16   0x00010000

Definition at line 158 of file lldp.h.

◆ LLDP_MGMT_ADDR_FILTER_17

#define LLDP_MGMT_ADDR_FILTER_17   0x00020000

Definition at line 159 of file lldp.h.

◆ LLDP_MGMT_ADDR_FILTER_18

#define LLDP_MGMT_ADDR_FILTER_18   0x00040000

Definition at line 160 of file lldp.h.

◆ LLDP_MGMT_ADDR_FILTER_19

#define LLDP_MGMT_ADDR_FILTER_19   0x00080000

Definition at line 161 of file lldp.h.

◆ LLDP_MGMT_ADDR_FILTER_2

#define LLDP_MGMT_ADDR_FILTER_2   0x00000004

Definition at line 144 of file lldp.h.

◆ LLDP_MGMT_ADDR_FILTER_20

#define LLDP_MGMT_ADDR_FILTER_20   0x00100000

Definition at line 162 of file lldp.h.

◆ LLDP_MGMT_ADDR_FILTER_21

#define LLDP_MGMT_ADDR_FILTER_21   0x00200000

Definition at line 163 of file lldp.h.

◆ LLDP_MGMT_ADDR_FILTER_22

#define LLDP_MGMT_ADDR_FILTER_22   0x00400000

Definition at line 164 of file lldp.h.

◆ LLDP_MGMT_ADDR_FILTER_23

#define LLDP_MGMT_ADDR_FILTER_23   0x00800000

Definition at line 165 of file lldp.h.

◆ LLDP_MGMT_ADDR_FILTER_24

#define LLDP_MGMT_ADDR_FILTER_24   0x01000000

Definition at line 166 of file lldp.h.

◆ LLDP_MGMT_ADDR_FILTER_25

#define LLDP_MGMT_ADDR_FILTER_25   0x02000000

Definition at line 167 of file lldp.h.

◆ LLDP_MGMT_ADDR_FILTER_26

#define LLDP_MGMT_ADDR_FILTER_26   0x04000000

Definition at line 168 of file lldp.h.

◆ LLDP_MGMT_ADDR_FILTER_27

#define LLDP_MGMT_ADDR_FILTER_27   0x08000000

Definition at line 169 of file lldp.h.

◆ LLDP_MGMT_ADDR_FILTER_28

#define LLDP_MGMT_ADDR_FILTER_28   0x10000000

Definition at line 170 of file lldp.h.

◆ LLDP_MGMT_ADDR_FILTER_29

#define LLDP_MGMT_ADDR_FILTER_29   0x20000000

Definition at line 171 of file lldp.h.

◆ LLDP_MGMT_ADDR_FILTER_3

#define LLDP_MGMT_ADDR_FILTER_3   0x00000008

Definition at line 145 of file lldp.h.

◆ LLDP_MGMT_ADDR_FILTER_30

#define LLDP_MGMT_ADDR_FILTER_30   0x40000000

Definition at line 172 of file lldp.h.

◆ LLDP_MGMT_ADDR_FILTER_31

#define LLDP_MGMT_ADDR_FILTER_31   0x80000000

Definition at line 173 of file lldp.h.

◆ LLDP_MGMT_ADDR_FILTER_4

#define LLDP_MGMT_ADDR_FILTER_4   0x00000010

Definition at line 146 of file lldp.h.

◆ LLDP_MGMT_ADDR_FILTER_5

#define LLDP_MGMT_ADDR_FILTER_5   0x00000020

Definition at line 147 of file lldp.h.

◆ LLDP_MGMT_ADDR_FILTER_6

#define LLDP_MGMT_ADDR_FILTER_6   0x00000040

Definition at line 148 of file lldp.h.

◆ LLDP_MGMT_ADDR_FILTER_7

#define LLDP_MGMT_ADDR_FILTER_7   0x00000080

Definition at line 149 of file lldp.h.

◆ LLDP_MGMT_ADDR_FILTER_8

#define LLDP_MGMT_ADDR_FILTER_8   0x00000100

Definition at line 150 of file lldp.h.

◆ LLDP_MGMT_ADDR_FILTER_9

#define LLDP_MGMT_ADDR_FILTER_9   0x00000200

Definition at line 151 of file lldp.h.

◆ LLDP_MGMT_ADDR_FILTER_ALL

#define LLDP_MGMT_ADDR_FILTER_ALL   0xFFFFFFFF

Definition at line 174 of file lldp.h.

◆ LLDP_MIN_MSG_TX_HOLD

#define LLDP_MIN_MSG_TX_HOLD   1

Definition at line 114 of file lldp.h.

◆ LLDP_MIN_MSG_TX_INTERVAL

#define LLDP_MIN_MSG_TX_INTERVAL   1

Definition at line 107 of file lldp.h.

◆ LLDP_MIN_NOTIFICATION_INTERVAL

#define LLDP_MIN_NOTIFICATION_INTERVAL   5

Definition at line 135 of file lldp.h.

◆ LLDP_MIN_REINIT_DELAY

#define LLDP_MIN_REINIT_DELAY   1

Definition at line 121 of file lldp.h.

◆ LLDP_MIN_TX_DELAY

#define LLDP_MIN_TX_DELAY   1

Definition at line 128 of file lldp.h.

◆ LLDP_RX_MODE_SUPPORT

#define LLDP_RX_MODE_SUPPORT   ENABLED

Definition at line 68 of file lldp.h.

◆ LLDP_SUPPORT

#define LLDP_SUPPORT   DISABLED

Definition at line 54 of file lldp.h.

◆ LLDP_TASK_PRIORITY

#define LLDP_TASK_PRIORITY   OS_TASK_PRIORITY_NORMAL

Definition at line 82 of file lldp.h.

◆ LLDP_TASK_STACK_SIZE

#define LLDP_TASK_STACK_SIZE   500

Definition at line 75 of file lldp.h.

◆ LLDP_TICK_INTERVAL

#define LLDP_TICK_INTERVAL   1000

Definition at line 87 of file lldp.h.

◆ LLDP_TX_MODE_SUPPORT

#define LLDP_TX_MODE_SUPPORT   ENABLED

Definition at line 61 of file lldp.h.

◆ LldpAgentContext

#define LldpAgentContext   struct _LldpAgentContext

Definition at line 40 of file lldp.h.

◆ LldpDataUnit

#define LldpDataUnit   struct _LldpDataUnit

Definition at line 36 of file lldp.h.

◆ LldpPortEntry

#define LldpPortEntry   struct _LldpPortEntry

Definition at line 44 of file lldp.h.

Typedef Documentation

◆ LldpReceiveCallback

typedef void(* LldpReceiveCallback) (LldpPortEntry *port, LldpDataUnit *lldpdu)

LLDP frame reception callback function.

Definition at line 220 of file lldp.h.

◆ LldpSendCallback

typedef void(* LldpSendCallback) (LldpPortEntry *port, LldpDataUnit *lldpdu)

LLDP frame transmission callback function.

Definition at line 213 of file lldp.h.

◆ LldpTickCallback

typedef void(* LldpTickCallback) (LldpAgentContext *context)

Tick callback function.

Definition at line 227 of file lldp.h.

Enumeration Type Documentation

◆ LldpAdminStatus

Administrative status.

Enumerator
LLDP_ADMIN_STATUS_DISABLED 

The local LLDP agent can neither transmit or receive LLDP frames.

LLDP_ADMIN_STATUS_ENABLED_TX_ONLY 

The local LLDP agent can only transmit LLDP frames.

LLDP_ADMIN_STATUS_ENABLED_RX_ONLY 

The local LLDP agent can only receive LLDP frames.

LLDP_ADMIN_STATUS_ENABLED_TX_RX 

Definition at line 186 of file lldp.h.

◆ LldpBasicTlvFilter

Basic TLV filter.

Enumerator
LLDP_BASIC_TLV_FILTER_PORT_DESC 

Port Description TLV.

LLDP_BASIC_TLV_FILTER_SYS_NAME 

System Name TLV.

LLDP_BASIC_TLV_FILTER_SYS_DESC 

System Description TLV.

LLDP_BASIC_TLV_FILTER_SYS_CAP 

System Capabilities TLV.

LLDP_BASIC_TLV_FILTER_ALL 

All Basic TLVs.

Definition at line 199 of file lldp.h.

Function Documentation

◆ lldpDeinit()

void lldpDeinit ( LldpAgentContext context)

Release LLDP agent context.

Parameters
[in]contextPointer to the LLDP agent context

Definition at line 1396 of file lldp.c.

◆ lldpDeleteLocalTlv()

error_t lldpDeleteLocalTlv ( LldpAgentContext context,
LldpTlvType  type 
)

Remove all TLVs with specified type.

Parameters
[in]contextPointer to the LLDP agent context
[in]typeTLV type
Returns
Error code

Definition at line 1216 of file lldp.c.

◆ lldpGetDefaultSettings()

void lldpGetDefaultSettings ( LldpAgentSettings settings)

Initialize settings with default values.

Parameters
[out]settingsStructure that contains LLDP agent settings

Definition at line 51 of file lldp.c.

◆ lldpInit()

error_t lldpInit ( LldpAgentContext context,
const LldpAgentSettings settings 
)

LLDP agent initialization.

Parameters
[in]contextPointer to the LLDP agent context
[in]settingsLLDP agent specific settings
Returns
Error code

Definition at line 87 of file lldp.c.

◆ lldpSetAdminStatus()

error_t lldpSetAdminStatus ( LldpAgentContext context,
uint_t  portIndex,
LldpAdminStatus  adminStatus 
)

Set administrative status.

Parameters
[in]contextPointer to the LLDP agent context
[in]portIndexPort index
[in]adminStatusThe administrative status indicates whether or not the local LLDP agent is enabled
Returns
Error code

Definition at line 581 of file lldp.c.

◆ lldpSetBasicTlvFilter()

error_t lldpSetBasicTlvFilter ( LldpAgentContext context,
uint_t  portIndex,
uint8_t  mask 
)

Set the list of TLVs enabled for transmission.

Parameters
[in]contextPointer to the LLDP agent context
[in]portIndexPort index
[in]maskBit-map indicating the TLVs enabled for transmission
Returns
Error code

Definition at line 615 of file lldp.c.

◆ lldpSetLocalChassisId()

error_t lldpSetLocalChassisId ( LldpAgentContext context,
LldpChassisIdSubtype  chassisIdSubtype,
const void *  chassisId,
size_t  chassisIdLen 
)

Set chassis ID.

Parameters
[in]contextPointer to the LLDP agent context
[in]chassisIdSubtypeType of identifier used for the chassis
[in]chassisIdAdministratively assigned name that identifies the chassis
[in]chassisIdLenLength of the chassis ID, in bytes
Returns
Error code

Definition at line 698 of file lldp.c.

◆ 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]contextPointer to the LLDP agent context
[in]indexZero-based index identifying a management address
[in]mgmtAddrSubtypeType of management address
[in]mgmtAddrOctet string indicating a particular management address
[in]mgmtAddrLenLength of the management address, in bytes
[in]ifNumSubtypeNumbering method used for defining the interface number
[in]ifNumNumber within the system that identifies the specific interface associated with this management address
[in]oidOID that identifies the type of hardware component or protocol entity associated with the indicated management address
[in]oidLenLength of the OID, in bytes
Returns
Error code

Definition at line 1077 of file lldp.c.

◆ lldpSetLocalPortDesc()

error_t lldpSetLocalPortDesc ( LldpAgentContext context,
uint_t  portIndex,
const char_t portDesc 
)

Set port description.

Parameters
[in]contextPointer to the LLDP agent context
[in]portIndexPort index
[in]portDescStation port's description
Returns
Error code

Definition at line 838 of file lldp.c.

◆ lldpSetLocalPortId()

error_t lldpSetLocalPortId ( LldpAgentContext context,
uint_t  portIndex,
LldpPortIdSubtype  portIdSubtype,
const void *  portId,
size_t  portIdLen 
)

Set port ID.

Parameters
[in]contextPointer to the LLDP agent context
[in]portIndexPort index
[in]portIdSubtypeType of identifier used for the port
[in]portIdAdministratively assigned name that identifies the port
[in]portIdLenLength of the port ID, in bytes
Returns
Error code

Definition at line 766 of file lldp.c.

◆ lldpSetLocalSysCap()

error_t lldpSetLocalSysCap ( LldpAgentContext context,
uint16_t  supportedCap,
uint16_t  enabledCap 
)

Set system capabilities.

Parameters
[in]contextPointer to the LLDP agent context
[in]supportedCapBit-map of the capabilities supported by the system
[in]enabledCapBit-map of the capabilities currently enabled
Returns
Error code

Definition at line 1009 of file lldp.c.

◆ lldpSetLocalSysDesc()

error_t lldpSetLocalSysDesc ( LldpAgentContext context,
const char_t sysDesc 
)

Set system description.

Parameters
[in]contextPointer to the LLDP agent context
[in]sysDescTextual description of the network entity
Returns
Error code

Definition at line 954 of file lldp.c.

◆ lldpSetLocalSysName()

error_t lldpSetLocalSysName ( LldpAgentContext context,
const char_t sysName 
)

Set system name.

Parameters
[in]contextPointer to the LLDP agent context
[in]sysNameSystem's administratively assigned name
Returns
Error code

Definition at line 900 of file lldp.c.

◆ lldpSetMgmtAddrFilter()

error_t lldpSetMgmtAddrFilter ( LldpAgentContext context,
uint_t  portIndex,
uint32_t  mask 
)

Set the list of management addresses enabled for transmission.

Parameters
[in]contextPointer to the LLDP agent context
[in]portIndexPort index
[in]maskBit-map indicating the management addresses enabled for transmission
Returns
Error code

Definition at line 650 of file lldp.c.

◆ lldpSetMsgTxHold()

error_t lldpSetMsgTxHold ( LldpAgentContext context,
uint_t  msgTxHold 
)

Set transmit hold multiplier.

Parameters
[in]contextPointer to the LLDP agent context
[in]msgTxHoldMultiplier on the msgTxInterval that determines the actual TTL value used in an LLDPDU
Returns
Error code

Definition at line 483 of file lldp.c.

◆ lldpSetMsgTxInterval()

error_t lldpSetMsgTxInterval ( LldpAgentContext context,
uint_t  msgTxInterval 
)

Set transmit interval.

Parameters
[in]contextPointer to the LLDP agent context
[in]msgTxIntervalTime interval between successive transmit cycles, in seconds
Returns
Error code

Definition at line 450 of file lldp.c.

◆ lldpSetPortAddr()

error_t lldpSetPortAddr ( LldpAgentContext context,
uint_t  portIndex,
const MacAddr macAddr 
)

Set port address.

Parameters
[in]contextPointer to the LLDP agent context
[in]portIndexPort index
[in]macAddrMAC address of the individual MAC entity for the port
Returns
Error code

Definition at line 407 of file lldp.c.

◆ lldpSetReinitDelay()

error_t lldpSetReinitDelay ( LldpAgentContext context,
uint_t  reinitDelay 
)

Set re-initialization delay.

Parameters
[in]contextPointer to the LLDP agent context
[in]reinitDelayDelay before re-initialization will be attempted
Returns
Error code

Definition at line 515 of file lldp.c.

◆ lldpSetTxDelay()

error_t lldpSetTxDelay ( LldpAgentContext context,
uint_t  txDelay 
)

Set transmit delay.

Parameters
[in]contextPointer to the LLDP agent context
[in]txDelayDelay between successive LLDP frame transmissions
Returns
Error code

Definition at line 547 of file lldp.c.

◆ lldpStart()

error_t lldpStart ( LldpAgentContext context)

Start LLDP agent.

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

Definition at line 268 of file lldp.c.

◆ lldpStop()

error_t lldpStop ( LldpAgentContext context)

Stop LLDP agent.

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

Definition at line 361 of file lldp.c.

◆ lldpTask()

void lldpTask ( LldpAgentContext context)

LLDP agent task.

Parameters
[in]contextPointer to the LLDP agent context

Definition at line 1312 of file lldp.c.