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

Macros

#define OPEN_MANUFACTURER_SIZE   6 + 1
 
#define OPEN_OS_VERSION_SIZE   60
 
#define OPEN_SYSTEM_PARAM_SIZE   256
 
#define OPENAPI_HW_VERSION_STR_SIZE   128
 
#define OPENAPI_OS_REVISION_STR_SIZE   100
 

Enumerations

enum  OPEN_PROTOCOL_MODE_t { OPEN_PROTOCOL_MODE_INVALID = 0, OPEN_PROTOCOL_MODE_NONE = 1, OPEN_PROTOCOL_MODE_BOOTP = 2, OPEN_PROTOCOL_MODE_DHCP = 3 }
 OpEN uses this enumeration to define network connectivity protocol modes. More...
 

Functions

open_error_t openapiArpInfoNextGet (openapiClientHandle_t *client_handle, uint32_t *arpIndex, uint32_t *intf, open_inet_addr_t *ipAddr, open_buffdesc *mac_addr)
 Get the next ARP info entry. More...
 
open_error_t openapiClientResourceTrackingSet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t trackingControl)
 Sets resource tracking flag for an OpEN API client. More...
 
open_error_t openapiLicenseFeatureStatusGet (openapiClientHandle_t *client_handle, open_buffdesc *featureName, OPEN_BOOL_t *enabled)
 Get license status for component. More...
 
open_error_t openapiLineTerminalLengthDefaultSet (openapiClientHandle_t *client_handle, OPEN_ACCESS_LINE_t accessLine)
 Set the terminal length of an access line to default. More...
 
open_error_t openapiLineTerminalLengthGet (openapiClientHandle_t *client_handle, OPEN_ACCESS_LINE_t accessLine, uint32_t *termLength)
 Get the terminal length of an access line. More...
 
open_error_t openapiLineTerminalLengthSet (openapiClientHandle_t *client_handle, OPEN_ACCESS_LINE_t accessLine, uint32_t termLength)
 Set the terminal length of an access line. More...
 
open_error_t openapiMaintenanceLevelGet (openapiClientHandle_t *client_handle, open_buffdesc *maintenanceLevel)
 Get the maintenance level of the system. More...
 
open_error_t openapiManufacturerGet (openapiClientHandle_t *client_handle, uint32_t unit, open_buffdesc *manufacturer)
 Get the manufacturer. More...
 
open_error_t openapiNetworkMgmtVlanGet (openapiClientHandle_t *client_handle, uint32_t *mgmtVlan)
 Get the network management VLAN of the system. More...
 
open_error_t openapiNetworkMgmtVlanSet (openapiClientHandle_t *client_handle, uint32_t mgmtVlan)
 Set the network management VLAN on the system. More...
 
open_error_t openapiNetworkPortGatewayIPv4AddrGet (openapiClientHandle_t *client_handle, open_inet_addr_t *gateway)
 Get the network port gateway IPv4 address. More...
 
open_error_t openapiNetworkPortIPv4AddrGet (openapiClientHandle_t *client_handle, open_inet_addr_t *ipAddr, open_inet_addr_t *netMask)
 Get the network port IPv4 address and subnet mask. More...
 
open_error_t openapiNetworkPortIPv4ParametersDelete (openapiClientHandle_t *client_handle)
 Delete network port IPv4 parameters. More...
 
open_error_t openapiNetworkPortIPv4ParametersSet (openapiClientHandle_t *client_handle, open_inet_addr_t *ipAddr, open_inet_addr_t *netMask, open_inet_addr_t *gateway)
 Set the network parameters. More...
 
open_error_t openapiNetworkPortIPv4ProtocolModeGet (openapiClientHandle_t *client_handle, OPEN_PROTOCOL_MODE_t *protoMode)
 Get the network port IPv4 protocol mode. More...
 
open_error_t openapiNetworkPortIPv4ProtocolModeSet (openapiClientHandle_t *client_handle, OPEN_PROTOCOL_MODE_t protoMode)
 Set the network port IPv4 protocol mode. More...
 
open_error_t openapiNetworkPortIPv6AddressesNextGet (openapiClientHandle_t *client_handle, open_inet_pfx_t *ipv6Addr)
 Get next network port configured IPv6 address and prefix length. More...
 
open_error_t openapiNetworkPortIPv6AdminModeGet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t *adminMode)
 Get IPv6 administrative mode of network port. More...
 
open_error_t openapiNetworkPortIPv6AdminModeSet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t adminMode)
 Set IPv6 administrative mode on network port. More...
 
open_error_t openapiNetworkPortIPv6AutoConfigModeGet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t *autoConfigMode)
 Get IPv6 auto-config mode on network port. More...
 
open_error_t openapiNetworkPortIPv6AutoConfigModeSet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t autoConfigMode)
 Set IPv6 auto-config mode on Network port. More...
 
open_error_t openapiNetworkPortIPv6GatewayGet (openapiClientHandle_t *client_handle, open_inet_addr_t *gateway)
 Get the network port IPv6 gateway address. More...
 
open_error_t openapiNetworkPortIPv6GatewaySet (openapiClientHandle_t *client_handle, open_inet_addr_t *gateway)
 Set the network port IPv6 gateway. More...
 
open_error_t openapiNetworkPortIPv6PrefixDelete (openapiClientHandle_t *client_handle, open_inet_pfx_t *ipv6Addr)
 Delete IPv6 prefix(es) on network port. More...
 
open_error_t openapiNetworkPortIPv6PrefixSet (openapiClientHandle_t *client_handle, open_inet_pfx_t *ipv6Addr)
 Set the network IPv6 prefix and prefix length. More...
 
open_error_t openapiNetworkPortIPv6ProtocolModeGet (openapiClientHandle_t *client_handle, OPEN_PROTOCOL_MODE_t *protoMode)
 Set IPv6 protocol mode on network port. More...
 
open_error_t openapiNetworkPortIPv6ProtocolModeSet (openapiClientHandle_t *client_handle, OPEN_PROTOCOL_MODE_t protoMode)
 Set IPv6 protocol mode on network port. More...
 
open_error_t openapiNetworkPortLinkStateGet (openapiClientHandle_t *client_handle, OPEN_LINK_STATE_t *linkState)
 Get network interface link state. More...
 
