Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
Macros | Enumerations | Functions
Interface Configuration And Status [OPENAPI_IF]

Macros

#define OPENAPI_INTERFACE_NAME_LENGTH   60
 

Enumerations

enum  OPEN_DISABLE_REASON_t {
  OPEN_DISABLE_REASON_NONE = 1, OPEN_DISABLE_REASON_UDLD = 2, OPEN_DISABLE_REASON_STP = 3, OPEN_DISABLE_REASON_BPDUGUARD = 4,
  OPEN_DISABLE_REASON_BPDUSTORM = 5, OPEN_DISABLE_REASON_DHCPSNOOPING = 6, OPEN_DISABLE_REASON_ARPINSPECTION = 7, OPEN_DISABLE_REASON_STORMCONTROL_BCAST = 8,
  OPEN_DISABLE_REASON_STORMCONTROL_MCAST = 9, OPEN_DISABLE_REASON_STORMCONTROL_UCAST = 10, OPEN_DISABLE_REASON_XCEIVER = 11, OPEN_DISABLE_REASON_XCEIVERPLUS = 12,
  OPEN_DISABLE_REASON_LOOPPROTECT = 13, OPEN_DISABLE_REASON_PML = 14, OPEN_DISABLE_REASON_DOS = 15, OPEN_DISABLE_REASON_LINK_FLAP = 16,
  OPEN_DISABLE_REASON_AUTHMGR_AUTH_VIOLATION = 17, OPEN_DISABLE_REASON_COA = 18
}
 OPEN uses these enumerators to indicate the reason a port is diagnostically disabled. More...
 
enum  OPEN_INTF_STATUS_t { OPEN_INTF_STATUS_NONE = 0, OPEN_INTF_STATUS_ATTACHED = 1 }
 OPEN uses these enumerators to indicate the interface status. More...
 
enum  OPEN_PHY_CAPABILITIES_t {
  OPEN_PHY_CAP_PORTSPEED_HALF_10 = 0x000000001, OPEN_PHY_CAP_PORTSPEED_FULL_10 = 0x000000002, OPEN_PHY_CAP_PORTSPEED_HALF_100 = 0x000000004, OPEN_PHY_CAP_PORTSPEED_FULL_100 = 0x000000008,
  OPEN_PHY_CAP_PORTSPEED_HALF_1000 = 0x000000010, OPEN_PHY_CAP_PORTSPEED_FULL_1000 = 0x000000020, OPEN_PHY_CAP_PORTSPEED_FULL_2P5G = 0x000000040, OPEN_PHY_CAP_PORTSPEED_FULL_5G = 0x000000080,
  OPEN_PHY_CAP_PORTSPEED_FULL_10G = 0x000000100, OPEN_PHY_CAP_PORTSPEED_AUTO_NEG = 0x000000400, OPEN_PHY_CAP_PORTSPEED_SFP = 0x000000800, OPEN_PHY_CAP_PORTSPEED_SFP_DETECT = 0x000001000,
  OPEN_PHY_CAP_POE_PSE = 0x000002000, OPEN_PHY_CAP_POE_PD = 0x000004000, OPEN_PHY_CAP_INTERNAL = 0x000008000, OPEN_PHY_CAP_NATIVE_EEE = 0x000010000,
  OPEN_PHY_CAP_AUTO_EEE = 0x000020000, OPEN_PHY_CAP_DUAL_MODE_SUPPORT = 0x000040000, OPEN_PHY_CAP_POE_PSE_PLUS = 0x000080000, OPEN_PHY_CAP_POE_PD_PLUS = 0x000100000,
  OPEN_PHY_CAP_ENERGY_DETECT = 0x000200000, OPEN_PHY_CAP_COMBO_PREFERENCE = 0x000400000, OPEN_PHY_CAP_EXPANDABLE_PORT = 0x000800000, OPEN_PHY_CAP_AUTO_CONFIG = 0x001000000,
  OPEN_PHY_CAP_SHORT_REACH = 0x002000000, OPEN_PHY_CAP_UPOE_PSE = 0x004000000, OPEN_PHY_CAP_UPOE_PD = 0x008000000, OPEN_PHY_CAP_DYNAMIC_PORT = 0x010000000,
  OPEN_PHY_CAP_FIXED_STACK_PORT = 0x020000000, OPEN_PHY_CAP_FEC_SUPPORT = 0x040000000, OPEN_PHY_CAP_PORTSPEED_FULL_20G = 0x080000000, OPEN_PHY_CAP_PORTSPEED_FULL_25G = 0x081000000,
  OPEN_PHY_CAP_PORTSPEED_FULL_40G = 0x082000000, OPEN_PHY_CAP_PORTSPEED_FULL_50G = 0x084000000, OPEN_PHY_CAP_PORTSPEED_FULL_100G = 0x088000000
}
 
