31#ifndef _LLDP_EXT_MED_H
32#define _LLDP_EXT_MED_H
39#define LLDP_MED_MIN_INVENTORY_STRING_LEN 0
41#define LLDP_MED_MAX_INVENTORY_STRING_LEN 32
174#if defined(__CWCC__) || defined(_WIN32)
175 #pragma pack(push, 1)
185 uint16_t capabilities;
196#if defined(_CPU_BIG_ENDIAN) && !defined(__ICCRX__)
203 uint8_t l2PriorityH : 1;
204 uint8_t l2PriorityL : 2;
205 uint8_t dscpValue : 6;
212 uint8_t l2PriorityH : 1;
214 uint8_t dscpValue : 6;
215 uint8_t l2PriorityL : 2;
217} LldpMedNetworkPolicyTlv;
226 uint8_t locationDataFormat;
227 uint8_t locationId[];
228} LldpMedLocationIdTlv;
237#if defined(_CPU_BIG_ENDIAN) && !defined(__ICCRX__)
238 uint8_t powerType : 2;
239 uint8_t powerSource : 2;
240 uint8_t powerPriority : 4;
243 uint8_t powerPriority : 4;
244 uint8_t powerSource : 2;
245 uint8_t powerType : 2;
248} LldpMedExtPowerViaMdiTlv;
252#if defined(__CWCC__) || defined(_WIN32)
257error_t lldpMedSetLocalCap(LldpAgentContext *context, uint16_t capabilities,
260error_t lldpMedSetLocalNetworkPolicy(LldpAgentContext *context,
262 uint16_t vlanId, uint8_t l2Priority, uint8_t dscpValue);
264error_t lldpMedSetLocalLocationId(LldpAgentContext *context,
266 const void *locationId,
size_t locationIdLen);
268error_t lldpMedSetLocalExtPowerViaMdi(LldpAgentContext *context,
272error_t lldpMedSetLocalHardwareRevision(LldpAgentContext *context,
273 const char_t *hardwareRevision);
275error_t lldpMedSetLocalFirmwareRevision(LldpAgentContext *context,
276 const char_t *firmwareRevision);
278error_t lldpMedSetLocalSoftwareRevision(LldpAgentContext *context,
279 const char_t *softwareRevision);
281error_t lldpMedSetLocalSerialNumber(LldpAgentContext *context,
282 const char_t *serialNumber);
284error_t lldpMedSetLocalManufacturerName(LldpAgentContext *context,
285 const char_t *manufacturerName);
287error_t lldpMedSetLocalModelName(LldpAgentContext *context,
288 const char_t *modelName);
290error_t lldpMedSetLocalAssetId(LldpAgentContext *context,
291 const char_t *assetId);
293error_t lldpMedDeleteLocalTlv(LldpAgentContext *context,
error_t
Error codes.
Definition error.h:43
LLDP (Link Layer Discovery Protocol)
LldpMedCap
LLDP-MED capabilities.
Definition lldp_ext_med.h:75
@ LLDP_MED_CAP_NETWORK_POLICY
Network policy.
Definition lldp_ext_med.h:77
@ LLDP_MED_CAP
LLDP-MED capabilities.
Definition lldp_ext_med.h:76
@ LLDP_MED_CAP_INVENTORY
Inventory.
Definition lldp_ext_med.h:81
@ LLDP_MED_CAP_EXTENDED_PSE
Extended power via MDI - PSE.
Definition lldp_ext_med.h:79
@ LLDP_MED_CAP_EXTENDED_PD
Extended power via MDI - PD.
Definition lldp_ext_med.h:80
@ LLDP_MED_CAP_LOCATION
Location identification.
Definition lldp_ext_med.h:78
LldpMedAppType
Application type.
Definition lldp_ext_med.h:104
@ LLDP_MED_APP_TYPE_VOICE_SIGNALING
Voice signaling.
Definition lldp_ext_med.h:107
@ LLDP_MED_APP_TYPE_GUEST_VOICE_SIGNALING
Guest Voice Signaling.
Definition lldp_ext_med.h:109
@ LLDP_MED_APP_TYPE_STREAMING_VIDEO
Streaming Video.
Definition lldp_ext_med.h:112
@ LLDP_MED_APP_TYPE_RESERVED
Reserved.
Definition lldp_ext_med.h:105
@ LLDP_MED_APP_TYPE_GUEST_VOICE
Guest Voice.
Definition lldp_ext_med.h:108
@ LLDP_MED_APP_TYPE_VIDEO_CONFERENCING
Video Conferencing.
Definition lldp_ext_med.h:111
@ LLDP_MED_APP_TYPE_SOFTPHONE_VOICE
Softphone Voice.
Definition lldp_ext_med.h:110
@ LLDP_MED_APP_TYPE_VOICE
Voice.
Definition lldp_ext_med.h:106
@ LLDP_MED_APP_TYPE_VIDEO_SIGNALING
Video signaling.
Definition lldp_ext_med.h:113
LldpMedPowerPriority
Power priority.
Definition lldp_ext_med.h:165
@ LLDP_MED_POWER_PRIORITY_HIGH
High.
Definition lldp_ext_med.h:168
@ LLDP_MED_POWER_PRIORITY_CRITICAL
Critical.
Definition lldp_ext_med.h:167
@ LLDP_MED_POWER_PRIORITY_UNKNOWN
Unknown.
Definition lldp_ext_med.h:166
@ LLDP_MED_POWER_PRIORITY_LOW
Low.
Definition lldp_ext_med.h:169
LldpMedSubtype
LLDP-MED subtypes.
Definition lldp_ext_med.h:54
@ LLDP_MED_SUBTYPE_FIRMWARE_REVISION
Inventory - Firmware Revision.
Definition lldp_ext_med.h:61
@ LLDP_MED_SUBTYPE_HARDWARE_REVISION
Inventory - Hardware Revision.
Definition lldp_ext_med.h:60
@ LLDP_MED_SUBTYPE_ASSET_ID
Inventory - Asset ID.
Definition lldp_ext_med.h:66
@ LLDP_MED_SUBTYPE_SOFTWARE_REVISION
Inventory - Software Revision.
Definition lldp_ext_med.h:62
@ LLDP_MED_SUBTYPE_NETWORK_POLICY
Network Policy.
Definition lldp_ext_med.h:57
@ LLDP_MED_SUBTYPE_SERIAL_NUMBER
Inventory - Serial Number.
Definition lldp_ext_med.h:63
@ LLDP_MED_SUBTYPE_LLDP_MED_CAP
LLDP-MED Capabilities.
Definition lldp_ext_med.h:56
@ LLDP_MED_SUBTYPE_EXT_POWER_VIA_MDI
Extended Power-via-MDI.
Definition lldp_ext_med.h:59
@ LLDP_MED_SUBTYPE_MODEL_NAME
Inventory - Model Name.
Definition lldp_ext_med.h:65
@ LLDP_MED_SUBTYPE_LOCATION_ID
Location Identification.
Definition lldp_ext_med.h:58
@ LLDP_MED_SUBTYPE_RESERVED
Reserved.
Definition lldp_ext_med.h:55
@ LLDP_MED_SUBTYPE_MANUFACTURER_NAME
Inventory - Manufacturer Name.
Definition lldp_ext_med.h:64
LldpMedLocationDataFormat
Location data format.
Definition lldp_ext_med.h:122
@ LLDP_MED_LOCATION_DATA_FORMAT_COORD_BASED_LCI
Coordinate-based LCI.
Definition lldp_ext_med.h:124
@ LLDP_MED_LOCATION_DATA_FORMAT_ECS_ELIN
ECS ELIN.
Definition lldp_ext_med.h:126
@ LLDP_MED_LOCATION_DATA_FORMAT_CIVIC_ADDR_LCI
Civic Address LCI.
Definition lldp_ext_med.h:125
@ LLDP_MED_LOCATION_DATA_FORMAT_INVALID
Invalid.
Definition lldp_ext_med.h:123
LldpMedPowerType
Power type.
Definition lldp_ext_med.h:135
@ LLDP_MED_POWER_TYPE_RESERVED_2
Reserved.
Definition lldp_ext_med.h:139
@ LLDP_MED_POWER_TYPE_RESERVED_1
Reserved.
Definition lldp_ext_med.h:138
@ LLDP_MED_POWER_TYPE_PSE_DEVICE
PSE Device.
Definition lldp_ext_med.h:136
@ LLDP_MED_POWER_TYPE_PD_DEVICE
PD Device.
Definition lldp_ext_med.h:137
LldpMedDeviceType
LLDP-MED device type.
Definition lldp_ext_med.h:90
@ LLDP_MED_DEVICE_TYPE_ENDPOINT_CLASS_2
Endpoint class II.
Definition lldp_ext_med.h:93
@ LLDP_MED_DEVICE_TYPE_NETWORK_CONNECTIVITY
Network connectivity.
Definition lldp_ext_med.h:95
@ LLDP_MED_DEVICE_TYPE_NOT_DEFINED
Type not defined.
Definition lldp_ext_med.h:91
@ LLDP_MED_DEVICE_TYPE_ENDPOINT_CLASS_1
Endpoint class I.
Definition lldp_ext_med.h:92
@ LLDP_MED_DEVICE_TYPE_ENDPOINT_CLASS_3
Endpoint class III.
Definition lldp_ext_med.h:94
LldpMedPowerSource
Power source.
Definition lldp_ext_med.h:148
@ LLDP_MED_PSE_POWER_SOURCE_RESERVED
Reserved (PSE device type)
Definition lldp_ext_med.h:156
@ LLDP_MED_PD_POWER_SOURCE_UNKNOWN
Unknown (PD device type)
Definition lldp_ext_med.h:149
@ LLDP_MED_PD_POWER_SOURCE_LOCAL
Local (PD device type)
Definition lldp_ext_med.h:151
@ LLDP_MED_PSE_POWER_SOURCE_PRIMARY
Primary Power Source (PSE device type)
Definition lldp_ext_med.h:154
@ LLDP_MED_PSE_POWER_SOURCE_UNKNOWN
Unknown (PSE device type)
Definition lldp_ext_med.h:153
@ LLDP_MED_PD_POWER_SOURCE_PSE_AND_LOCAL
PSE and local (PD device type)
Definition lldp_ext_med.h:152
@ LLDP_MED_PSE_POWER_SOURCE_BACKUP
Backup Power Source (PSE device type)
Definition lldp_ext_med.h:155
@ LLDP_MED_PD_POWER_SOURCE_PSE
PSE (PD device type)
Definition lldp_ext_med.h:150
typedef __packed_struct
LLDP-MED Capabilities TLV.
Definition lldp_ext_med.h:184