open_error_t openapiOperSysGet (openapiClientHandle_t *client_handle, open_buffdesc *operSys)
 Get the operating system. More...
 
open_error_t openapiResetConfigurationSet (openapiClientHandle_t *client_handle)
 Clear the switch configuration to factory defaults. More...
 
open_error_t openapiSaveConfigurationSet (openapiClientHandle_t *client_handle)
 Saves the configuration to non-volatile storage. More...
 
open_error_t openapiSerialTimeoutDefaultSet (openapiClientHandle_t *client_handle)
 Set the serial timeout to default value. More...
 
open_error_t openapiSerialTimeoutGet (openapiClientHandle_t *client_handle, uint32_t *serialTimeout)
 Get the serial timeout. More...
 
open_error_t openapiSerialTimeoutSet (openapiClientHandle_t *client_handle, uint32_t serialTimeout)
 Set the serial timeout. More...
 
open_error_t openapiServicePortGatewayIPv4AddrGet (openapiClientHandle_t *client_handle, open_inet_addr_t *gateway)
 Get the service port gateway IPv4 address. More...
 
open_error_t openapiServicePortIPv4AddrGet (openapiClientHandle_t *client_handle, open_inet_addr_t *ipAddr, open_inet_addr_t *netMask)
 Get the service port IPv4 address and subnet mask. More...
 
open_error_t openapiServicePortIPv4ParametersDelete (openapiClientHandle_t *client_handle)
 Delete IPv4 service port parameters. More...
 
open_error_t openapiServicePortIPv4ParametersSet (openapiClientHandle_t *client_handle, open_inet_addr_t *ipAddr, open_inet_addr_t *netMask, open_inet_addr_t *gateway)
 Set the service port IPv4 parameters. More...
 
open_error_t openapiServicePortIPv4ProtocolModeGet (openapiClientHandle_t *client_handle, OPEN_PROTOCOL_MODE_t *protoMode)
 Get the service port IPv4 protocol mode. More...
 
open_error_t openapiServicePortIPv4ProtocolModeSet (openapiClientHandle_t *client_handle, OPEN_PROTOCOL_MODE_t protoMode)
 Set the service port IPv4 protocol mode. More...
 
open_error_t openapiServicePortIPv6AddressesNextGet (openapiClientHandle_t *client_handle, open_inet_pfx_t *ipv6Addr)
 Get next service port IPv6 address and prefix length. More...
 
open_error_t openapiServicePortIPv6AdminModeGet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t *adminMode)
 Get IPv6 administrative mode of service port. More...
 
open_error_t openapiServicePortIPv6AdminModeSet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t adminMode)
 Set IPv6 administrative mode of service port. More...
 
open_error_t openapiServicePortIPv6AutoConfigModeGet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t *autoConfigMode)
 Get IPv6 auto-config mode of service port. More...
 
open_error_t openapiServicePortIPv6AutoConfigModeSet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t autoConfigMode)
 Set IPv6 auto-config mode on service port. More...
 
open_error_t openapiServicePortIPv6GatewayGet (openapiClientHandle_t *client_handle, open_inet_addr_t *gateway)
 Get the service port IPv6 gateway address. More...
 
open_error_t openapiServicePortIPv6GatewaySet (openapiClientHandle_t *client_handle, open_inet_addr_t *gateway)
 Set the service port IPv6 gateway. More...
 
open_error_t openapiServicePortIPv6PrefixDelete (openapiClientHandle_t *client_handle, open_inet_pfx_t *ipv6Addr)
 Delete IPv6 parameters set on a service port. More...
 
open_error_t openapiServicePortIPv6PrefixSet (openapiClientHandle_t *client_handle, open_inet_pfx_t *ipv6Addr)
 Set the service port IPv6 parameters. More...
 
open_error_t openapiServicePortIPv6ProtocolModeGet (openapiClientHandle_t *client_handle, OPEN_PROTOCOL_MODE_t *protoMode)
 Get IPv6 protocol mode of service port. More...
 
open_error_t openapiServicePortIPv6ProtocolModeSet (openapiClientHandle_t *client_handle, OPEN_PROTOCOL_MODE_t protoMode)
 Set IPv6 protocol mode on service port. More...
 
open_error_t openapiServicePortMaskGet (openapiClientHandle_t *client_handle, open_inet_addr_t *netMask)
 Get the service port subnet mask. More...
 
open_error_t openapiSystemBurnedInMacAddrGet (openapiClientHandle_t *client_handle, open_buffdesc *mac_address)
 Gets System Burned in MAC Address. More...
 
open_error_t openapiSystemHostnameGet (openapiClientHandle_t *client_handle, open_buffdesc *sysHostName)
 Get the system hostname. More...
 
open_error_t openapiSystemHostnameSet (openapiClientHandle_t *client_handle, open_buffdesc *sysHostName)
 Set the system hostname. More...
 
open_error_t openapiSystemHostnameSizeGet (openapiClientHandle_t *client_handle, uint32_t *hostNameSize)
 Get the maximum size of system hostname. More...
 
open_error_t openapiSystemLocalUnitGet (openapiClientHandle_t *client_handle, uint32_t *unit)
 Get the current unit's ID. More...
 
open_error_t openapiSystemMacAddrGet (openapiClientHandle_t *client_handle, open_buffdesc *macAddress)
 Get System MAC Address. More...
 
open_error_t openapiSystemMemoryInfoGet (openapiClientHandle_t *client_handle, uint32_t *memTotal, uint32_t *memAlloc, uint32_t *memFree)
 Get current system memory allocation information. More...
 
open_error_t openapiSystemNameGet (openapiClientHandle_t *client_handle, open_buffdesc *systemName)
 Get the administratively-assigned system name. More...
 
open_error_t openapiSystemNameMaxSizeGet (openapiClientHandle_t *client_handle, uint32_t *systemNameSize)
 Get the maximum size of the system name. More...
 
open_error_t openapiSystemPromptMaxSizeGet (openapiClientHandle_t *client_handle, uint32_t *promptSize)
 Get the maximum size of system prompt. More...
 
open_error_t openapiSystemPromptSet (openapiClientHandle_t *client_handle, open_buffdesc *systemPrompt)
 Set the system prompt. More...
 
open_error_t openapiSystemReload (openapiClientHandle_t *client_handle)
 Resets the switch. More...
 