enum  OPEN_PORT_AUTO_NEG_t { OPEN_PORT_AUTO_NEG_ENABLE = 0, OPEN_PORT_AUTO_NEG_DISABLE = 1, OPEN_PORT_AUTO_NEG_UNKNOWN = 0xffff }
 
enum  OPEN_PORT_CABLE_MEDIA_TYPE_t { OPEN_PORT_CABLE_MEDIA_TYPE_NONE = 0, OPEN_PORT_CABLE_MEDIA_TYPE_COPPER = 1, OPEN_PORT_CABLE_MEDIA_TYPE_FIBER = 2 }
 OPEN uses these enumerators to indicate the interface active media type. More...
 
enum  OPEN_PORT_DUPLEX_t { OPEN_PORT_DUPLEX_HALF = 0, OPEN_PORT_DUPLEX_FULL = 1, OPEN_PORT_DUPLEX_UNKNOWN = 0xffff }
 
enum  OPEN_PORT_SPEEDS_t {
  OPEN_PORTCTRL_PORTSPEED_AUTO_NEG = 1, OPEN_PORTCTRL_PORTSPEED_HALF_100TX = 2, OPEN_PORTCTRL_PORTSPEED_FULL_100TX = 3, OPEN_PORTCTRL_PORTSPEED_HALF_10T = 4,
  OPEN_PORTCTRL_PORTSPEED_FULL_10T = 5, OPEN_PORTCTRL_PORTSPEED_FULL_100FX = 6, OPEN_PORTCTRL_PORTSPEED_FULL_1000SX = 7, OPEN_PORTCTRL_PORTSPEED_FULL_10GSX = 8,
  OPEN_PORTCTRL_PORTSPEED_FULL_20GSX = 9, OPEN_PORTCTRL_PORTSPEED_FULL_40GSX = 10, OPEN_PORTCTRL_PORTSPEED_FULL_25GSX = 11, OPEN_PORTCTRL_PORTSPEED_FULL_50GSX = 12,
  OPEN_PORTCTRL_PORTSPEED_FULL_100GSX = 13, OPEN_PORTCTRL_PORTSPEED_AAL5_155 = 14, OPEN_PORTCTRL_PORTSPEED_FULL_5FX = 15, OPEN_PORTCTRL_PORTSPEED_FULL_200GSX = 16,
  OPEN_PORTCTRL_PORTSPEED_FULL_400GSX = 17, OPEN_PORTCTRL_PORTSPEED_FULL_2P5FX = 128, OPEN_PORTCTRL_PORTSPEED_LAG = 129, OPEN_PORTCTRL_PORTSPEED_UNKNOWN = 130
}
 
enum  OPEN_SPECIAL_PORT_TYPE_t {
  OPEN_SPECIAL_PORT_TYPE_NORMAL = 1, OPEN_SPECIAL_PORT_TYPE_TRUNK_MEMBER = 2, OPEN_SPECIAL_PORT_TYPE_MIRRORED_PORT = 3, OPEN_SPECIAL_PORT_TYPE_PROBE_PORT = 4,
  OPEN_SPECIAL_PORT_TYPE_L2TUNNEL_PORT = 5, OPEN_SPECIAL_PORT_TYPE_SERVICE_PORT = 6
}
 OPEN uses these enumerators to indicate a port that is currently being used for a special purpose, such as as a trunk member, probe port, etc. More...
 

Functions

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. More...
 
open_error_t openapiIfAdminStateGet (openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_CONTROL_t *adminState)
 Gets the administrative state for the specified interface. More...
 
open_error_t openapiIfAdminStateSet (openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_CONTROL_t adminState)
 Sets the administrative state for the specified interface. More...
 
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. More...
 
open_error_t openapiIfAutoNegSet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t autoneg)
 Sets the auto-negotiation mode of a given interface. More...
 
open_error_t openapiIfCapabilitiesGet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint64_t *portCapability)
 Gets the capabilities of a given interface. More...
 
open_error_t openapiIfDescrGet (openapiClientHandle_t *client_handle, uint32_t ifNum, open_buffdesc *descrip)
 Gets the Description of a given interface. More...
 
open_error_t openapiIfDescrSet (openapiClientHandle_t *client_handle, uint32_t ifNum, open_buffdesc *descrip)
 Sets the Description of a given interface. More...
 
open_error_t openapiIfDescrSizeGet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *size)
 Gets the Description size of a given interface. More...
 
open_error_t openapiIfDisableReasonGet (openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DISABLE_REASON_t *reason)
 Gets the disable reason code for an interface. More...
 
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. More...
 
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. More...
 
