Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
openapi_lldp.h
Go to the documentation of this file.
1 
9 /*********************************************************************
10 *
11 * Copyright 2016-2018 Broadcom.
12 *
13 * Licensed under the Apache License, Version 2.0 (the "License");
14 * you may not use this file except in compliance with the License.
15 * You may obtain a copy of the License at
16 *
17 * http://www.apache.org/licenses/LICENSE-2.0
18 *
19 * Unless required by applicable law or agreed to in writing, software
20 * distributed under the License is distributed on an "AS IS" BASIS,
21 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 * See the License for the specific language governing permissions and
23 * limitations under the License.
24 *
25 **********************************************************************
26 *
27 * @filename openapi_lldp.h
28 *
29 * @purpose LLDP Configuration and Status
30 *
31 * @component OpEN
32 *
33 * @create 10/10/2012
34 *
35 * @end
36 *
37 **********************************************************************/
38 #ifndef OPENAPI_LLDP_H_INCLUDED
39 #define OPENAPI_LLDP_H_INCLUDED
40 
41 #include "openapi_common.h"
42 
43 #define OPEN_LLDP_MED_CAP_CAPABILITIES_BITMASK 0x01
44 #define OPEN_LLDP_MED_CAP_NETWORKPOLICY_BITMASK 0x02
45 #define OPEN_LLDP_MED_CAP_LOCATION_BITMASK 0x04
46 #define OPEN_LLDP_MED_CAP_EXT_PSE_BITMASK 0x08
47 #define OPEN_LLDP_MED_CAP_EXT_PD_BITMASK 0x10
48 #define OPEN_LLDP_MED_CAP_INVENTORY_BITMASK 0x20
49 
50 typedef struct
51 {
52  unsigned char bitmap[2];
54 
55 typedef enum
56 {
65 
66 typedef enum {
75 
76 typedef enum {
84 
85 typedef enum {
91 
92 /*****************************************************************/
108  uint32_t *strLen);
109 
110 /*****************************************************************/
130  uint32_t ifNum,
131  OPEN_CONTROL_t lldpTxMode);
132 
133 /*****************************************************************/
151  uint32_t ifNum,
152  OPEN_CONTROL_t *lldpTxMode);
153 
154 /*****************************************************************/
173  uint32_t ifNum,
174  OPEN_CONTROL_t lldpRxMode);
175 
176 /*****************************************************************/
193  uint32_t ifNum,
194  OPEN_CONTROL_t *lldpRxMode);
195 
196 /*****************************************************************/
215  uint32_t ifNum,
216  OPEN_LLDP_TLV_TYPE_t tlvType,
217  OPEN_CONTROL_t tlvTransmitMode);
218 
219 /*****************************************************************/
236  uint32_t ifNum,
237  OPEN_LLDP_TLV_TYPE_t tlvType,
238  OPEN_CONTROL_t *tlvTransmitMode);
239 
240 /*****************************************************************/
259  uint32_t ifNum,
260  OPEN_CONTROL_t lldpNotMode);
261 
262 /*****************************************************************/
278  uint32_t ifNum,
279  OPEN_CONTROL_t *lldpNotMode);
280 
281 /*****************************************************************/
295  uint32_t ifNum,
296  uint32_t *nextIfNum);
297 
298 /*****************************************************************/
315  uint32_t ifNum,
316  uint32_t *remIndex,
317  uint32_t *timeStamp);
318 
319 /*****************************************************************/
344  uint32_t ifNum,
345  uint32_t remIndex,
346  uint32_t timeStamp,
347  OPEN_LLDP_CHASSIS_ID_SUBTYPE_t *chassisIdSubtype,
348  open_buffdesc *chassisId);
349 
350 /*****************************************************************/
375  uint32_t ifNum,
376  uint32_t remIndex,
377  uint32_t timeStamp,
378  OPEN_LLDP_PORT_ID_SUBTYPE_t *portIdSubtype,
379  open_buffdesc *portId);
380 
381 /*****************************************************************/
405  uint32_t ifNum,
406  uint32_t remIndex,
407  uint32_t timeStamp,
408  open_buffdesc *systemName);
409 
410 /*****************************************************************/
434  uint32_t ifNum,
435  uint32_t remIndex,
436  uint32_t timeStamp,
437  open_buffdesc *systemDesc);
438 
439 /*****************************************************************/
463  uint32_t ifNum,
464  uint32_t remIndex,
465  uint32_t timeStamp,
466  open_buffdesc *portDesc);
467 
468 /*****************************************************************/
492  uint32_t ifNum,
493  uint32_t remIndex,
494  uint32_t timeStamp,
495  open_buffdesc *sysCapSupp);
496 
497 /*****************************************************************/
521  uint32_t ifNum,
522  uint32_t remIndex,
523  uint32_t timeStamp,
524  open_buffdesc *sysCapEnabled);
525 
526 /*****************************************************************/
555  uint32_t ifNum,
556  uint32_t remIndex,
557  uint32_t timeStamp,
558  OPEN_LLDP_IANA_ADDR_FAMILY_t *addressFamily,
559  open_buffdesc *address,
560  uint8_t *addrLen);
561 
562 /*****************************************************************/
583  uint32_t ifNum,
584  uint32_t remIndex,
585  uint32_t timeStamp,
586  uint32_t *ttl);
587 
588 /*****************************************************************/
609  uint32_t ifNum,
610  OPEN_LLDP_CHASSIS_ID_SUBTYPE_t *chassisIdSubtype,
611  open_buffdesc *chassisId);
612 
613 /*****************************************************************/
634  uint32_t ifNum,
635  OPEN_LLDP_PORT_ID_SUBTYPE_t *portIdSubtype,
636  open_buffdesc *portId);
637 
638 /*****************************************************************/
658  uint32_t ifNum,
659  open_buffdesc *systemName);
660 
661 /*****************************************************************/
681  uint32_t ifNum,
682  open_buffdesc *systemDesc);
683 
684 /*****************************************************************/
704  uint32_t ifNum,
705  open_buffdesc *portDesc);
706 
707 /*****************************************************************/
727  uint32_t ifNum,
728  open_buffdesc *sysCapSupp);
729 
730 /*****************************************************************/
750  uint32_t ifNum,
751  open_buffdesc *sysCapEnabled);
752 
753 /*****************************************************************/
774  uint32_t ifNum,
775  OPEN_LLDP_IANA_ADDR_FAMILY_t *addressFamily,
776  open_buffdesc *address);
777 
778 /*****************************************************************/
795  uint32_t intf,
796  OPEN_CONTROL_t *mode);
797 
798 /*****************************************************************/
819  uint32_t intf,
820  OPEN_CONTROL_t mode);
821 
822 /*****************************************************************/
839  uint32_t intf,
840  OPEN_BOOL_t *mode);
841 
842 /*****************************************************************/
863  uint32_t intf,
864  OPEN_BOOL_t mode);
865 
866 /*****************************************************************/
889  uint32_t intf,
891 
892 /*****************************************************************/
919  uint32_t intf,
921 
922 /*****************************************************************/
950  uint32_t intf, uint32_t remIndex, uint32_t timeStamp,
951  OPEN_LLDP_MED_CAPABILITIES_t *supportedCapabilities,
952  OPEN_LLDP_MED_CAPABILITIES_t *enabledCapabilities);
953 
954 /*****************************************************************/
973  uint32_t intf, uint32_t remIndex, uint32_t timeStamp,
974  uint32_t *deviceClass);
975 
976 /*****************************************************************/
990  uint32_t *size);
991 
992 /*****************************************************************/
1014  uint32_t intf, uint32_t remIndex, uint32_t timeStamp,
1015  open_buffdesc *modelName);
1016 
1017 #endif /* OPENAPI_LLDP_H_INCLUDED */
1018 
open_error_t openapiLldpIntfLocalDeviceChassisIdGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_LLDP_CHASSIS_ID_SUBTYPE_t *chassisIdSubtype, open_buffdesc *chassisId)
Gets the LLDP Local Device Chassis Id and Chassis Id Subtype for the specified interface.
open_error_t openapiLldpMedRemoteModelNameGet(openapiClientHandle_t *client_handle, uint32_t intf, uint32_t remIndex, uint32_t timeStamp, open_buffdesc *modelName)
Get the LLDP-MED model name of the remote device.
OPEN_LLDP_IANA_ADDR_FAMILY_t
Definition: openapi_lldp.h:85
System Capabilities TLV.
Definition: openapi_lldp.h:79
open_error_t openapiLldpIntfLocalDeviceSystemNameGet(openapiClientHandle_t *client_handle, uint32_t ifNum, open_buffdesc *systemName)
Gets the LLDP Local Device System Name for the specified interface.
OPEN_LLDP_PORT_ID_SUBTYPE_t
Definition: openapi_lldp.h:66
OPEN_LLDP_CHASSIS_ID_SUBTYPE_t
Definition: openapi_lldp.h:55
open_error_t openapiLldpMedIntfModeSet(openapiClientHandle_t *client_handle, uint32_t intf, OPEN_CONTROL_t mode)
Set LLDP-MED administrative mode on valid LLDP interfaces.
open_error_t openapiLldpMedIntfModeGet(openapiClientHandle_t *client_handle, uint32_t intf, OPEN_CONTROL_t *mode)
Get the interface LLDP-MED administrative mode.
open_error_t openapiLldpIntfRemoteDeviceSysCapSuppGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t remIndex, uint32_t timeStamp, open_buffdesc *sysCapSupp)
Gets the LLDP Remote Device System Capabilities Supported for the specified interface.
open_error_t
OPEN uses these enumerators to indicate the error codes.
open_error_t openapiLldpIntfLocalDevicePortIdGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_LLDP_PORT_ID_SUBTYPE_t *portIdSubtype, open_buffdesc *portId)
Gets the LLDP Local Device Port Id and Port Id Subtype for the specified interface.
open_error_t openapiLldpIntfLocalDeviceSysCapSuppGet(openapiClientHandle_t *client_handle, uint32_t ifNum, open_buffdesc *sysCapSupp)
Gets the LLDP Local Device System Capabilities Supported for the specified interface.
open_error_t openapiLldpIntfRemoteDeviceMgmtAddressNextGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t remIndex, uint32_t timeStamp, OPEN_LLDP_IANA_ADDR_FAMILY_t *addressFamily, open_buffdesc *address, uint8_t *addrLen)
Gets the LLDP Remote Device next Management Address for the specified interface.
open_error_t openapiLldpMedRemoteDeviceClassGet(openapiClientHandle_t *client_handle, uint32_t intf, uint32_t remIndex, uint32_t timeStamp, uint32_t *deviceClass)
Get the LLDP-MED device class of the remote device.
open_error_t openapiLldpIntfNextGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *nextIfNum)
Gets the next valid LLDP interface.
open_error_t openapiLldpIntfLocalDevicePortDescGet(openapiClientHandle_t *client_handle, uint32_t ifNum, open_buffdesc *portDesc)
Gets the LLDP Local Device Port Description for the specified interface.
System Name TLV.
Definition: openapi_lldp.h:78
open_error_t openapiLldpIntfRemoteDeviceTTLGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t remIndex, uint32_t timeStamp, uint32_t *ttl)
Gets the LLDP Remote Device TTL for the specified interface.
open_error_t openapiLldpIntfRemoteDeviceSystemNameGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t remIndex, uint32_t timeStamp, open_buffdesc *systemName)
Gets the LLDP Remote Device System Name for the specified interface.
open_error_t openapiLldpIntfLocalDeviceMgmtAddressGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_LLDP_IANA_ADDR_FAMILY_t *addressFamily, open_buffdesc *address)
Gets the LLDP Local Device Management Address for the specified interface.
open_error_t openapiLldpIntfRemoteDeviceSystemDescGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t remIndex, uint32_t timeStamp, open_buffdesc *systemDesc)
Gets the LLDP Remote Device System Description for the specified interface.
open_error_t openapiLldpIntfLocalDeviceSystemDescGet(openapiClientHandle_t *client_handle, uint32_t ifNum, open_buffdesc *systemDesc)
Gets the LLDP Local Device System Description for the specified interface.
open_error_t openapiLldpMgmtStrLenGet(openapiClientHandle_t *client_handle, uint32_t *strLen)
Gets the LLDP Management string length.
open_error_t openapiLldpIntfNotificationModeSet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_CONTROL_t lldpNotMode)
Sets the LLDP Notification mode for the specified interface.
OPEN_CONTROL_t
OPEN uses these enumerators to indicate enable or disable for a given config or status parameter...
open_error_t openapiLldpIntfRemoteDeviceNextGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *remIndex, uint32_t *timeStamp)
Gets the next LLDP Remote Device entry for the specified interface.
open_error_t openapiLldpIntfRemoteDeviceSysCapEnabledGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t remIndex, uint32_t timeStamp, open_buffdesc *sysCapEnabled)
Gets the LLDP Remote Device System Capabilities Enabled for the specified interface.
OPEN_BOOL_t
OPEN uses these enumerators to indicate true or false for a given config or status parameter...
open_error_t openapiLldpMedIntfTransmitTlvSet(openapiClientHandle_t *client_handle, uint32_t intf, OPEN_LLDP_MED_CAPABILITIES_t *cap)
Set LLDP-MED TLVs for transmision on valid LLDP interfaces.
open_error_t openapiLldpMedRemoteModelNameSizeGet(openapiClientHandle_t *client_handle, uint32_t *size)
Get the size in bytes for the open_buffdesc used to call openapiLldpMedRemoteModelNameGet().
open_error_t openapiLldpIntfTransmitModeSet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_CONTROL_t lldpTxMode)
Sets LLDP PDU transmit mode on the specified interface.
open_error_t openapiLldpIntfNotificationModeGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_CONTROL_t *lldpNotMode)
Gets the LLDP Notification mode for the specified interface.
open_error_t openapiLldpIntfTLVTransmitModeGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_LLDP_TLV_TYPE_t tlvType, OPEN_CONTROL_t *tlvTransmitMode)
Gets the LLDP optional TLVs transmit mode for the specified interface.
open_error_t openapiLldpMedIntfConfigNotificationModeGet(openapiClientHandle_t *client_handle, uint32_t intf, OPEN_BOOL_t *mode)
Get the interface LLDP-MED configuration notification mode.
open_error_t openapiLldpIntfRemoteDevicePortDescGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t remIndex, uint32_t timeStamp, open_buffdesc *portDesc)
Gets the LLDP Remote Device Port Description for the specified interface.
open_error_t openapiLldpIntfRemoteDeviceChassisIdGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t remIndex, uint32_t timeStamp, OPEN_LLDP_CHASSIS_ID_SUBTYPE_t *chassisIdSubtype, open_buffdesc *chassisId)
Gets the LLDP Remote Device Chassis Id and Chassis Id Subtype for the specified interface.
open_error_t openapiLldpIntfReceiveModeSet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_CONTROL_t lldpRxMode)
Sets LLDP PDU reception mode on the specified interface.
open_error_t openapiLldpIntfTransmitModeGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_CONTROL_t *lldpTxMode)
Gets the LLDP PDU transmit mode for the specified interface.
open_error_t openapiLldpIntfTLVTransmitModeSet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_LLDP_TLV_TYPE_t tlvType, OPEN_CONTROL_t tlvTransmitMode)
Sets the LLDP optional TLVs transmit mode for the specified interface.
System Description TLV.
Definition: openapi_lldp.h:77
open_error_t openapiLldpIntfReceiveModeGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_CONTROL_t *lldpRxMode)
Gets the LLDP PDU reception mode for the specified interface.
open_error_t openapiLldpMedIntfTransmitTlvGet(openapiClientHandle_t *client_handle, uint32_t intf, OPEN_LLDP_MED_CAPABILITIES_t *cap)
Get the interface LLDP-MED TLVs enabled for transmision.
open_error_t openapiLldpMedIntfConfigNotificationModeSet(openapiClientHandle_t *client_handle, uint32_t intf, OPEN_BOOL_t mode)
Set LLDP-MED configuration notification mode on valid LLDP interfaces.
Port Description TLV.
Definition: openapi_lldp.h:80
open_error_t openapiLldpMedRemoteCapabilitiesGet(openapiClientHandle_t *client_handle, uint32_t intf, uint32_t remIndex, uint32_t timeStamp, OPEN_LLDP_MED_CAPABILITIES_t *supportedCapabilities, OPEN_LLDP_MED_CAPABILITIES_t *enabledCapabilities)
Get the LLDP-MED capabilities received from the remote device.
OPEN_LLDP_TLV_TYPE_t
Definition: openapi_lldp.h:76
Management Address TLV.
Definition: openapi_lldp.h:81
open_error_t openapiLldpIntfLocalDeviceSysCapEnabledGet(openapiClientHandle_t *client_handle, uint32_t ifNum, open_buffdesc *sysCapEnabled)
Gets the LLDP Local Device System Capabilities Enabled for the specified interface.
open_error_t openapiLldpIntfRemoteDevicePortIdGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t remIndex, uint32_t timeStamp, OPEN_LLDP_PORT_ID_SUBTYPE_t *portIdSubtype, open_buffdesc *portId)
Gets the LLDP Remote Device Port Id and Port Id Subtype for the specified interface.