open_error_t openapiSystemUpTimeGet (openapiClientHandle_t *client_handle, uint32_t *sysUpTimeSec)
 Get the stack up time in seconds. More...
 
open_error_t openapiSystemUpTimeMsecGet (openapiClientHandle_t *client_handle, uint32_t *sysUpTimeMsec)
 Get the stack up time in milliseconds. More...
 
open_error_t openapiTelnetServerAdminModeGet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t *telnetServerMode)
 Get the telnet server admin mode. More...
 
open_error_t openapiTelnetServerAdminModeSet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t telnetServerMode)
 Set the telnet server admin mode. More...
 
open_error_t openapiTimeZoneOffsetGet (openapiClientHandle_t *client_handle, uint32_t *timeZoneOffsetMin)
 Get the time zone minutes parameter. More...
 
open_error_t openapiTransferBytesCompletedSet (openapiClientHandle_t *client_handle, uint32_t bytes)
 Set the transferred bytes. More...
 
open_error_t openapiUidGet (openapiClientHandle_t *client_handle, open_buffdesc *uid)
 Get UID of the System Uid of the system is Datapath ID of the ofdb. More...
 
open_error_t openapiWarmRestartStatusGet (openapiClientHandle_t *client_handle, OPEN_BOOL_t *warmRestartStatus)
 Get warm restart status. More...
 

Detailed Description

Enumeration Type Documentation

OpEN uses this enumeration to define network connectivity protocol modes.

Enumerator
OPEN_PROTOCOL_MODE_INVALID 

Invalid Protocol mode.

OPEN_PROTOCOL_MODE_NONE 

Protocol mode none.

OPEN_PROTOCOL_MODE_BOOTP 

Protocol mode BOOTP.

OPEN_PROTOCOL_MODE_DHCP 

Protocol mode DHCP.

Definition at line 46 of file openapi_system.h.

Function Documentation

open_error_t openapiArpInfoNextGet ( openapiClientHandle_t client_handle,
uint32_t *  arpIndex,
uint32_t *  intf,
open_inet_addr_t ipAddr,
open_buffdesc mac_addr 
)

Get the next ARP info entry.

Parameters
[in]client_handleclient handle from registration API
[in,out]arpIndexStarting index to find next. Initialize arpIndex to 0 to get the first ARP entry
[out]intfARP entry internal interface number
[out]ipAddrARP entry ip address
[out]mac_addrARP entry mac address
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILNo more entries.
OPEN_E_PARAMIf an input parameter is invalid.

OpEN API Version: 1.19

Examples:
system_example.c.
open_error_t openapiClientResourceTrackingSet ( openapiClientHandle_t client_handle,
OPEN_CONTROL_t  trackingControl 
)

Sets resource tracking flag for an OpEN API client.

Parameters
[in]client_handleStorage to contain handle information.
[in]trackingControlResource tracking control mode.
Return values
OPEN_E_NONESuccessfully set resource tracking.
OPEN_E_ERRORUnable to set resource tracking.
OPEN_E_PARAMError in parameter passed.
Note
When tracking is enabled, all the HW resources allocated by a given OpEN API client will be tracked and those resources will be freed when OpEN API client ceases to exist.

OpEN API Version: 1.15

Examples:
system_example.c.
open_error_t openapiLicenseFeatureStatusGet ( openapiClientHandle_t client_handle,
open_buffdesc featureName,
OPEN_BOOL_t enabled 
)

Get license status for component.

Parameters
[in]client_handleClient handle from registration API
[in]featureNameFeature name
[out]enabledFeature enabled status
Return values
OPEN_E_NONESuccessfully fetched feature enabled status.
OPEN_E_ERRORUnable to fetch feature enabled status.
OPEN_E_PARAMError in parameter passed.
OPEN_E_UNAVAILFetching feature status functionality not suppported.

OpEN API Version: 1.18

open_error_t openapiLineTerminalLengthDefaultSet ( openapiClientHandle_t client_handle,
OPEN_ACCESS_LINE_t  accessLine 
)

Set the terminal length of an access line to default.

Parameters
[in]client_handleClient handle from registration API
[in]accessLineAccess Line: Console/Telnet/SSH
Return values
OPEN_E_NONEif terminal length for the given access line is set to default successfully.
OPEN_E_FAILif access line is invalid.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiLineTerminalLengthGet ( openapiClientHandle_t client_handle,
OPEN_ACCESS_LINE_t  accessLine,
uint32_t *  termLength 
)

Get the terminal length of an access line.

Parameters
[in]client_handleClient handle from registration API
[in]accessLineAccess Line: Console/Telnet/SSH
[out]termLengthTerminal length of the access line
Return values
OPEN_E_NONEif terminal length of a given access line is returned successfully.
OPEN_E_FAILif access line is invalid.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiLineTerminalLengthSet ( openapiClientHandle_t client_handle,
OPEN_ACCESS_LINE_t  accessLine,
uint32_t  termLength 
)

Set the terminal length of an access line.

Parameters
[in]client_handleClient handle from registration API
[in]accessLineAccess Line: Console/Telnet/SSH
[in]termLengthTerminal length of access line
-Minimum value OPENAPI_MIN_TERMINAL_LENGTH
-Maximum value OPENAPI_MAX_TERMINAL_LENGTH
Return values
OPEN_E_NONEif terminal length for the given access line is set successfully
OPEN_E_FAILif access line is invalid.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.
Setting the terminal length to 0 will disable pagination on that access line.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiMaintenanceLevelGet ( openapiClientHandle_t client_handle,
open_buffdesc maintenanceLevel 
)

Get the maintenance level of the system.

Parameters
[in]client_handleClient handle from registration API
[out]maintenanceLevelPointer to maintenance level string storage
  • Buffer allocated size must be at least
  • OPEN_SYSTEM_PARAM_SIZE
Return values
OPEN_E_NONEif operation is successful
OPEN_E_FAILif operation has failed
OPEN_E_PARAMif invalid parameter is supplied

OpEN API Version: 1.15

Examples:
system_example.c.
open_error_t openapiManufacturerGet ( openapiClientHandle_t client_handle,
uint32_t  unit,
open_buffdesc manufacturer 
)

Get the manufacturer.

Parameters
[in]client_handleClient handle from registration API
[in]unitUnit number
[out]manufacturerPointer to manufacturer
  • Buffer allocated size must be at least
  • OPEN_MANUFACTURER_SIZE