open_error_t openapiIfEthernetHeaderSizeGet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *headerSize)
 Gets the ethernet header size of a given interface. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
open_error_t openapiIfInErrorsGet (openapiClientHandle_t *client_handle, uint32_t interface, uint32_t *value)
 Returns the current value of the errors counter. More...
 
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. More...
 
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. More...
 
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 unsupported protocol. More...
 
open_error_t openapiIfLastChangeGet (openapiClientHandle_t *client_handle, uint32_t interface, uint32_t *value)
 Gets the time of last link state change in seconds. More...
 
open_error_t openapiIfLinkStateGet (openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_LINK_STATE_t *linkState)
 Gets the link state for the specified interface. More...
 
open_error_t openapiIfMacAddrGet (openapiClientHandle_t *client_handle, uint32_t ifNum, open_buffdesc *mac_addr)
 Gets the MAC address of a given interface. More...
 
open_error_t openapiIfMacAddrSizeGet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *size)
 Gets the MAC address size of a given interface. More...
 
open_error_t openapiIfMaxFrameSizeGet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *maxFrameSize)
 Gets the Maximum frame size of a given interface. More...
 
open_error_t openapiIfMaxFrameSizeSet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t maxFrameSize)
 Sets the Maximum frame size of a given interface. More...
 
open_error_t openapiIfMtuSizeGet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *mtu_size)
 Gets the MTU size of a given interface. More...
 
open_error_t openapiIfMtuSizeSet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t mtu_size)
 Sets the MTU size of a given interface. More...
 
open_error_t openapiIfMtuSizeSetV2 (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t mtu_size)
 Sets the MTU size of a given interface. More...
 
open_error_t openapiIfNameGet (openapiClientHandle_t *client_handle, uint32_t intf, open_buffdesc *intfName)
 Gets the displayable name for the specified interface. More...
 
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. More...
 
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 next identifier. More...
 
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. More...
 
open_error_t openapiIfOprStateGet (openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_PORT_STATE_t *val)
 Gets the operational status of a given interface. More...
 
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. More...
 
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 of errors. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
open_error_t openapiIfSpeedGet (openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_PORT_SPEEDS_t *speed)
 Gets the speed status of a given interface. More...
 
open_error_t openapiIfSpeedModeGet (openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_PORT_SPEEDS_t *speed)
 Gets the speed mode of a given interface. More...
 
open_error_t openapiIfSpeedSet (openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_PORT_SPEEDS_t speed)
 Sets the speed of a given interface. More...
 
open_error_t openapiIfStatusGet (openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_INTF_STATUS_t *ifStatus)
 Gets the status of the specified interface. More...
 
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. More...
 

Detailed Description

Enumeration Type Documentation

OPEN uses these enumerators to indicate the reason a port is diagnostically disabled.

Definition at line 134 of file openapi_if.h.

OPEN uses these enumerators to indicate the interface status.

Enumerator
OPEN_INTF_STATUS_NONE 

Interface not attached.

OPEN_INTF_STATUS_ATTACHED 

Interface in attached state.

Definition at line 195 of file openapi_if.h.

OPEN uses these enumerators to indicate the interface active media type.

Definition at line 158 of file openapi_if.h.

OPEN uses these enumerators to indicate a port that is currently being used for a special purpose, such as as a trunk member, probe port, etc.

Definition at line 168 of file openapi_if.h.

Function Documentation

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.

Parameters
[in]client_handleClient handle from registration API.
[in]ifNumInterface number.
-Minimum value 1
-Maximum value openapiMaxInterfaceCountGet()
[out]mediaTypeActive media type.
-See OPEN_PORT_CABLE_MEDIA_TYPE_t for possible values.
Return values
OPEN_E_NONESuccess.
OPEN_E_FAILFailed to get value.
OPEN_E_PARAMError in parameter passed.
OPEN_E_ERRORInterface not in attached state.
OPEN_E_UNAVAILNot supported on this interface.
OPEN_E_INTERNALOther internal error occurred.
Note
This operation is valid only for physical interfaces currently in an attached state.
If the mediaType is reported as OPEN_PORT_CABLE_MEDIA_TYPE_FIBER, the openapiBoxsSfpTypeGet() API can provide information on the type of fiber module in use.

OpEN API Version: 1.18

Examples:
interface_example.c.
open_error_t openapiIfAdminStateGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
OPEN_CONTROL_t adminState 
)

Gets the administrative state for the specified interface.

Parameters
[in]client_handleclient handle from registration API
[in]ifNumID of the interface.
[out]adminStateStorage for the returned link state.
Return values
OPEN_E_NONEAdministrative state returned.
OPEN_E_FAILAdministrative state retrieval failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.1

