50 #ifndef OPENAPI_IF_H_INCLUDED
51 #define OPENAPI_IF_H_INCLUDED
57 OPEN_PHY_CAP_PORTSPEED_HALF_10 = 0x000000001,
58 OPEN_PHY_CAP_PORTSPEED_FULL_10 = 0x000000002,
59 OPEN_PHY_CAP_PORTSPEED_HALF_100 = 0x000000004,
60 OPEN_PHY_CAP_PORTSPEED_FULL_100 = 0x000000008,
61 OPEN_PHY_CAP_PORTSPEED_HALF_1000 = 0x000000010,
62 OPEN_PHY_CAP_PORTSPEED_FULL_1000 = 0x000000020,
63 OPEN_PHY_CAP_PORTSPEED_FULL_2P5G = 0x000000040,
64 OPEN_PHY_CAP_PORTSPEED_FULL_5G = 0x000000080,
65 OPEN_PHY_CAP_PORTSPEED_FULL_10G = 0x000000100,
66 OPEN_PHY_CAP_PORTSPEED_AUTO_NEG = 0x000000400,
67 OPEN_PHY_CAP_PORTSPEED_SFP = 0x000000800,
68 OPEN_PHY_CAP_PORTSPEED_SFP_DETECT = 0x000001000,
69 OPEN_PHY_CAP_POE_PSE = 0x000002000,
70 OPEN_PHY_CAP_POE_PD = 0x000004000,
71 OPEN_PHY_CAP_INTERNAL = 0x000008000,
72 OPEN_PHY_CAP_NATIVE_EEE = 0x000010000,
73 OPEN_PHY_CAP_AUTO_EEE = 0x000020000,
74 OPEN_PHY_CAP_DUAL_MODE_SUPPORT = 0x000040000,
77 OPEN_PHY_CAP_POE_PSE_PLUS = 0x000080000,
78 OPEN_PHY_CAP_POE_PD_PLUS = 0x000100000,
79 OPEN_PHY_CAP_ENERGY_DETECT = 0x000200000,
80 OPEN_PHY_CAP_COMBO_PREFERENCE = 0x000400000,
81 OPEN_PHY_CAP_EXPANDABLE_PORT = 0x000800000,
82 OPEN_PHY_CAP_AUTO_CONFIG = 0x001000000,
83 OPEN_PHY_CAP_SHORT_REACH = 0x002000000,
84 OPEN_PHY_CAP_UPOE_PSE = 0x004000000,
85 OPEN_PHY_CAP_UPOE_PD = 0x008000000,
86 OPEN_PHY_CAP_DYNAMIC_PORT = 0x010000000,
87 OPEN_PHY_CAP_FIXED_STACK_PORT = 0x020000000,
89 OPEN_PHY_CAP_FEC_SUPPORT = 0x040000000,
90 OPEN_PHY_CAP_PORTSPEED_FULL_20G = 0x080000000,
91 OPEN_PHY_CAP_PORTSPEED_FULL_25G = 0x081000000,
92 OPEN_PHY_CAP_PORTSPEED_FULL_40G = 0x082000000,
93 OPEN_PHY_CAP_PORTSPEED_FULL_50G = 0x084000000,
94 OPEN_PHY_CAP_PORTSPEED_FULL_100G = 0x088000000,
106 } OPEN_PHY_CAPABILITIES_t;
110 OPEN_PORTCTRL_PORTSPEED_AUTO_NEG = 1,
111 OPEN_PORTCTRL_PORTSPEED_HALF_100TX = 2,
112 OPEN_PORTCTRL_PORTSPEED_FULL_100TX = 3,
113 OPEN_PORTCTRL_PORTSPEED_HALF_10T = 4,
114 OPEN_PORTCTRL_PORTSPEED_FULL_10T = 5,
115 OPEN_PORTCTRL_PORTSPEED_FULL_100FX = 6,
116 OPEN_PORTCTRL_PORTSPEED_FULL_1000SX = 7,
117 OPEN_PORTCTRL_PORTSPEED_FULL_10GSX = 8,
118 OPEN_PORTCTRL_PORTSPEED_FULL_20GSX = 9,
119 OPEN_PORTCTRL_PORTSPEED_FULL_40GSX = 10,
120 OPEN_PORTCTRL_PORTSPEED_FULL_25GSX = 11,
121 OPEN_PORTCTRL_PORTSPEED_FULL_50GSX = 12,
122 OPEN_PORTCTRL_PORTSPEED_FULL_100GSX = 13,
123 OPEN_PORTCTRL_PORTSPEED_AAL5_155 = 14,
124 OPEN_PORTCTRL_PORTSPEED_FULL_5FX = 15,
125 OPEN_PORTCTRL_PORTSPEED_FULL_200GSX = 16,
126 OPEN_PORTCTRL_PORTSPEED_FULL_400GSX = 17,
127 OPEN_PORTCTRL_PORTSPEED_FULL_2P5FX = 128,
128 OPEN_PORTCTRL_PORTSPEED_LAG = 129,
129 OPEN_PORTCTRL_PORTSPEED_UNKNOWN = 130
130 } OPEN_PORT_SPEEDS_t;
136 OPEN_DISABLE_REASON_NONE = 1,
137 OPEN_DISABLE_REASON_UDLD = 2,
138 OPEN_DISABLE_REASON_STP = 3,
139 OPEN_DISABLE_REASON_BPDUGUARD = 4,
140 OPEN_DISABLE_REASON_BPDUSTORM = 5,
141 OPEN_DISABLE_REASON_DHCPSNOOPING = 6,
142 OPEN_DISABLE_REASON_ARPINSPECTION = 7,
143 OPEN_DISABLE_REASON_STORMCONTROL_BCAST = 8,
144 OPEN_DISABLE_REASON_STORMCONTROL_MCAST = 9,
145 OPEN_DISABLE_REASON_STORMCONTROL_UCAST = 10,
146 OPEN_DISABLE_REASON_XCEIVER = 11,
147 OPEN_DISABLE_REASON_XCEIVERPLUS = 12,
148 OPEN_DISABLE_REASON_LOOPPROTECT = 13,
149 OPEN_DISABLE_REASON_PML = 14,
150 OPEN_DISABLE_REASON_DOS = 15,
151 OPEN_DISABLE_REASON_LINK_FLAP = 16,
152 OPEN_DISABLE_REASON_AUTHMGR_AUTH_VIOLATION = 17,
153 OPEN_DISABLE_REASON_COA = 18
160 OPEN_PORT_CABLE_MEDIA_TYPE_NONE = 0,
161 OPEN_PORT_CABLE_MEDIA_TYPE_COPPER = 1,
162 OPEN_PORT_CABLE_MEDIA_TYPE_FIBER = 2,
170 OPEN_SPECIAL_PORT_TYPE_NORMAL = 1,
171 OPEN_SPECIAL_PORT_TYPE_TRUNK_MEMBER = 2,
172 OPEN_SPECIAL_PORT_TYPE_MIRRORED_PORT = 3,
173 OPEN_SPECIAL_PORT_TYPE_PROBE_PORT = 4,
174 OPEN_SPECIAL_PORT_TYPE_L2TUNNEL_PORT = 5,
175 OPEN_SPECIAL_PORT_TYPE_SERVICE_PORT = 6
180 OPEN_PORT_DUPLEX_HALF = 0,
181 OPEN_PORT_DUPLEX_FULL = 1,
182 OPEN_PORT_DUPLEX_UNKNOWN = 0xffff
184 } OPEN_PORT_DUPLEX_t;
188 OPEN_PORT_AUTO_NEG_ENABLE = 0,
189 OPEN_PORT_AUTO_NEG_DISABLE = 1,
190 OPEN_PORT_AUTO_NEG_UNKNOWN = 0xffff
192 } OPEN_PORT_AUTO_NEG_t;
201 #define OPENAPI_INTERFACE_NAME_LENGTH 60
219 uint32_t ifNum, OPEN_PORT_SPEEDS_t * speed);
238 uint32_t ifNum, OPEN_PORT_SPEEDS_t speed);
259 uint32_t ifNum, OPEN_PORT_DUPLEX_t * duplex_mode);
276 uint32_t ifNum, OPEN_PORT_AUTO_NEG_t * autoneg);
296 uint32_t ifNum, uint32_t autoneg);
313 uint32_t ifNum, uint32_t *headerSize);
330 uint32_t ifNum, uint32_t * mtu_size);
354 uint32_t ifNum, uint32_t mtu_size);
402 uint32_t ifNum, uint32_t maxFrameSize);
419 uint32_t ifNum, uint32_t *maxFrameSize);
442 client_handle, uint32_t ifNum,
467 client_handle, uint32_t ifNum,
485 uint32_t ifNum, uint32_t * size);
522 uint32_t ifNum, uint32_t* size);
600 uint32_t *firstIfNum);
624 uint32_t *nextIfNum);
741 uint32_t *delete_pending);
777 uint32_t interface, uint32_t *value);
795 uint32_t interface, uint32_t *value);
816 uint32_t interface, uint32_t *value);
836 uint32_t interface, uint32_t *value);
853 uint32_t interface, uint32_t *value);
871 uint32_t interface, uint32_t *value);
889 uint32_t interface, uint32_t *value);
913 uint32_t interface, uint32_t *value);
934 uint32_t interface, uint32_t *value);
952 uint32_t interface, uint32_t *value);
971 uint32_t ifNum, OPEN_PORT_SPEEDS_t *speed);
992 uint32_t ifNum, OPEN_PORT_DUPLEX_t *duplex_mode);
1012 uint32_t ifNum, uint64_t *portCapability);
1056 uint32_t *rootPort);
1077 uint32_t *laneCount);
1098 uint32_t *peerIfNum);
1119 uint32_t *laneCount);
open_error_t openapiIfAdminStateSet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_CONTROL_t adminState)
Sets the administrative state for the specified interface.
open_error_t openapiIfOutOctetsGet(openapiClientHandle_t *client_handle, uint32_t interface, uint32_t *value)
The total number of octets transmitted out of the interface, including framing characters.
OPEN_INTF_STATUS_t
OPEN uses these enumerators to indicate the interface status.
OPEN_SPECIAL_PORT_TYPE_t
OPEN uses these enumerators to indicate a port that is currently being used for a special purpose...
open_error_t openapiIfPauseStatusGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_BOOL_t *rxPauseAllowed, OPEN_BOOL_t *txPauseAllowed)
Get the negotiated Rx and Tx pause status of a given interface.
open_error_t openapiIfInOctetsGet(openapiClientHandle_t *client_handle, uint32_t interface, uint32_t *value)
Gets the total number of octets received on the interface including framing characters.
open_error_t openapiIfSpeedGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_PORT_SPEEDS_t *speed)
Gets the speed status of a given interface.
open_error_t openapiIfSoftShutdownStateGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_CONTROL_t *soft_shut)
Gets the Soft-shutdown status of a given interface.
open_error_t openapiIfNumGet(openapiClientHandle_t *client_handle, open_buffdesc *intfName, uint32_t *ifNum)
Gets the interface number given the displayable name for the interface.
open_error_t openapiIfInUcastPktsGet(openapiClientHandle_t *client_handle, uint32_t interface, uint32_t *value)
The number of packets, delivered by this sub-layer to a higher sub-layer.
open_error_t openapiIfMtuSizeSet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t mtu_size)
Sets the MTU size of a given interface.
open_error_t openapiIfOutErrorsGet(openapiClientHandle_t *client_handle, uint32_t interface, uint32_t *value)
For packet-oriented interfaces, the number of outbound packets that could not be transmitted because ...
open_error_t openapiIfMacAddrSizeGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *size)
Gets the MAC address size of a given interface.
OPEN_PORT_CABLE_MEDIA_TYPE_t
OPEN uses these enumerators to indicate the interface active media type.
open_error_t openapiIfAutoNegSet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t autoneg)
Sets the auto-negotiation mode of a given interface.
open_error_t openapiIfEthernetHeaderSizeGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *headerSize)
Gets the ethernet header size of a given interface.
open_error_t
OPEN uses these enumerators to indicate the error codes.
open_error_t openapiIfAutoNegGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_PORT_AUTO_NEG_t *autoneg)
Gets the auto-negotiation mode of a given interface.
open_error_t openapiIfDescrGet(openapiClientHandle_t *client_handle, uint32_t ifNum, open_buffdesc *descrip)
Gets the Description of a given interface.
open_error_t openapiIfPortSpeedLaneCountGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *laneCount)
Determine the number of lanes running under this port based on the running speed of this port...
open_error_t openapiIfDuplexModeGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_PORT_DUPLEX_t *duplex_mode)
Gets the duplex mode of a given interface.
open_error_t openapiIfOutDiscardsGet(openapiClientHandle_t *client_handle, uint32_t interface, uint32_t *value)
The number of outbound packets which were chosen to be discarded.
open_error_t openapiIfNextChangedGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *nextIfNum, uint32_t *delete_pending)
Gets the next interface which has a pending change or a pending deletion.
open_error_t openapiIfDescrSizeGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *size)
Gets the Description size of a given interface.
open_error_t openapiIfDisableReasonGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DISABLE_REASON_t *reason)
Gets the disable reason code for an interface.
OPEN_DISABLE_REASON_t
OPEN uses these enumerators to indicate the reason a port is diagnostically disabled.
open_error_t openapiIfInDiscardsGet(openapiClientHandle_t *client_handle, uint32_t interface, uint32_t *value)
The number of inbound packets which were chosen to be discarded.
open_error_t openapiIfExpPortFirstPeerGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *peerIfNum)
Get the interface number of the port's first and presumably the smallest peer interface.
open_error_t openapiIfInUnknownProtosGet(openapiClientHandle_t *client_handle, uint32_t interface, uint32_t *value)
The number of packets received via the interface which were discarded because of an unknown or unsupp...
OPEN_PORT_STATE_t
OPEN uses these enumerators to indicate port admin mode enable, disable or diag_disable.
open_error_t openapiIfMaxFrameSizeGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *maxFrameSize)
Gets the Maximum frame size of a given interface.
open_error_t openapiIfDescrSet(openapiClientHandle_t *client_handle, uint32_t ifNum, open_buffdesc *descrip)
Sets the Description of a given interface.
open_error_t openapiIfSpeedModeGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_PORT_SPEEDS_t *speed)
Gets the speed mode of a given interface.
open_error_t openapiIfNextGet(openapiClientHandle_t *client_handle, OPEN_INTF_TYPE_t ifType, uint32_t ifNum, uint32_t *nextIfNum)
Gets the interface identifier for the first interface of the specified interface type that has the ne...
OPEN_CONTROL_t
OPEN uses these enumerators to indicate enable or disable for a given config or status parameter...
open_error_t openapiIfMtuSizeGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *mtu_size)
Gets the MTU size of a given interface.
open_error_t openapiIfSoftShutdownStateSet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_CONTROL_t soft_shut)
Sets the Soft-shutdown status of a given interface.
OPEN_BOOL_t
OPEN uses these enumerators to indicate true or false for a given config or status parameter...
Interface in attached state.
open_error_t openapiIfAdminStateGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_CONTROL_t *adminState)
Gets the administrative state for the specified interface.
open_error_t openapiIfNameGet(openapiClientHandle_t *client_handle, uint32_t intf, open_buffdesc *intfName)
Gets the displayable name for the specified interface.
open_error_t openapiIfMtuSizeSetV2(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t mtu_size)
Sets the MTU size of a given interface.
open_error_t openapiIfInErrorsGet(openapiClientHandle_t *client_handle, uint32_t interface, uint32_t *value)
Returns the current value of the errors counter.
open_error_t openapiIfTypeGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_INTF_TYPE_t *ifType)
Gets the interface type associated with the internal interface number.
open_error_t openapiIfCapabilitiesGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint64_t *portCapability)
Gets the capabilities of a given interface.
open_error_t openapiIfOprStateGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_PORT_STATE_t *val)
Gets the operational status of a given interface.
open_error_t openapiIfActiveMediaTypeGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_PORT_CABLE_MEDIA_TYPE_t *mediaType)
Get the active media type for a given interface.
open_error_t openapiIfLinkStateGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_LINK_STATE_t *linkState)
Gets the link state for the specified interface.
open_error_t openapiIfLastChangeGet(openapiClientHandle_t *client_handle, uint32_t interface, uint32_t *value)
Gets the time of last link state change in seconds.
open_error_t openapiIfSpecialPortTypeGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_SPECIAL_PORT_TYPE_t *specialType)
Get the special port type designation of a given interface.
open_error_t openapiIfDuplexGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_PORT_DUPLEX_t *duplex_mode)
Gets the duplex status of a given interface.
OPEN_LINK_STATE_t
OPEN uses these enumerators to indicate the link status.
open_error_t openapiIfStatusGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_INTF_STATUS_t *ifStatus)
Gets the status of the specified interface.
open_error_t openapiIfOutUcastPktsGet(openapiClientHandle_t *client_handle, uint32_t interface, uint32_t *value)
The total number of packets that higher-level protocols requested be transmitted. ...
open_error_t openapiIfFirstGet(openapiClientHandle_t *client_handle, OPEN_INTF_TYPE_t ifType, uint32_t *firstIfNum)
Gets the interface identifier for the first interface of the specified interface type.
open_error_t openapiIfMacAddrGet(openapiClientHandle_t *client_handle, uint32_t ifNum, open_buffdesc *mac_addr)
Gets the MAC address of a given interface.
open_error_t openapiIfExpPortOperModeLaneCountGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *laneCount)
Determine the number of lanes running under this port based on the operating mode of this port...
open_error_t openapiIfMaxFrameSizeSet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t maxFrameSize)
Sets the Maximum frame size of a given interface.
open_error_t openapiIfExpPortRootPortGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *rootSlot, uint32_t *rootPort)
Translate internal interface number into root slot and port.
open_error_t openapiIfSpeedSet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_PORT_SPEEDS_t speed)
Sets the speed of a given interface.