Return values
OPEN_E_NONEif successfully
OPEN_E_FAILif get operation has failed
OPEN_E_PARAMif invalid parameter is supplied

OpEN API Version: 1.8

open_error_t openapiNetworkMgmtVlanGet ( openapiClientHandle_t client_handle,
uint32_t *  mgmtVlan 
)

Get the network management VLAN of the system.

Parameters
[in]client_handleclient handle from registration API
[out]mgmtVlannetwork management VLAN ID
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.14

Examples:
system_example.c.
open_error_t openapiNetworkMgmtVlanSet ( openapiClientHandle_t client_handle,
uint32_t  mgmtVlan 
)

Set the network management VLAN on the system.

Parameters
[in]client_handleclient handle from registration API
[in]mgmtVlannetwork management VLAN ID
-Minimum value OPENAPI_DOT1Q_MIN_VLAN_ID
-Maximum value openapiDot1VlanMaxGet()
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.
OPEN_E_INTERNALAn internal error occurred.
OPEN_E_EXISTSVLAN already in use (e.g. for a port-based routing interface).
Note
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.14

Examples:
system_example.c.
open_error_t openapiNetworkPortGatewayIPv4AddrGet ( openapiClientHandle_t client_handle,
open_inet_addr_t gateway 
)

Get the network port gateway IPv4 address.

Parameters
[in]client_handleClient handle from registration API
[out]gatewayGateway IPv4 address
Return values
OPEN_E_NONEif the network port gateway IPv4 address is returned successfully.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiNetworkPortIPv4AddrGet ( openapiClientHandle_t client_handle,
open_inet_addr_t ipAddr,
open_inet_addr_t netMask 
)

Get the network port IPv4 address and subnet mask.

Parameters
[in]client_handleClient handle from registration API
[out]ipAddrnetwork port IPv4 address
[out]netMaskNetwork mask
Return values
OPEN_E_NONEif the network port IPv4 address and subnet mask are returned successfully.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiNetworkPortIPv4ParametersDelete ( openapiClientHandle_t client_handle)

Delete network port IPv4 parameters.

Parameters
[in]client_handleClient handle from registration API
Return values
OPEN_E_NONEif the network port IPv4 parameters are deleted successfully.
OPEN_E_FAILif network protocol mode is not set to none.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.
Network protocol mode must be set to "none" before applying this configuration.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiNetworkPortIPv4ParametersSet ( openapiClientHandle_t client_handle,
open_inet_addr_t ipAddr,
open_inet_addr_t netMask,
open_inet_addr_t gateway 
)

Set the network parameters.

Parameters
[in]client_handleClient handle from registration API
[in]ipAddrNetwork port IPv4 address
[in]netMaskNetwork mask
[in]gatewayGateway IP address
Return values
OPEN_E_NONEif the network parameters are set successfully.
OPEN_E_ERRORif IP address conflicts occur.
OPEN_E_EXISTSif the same values of IP address, network mask and gateway are already set.
OPEN_E_FAILif network protocol mode is not set to none or if ip address or network mask are passed as 0.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.
Network protocol mode must be set to "none" before applying this configuration.
Pass the structure variable gateway->addr.ipv4 as 0 if not required to be set.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiNetworkPortIPv4ProtocolModeGet ( openapiClientHandle_t client_handle,
OPEN_PROTOCOL_MODE_t protoMode 
)

Get the network port IPv4 protocol mode.

Parameters
[in]client_handleClient handle from registration API
[out]protoModeNetwork port IPv4 protocol mode: none/dhcp/bootp
Return values
OPEN_E_NONEif the network port IPv4 protocol mode is returned.
OPEN_E_FAILif invalid network port IPv4 protocol mode is returned,
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiNetworkPortIPv4ProtocolModeSet ( openapiClientHandle_t client_handle,
OPEN_PROTOCOL_MODE_t  protoMode 
)

Set the network port IPv4 protocol mode.

Parameters
[in]client_handleClient handle from registration API
[in]protoModeNetwork port IPv4 protocol mode: none/dhcp/bootp
Return values
OPEN_E_NONEif the network port IPv4 protocol mode is set successfully
OPEN_E_FAILif service port is configured with dhcp/bootp and trying to configure bootp on network port. Only one interface can run DHCP or Bootp.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiNetworkPortIPv6AddressesNextGet ( openapiClientHandle_t client_handle,
open_inet_pfx_t ipv6Addr 
)

Get next network port configured IPv6 address and prefix length.

Parameters
[in]client_handleClient handle from registration API
[in,out]ipv6AddrIPv6 address and prefix length
Return values
OPEN_E_NONEif the next configured IPv6 network address and prefix length are returned.
OPEN_E_FAILif no more entries are found.
OPEN_E_UNAVAILif IPv6 feature is unsupported.
OPEN_E_PARAMif invalid parameter is passed.
Note
Set all the structure elements pointed by ipv6Addr to 0 to get the first address.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiNetworkPortIPv6AdminModeGet ( openapiClientHandle_t client_handle,
OPEN_CONTROL_t adminMode 
)

Get IPv6 administrative mode of network port.

Parameters
[in]client_handleClient handle from registration API
[out]adminModeIPv6 admin mode of network port
Return values
OPEN_E_NONEif IPv6 admin mode of network port is returned.
OPEN_E_FAILif invalid mode is returned.
OPEN_E_UNAVAILif IPv6 feature is unsupported.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiNetworkPortIPv6AdminModeSet ( openapiClientHandle_t client_handle,
OPEN_CONTROL_t  adminMode 
)

Set IPv6 administrative mode on network port.

Parameters
[in]client_handleClient handle from registration API
[in]adminModeIPv6 admin mode of network port
Return values
OPEN_E_NONEif IPv6 admin mode of network port is set successfully.
OPEN_E_FAILif unable to set IPv6 admin mode on network port.
OPEN_E_UNAVAILif IPv6 feature is unsupported.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiNetworkPortIPv6AutoConfigModeGet ( openapiClientHandle_t client_handle,
OPEN_CONTROL_t autoConfigMode 
)

Get IPv6 auto-config mode on network port.