Examples:
interface_example.c.
open_error_t openapiIfAdminStateSet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
OPEN_CONTROL_t  adminState 
)

Sets the administrative state for the specified interface.

Parameters
[in]client_handleclient handle from registration API
[in]ifNumID of the interface.
[in]adminStateAdministrative state to set.
Return values
OPEN_E_NONEAdministrative state set.
OPEN_E_FAILAdministrative state set failed.
OPEN_E_NOT_FOUNDInterface not found.
OPEN_E_UNAVAILInterface not supported.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.1

Examples:
interface_example.c.
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.

Parameters
[in]client_handleclient handle from registration API
[in]ifNumInterface number.
[out]autonegauto-negotiation mode of the interface.
Return values
OPEN_E_NONEauto-negotiation mode of the interface returned.
OPEN_E_FAILFailed to get the auto-negotiation mode of the interface.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.1

Examples:
interface_example.c.
open_error_t openapiIfAutoNegSet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t  autoneg 
)

Sets the auto-negotiation mode of a given interface.

Parameters
[in]client_handleclient handle from registration API
[in]ifNumInterface number.
[in]autonegauto-negotiation mode of the interface.
Return values
OPEN_E_NONEauto-negotiation mode of the interface set successfully.
OPEN_E_FAILFailed to set the auto-negotiation mode of the interface.
OPEN_E_PARAMError in parameter passed.
OPEN_E_UNAVAILRequested mode is not available for this interface.
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.1

Examples:
interface_example.c.
open_error_t openapiIfCapabilitiesGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint64_t *  portCapability 
)

Gets the capabilities of a given interface.

Parameters
[in]client_handleclient handle from registration API
[in]ifNumInterface number.
-Minimum value 1
-Maximum value openapiMaxInterfaceCountGet()
[out]portCapabilitycapabilities of the interface.
Return values
OPEN_E_NONECapabilities of the interface returned.
OPEN_E_FAILFailed to get the capabilities of the interface.
OPEN_E_PARAMError in parameter passed.
OPEN_E_ERRORIf interface is LAG member.

OpEN API Version: 1.11

Examples:
interface_example.c.
open_error_t openapiIfDescrGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
open_buffdesc descrip 
)

Gets the Description of a given interface.

Parameters
[in]client_handleclient handle from registration API
[in]ifNumInterface number.
[out]descripDescription of the interface. use openapiIfDescrSizeGet to get the size of Description
Return values
OPEN_E_NONEDescription the interface returned.
OPEN_E_FAILFailed to get the description of the interface.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.1

Examples:
interface_example.c.
open_error_t openapiIfDescrSet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
open_buffdesc descrip 
)

Sets the Description of a given interface.

Parameters
[in]client_handleclient handle from registration API
[in]ifNumInterface number.
[in]descripDescription of the interface. upto OPEN_INTF_DESCR_SIZE
Return values
OPEN_E_NONEDescription of the interface successfully set
OPEN_E_FAILFailed to set the description of the interface.
OPEN_E_PARAMError in parameter passed.
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.1

Examples:
interface_example.c.
open_error_t openapiIfDescrSizeGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t *  size 
)

Gets the Description size of a given interface.

Parameters
[in]client_handleclient handle from registration API
[in]ifNumInterface number.
[out]sizeDescription size of the interface.
Return values
OPEN_E_NONEDescription size of the interface returned.
OPEN_E_FAILFailed to get the description size of the interface.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.1

open_error_t openapiIfDisableReasonGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
OPEN_DISABLE_REASON_t reason 
)

Gets the disable reason code for an interface.

Parameters
[in]client_handleclient handle from registration API
[in]ifNumInterface number.
-Minimum value 1
-Maximum value openapiMaxInterfaceCountGet()
[out]reasonThe disable reason code for the interface
Return values
OPEN_E_NONEDisable reason code of the interface returned.
OPEN_E_FAILFailed to get the disable reason code of the interface.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.15

Examples:
interface_example.c.
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.

Parameters
[in]client_handleclient handle from registration API
[in]ifNumInterface number.
-Minimum value 1
-Maximum value openapiMaxInterfaceCountGet()
[out]duplex_modeduplex mode of the interface. returns OPEN_PORT_DUPLEX_UNKNOWN when link is down
Return values
OPEN_E_NONEDuplex mode of the interface returned.
OPEN_E_FAILFailed to get the duplex mode of the interface.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.7

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.

Parameters
[in]client_handleclient handle from registration API
[in]ifNumInterface number.
-Minimum value 1
-Maximum value openapiMaxInterfaceCountGet()
[out]duplex_modeduplex mode of the interface. returns OPEN_PORT_DUPLEX_UNKNOWN when duplex is auto
Return values
OPEN_E_NONEduplex mode of the interface returned.
OPEN_E_FAILFailed to get the duplex mode of the interface.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.1

