Open Ethernet Networking (OpEN) API Guide and Reference Manual
3.9.0.2
Welcome
ADK Documentation
API Reference
Files
File List
Globals
api
include
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];
53
}
OPEN_LLDP_MED_CAPABILITIES_t
;
54
55
typedef
enum
56
{
57
OPEN_LLDP_CHASSIS_ID_SUBTYPE_CHASSIS_COMP
= 1,
58
OPEN_LLDP_CHASSIS_ID_SUBTYPE_INTF_ALIAS
= 2,
59
OPEN_LLDP_CHASSIS_ID_SUBTYPE_PORT_COMP
= 3,
60
OPEN_LLDP_CHASSIS_ID_SUBTYPE_MAC_ADDR
= 4,
61
OPEN_LLDP_CHASSIS_ID_SUBTYPE_NET_ADDR
= 5,
62
OPEN_LLDP_CHASSIS_ID_SUBTYPE_INTF_NAME
= 6,
63
OPEN_LLDP_CHASSIS_ID_SUBTYPE_LOCAL
= 7
64
}
OPEN_LLDP_CHASSIS_ID_SUBTYPE_t
;
65
66
typedef
enum
{
67
OPEN_LLDP_PORT_ID_SUBTYPE_INTF_ALIAS
= 1,
68
OPEN_LLDP_PORT_ID_SUBTYPE_PORT_COMP
= 2,
69
OPEN_LLDP_PORT_ID_SUBTYPE_MAC_ADDR
= 3,
70
OPEN_LLDP_PORT_ID_SUBTYPE_NET_ADDR
= 4,
71
OPEN_LLDP_PORT_ID_SUBTYPE_INTF_NAME
= 5,
72
OPEN_LLDP_PORT_ID_SUBTYPE_AGENT_ID
= 6,
73
OPEN_LLDP_PORT_ID_SUBTYPE_LOCAL
= 7
74
}
OPEN_LLDP_PORT_ID_SUBTYPE_t
;
75
76
typedef
enum
{
77
OPEN_LLDP_SYS_DESC_TLV
= 0,
78
OPEN_LLDP_SYS_NAME_TLV
= 1,
79
OPEN_LLDP_SYS_CAPABILITIES_TLV
= 2,
80
OPEN_LLDP_PORT_DESC_TLV
= 3,
81
OPEN_LLDP_MGMT_ADDRESS_TLV
= 4,
82
OPEN_LLDP_LAST_TLV
= 5
83
}
OPEN_LLDP_TLV_TYPE_t
;
84
85
typedef
enum
{
86
OPEN_LLDP_IANA_ADDR_FAMILY_NUMBER_RESERVED
= 0,
87
OPEN_LLDP_IANA_ADDR_FAMILY_NUMBER_IPV4
= 1,
88
OPEN_LLDP_IANA_ADDR_FAMILY_NUMBER_IPV6
= 2,
89
OPEN_LLDP_IANA_ADDR_FAMILY_NUMBER_802
= 6
90
}
OPEN_LLDP_IANA_ADDR_FAMILY_t
;
91
92
/*****************************************************************/
107
open_error_t
openapiLldpMgmtStrLenGet
(
openapiClientHandle_t
*client_handle,
108
uint32_t *strLen);
109
110
/*****************************************************************/
129
open_error_t
openapiLldpIntfTransmitModeSet
(
openapiClientHandle_t
*client_handle,
130
uint32_t ifNum,
131
OPEN_CONTROL_t
lldpTxMode);
132
133
/*****************************************************************/
150
open_error_t
openapiLldpIntfTransmitModeGet
(
openapiClientHandle_t
*client_handle,
151
uint32_t ifNum,
152
OPEN_CONTROL_t
*lldpTxMode);
153
154
/*****************************************************************/
172
open_error_t
openapiLldpIntfReceiveModeSet
(
openapiClientHandle_t
*client_handle,
173
uint32_t ifNum,
174
OPEN_CONTROL_t
lldpRxMode);
175
176
/*****************************************************************/
192
open_error_t
openapiLldpIntfReceiveModeGet
(
openapiClientHandle_t
*client_handle,
193
uint32_t ifNum,
194
OPEN_CONTROL_t
*lldpRxMode);
195
196
/*****************************************************************/
214
open_error_t
openapiLldpIntfTLVTransmitModeSet
(
openapiClientHandle_t
*client_handle,
215
uint32_t ifNum,
216
OPEN_LLDP_TLV_TYPE_t
tlvType,
217
OPEN_CONTROL_t
tlvTransmitMode);
218
219
/*****************************************************************/
235
open_error_t
openapiLldpIntfTLVTransmitModeGet
(
openapiClientHandle_t
*client_handle,
236
uint32_t ifNum,
237
OPEN_LLDP_TLV_TYPE_t
tlvType,
238
OPEN_CONTROL_t
*tlvTransmitMode);
239
240
/*****************************************************************/
258
open_error_t
openapiLldpIntfNotificationModeSet
(
openapiClientHandle_t
*client_handle,
259
uint32_t ifNum,
260
OPEN_CONTROL_t
lldpNotMode);
261
262
/*****************************************************************/
277
open_error_t
openapiLldpIntfNotificationModeGet
(
openapiClientHandle_t
*client_handle,
278
uint32_t ifNum,
279
OPEN_CONTROL_t
*lldpNotMode);
280
281
/*****************************************************************/
294
open_error_t
openapiLldpIntfNextGet
(
openapiClientHandle_t
*client_handle,
295
uint32_t ifNum,
296
uint32_t *nextIfNum);
297
298
/*****************************************************************/
314
open_error_t
openapiLldpIntfRemoteDeviceNextGet
(
openapiClientHandle_t
*client_handle,
315
uint32_t ifNum,
316
uint32_t *remIndex,
317
uint32_t *timeStamp);
318
319
/*****************************************************************/
343
open_error_t
openapiLldpIntfRemoteDeviceChassisIdGet
(
openapiClientHandle_t
*client_handle,
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
/*****************************************************************/
374
open_error_t
openapiLldpIntfRemoteDevicePortIdGet
(
openapiClientHandle_t
*client_handle,
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
/*****************************************************************/
404
open_error_t
openapiLldpIntfRemoteDeviceSystemNameGet
(
openapiClientHandle_t
*client_handle,
405
uint32_t ifNum,
406
uint32_t remIndex,
407
uint32_t timeStamp,
408
open_buffdesc
*systemName);
409
410
/*****************************************************************/
433
open_error_t
openapiLldpIntfRemoteDeviceSystemDescGet
(
openapiClientHandle_t
*client_handle,
434
uint32_t ifNum,
435
uint32_t remIndex,
436
uint32_t timeStamp,
437
open_buffdesc
*systemDesc);
438
439
/*****************************************************************/
462
open_error_t
openapiLldpIntfRemoteDevicePortDescGet
(
openapiClientHandle_t
*client_handle,
463
uint32_t ifNum,
464
uint32_t remIndex,
465
uint32_t timeStamp,
466
open_buffdesc
*portDesc);
467
468
/*****************************************************************/
491
open_error_t
openapiLldpIntfRemoteDeviceSysCapSuppGet
(
openapiClientHandle_t
*client_handle,
492
uint32_t ifNum,
493
uint32_t remIndex,
494
uint32_t timeStamp,
495
open_buffdesc
*sysCapSupp);
496
497
/*****************************************************************/
520
open_error_t
openapiLldpIntfRemoteDeviceSysCapEnabledGet
(
openapiClientHandle_t
*client_handle,
521
uint32_t ifNum,
522
uint32_t remIndex,
523
uint32_t timeStamp,
524
open_buffdesc
*sysCapEnabled);
525
526
/*****************************************************************/
554
open_error_t
openapiLldpIntfRemoteDeviceMgmtAddressNextGet
(
openapiClientHandle_t
*client_handle,
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
/*****************************************************************/
582
open_error_t
openapiLldpIntfRemoteDeviceTTLGet
(
openapiClientHandle_t
*client_handle,
583
uint32_t ifNum,
584
uint32_t remIndex,
585
uint32_t timeStamp,
586
uint32_t *ttl);
587
588
/*****************************************************************/
608
open_error_t
openapiLldpIntfLocalDeviceChassisIdGet
(
openapiClientHandle_t
*client_handle,
609
uint32_t ifNum,
610
OPEN_LLDP_CHASSIS_ID_SUBTYPE_t
*chassisIdSubtype,
611
open_buffdesc
*chassisId);
612
613
/*****************************************************************/
633
open_error_t
openapiLldpIntfLocalDevicePortIdGet
(
openapiClientHandle_t
*client_handle,
634
uint32_t ifNum,
635
OPEN_LLDP_PORT_ID_SUBTYPE_t
*portIdSubtype,
636
open_buffdesc
*portId);
637
638
/*****************************************************************/
657
open_error_t
openapiLldpIntfLocalDeviceSystemNameGet
(
openapiClientHandle_t
*client_handle,
658
uint32_t ifNum,
659
open_buffdesc
*systemName);
660
661
/*****************************************************************/
680
open_error_t
openapiLldpIntfLocalDeviceSystemDescGet
(
openapiClientHandle_t
*client_handle,
681
uint32_t ifNum,
682
open_buffdesc
*systemDesc);
683
684
/*****************************************************************/
703
open_error_t
openapiLldpIntfLocalDevicePortDescGet
(
openapiClientHandle_t
*client_handle,
704
uint32_t ifNum,
705
open_buffdesc
*portDesc);
706
707
/*****************************************************************/
726
open_error_t
openapiLldpIntfLocalDeviceSysCapSuppGet
(
openapiClientHandle_t
*client_handle,
727
uint32_t ifNum,
728
open_buffdesc
*sysCapSupp);
729
730
/*****************************************************************/
749
open_error_t
openapiLldpIntfLocalDeviceSysCapEnabledGet
(
openapiClientHandle_t
*client_handle,
750
uint32_t ifNum,
751
open_buffdesc
*sysCapEnabled);
752
753
/*****************************************************************/
773
open_error_t
openapiLldpIntfLocalDeviceMgmtAddressGet
(
openapiClientHandle_t
*client_handle,
774
uint32_t ifNum,
775
OPEN_LLDP_IANA_ADDR_FAMILY_t
*addressFamily,
776
open_buffdesc
*address);
777
778
/*****************************************************************/
794
open_error_t
openapiLldpMedIntfModeGet
(
openapiClientHandle_t
*client_handle,
795
uint32_t intf,
796
OPEN_CONTROL_t
*mode);
797
798
/*****************************************************************/
818
open_error_t
openapiLldpMedIntfModeSet
(
openapiClientHandle_t
*client_handle,
819
uint32_t intf,
820
OPEN_CONTROL_t
mode);
821
822
/*****************************************************************/
838
open_error_t
openapiLldpMedIntfConfigNotificationModeGet
(
openapiClientHandle_t
*client_handle,
839
uint32_t intf,
840
OPEN_BOOL_t
*mode);
841
842
/*****************************************************************/
862
open_error_t
openapiLldpMedIntfConfigNotificationModeSet
(
openapiClientHandle_t
*client_handle,
863
uint32_t intf,
864
OPEN_BOOL_t
mode);
865
866
/*****************************************************************/
888
open_error_t
openapiLldpMedIntfTransmitTlvGet
(
openapiClientHandle_t
*client_handle,
889
uint32_t intf,
890
OPEN_LLDP_MED_CAPABILITIES_t
*cap);
891
892
/*****************************************************************/
918
open_error_t
openapiLldpMedIntfTransmitTlvSet
(
openapiClientHandle_t
*client_handle,
919
uint32_t intf,
920
OPEN_LLDP_MED_CAPABILITIES_t
*cap);
921
922
/*****************************************************************/
949
open_error_t
openapiLldpMedRemoteCapabilitiesGet
(
openapiClientHandle_t
*client_handle,
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
/*****************************************************************/
972
open_error_t
openapiLldpMedRemoteDeviceClassGet
(
openapiClientHandle_t
*client_handle,
973
uint32_t intf, uint32_t remIndex, uint32_t timeStamp,
974
uint32_t *deviceClass);
975
976
/*****************************************************************/
989
open_error_t
openapiLldpMedRemoteModelNameSizeGet
(
openapiClientHandle_t
*client_handle,
990
uint32_t *size);
991
992
/*****************************************************************/
1013
open_error_t
openapiLldpMedRemoteModelNameGet
(
openapiClientHandle_t
*client_handle,
1014
uint32_t intf, uint32_t remIndex, uint32_t timeStamp,
1015
open_buffdesc
*modelName);
1016
1017
#endif
/* OPENAPI_LLDP_H_INCLUDED */
1018
© 2022 by Broadcom. All rights reserved.