Parameters
[in]client_handleClient handle from registration API
[out]autoConfigModeIPv6 auto config mode
Return values
OPEN_E_NONEif IPv6 auto-config mode of network port is returned.
OPEN_E_FAILif invalid mode is returned.
OPEN_E_UNAVAILif IPv6 feature is unsupported.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiNetworkPortIPv6AutoConfigModeSet ( openapiClientHandle_t client_handle,
OPEN_CONTROL_t  autoConfigMode 
)

Set IPv6 auto-config mode on Network port.

Parameters
[in]client_handleClient handle from registration API
[in]autoConfigModeIPv6 auto config mode
Return values
OPEN_E_NONEif IPv6 auto-config mode is set successfully.
OPEN_E_FAILif unable to set auto-config mode.
OPEN_E_UNAVAILif IPv6 feature is unsupported.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiNetworkPortIPv6GatewayGet ( openapiClientHandle_t client_handle,
open_inet_addr_t gateway 
)

Get the network port IPv6 gateway address.

Parameters
[in]client_handleClient handle from registration API
[out]gatewayIPv6 gateway address
Return values
OPEN_E_NONEif IPv6 gateway address is returned.
OPEN_E_FAILif IPv6 gateway address is not configured on network port.
OPEN_E_UNAVAILif IPv6 feature is unsupported.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiNetworkPortIPv6GatewaySet ( openapiClientHandle_t client_handle,
open_inet_addr_t gateway 
)

Set the network port IPv6 gateway.

Parameters
[in]client_handleClient handle from
[in]gatewayIPv6 gateway address.
Return values
OPEN_E_NONEif the network port IPv6 gateway is set successfully.
OPEN_E_EXISTSif IPv6 address conflicts occur with service port/network port gateway
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_UNAVAILif IPv6 feature is unsupported.
OPEN_E_INTERNALif internal error has occurred.
Note
Calling this API will change the running configuration of the switch.
Pass the structure variable gateway->addr.ipv4 as 0 if not required to be set.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiNetworkPortIPv6PrefixDelete ( openapiClientHandle_t client_handle,
open_inet_pfx_t ipv6Addr 
)

Delete IPv6 prefix(es) on network port.

Parameters
[in]client_handleClient handle from registration API
[in]ipv6AddrIPv6 address and prefix length.
Return values
OPEN_E_NONEif the network parameters are deleted successfully.
OPEN_E_FAILif unable remove the parameters or if invalid prefix is passed or if parameters does not exist.
OPEN_E_UNAVAILif IPv6 feature is unsupported.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.
Set all the structure elements pointed by ipv6Addr to 0 to delete all the IPv6 prefixes.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiNetworkPortIPv6PrefixSet ( openapiClientHandle_t client_handle,
open_inet_pfx_t ipv6Addr 
)

Set the network IPv6 prefix and prefix length.

Parameters
[in]client_handleClient handle from registration API
[in]ipv6AddrIPv6 address and prefix length
Return values
OPEN_E_NONEif the network parameters are set successfully.
OPEN_E_EXISTSif IP address conflicts occur with service port/network port prefixes.
OPEN_E_UNAVAILif invalid prefix length is given.
OPEN_E_FULLif no more space to add ipv6 prefixes.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_UNAVAILif IPv6 feature is unsupported.
OPEN_E_INTERNALif internal error has occurred.
Note
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiNetworkPortIPv6ProtocolModeGet ( openapiClientHandle_t client_handle,
OPEN_PROTOCOL_MODE_t protoMode 
)

Set IPv6 protocol mode on network port.

Parameters
[in]client_handleClient handle from registration API
[out]protoModeIPv6 protocol mode
Return values
OPEN_E_NONEif IPv6 protocol mode is returned successfully.
OPEN_E_UNAVAILif IPv6 feature is unsupported.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiNetworkPortIPv6ProtocolModeSet ( openapiClientHandle_t client_handle,
OPEN_PROTOCOL_MODE_t  protoMode 
)

Set IPv6 protocol mode on network port.

Parameters
[in]client_handleClient handle from registration API
[in]protoModeIPv6 protocol mode: dhcp/none
Return values
OPEN_E_NONEif IPv6 protocol mode is set successfully.
OPEN_E_FAILif unable to set IPv6 protocol mode.
OPEN_E_UNAVAILif IPv6 feature is unsupported.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiNetworkPortLinkStateGet ( openapiClientHandle_t client_handle,
OPEN_LINK_STATE_t linkState 
)

Get network interface link state.

Parameters
[in]client_handleClient handle from registration API
[out]linkStateInterface link state
Return values
OPEN_E_NONEif successfully
OPEN_E_PARAMif invalid parameter is supplied
OPEN_E_ERRORotherwise

OpEN API Version: 1.14

Examples:
system_example.c.
open_error_t openapiOperSysGet ( openapiClientHandle_t client_handle,
open_buffdesc operSys 
)

Get the operating system.

Parameters
[in]client_handleClient handle from registration API
[out]operSysPointer to operating system string storage
  • Buffer allocated size must be at least
  • OPEN_OS_VERSION_SIZE
Return values
OPEN_E_NONEif successfully
OPEN_E_FAILif operation has failed
OPEN_E_PARAMif invalid parameter is supplied

OpEN API Version: 1.8

open_error_t openapiResetConfigurationSet ( openapiClientHandle_t client_handle)

Clear the switch configuration to factory defaults.

Parameters
[in]client_handleClient handle from registration API
Return values
OPEN_E_NONEif clear operation is successful
OPEN_E_FAILif clear operation resulted in failure
OPEN_E_PARAMif invalid parameter is supplied
Note
You can reset the configuration to factory default values without
powering off the switch.

OpEN API Version: 1.7

open_error_t openapiSaveConfigurationSet ( openapiClientHandle_t client_handle)

Saves the configuration to non-volatile storage.

Parameters
[in]client_handleClient handle from registration API
Return values
OPEN_E_NONEif save operation is successful
OPEN_E_FAILif save operation resulted in failure

OpEN API Version: 1.3

Examples:
system_example.c.
open_error_t openapiSerialTimeoutDefaultSet ( openapiClientHandle_t client_handle)

Set the serial timeout to default value.

Parameters
[in]client_handleClient handle from registration API
Return values
OPEN_E_NONEif serial timeout default value is set successfully.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiSerialTimeoutGet ( openapiClientHandle_t client_handle,
uint32_t *  serialTimeout 
)

Get the serial timeout.