Examples:
interface_example.c.
open_error_t openapiIfEthernetHeaderSizeGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t *  headerSize 
)

Gets the ethernet header size of a given interface.

Parameters
[in]client_handleclient handle from registration API
[in]ifNumInterface number.
[out]headerSizeEthernet header size
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.18

Examples:
interface_example.c.
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.

Parameters
[in]client_handleClient handle from registration API
[in]ifNumInterface number.
-Minimum value 1
-Maximum value openapiMaxInterfaceCountGet()
[out]peerIfNumInternal interface number of the first peer
Return values
OPEN_E_NONESuccess.
OPEN_E_FAILFailed to determine number of lanes.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.15

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.

Parameters
[in]client_handleClient handle from registration API
[in]ifNumInterface number.
-Minimum value 1
-Maximum value openapiMaxInterfaceCountGet()
[out]laneCountNumber of lanes for this port.
Return values
OPEN_E_NONESuccess.
OPEN_E_FAILFailed to determine number of lanes.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.15

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.

Primarily used for translating an expanded port interface into its root port.

Parameters
[in]client_handleClient handle from registration API
[in]ifNumInterface number.
-Minimum value 1
-Maximum value openapiMaxInterfaceCountGet()
[out]rootSlotroot slot number.
[out]rootPortroot port number.
Return values
OPEN_E_NONESuccess.
OPEN_E_FAILFailed to translate interface number.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.15

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.

Parameters
[in]client_handleclient handle from registration API
[in]ifTypeType of interface.
[out]firstIfNumStorage for the returned interface ID
Return values
OPEN_E_NONEThe first interface of the specified type returned.
OPEN_E_FAILNo interface of the specified type was found.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.1

Examples:
acl_example.c, boxs_example.c, cosq_stats_example.c, interface_example.c, intf_stats_example.c, ip_example.c, lag_example.c, snmp_example.c, and vlan_example.c.
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.

Parameters
[in]client_handleclient handle from registration API.
[in]interfaceinternal interface number.
[out]valuereturned value of counter.
Return values
OPEN_E_NONEIf the counter requested exist.
OPEN_E_FAILIf the counter requested does not exist.
OPEN_E_PARAMError in parameter passed.
Note
More specifically even though no errors had been detected to prevent their being deliverable to a higher-layer protocol.

OpEN API Version: 1.7

Examples:
interface_example.c.
open_error_t openapiIfInErrorsGet ( openapiClientHandle_t client_handle,
uint32_t  interface,
uint32_t *  value 
)

Returns the current value of the errors counter.

Parameters
[in]client_handleclient handle from registration API.
[in]interfaceinternal interface number.
[out]valuereturned value of counter.
Return values
OPEN_E_NONEIf the counter requested exist.
OPEN_E_FAILIf the counter requested does not exist.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.7

Examples:
interface_example.c.
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.

Parameters
[in]client_handleclient handle from registration API.
[in]interfaceinternal interface number.
[out]valuereturned value of counter.
Return values
OPEN_E_NONEIf the counter requested exist.
OPEN_E_FAILIf the counter requested does not exist.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.7

Examples:
interface_example.c.
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.

Parameters
[in]client_handleclient handle from registration API.
[in]interfaceinternal interface number.
[out]valuereturned value of counter.
Return values
OPEN_E_NONEIf the counter requested exist.
OPEN_E_FAILIf the counter requested does not exist.
OPEN_E_PARAMError in parameter passed.
Note
More specifically which were not addressed to a multicast or broadcast address at this sub-layer.

OpEN API Version: 1.7

Examples:
interface_example.c.
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 unsupported protocol.

Parameters
[in]client_handleclient handle from registration API.
[in]interfaceinternal interface number.
[out]valuereturned value of counter.
Return values
OPEN_E_NONEIf the counter requested exist.
OPEN_E_FAILIf the counter requested does not exist.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.7

Examples:
interface_example.c.
open_error_t openapiIfLastChangeGet ( openapiClientHandle_t client_handle,
uint32_t  interface,
uint32_t *  value 
)

Gets the time of last link state change in seconds.

Parameters
[in]client_handleclient handle from registration API.
[in]interfaceinternal interface number.
[out]valuereturned value of counter.
Return values
OPEN_E_NONEIf the counter requested exist.
OPEN_E_FAILIf the counter requested does not exist.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.7

Examples:
interface_example.c.
open_error_t openapiIfLinkStateGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
OPEN_LINK_STATE_t linkState 
)

Gets the link state for the specified interface.

Parameters
[in]client_handleclient handle from registration API
[in]ifNumID of the interface.
[out]linkStateStorage for the returned link state.
Return values
OPEN_E_NONELink state returned.
OPEN_E_FAILLink state retrieval failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.1

Examples:
boxs_example.c, intf_stats_example.c, link_status_example.c, and snmp_example.c.
open_error_t openapiIfMacAddrGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
open_buffdesc mac_addr 
)

Gets the MAC address of a given interface.

Parameters
[in]client_handleclient handle from registration API
[in]ifNumInterface number.
[out]mac_addrMAC address of the interface. returns array of MAC address. use openapiIfMacAddrSizeGet to get the size of MAC
Return values
OPEN_E_NONEThe MAC address of the interface returned.
OPEN_E_FAILFailed to get the mac address of the interface.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.1

Examples:
interface_example.c.
open_error_t openapiIfMacAddrSizeGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t *  size 
)

Gets the MAC address size of a given interface.

Parameters
[in]client_handleclient handle from registration API
[in]ifNumInterface number.
[out]sizeMAC address size of the interface.
Return values
OPEN_E_NONEThe MAC address size of the interface returned.
OPEN_E_FAILFailed to get the mac address size of the interface.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.1

open_error_t openapiIfMaxFrameSizeGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t *  maxFrameSize 
)

Gets the Maximum frame size of a given interface.

Parameters
[in]client_handleclient handle from registration API
[in]ifNumInterface number.
[in]maxFrameSizeMaximum frame size of the interface.
Return values
OPEN_E_NONEOn success
OPEN_E_FAILFailed to get the Maximum frame size of the interface.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.18

Examples:
interface_example.c.
open_error_t openapiIfMaxFrameSizeSet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t  maxFrameSize 
)

Sets the Maximum frame size of a given interface.

Parameters
[in]client_handleclient handle from registration API
[in]ifNumInterface number.
[in]maxFrameSizeMaximum frame size of the interface.
Return values
OPEN_E_NONEOn success
OPEN_E_FAILFailed to set the Maximum frame size of the interface.
OPEN_E_ERRORFIP snooping is enabled and resulting MTU is less than the minimum FCoE frame size.
OPEN_E_PARAMError in parameter passed.
Note
Calling this API will change the running configuration of the switch
Calling this function will also set the MTU, which will be set to maxFrameSize - the size of the ethernet headers.

OpEN API Version: 1.18

Examples:
interface_example.c.
open_error_t openapiIfMtuSizeGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t *  mtu_size 
)

Gets the MTU size of a given interface.

Parameters
[in]client_handleclient handle from registration API
[in]ifNumInterface number.
[out]mtu_sizeMTU size of the interface.
Return values
OPEN_E_NONEMTU size of the interface returned.
OPEN_E_FAILFailed to get the MTU size of the interface.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.1

Examples:
interface_example.c.
open_error_t openapiIfMtuSizeSet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t  mtu_size 
)

Sets the MTU size of a given interface.

Parameters
[in]client_handleclient handle from registration API
[in]ifNumInterface number.
[in]mtu_sizeMTU size of the interface.
Return values
OPEN_E_NONEMTU size of the interface set successfully.
OPEN_E_FAILFailed to set the MTU size of the interface.
OPEN_E_PARAMError in parameter passed.
Note
Calling this API will change the running configuration of the switch
This function, although named openapiIfMtuSizeSet, actually is setting the maximum frame size (i.e., ethernet packet size)

Deprecated -by openapiIfMtuSizeSetV2() OpEN API Version: 1.18

OpEN API Version: 1.1

open_error_t openapiIfMtuSizeSetV2 ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t  mtu_size 
)

Sets the MTU size of a given interface.

Parameters
[in]client_handleclient handle from registration API
[in]ifNumInterface number.
[in]mtu_sizeMTU size of the interface.
Return values
OPEN_E_NONEMTU size of the interface set successfully.
OPEN_E_FAILFailed to set the MTU size of the interface.
OPEN_E_ERRORFIP snooping is enabled and resulting MTU is less than the minimum FCoE frame size.
OPEN_E_PARAMError in parameter passed.
Note
Calling this API will change the running configuration of the switch
The MTU describes the maximum layer 3 packet size excluding headers.
The maximum frame size will be set to mtu_size + frame header size as a result of calling this function.

OpEN API Version: 1.18

Examples:
interface_example.c.
open_error_t openapiIfNameGet ( openapiClientHandle_t client_handle,
uint32_t  intf,
open_buffdesc intfName 
)

Gets the displayable name for the specified interface.