Parameters
[in]client_handleClient handle from registration API
[out]serialTimeoutSerial timeout
Return values
OPEN_E_NONEif serial timeout is returned successfully.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiSerialTimeoutSet ( openapiClientHandle_t client_handle,
uint32_t  serialTimeout 
)

Set the serial timeout.

Parameters
[in]client_handleClient handle from registration API
[in]serialTimeoutSerial timeout (minutes)
-Maximum value OPENAPI_SERIAL_TIMEOUT_MAX
Return values
OPEN_E_NONEif serial timeout is set successfully.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiServicePortGatewayIPv4AddrGet ( openapiClientHandle_t client_handle,
open_inet_addr_t gateway 
)

Get the service port gateway IPv4 address.

Parameters
[in]client_handleClient handle from registration API
[out]gatewayGateway IPv4 address
Return values
OPEN_E_NONEif the service port gateway IP address is returned successfully.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiServicePortIPv4AddrGet ( openapiClientHandle_t client_handle,
open_inet_addr_t ipAddr,
open_inet_addr_t netMask 
)

Get the service port IPv4 address and subnet mask.

Parameters
[in]client_handleClient handle from registration API
[out]ipAddrService port IPv4 address
[out]netMaskNetwork mask
Return values
OPEN_E_NONEif the service port IPv4 address and subnet mask are returned successfully.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiServicePortIPv4ParametersDelete ( openapiClientHandle_t client_handle)

Delete IPv4 service port parameters.

Parameters
[in]client_handleClient handle from registration API
Return values
OPEN_E_NONEif the service port IPv4 parameters are deleted successfully.
OPEN_E_FAILif service protocol mode is not set to none.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.
Service port protocol mode must be set to none before applying this configuration.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiServicePortIPv4ParametersSet ( openapiClientHandle_t client_handle,
open_inet_addr_t ipAddr,
open_inet_addr_t netMask,
open_inet_addr_t gateway 
)

Set the service port IPv4 parameters.

Parameters
[in]client_handleClient handle from registration API
[in]ipAddrIPv4 address
[in]netMaskNetwork mask
[in]gatewayGateway
Return values
OPEN_E_NONEif the service port IPv4 parameters are set successfully.
OPEN_E_ERRORif IP address conflicts occur.
OPEN_E_EXISTSif the same values of IP address, service port subnet mask and gateway are already set.
OPEN_E_FAILif service protocol mode is not set to none.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.
Service port protocol mode must be set to none before applying this configuration.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiServicePortIPv4ProtocolModeGet ( openapiClientHandle_t client_handle,
OPEN_PROTOCOL_MODE_t protoMode 
)

Get the service port IPv4 protocol mode.

Parameters
[in]client_handleClient handle from registration API
[out]protoModeService protocol mode: none/dhcp/bootp
Return values
OPEN_E_NONEif the service port IPv4 protocol mode is returned successfully
OPEN_E_FAILif invalid service port IPv4 protocol mode is returned.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiServicePortIPv4ProtocolModeSet ( openapiClientHandle_t client_handle,
OPEN_PROTOCOL_MODE_t  protoMode 
)

Set the service port IPv4 protocol mode.

Parameters
[in]client_handleClient handle from registration API
[in]protoModeService port IPv4 protocol mode: none/dhcp/bootp
Return values
OPEN_E_NONEif the service port IPv4 protocol mode is set successfully
OPEN_E_FAILif network port is configured with dhcp/bootp and trying to configure bootp on service port. Only one interface can run DHCP or Bootp.
OPEN_E_UNAVAILif feature is unsupported.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiServicePortIPv6AddressesNextGet ( openapiClientHandle_t client_handle,
open_inet_pfx_t ipv6Addr 
)

Get next service port IPv6 address and prefix length.

Parameters
[in]client_handleClient handle from registration API
[in,out]ipv6AddrIPv6 address and prefix length
Return values
OPEN_E_NONEif the next IPv6 service port address and prefix length are returned.
OPEN_E_FAILif no more entries are found.
OPEN_E_UNAVAILif IPv6 feature is unsupported.
OPEN_E_PARAMif invalid parameter is passed.
Note
Set all the structure elements pointed by ipv6Addr to 0 to get the first address.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiServicePortIPv6AdminModeGet ( openapiClientHandle_t client_handle,
OPEN_CONTROL_t adminMode 
)

Get IPv6 administrative mode of service port.

Parameters
[in]client_handleClient handle from registration API
[out]adminModeIPv6 admin mode of service port
Return values
OPEN_E_NONEif IPv6 admin mode of service port is returned.
OPEN_E_FAILif invalid mode is returned.
OPEN_E_UNAVAILif IPv6 feature is unsupported.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiServicePortIPv6AdminModeSet ( openapiClientHandle_t client_handle,
OPEN_CONTROL_t  adminMode 
)

Set IPv6 administrative mode of service port.

Parameters
[in]client_handleClient handle from registration API
[in]adminModeIPv6 admin mode of service port
Return values
OPEN_E_NONEif IPv6 admin mode of service port is set successfully.
OPEN_E_FAILif unable to set IPv6 admin mode of service port.
OPEN_E_UNAVAILif IPv6 feature is unsupported.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiServicePortIPv6AutoConfigModeGet ( openapiClientHandle_t client_handle,
OPEN_CONTROL_t autoConfigMode 
)

Get IPv6 auto-config mode of service port.

Parameters
[in]client_handleClient handle from registration API
[out]autoConfigModeIPv6 auto config mode
Return values
OPEN_E_NONEif IPv6 auto-config mode is returned.
OPEN_E_FAILif invalid mode is returned.
OPEN_E_UNAVAILif IPv6 feature is unsupported.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiServicePortIPv6AutoConfigModeSet ( openapiClientHandle_t client_handle,
OPEN_CONTROL_t  autoConfigMode 
)

Set IPv6 auto-config mode on service port.

Parameters
[in]client_handleClient handle from registration API
[in]autoConfigModeIPv6 auto config mode
Return values
OPEN_E_NONEif IPv6 auto-config mode is set successfully.
OPEN_E_FAILif unable to set auto-config mode.
OPEN_E_UNAVAILif IPv6 feature is unsupported.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiServicePortIPv6GatewayGet ( openapiClientHandle_t client_handle,
open_inet_addr_t gateway 
)