Parameters
[in]client_handleclient handle from registration API
[in]intfID of the interface.
[out]intfNameStorage for the interface name. Buffer length value OPENAPI_INTERFACE_NAME_LENGTH
Return values
OPEN_E_NONEInterface name returned.
OPEN_E_FAILInterface name retrieval failed.
OPEN_E_NOT_FOUNDInterface does not exist.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.1

Examples:
interface_example.c, intf_stats_example.c, and link_status_example.c.
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.

Parameters
[in]client_handleclient handle from registration API
[in]ifNumID of the current interface.
[out]nextIfNumStorage for the returned interface ID
[out]delete_pendingFlag Indicating that the interface is pending for deletion.
Return values
OPEN_E_NONEThe next interface of the specified type returned.
OPEN_E_FAILNo next interface of the specified type was found.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.1

Examples:
link_status_example.c.
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 next identifier.

Used to iterate over interfaces of a type in the system.

Parameters
[in]client_handleclient handle from registration API
[in]ifTypeType of interface.To get all interface types pass OPEN_INTF_TYPE_ANY
[in]ifNumID of the current interface.
[out]nextIfNumStorage for the returned interface ID
Return values
OPEN_E_NONEThe next interface of the specified type returned.
OPEN_E_FAILNo next interface of the specified type was found.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.1

Examples:
boxs_example.c, cosq_stats_example.c, intf_stats_example.c, and link_status_example.c.
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.

Parameters
[in]client_handleclient handle from registration API
[in]intfNameThe display string for the interface.
[out]ifNumID of the interface.
Return values
OPEN_E_NONEInterface name returned.
OPEN_E_FAILInterface name retrieval failed.
OPEN_E_NOT_FOUNDInterface does not exist.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.1

Examples:
acl_pkt_cap.c, dot1ad_example.c, hash_example.c, rx_pkt_example.c, and tcam_example.c.
open_error_t openapiIfOprStateGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
OPEN_PORT_STATE_t val 
)

Gets the operational status of a given interface.

Parameters
[in]client_handleclient handle from registration API
[in]ifNumInterface number. - Minimum value 1 - Maximum value openapiMaxInterfaceCountGet
[out]valOperational value of the interface.
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.19

Examples:
interface_example.c.
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.

Parameters
[in]client_handleclient handle from registration API.
[in]interfaceinternal interface number.
[out]valuereturned value of counter.
Return values
OPEN_E_NONEIf the counter requested exist.
OPEN_E_FAILIf the counter requested does not exist.
OPEN_E_PARAMError in parameter passed.
Note
Specifically those which were chosen to be discarded even though no errors had been detected to prevent their being transmitted

OpEN API Version: 1.7

Examples:
interface_example.c.
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 of errors.

Parameters
[in]client_handleclient handle from registration API.
[in]interfaceinternal interface number.
[out]valuereturned value of counter.
Return values
OPEN_E_NONEIf the counter requested exist.
OPEN_E_FAILIf the counter requested does not exist.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.7

Examples:
interface_example.c.
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.

Parameters
[in]client_handleclient handle from registration API.
[in]interfaceinternal interface number.
[out]valuereturned value of counter.
Return values
OPEN_E_NONEIf the counter requested exist.
OPEN_E_FAILIf the counter requested does not exist.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.7

Examples:
interface_example.c.
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.

Parameters
[in]client_handleclient handle from registration API.
[in]interfaceinternal interface number.
[out]valuereturned value of counter.
Return values
OPEN_E_NONEIf the counter requested exist.
OPEN_E_FAILIf the counter requested does not exist.
OPEN_E_PARAMError in parameter passed.
Note
And more specifically which were not addressed to a multicast or broadcast address at this sub-layer, including those that were discarded or not sent

OpEN API Version: 1.7

Examples:
interface_example.c.
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.

Parameters
[in]client_handleClient handle from registration API.
[in]ifNumInterface number.
-Minimum value 1
-Maximum value openapiMaxInterfaceCountGet()
[out]rxPauseAllowedReceive pause allowed by autonegotiation
[out]txPauseAllowedTransmit pause allowed by autonegotiation
Return values
OPEN_E_NONESuccess.
OPEN_E_FAILFailed to get value.
OPEN_E_PARAMError in parameter passed.
OPEN_E_ERRORInterface not in attached state.
OPEN_E_UNAVAILNot supported on this interface.
OPEN_E_INTERNALOther internal error occurred.
Note
This operation is valid only for physical interfaces currently in an attached state.
If OPEN_TRUE is indicated for either rxPauseAllowed and/or txPauseAllowed, then the interface flow control operational state is considered to be active.

OpEN API Version: 1.18

Examples:
interface_example.c.
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.