Get the service port IPv6 gateway address.

Parameters
[in]client_handleClient handle from registration API
[out]gatewayIPv6 gateway address
Return values
OPEN_E_NONEif IPv6 gateway address is returned.
OPEN_E_FAILif unable to get IPv6 gateway address.
OPEN_E_UNAVAILif IPv6 feature is unsupported.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiServicePortIPv6GatewaySet ( openapiClientHandle_t client_handle,
open_inet_addr_t gateway 
)

Set the service port IPv6 gateway.

Parameters
[in]client_handleClient handle from registration API
[in]gatewayIPv6 gateway address
Return values
OPEN_E_NONEif the service port gateway is set successfully.
OPEN_E_EXISTSif IP address conflicts occur with service port/network port gateway.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_UNAVAILif IPv6 feature is unsupported.
OPEN_E_INTERNALif internal error has occurred.
Note
Calling this API will change the running configuration of the switch.
Pass the structure variable gateway->addr.ipv4 as 0 if not required to be set.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiServicePortIPv6PrefixDelete ( openapiClientHandle_t client_handle,
open_inet_pfx_t ipv6Addr 
)

Delete IPv6 parameters set on a service port.

Parameters
[in]client_handleClient handle from registration API
[in]ipv6AddrIPv6 address and prefix length
Return values
OPEN_E_NONEif the service port IPv6 prefix and prefix length are deleted successfully.
OPEN_E_FAILif unable remove the parameters or if invalid prefix is passed or if parameters does not exist.
OPEN_E_UNAVAILif IPv6 feature is unsupported.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.
Set all the structure elements pointed by ipv6Addr to 0 to delete all the IPv6 prefixes.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiServicePortIPv6PrefixSet ( openapiClientHandle_t client_handle,
open_inet_pfx_t ipv6Addr 
)

Set the service port IPv6 parameters.

Parameters
[in]client_handleClient handle from registration API
[in]ipv6AddrIPv6 address and prefix length
Return values
OPEN_E_NONEif the service port prefix and prefix length are set successfully.
OPEN_E_EXISTSif IP address conflicts occur with service port/network port prefixes.
OPEN_E_UNAVAILif invalid prefix length is given.
OPEN_E_FULLif no more space to add ipv6 prefixes.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_UNAVAILif IPv6 feature is unsupported.
OPEN_E_INTERNALif internal error has occurred.
Note
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiServicePortIPv6ProtocolModeGet ( openapiClientHandle_t client_handle,
OPEN_PROTOCOL_MODE_t protoMode 
)

Get IPv6 protocol mode of service port.

Parameters
[in]client_handleClient handle from registration API
[out]protoModeIPv6 protocol mode
Return values
OPEN_E_NONEif IPv6 protocol mode is returned.
OPEN_E_UNAVAILif IPv6 feature is unsupported.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiServicePortIPv6ProtocolModeSet ( openapiClientHandle_t client_handle,
OPEN_PROTOCOL_MODE_t  protoMode 
)

Set IPv6 protocol mode on service port.

Parameters
[in]client_handleClient handle from registration API
[in]protoModeIPv6 protocol mode: dhcp/none
Return values
OPEN_E_NONEif IPv6 protocol mode is set successfully.
OPEN_E_FAILif unable to set IPv6 protocol mode.
OPEN_E_UNAVAILif IPv6 feature is unsupported.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiServicePortMaskGet ( openapiClientHandle_t client_handle,
open_inet_addr_t netMask 
)

Get the service port subnet mask.

Parameters
[in]client_handleClient handle from registration API
[out]netMaskNetwork mask
Return values
OPEN_E_NONEif the service port subnet mask is returned successfully.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.1

open_error_t openapiSystemBurnedInMacAddrGet ( openapiClientHandle_t client_handle,
open_buffdesc mac_address 
)

Gets System Burned in MAC Address.

Parameters
[in]client_handleClient handle from registration API
[out]mac_addresssMAC address buffer
Return values
OPEN_E_NONEif MAC get operation is successful
OPEN_E_FAILif MAC get operation resulted in failure
OPEN_E_PARAMif invalid parameter or size is supplied
Note
MAC Address buffer should be at least OPEN_MAC_ADDR_LEN bytes long

OpEN API Version: 1.3

Examples:
system_example.c.
open_error_t openapiSystemHostnameGet ( openapiClientHandle_t client_handle,
open_buffdesc sysHostName 
)

Get the system hostname.

Parameters
[in]client_handleClient handle from registration API
[out]sysHostNameSystem hostname
Return values
OPEN_E_NONEif system hostname is returned successfully.
OPEN_E_PARAMif invalid parameter is passed.
Note
Maximum size for sysHostName is determined by calling openapiSystemHostnameSizeGet().

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiSystemHostnameSet ( openapiClientHandle_t client_handle,
open_buffdesc sysHostName 
)

Set the system hostname.

Parameters
[in]client_handleClient handle from registration API
[in]sysHostNameSystem hostname
Return values
OPEN_E_NONEif system hostname is set successfully.
OPEN_E_FAILif system hostname contains non printable characters.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.
Maximum size for systemPrompt is determined by calling openapiSystemPromptMaxSizeGet().
To set the system host name to default, pass the host name as empty string

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiSystemHostnameSizeGet ( openapiClientHandle_t client_handle,
uint32_t *  hostNameSize 
)

Get the maximum size of system hostname.

Parameters
[in]client_handleClient handle from registration API
[out]hostNameSizeMaximum size of system hostname
Return values
OPEN_E_NONEif maximum hostname size is returned successfully.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiSystemLocalUnitGet ( openapiClientHandle_t client_handle,
uint32_t *  unit 
)

Get the current unit's ID.

Parameters
[in]client_handleClient handle from registration API
[out]unitLocal unit number
Return values
OPEN_E_NONEif successful
OPEN_E_PARAMif invalid parameter is supplied
Note
Functional for both stacking and non-stacking builds

OpEN API Version: 1.8

Examples:
poe_example.c.
open_error_t openapiSystemMacAddrGet ( openapiClientHandle_t client_handle,
open_buffdesc macAddress 
)

Get System MAC Address.

Parameters
[in]client_handleClient handle from registration API
[out]macAddressMAC address buffer
Return values
OPEN_E_NONEif MAC get operation is successful
OPEN_E_PARAMif invalid parameter or size is supplied
Note
MAC Address buffer should be at least OPEN_MAC_ADDR_LEN bytes long

OpEN API Version: 1.8

Examples:
system_example.c.
open_error_t openapiSystemMemoryInfoGet ( openapiClientHandle_t client_handle,
uint32_t *  memTotal,
uint32_t *  memAlloc,
uint32_t *  memFree 
)

Get current system memory allocation information.

Parameters
[in]client_handleClient handle from registration API.
[out]memTotalTotal amount of memory in the system.
[out]memAllocAmount of memory currently allocated.
[out]memFreeAmount of free memory available.
Return values
OPEN_E_NONEOperation succeeded.
OPEN_E_FAILUnable to get data values.
OPEN_E_PARAMError in parameter passed.
Note
Provides current values of allocated and free memory (system RAM) in kilobytes (KB) along with their sum total.

OpEN API Version: 1.18

Examples:
system_example.c.
open_error_t openapiSystemNameGet ( openapiClientHandle_t client_handle,
open_buffdesc systemName 
)

Get the administratively-assigned system name.

Parameters
[in]client_handleClient handle from registration API
[out]systemNameSystem name
Return values
OPEN_E_NONEif system hostname is returned successfully.
OPEN_E_PARAMif invalid parameter is passed.
Note
Maximum size for systemName is determined by calling openapiSystemNameMaxSizeGet().

OpEN API Version: 1.4

open_error_t openapiSystemNameMaxSizeGet ( openapiClientHandle_t client_handle,
uint32_t *  systemNameSize 
)

Get the maximum size of the system name.

Parameters
[in]client_handleClient handle from registration API
[out]systemNameSizeMaximum size of the system name
Return values
OPEN_E_NONEif maximum prompt size is returned successfully.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.4

open_error_t openapiSystemPromptMaxSizeGet ( openapiClientHandle_t client_handle,
uint32_t *  promptSize 
)

Get the maximum size of system prompt.

Parameters
[in]client_handleClient handle from registration API
[out]promptSizeMaximum size of the system prompt
Return values
OPEN_E_NONEif maximum prompt size is returned successfully.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiSystemPromptSet ( openapiClientHandle_t client_handle,
open_buffdesc systemPrompt 
)

Set the system prompt.

Parameters
[in]client_handleClient handle from registration API
[in]systemPromptSystem prompt
Return values
OPEN_E_NONEif system prompt set successfully.
OPEN_E_FAILif system prompt contains non printable characters.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.
Maximum size for systemPrompt is determined by calling openapiSystemPromptMaxSizeGet().

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiSystemReload ( openapiClientHandle_t client_handle)

Resets the switch.

Parameters
[in]client_handleClient handle from registration API
Return values
OPEN_E_NONEif reset is issued successfully
OPEN_E_FAILif reset operation has failed

OpEN API Version: 1.3

Examples:
system_example.c.
open_error_t openapiSystemUpTimeGet ( openapiClientHandle_t client_handle,
uint32_t *  sysUpTimeSec 
)

Get the stack up time in seconds.

Parameters
[in]client_handleClient handle from registration API
[out]sysUpTimeSecSystem up time (seconds)
Return values
OPEN_E_NONEif system up time is returned successfully.
OPEN_E_PARAMif invalid parameter is passed.
Note
Stack up time is the time since the stack performed a cold restart. Stack up time does not reset on a warm restart.

OpEN API Version: 1.1

open_error_t openapiSystemUpTimeMsecGet ( openapiClientHandle_t client_handle,
uint32_t *  sysUpTimeMsec 
)

Get the stack up time in milliseconds.

Parameters
[in]client_handleClient handle from registration API
[out]sysUpTimeMsecSystem up time (milliseconds)
Return values
OPEN_E_NONEif system up time is returned successfully.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.1

open_error_t openapiTelnetServerAdminModeGet ( openapiClientHandle_t client_handle,
OPEN_CONTROL_t telnetServerMode 
)

Get the telnet server admin mode.

Parameters
[in]client_handleClient handle from registration API
[out]telnetServerModeTelnet server admin mode
Return values
OPEN_E_NONEif telnet server admin mode is returned.
OPEN_E_FAILis unable to get telnet server admin mode or if invalid mode is returned.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiTelnetServerAdminModeSet ( openapiClientHandle_t client_handle,
OPEN_CONTROL_t  telnetServerMode 
)

Set the telnet server admin mode.

Parameters
[in]client_handleClient handle from registration API
[in]telnetServerModeTelnet server admin mode
Return values
OPEN_E_NONEif telnet server admin mode set successfully.
OPEN_E_FAILif unable to set telnet server mode.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.1

Examples:
system_example.c.
open_error_t openapiTimeZoneOffsetGet ( openapiClientHandle_t client_handle,
uint32_t *  timeZoneOffsetMin 
)

Get the time zone minutes parameter.

Parameters
[in]client_handleClient handle from registration API
[out]minutesTime zone offset in minutes
Return values
OPEN_E_NONEif successfully
OPEN_E_FAILif get operation has failed
OPEN_E_PARAMif invalid parameter is supplied

OpEN API Version: 1.8

open_error_t openapiTransferBytesCompletedSet ( openapiClientHandle_t client_handle,
uint32_t  bytes 
)

Set the transferred bytes.

Parameters
[in]client_handleClient handle from registration API
[in]serialTimeoutTransferred Bytes
Return values
OPEN_E_NONEif transferred bytes is set successfully.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.1

open_error_t openapiUidGet ( openapiClientHandle_t client_handle,
open_buffdesc uid 
)

Get UID of the System Uid of the system is Datapath ID of the ofdb.

If OFDB component is not enabled, we will return service port Mac address prefixed by 2 bytes (default value 0)

Parameters
[in]client_handle
[out]uid– UID of the system
Return values
OPEN_E_NONE
OPEN_E_ERROROpEN API Version: 1.10
open_error_t openapiWarmRestartStatusGet ( openapiClientHandle_t client_handle,
OPEN_BOOL_t warmRestartStatus 
)

Get warm restart status.

Parameters
[in]client_handleClient handle from registration API
[out]warmRestartStatusWarm restart status
Return values
OPEN_E_PARAMIf the passed params are invalid
OPEN_E_NONEIf the OPEN call is successful

OpEN API Version: 1.3