Parameters
[in]client_handleClient handle from registration API
[in]ifNumInterface number.
-Minimum value 1
-Maximum value openapiMaxInterfaceCountGet()
[out]laneCountNumber of lanes for this port.
Return values
OPEN_E_NONESuccess.
OPEN_E_FAILFailed to determine number of lanes.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.15

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.

When the soft shutdown is set to OPEN_ENABLE, no traffic other than LLDPDU and ISDPDU packets will be sent or received on the interface

Parameters
[in]client_handleclient handle from registration API
[in]ifNumInterface number.
[out]soft_shutsoft-shutdown status of the interface.
Return values
OPEN_E_NONEThe soft-shutdown status of the interface returned.
OPEN_E_FAILFailed to get the soft-shutdown status of the interface.
OPEN_E_PARAMError in parameter passed.
OPEN_E_UNAVAILFeature not supported.
Note
Vlan configurations and ingress filtering configuration will not effect on the interface until soft-shutdown is disabled.

OpEN API Version: 1.1

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.

When the soft shutdown is set to OPEN_ENABLE, no traffic other than LLDPDU and ISDPDU packets will be sent or received on the interface

Parameters
[in]client_handleclient handle from registration API
[in]ifNumInterface number.
[in]soft_shutsoft-shutdown status of the interface.
Return values
OPEN_E_NONEThe soft-shutdown status of the interface set successfully.
OPEN_E_FAILFailed to set the soft-shutdown status of the interface.
OPEN_E_PARAMError in parameter passed.
OPEN_E_UNAVAILFeature not supported.
Note
Vlan configurations and ingress filtering configuration will not effect on the interface until soft-shutdown is disabled.
Calling this API will change the running configuration of the switch OpEN API Version: 1.1
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.

Parameters
[in]client_handleClient handle from registration API.
[in]ifNumInterface number.
-Minimum value 1
-Maximum value openapiMaxInterfaceCountGet()
[out]specialTypeSpecial port type.
-See OPEN_SPECIAL_PORT_TYPE_t for possible values.
Return values
OPEN_E_NONESuccess.
OPEN_E_FAILFailed to get value.
OPEN_E_PARAMError in parameter passed.
OPEN_E_INTERNALOther internal error occurred.
Note
A port is designated as having a "special type" when, for example, it becomes a trunk (LAG) member; is a mirrored, probe, or tunnel port; or is a service port.

OpEN API Version: 1.18

Examples:
interface_example.c.
open_error_t openapiIfSpeedGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
OPEN_PORT_SPEEDS_t *  speed 
)

Gets the speed status of a given interface.

Parameters
[in]client_handleclient handle from registration API
[in]ifNumInterface number.
[out]speedspeed of the interface. returns OPEN_PORTCTRL_PORTSPEED_UNKNOWN when link is down
Return values
OPEN_E_NONEspeed of the interface returned.
OPEN_E_FAILFailed to get the speed of the interface.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.1

Examples:
interface_example.c.
open_error_t openapiIfSpeedModeGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
OPEN_PORT_SPEEDS_t *  speed 
)

Gets the speed mode of a given interface.

Parameters
[in]client_handleclient handle from registration API
[in]ifNumInterface number.
-Minimum value 1
-Maximum value openapiMaxInterfaceCountGet()
[out]speedspeed of the interface.
Return values
OPEN_E_NONESpeed of the interface returned.
OPEN_E_FAILFailed to get the speed of the interface.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.7

open_error_t openapiIfSpeedSet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
OPEN_PORT_SPEEDS_t  speed 
)

Sets the speed of a given interface.

Parameters
[in]client_handleclient handle from registration API
[in]ifNumInterface number.
[in]speedspeed of the interface.
Return values
OPEN_E_NONESpeed of the interface set successfully.
OPEN_E_FAILFailed to set the speed of the interface.
OPEN_E_PARAMError in parameter passed.
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.1

Examples:
interface_example.c.
open_error_t openapiIfStatusGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
OPEN_INTF_STATUS_t ifStatus 
)

Gets the status of the specified interface.

Parameters
[in]client_handleClient handle from registration API.
[in]ifNumID of the interface.
[out]ifStatusInterface status.
-See OPEN_INTF_STATUS_t for possible values.
Return values
OPEN_E_NONEStatus returned.
OPEN_E_FAILStatus retrieval failed.
OPEN_E_PARAMError in parameter passed.
OPEN_E_ERRORInterface not in attached state.
OPEN_E_INTERNALOther internal error occurred.

OpEN API Version: 1.19

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.

Parameters
[in]client_handleclient handle from registration API
[in]ifNumID of the interface.
[out]ifTypeInterface type.
Return values
OPEN_E_NONEInterface type returned.
OPEN_E_FAILInterface type retrieval failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.3