Open Ethernet Networking (OpEN) API Guide and Reference Manual
3.6.0.3
|
Data Structures | |
struct | open_buffdesc |
struct | open_in6_addr_s |
Hash Mode names. More... | |
struct | open_inet_addr_s |
struct | open_inet_pfx_s |
struct | open_revision_data_t |
struct | open_USP_t |
struct | openapiClientHandle_s |
struct | openapiEventList_t |
Macros | |
#define | OPEN_CLIENT_INSTANCE_FIRST 1 |
#define | OPEN_INTF_NAME_MAX_LENGTH 60 |
#define | OPEN_IP_ADDR_DISP_LENGTH 46 |
#define | OPEN_IP_ADDR_LENGTH 16 |
#define | OPEN_IS_ADDR_EQUAL(xaddr, yaddr) |
#define | OPEN_MAC_ADDR_LEN 6 |
#define | OPEN_MIN_U64_STR_BUFFER_SIZE 21 |
20 chars + terminating nul | |
#define | OPEN_PACKED_STRUCT typedef struct |
#define | OPEN_REGISTRATION_SERVICE_USERAPPS 100001 /* all user-provided applications */ |
#define | OPENAPI_PROTOCOL_HEX_ARP 0x0806 |
HEX code for the ARP protocol. More... | |
#define | OPENAPI_PROTOCOL_HEX_IP 0x0800 |
OpEN uses these defines to define hex codes of the protocols. More... | |
#define | OPENAPI_PROTOCOL_HEX_IPX 0x8137 |
HEX code for the IPX protocol. More... | |
#define | OPENAPI_PROTOCOL_HEX_MAX 0xFFFF |
Maximim HEX code of the protocol. More... | |
#define | OPENAPI_PROTOCOL_HEX_MIN 0x0600 |
Minumum HEX code of the protocol. More... | |
#define | OPENAPI_VER_BUFF_MAX_SIZE 128 |
#define | OPENAPI_VER_BUFF_MAX_SIZE 128 |
Typedefs | |
typedef struct open_in6_addr_s | open_in6_addr_t |
Hash Mode names. | |
typedef struct open_inet_addr_s | open_inet_addr_t |
typedef struct open_inet_pfx_s | open_inet_pfx_t |
typedef struct openapiClientHandle_s | openapiClientHandle_t |
Enumerations | |
enum | OPEN_ACCESS_LINE_t { OPEN_ACCESS_LINE_UNKNOWN = 0, OPEN_ACCESS_LINE_CONSOLE = 1, OPEN_ACCESS_LINE_TELNET = 2, OPEN_ACCESS_LINE_SSH = 3 } |
enum | OPEN_ACTION_t { OPEN_ACTION_ADD = 0, OPEN_ACTION_DELETE = 1 } |
OPEN uses these enumerators to indicate the interface types. More... | |
enum | OPEN_AF_t { OPEN_AF_NONE = 0, OPEN_AF_INET = 1, OPEN_AF_INET6 = 2 } |
OPEN uses these enumerators to indicate address family, IPV4 or IPV6. More... | |
enum | OPEN_AFX_t { OPEN_AFX_IP4 = 0, OPEN_AFX_IP6 = 1 } |
OPEN uses these enumerators to indicate BGP address family index of routes or policy for IPV4 or IPV6. More... | |
enum | OPEN_BOOL_t { OPEN_FALSE = 0, OPEN_TRUE = 1 } |
OPEN uses these enumerators to indicate true or false for a given config or status parameter. More... | |
enum | OPEN_CONTROL_t { OPEN_DISABLE = 0, OPEN_ENABLE = 1 } |
OPEN uses these enumerators to indicate enable or disable for a given config or status parameter. More... | |
enum | OPEN_DOT1Q_ACCEPT_FRAME_TYPE_t { OPEN_DOT1Q_ADMIT_ALL = 1, OPEN_DOT1Q_ADMIN_ONLY_VLAN_TAGGED = 2, OPEN_DOT1Q_ADMIN_ONLY_VLAN_UNTAGGED = 3 } |
OPEN uses these enumerators to indicate the types of frames that may be received on this port. More... | |
enum | open_error_t { OPEN_E_NONE = 0, OPEN_E_RPC = -20, OPEN_E_INTERNAL = -21, OPEN_E_PARAM = -22, OPEN_E_FULL = -23, OPEN_E_EXISTS = -24, OPEN_E_TIMEOUT = -25, OPEN_E_FAIL = -26, OPEN_E_DISABLED = -27, OPEN_E_UNAVAIL = -28, OPEN_E_NOT_FOUND = -29, OPEN_E_EMPTY = -30, OPEN_E_ERROR = -31 } |
OPEN uses these enumerators to indicate the error codes. More... | |
enum | OPEN_EVENT_e { OPEN_EVENT_INTERFACE = 0, OPEN_EVENT_VLAN = 1, OPEN_EVENT_ROUTE = 2, OPEN_EVENT_ROUTING_INTERFACE = 3, OPEN_EVENT_ISSU_START = 4, OPEN_EVENT_READY_STATE = 5, OPEN_EVENT_CONFIG = 6, OPEN_EVENT_LAST } |
Open API Events for which clients can register. More... | |
enum | OPEN_INTF_TYPE_t { OPEN_INTF_TYPE_PHY = 0, OPEN_INTF_TYPE_CPU = 1, OPEN_INTF_TYPE_LAG = 2, OPEN_INTF_TYPE_VLAN = 3, OPEN_INTF_TYPE_LOOPBACK = 4, OPEN_INTF_TYPE_TUNNEL = 5, OPEN_INTF_TYPE_SERVICE_PORT = 6, OPEN_INTF_TYPE_OTHER = 7, OPEN_INTF_TYPE_ANY = 8 } |
enum | OPEN_IP_ADDRESS_TYPE_t { OPEN_IP_ADDRESS_UNKNOWN = 0, OPEN_IP_ADDRESS_IPV4 = 1, OPEN_IP_ADDRESS_IPV6 = 2, OPEN_IP_ADDRESS_DNS = 16 } |
OpEN uses this enumeration to define IP address types. More... | |
enum | OPEN_LINK_STATE_t { OPEN_LINK_UP = 0, OPEN_LINK_DOWN = 1 } |
OPEN uses these enumerators to indicate the link status. More... | |
enum | OPEN_PASSWORD_ENCRYPT_ALG_t { OPEN_PASSWORD_ENCRYPT_NONE = 0, OPEN_PASSWORD_ENCRYPT_AES = 1, OPEN_PASSWORD_ENCRYPT_MD5 = 2 } |
OpEN uses this enumeration to define encryption types. | |
enum | OPEN_PORT_STATE_t { OPEN_PORT_DISABLE = 0, OPEN_PORT_ENABLE = 1, OPEN_PORT_DIAG_DISABLE = 2 } |
OPEN uses these enumerators to indicate port admin mode enable, disable or diag_disable. More... | |
enum | OPEN_PREF_INDICES_t { OPEN_PREF_RESERVED = 0, OPEN_PREF_LOCAL = 1, OPEN_PREF_STATIC = 2, OPEN_PREF_MPLS = 3, OPEN_PREF_OSPF_INTRA_AREA = 4, OPEN_PREF_OSPF_INTER_AREA = 5, OPEN_PREF_OSPF_EXTERNAL = 6, OPEN_PREF_RIP = 7, OPEN_PREF_IBGP = 8, OPEN_PREF_EBGP = 9, OPEN_PREF_6TO4 = 10, OPEN_PREF_GLOBAL_DEFAULT_GATEWAY = 11, OPEN_PREF_DEFAULT_DHCP = 12, OPEN_PREF_LOCAL_BGP = 13, OPEN_PREF_LAST } |
Route Preference Types. | |
enum | OPEN_RATE_UNIT_t { OPEN_RATE_UNIT_NONE = 0, OPEN_RATE_UNIT_PERCENT = 1, OPEN_RATE_UNIT_PPS = 2, OPEN_RATE_UNIT_KBPS = 3 } |
OpEN uses this enumeration to define rate units. More... | |
enum | OPEN_REDIST_RT_INDICES_t { OPEN_REDIST_RT_FIRST = 0, OPEN_REDIST_RT_LOCAL = 1, OPEN_REDIST_RT_STATIC = 2, OPEN_REDIST_RT_RIP = 3, OPEN_REDIST_RT_OSPF = 4, OPEN_REDIST_RT_BGP = 5, OPEN_REDIST_RT_OSPFV3 = 6, OPEN_REDIST_RT_LAST } |
Redistribution route types. | |
enum | OPEN_REGISTER_FLAGS_t { OPEN_REGISTER_FLAGS_NONE = 0x00000000, OPEN_REGISTER_FLAGS_THREADED = 0x00000001 } |
Open API enhanced registration flags. More... | |
enum | OPEN_VLAN_PARTICIPATION_MODE_t { OPEN_VLAN_PARTICIPATION_MODE_INCLUDE = 0, OPEN_VLAN_PARTICIPATION_MODE_AUTO = 1, OPEN_VLAN_PARTICIPATION_MODE_EXCLUDE = 2 } |
OPEN uses these enumerators to indicate the VLAN participation of a given interface. More... | |
Functions | |
open_error_t | openapiApiVersionGet (openapiClientHandle_t *client_handle, open_revision_data_t *version) |
Returns the revision of the OPEN API. More... | |
int | openapiClientNotifySocketFDGet (openapiClientHandle_t *client_handle) |
Accessor function to retrieve the socket FD for event notifications from OpEN. More... | |
open_error_t | openapiClientRegister (char *client_name, openapiClientHandle_t *client_handle) |
Register as a client with the OpEN API and wait until OpEN API services are available. More... | |
open_error_t | openapiClientRegisterEnhanced (char *client_name, OPEN_REGISTER_FLAGS_t reg_flags, openapiClientHandle_t *client_handle) |
Register as a client with the OpEN API using enhanced options and wait until OpEN API services are available. More... | |
open_error_t | openapiClientTearDown (openapiClientHandle_t *client_handle) |
Teardown and cleanup the connection resources. More... | |
open_error_t | openapiConnectivityCheck (openapiClientHandle_t *client_handle) |
Return code indicates whether the OpEN remote procedure call infrastructure is ready. More... | |
open_error_t | openapiCpuIntfGet (openapiClientHandle_t *client_handle, uint32_t *intf) |
Returns the CPU control plane interface number. More... | |
open_error_t | openapiCurrentSDMGet (openapiClientHandle_t *client_handle, uint32_t *sdm_template) |
Get the current active SDM template in the system. More... | |
int | openapiEventIsSet (openapiEventList_t *event_mask, OPEN_EVENT_e event_handle) |
Check if a particular event is set in a bit mask of events. More... | |
void | openapiEventListClear (openapiEventList_t *event_mask) |
open_error_t | openapiEventRegister (openapiClientHandle_t *client_handle, openapiEventList_t *event_mask) |
Register the client to receive event notifications for one or more event types. More... | |
void | openapiEventSet (openapiEventList_t *event_mask, OPEN_EVENT_e event_handle) |
open_error_t | openapiEventWait (openapiClientHandle_t *client_handle, int32_t timeout_secs) |
Wait for Open API events for this client. More... | |
open_error_t | openapiHardwareVersionGet (openapiClientHandle_t *client_handle, open_buffdesc *version) |
Returns hardware version of the switch. More... | |
open_error_t | openapiImageFileNameMaxLengthGet (openapiClientHandle_t *client_handle, uint32_t *fileNameLen) |
Get the maximum length of an image file name (excluding its path) in the file system. More... | |
open_error_t | openapiInetAddrCompare (openapiClientHandle_t *client_handle, open_buffdesc *ip1Str, open_buffdesc *ip2Str, OPEN_BOOL_t *equal) |
Check if the two IP address strings refer to the same address. More... | |
open_error_t | openapiInetAddrFromIPAddrHostNameStr (openapiClientHandle_t *client_handle, open_buffdesc *ipOrHostStr, open_inet_addr_t *inetAddr) |
Converts network address string containing either an IPv4/IPv6 address or a host name into an inetAddr in network byte order. More... | |
open_error_t | openapiInetAddrGet (openapiClientHandle_t *client_handle, open_buffdesc *ipStr, open_inet_addr_t *ipAddr) |
Get the IP address in network byte order from string format. More... | |
open_error_t | openapiInternalClientRegister (char *client_name, openapiClientHandle_t *client_handle) |
Register as an internal client with the OpEN API and wait until OpEN API services are available. More... | |
open_error_t | openapiInternalClientTearDown (openapiClientHandle_t *client_handle) |
Deregister an internal OpEN client. More... | |
open_error_t | openapiIntfDisplayNameGet (openapiClientHandle_t *client_handle, uint32_t unit, uint32_t slot, uint32_t port, open_buffdesc *bufdName) |
Get the display name of given interface. More... | |
open_error_t | openapiIntfNameGet (openapiClientHandle_t *client_handle, uint32_t intfNum, open_buffdesc *bufdName) |
Get interface name for a given internal interface number. More... | |
open_error_t | openapiIntfNameMaxLengthGet (openapiClientHandle_t *client_handle, uint32_t *maxLen) |
Get maximum length of interface name. More... | |
open_error_t | openapiIpAddressMaxStringLength (openapiClientHandle_t *client_handle, uint32_t *maxLen) |
Get maximum string length of IP address. More... | |
open_error_t | openapiIsInetAddrZero (openapiClientHandle_t *client_handle, open_inet_addr_t ipAddr, OPEN_BOOL_t *isZero) |
Check if the given IP address is zero or not. More... | |
open_error_t | openapiMaxInterfaceCountGet (openapiClientHandle_t *client_handle, uint32_t *max_interface_count) |
Get the maximum number of interfaces on this switch. More... | |
open_error_t | openapiNetworkOSVersionGet (openapiClientHandle_t *client_handle, open_buffdesc *version) |
Returns the revision of the network operating system running on the switch. More... | |
open_error_t | openapiOpenIPtoStringGet (openapiClientHandle_t *client_handle, open_inet_addr_t openAddr, open_buffdesc *bufdName) |
Get human readable string format of given IP address. More... | |
open_error_t | openapiOspfEqualCostRoutesMax (openapiClientHandle_t *client_handle, uint32_t *maxPaths) |
Get the number of equal cost routes supported by this platform. More... | |
open_error_t | openapiPendingEventsGet (openapiClientHandle_t *client_handle, openapiEventList_t *changed_mask, openapiEventList_t *purged_mask) |
Check what events are pending for this client. More... | |
open_error_t | openapiPingCallback (openapiClientHandle_t *client_handle, uint16_t seqNo, uint32_t rtt, uint32_t type, open_buffdesc *srcIp) |
Send the ping response to the client(CLI/Telnet/SSH) session. More... | |
open_error_t | openapiServiceClientRegister (char *client_name, int32_t client_inst, int32_t server_id, openapiClientHandle_t *client_handle) |
Register as a client of a specified OpEN API service and wait until the service is available. More... | |
open_error_t | openapiSystemFileNameMaxLengthGet (openapiClientHandle_t *client_handle, uint32_t *fileNameLen) |
Get the maximum length of a file name (including its path) in the file system. More... | |
open_error_t | openapiSystemReadyStateGet (openapiClientHandle_t *client_handle, uint32_t *system_is_ready) |
Determine whether the system is currently operational or not operational. More... | |
open_error_t | openapiSystemReadyStateTransitionNextGet (openapiClientHandle_t *client_handle, uint32_t *system_is_ready) |
Get the next configurator state transition event. More... | |
open_error_t | openapiTraceRouteCallbackFn (openapiClientHandle_t *client_handle, uint32_t num_probes, uint32_t ttl, uint32_t ipDa, uint16_t hopCount, uint16_t probeCount, uint32_t rtt, uint8_t errSym) |
Send the traceroute response to the client(CLI/Telnet/SSH) session. More... | |
#define OPEN_IS_ADDR_EQUAL | ( | xaddr, | |
yaddr | |||
) |
Definition at line 321 of file openapi_common.h.
#define OPENAPI_PROTOCOL_HEX_ARP 0x0806 |
HEX code for the ARP protocol.
Definition at line 369 of file openapi_common.h.
#define OPENAPI_PROTOCOL_HEX_IP 0x0800 |
OpEN uses these defines to define hex codes of the protocols.
HEX code for the IP protocol.
Definition at line 368 of file openapi_common.h.
#define OPENAPI_PROTOCOL_HEX_IPX 0x8137 |
HEX code for the IPX protocol.
Definition at line 370 of file openapi_common.h.
#define OPENAPI_PROTOCOL_HEX_MAX 0xFFFF |
Maximim HEX code of the protocol.
Definition at line 372 of file openapi_common.h.
#define OPENAPI_PROTOCOL_HEX_MIN 0x0600 |
Minumum HEX code of the protocol.
Definition at line 371 of file openapi_common.h.
enum OPEN_ACCESS_LINE_t |
Enumerator | |
---|---|
OPEN_ACCESS_LINE_UNKNOWN |
Unknown Connection. |
OPEN_ACCESS_LINE_CONSOLE |
Console Access. |
OPEN_ACCESS_LINE_TELNET |
Telnet Access. |
OPEN_ACCESS_LINE_SSH |
SSH Access. |
Definition at line 313 of file openapi_common.h.
enum OPEN_ACTION_t |
OPEN uses these enumerators to indicate the interface types.
Definition at line 192 of file openapi_common.h.
enum OPEN_AF_t |
OPEN uses these enumerators to indicate address family, IPV4 or IPV6.
Enumerator | |
---|---|
OPEN_AF_NONE |
Neither IPV4 nor IPV6. |
OPEN_AF_INET |
IPV4 address family. |
OPEN_AF_INET6 |
IPV6 address family. |
Definition at line 235 of file openapi_common.h.
enum OPEN_AFX_t |
OPEN uses these enumerators to indicate BGP address family index of routes or policy for IPV4 or IPV6.
Enumerator | |
---|---|
OPEN_AFX_IP4 |
IPV4 address family. |
OPEN_AFX_IP6 |
IPV6 address family. |
Definition at line 244 of file openapi_common.h.
enum OPEN_BOOL_t |
OPEN uses these enumerators to indicate true or false for a given config or status parameter.
Enumerator | |
---|---|
OPEN_FALSE |
false |
OPEN_TRUE |
true |
Definition at line 177 of file openapi_common.h.
enum OPEN_CONTROL_t |
OPEN uses these enumerators to indicate enable or disable for a given config or status parameter.
Enumerator | |
---|---|
OPEN_DISABLE |
disable |
OPEN_ENABLE |
enable |
Definition at line 161 of file openapi_common.h.
OPEN uses these enumerators to indicate the types of frames that may be received on this port.
Enumerator | |
---|---|
OPEN_DOT1Q_ADMIT_ALL |
Untagged or priority tagged frames. |
OPEN_DOT1Q_ADMIN_ONLY_VLAN_TAGGED |
VLAN tagged frames. |
OPEN_DOT1Q_ADMIN_ONLY_VLAN_UNTAGGED |
VLAN untagged frames. |
Definition at line 223 of file openapi_common.h.
enum open_error_t |
OPEN uses these enumerators to indicate the error codes.
Definition at line 64 of file openapi_common.h.
enum OPEN_EVENT_e |
Open API Events for which clients can register.
Definition at line 82 of file openapi_common.h.
enum OPEN_INTF_TYPE_t |
Enumerator | |
---|---|
OPEN_INTF_TYPE_PHY |
Physical interface. |
OPEN_INTF_TYPE_CPU |
CPU interface. |
OPEN_INTF_TYPE_LAG |
LAG interface. |
OPEN_INTF_TYPE_VLAN |
VLAN interface. |
OPEN_INTF_TYPE_LOOPBACK |
Loopback interface. |
OPEN_INTF_TYPE_TUNNEL |
Tunnel interface. |
OPEN_INTF_TYPE_SERVICE_PORT |
Service port interface. |
OPEN_INTF_TYPE_OTHER |
Any other interface type. Not one of the interfaces defined above |
OPEN_INTF_TYPE_ANY |
Useful on openapiIfNextGet() to get all interfaces. |
Definition at line 199 of file openapi_common.h.
OpEN uses this enumeration to define IP address types.
Enumerator | |
---|---|
OPEN_IP_ADDRESS_UNKNOWN |
Address type unknown. |
OPEN_IP_ADDRESS_IPV4 |
Address type IPv4. |
OPEN_IP_ADDRESS_IPV6 |
Address type IPv6. |
OPEN_IP_ADDRESS_DNS |
Address type DNS. |
Definition at line 349 of file openapi_common.h.
enum OPEN_LINK_STATE_t |
OPEN uses these enumerators to indicate the link status.
Enumerator | |
---|---|
OPEN_LINK_UP |
Link Up. |
OPEN_LINK_DOWN |
Link Down. |
Definition at line 184 of file openapi_common.h.
enum OPEN_PORT_STATE_t |
OPEN uses these enumerators to indicate port admin mode enable, disable or diag_disable.
Enumerator | |
---|---|
OPEN_PORT_DISABLE |
Port is disabled. |
OPEN_PORT_ENABLE |
Port is enabled. |
OPEN_PORT_DIAG_DISABLE |
Port is disabled by protocol. |
Definition at line 168 of file openapi_common.h.
enum OPEN_RATE_UNIT_t |
OpEN uses this enumeration to define rate units.
Enumerator | |
---|---|
OPEN_RATE_UNIT_NONE |
Rate unit none. |
OPEN_RATE_UNIT_PERCENT |
Rate in percentage of link speed. |
OPEN_RATE_UNIT_PPS |
Rate in packets/sec. |
OPEN_RATE_UNIT_KBPS |
Rate in kilobytes/sec. |
Definition at line 358 of file openapi_common.h.
Open API enhanced registration flags.
Enumerator | |
---|---|
OPEN_REGISTER_FLAGS_NONE |
No special flags needed. |
OPEN_REGISTER_FLAGS_THREADED |
Multi-threaded application. |
Definition at line 120 of file openapi_common.h.
OPEN uses these enumerators to indicate the VLAN participation of a given interface.
Enumerator | |
---|---|
OPEN_VLAN_PARTICIPATION_MODE_INCLUDE |
Included in the VLAN. |
OPEN_VLAN_PARTICIPATION_MODE_AUTO |
AUTO detect mode . |
OPEN_VLAN_PARTICIPATION_MODE_EXCLUDE |
Excluded from the VLAN. |
Definition at line 214 of file openapi_common.h.
open_error_t openapiApiVersionGet | ( | openapiClientHandle_t * | client_handle, |
open_revision_data_t * | version | ||
) |
Returns the revision of the OPEN API.
[in] | client_handle | Client handle from registration API. |
[out] | version | Pointer to structure that is used to store revision data. |
OPEN_E_NONE | Revision data successfully retrieved. |
OPEN_E_FAIL | Revision data could not be retrieved. |
OPEN_E_PARAM | Error in parameter passed. |
OpEN API Version: 1.1
int openapiClientNotifySocketFDGet | ( | openapiClientHandle_t * | client_handle | ) |
Accessor function to retrieve the socket FD for event notifications from OpEN.
[in] | client_handle | Client handle from registration API. |
OpEN API Version: 1.1
open_error_t openapiClientRegister | ( | char * | client_name, |
openapiClientHandle_t * | client_handle | ||
) |
Register as a client with the OpEN API and wait until OpEN API services are available.
[in] | client_name | String containing the client name. |
[out] | client_handle | Storage to contain handle information. |
OPEN_E_NONE | OpEN is ready to accept RPC calls. |
OPEN_E_INTERNAL | OpEN is not available in this product. |
OPEN_E_PARAM | Error in parameter passed. |
The same process may register multiple times.
The client name is a zero-terminated string of any length and does not have to be unique.
OpEN API Version: 1.1
open_error_t openapiClientRegisterEnhanced | ( | char * | client_name, |
OPEN_REGISTER_FLAGS_t | reg_flags, | ||
openapiClientHandle_t * | client_handle | ||
) |
Register as a client with the OpEN API using enhanced options and wait until OpEN API services are available.
[in] | client_name | String containing the client name. |
[in] | reg_flags | Client registration flags (bit mask). The following flags are supported (all other values are silently ignored) -
|
[out] | client_handle | Storage to contain handle information. |
OPEN_E_NONE | OpEN is ready to accept RPC calls. |
OPEN_E_INTERNAL | OpEN is not available in this product. |
OPEN_E_PARAM | Error in parameter passed. |
The same process may register multiple times.
The client name is a zero-terminated string of any length and does not have to be unique.
OpEN API Version: 1.11
open_error_t openapiClientTearDown | ( | openapiClientHandle_t * | client_handle | ) |
Teardown and cleanup the connection resources.
[in] | client_handle | Client handle from registration API. |
OPEN_E_NONE | Connection closed. |
OPEN_E_FAIL | Failed to teardown and cleanup. |
OPEN_E_PARAM | Error in parameter passed. |
OpEN API Version: 1.3
open_error_t openapiConnectivityCheck | ( | openapiClientHandle_t * | client_handle | ) |
Return code indicates whether the OpEN remote procedure call infrastructure is ready.
[in] | client_handle | Client handle from registration API. |
OPEN_E_NONE | OpEN is ready to accept RPC calls. |
OPEN_E_RPC | OpEN is not ready to accept RPC calls. |
OpEN API Version: 1.1
open_error_t openapiCpuIntfGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t * | intf | ||
) |
Returns the CPU control plane interface number.
[in] | client_handle | Client handle from registration API. |
[out] | intf | Internal interface number. |
OPEN_E_NONE | Revision data successfully retrieved. |
OPEN_E_FAIL | Revision data could not be retrieved. |
OPEN_E_PARAM | Error in parameter passed. |
OpEN API Version: 1.1
open_error_t openapiCurrentSDMGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t * | sdm_template | ||
) |
Get the current active SDM template in the system.
[in] | client_handle | Client handle from registration API. |
[in] | sdm_template | Current active SDM template. |
OPEN_E_NONE | Successfully passed output to the client. |
OPEN_E_FAIL | Failed to pass output to the client. |
OpEN API Version: 1.1
int openapiEventIsSet | ( | openapiEventList_t * | event_mask, |
OPEN_EVENT_e | event_handle | ||
) |
Check if a particular event is set in a bit mask of events.
[in] | event_mask | Bit mask of events in which an event has to be checked to be set. |
[in] | event_handle | Storage to contain event information. |
OpEN API Version: 1.1
open_error_t openapiEventRegister | ( | openapiClientHandle_t * | client_handle, |
openapiEventList_t * | event_mask | ||
) |
Register the client to receive event notifications for one or more event types.
[in] | client_handle | Client handle from registration API. |
[in] | event_mask | Bit mask of events for which to register. |
OPEN_E_NONE | Registered for all events. |
OPEN_E_FAIL | Failed to register for all events. |
OpEN API Version: 1.1
open_error_t openapiEventWait | ( | openapiClientHandle_t * | client_handle, |
int32_t | timeout_secs | ||
) |
Wait for Open API events for this client.
[in] | client_handle | Client handle from registration API. |
[in] | timeout_secs | Number of seconds to wait. 0 - Do not wait. Return immediately. < 0 - Wait forever. > 0 - Wait specified number of seconds. |
OPEN_E_NONE | Event is pending for this client. |
OPEN_E_TIMEOUT | Timed out while waiting for event. |
OpEN API Version: 1.1
open_error_t openapiHardwareVersionGet | ( | openapiClientHandle_t * | client_handle, |
open_buffdesc * | version | ||
) |
Returns hardware version of the switch.
[in] | client_handle | Client handle from registration API. |
[out] | version | Pointer to structure that is used to store revision data.
|
OPEN_E_NONE | Revision data successfully retrieved. |
OPEN_E_FAIL | Revision data could not be retrieved. |
OPEN_E_PARAM | Error in parameter passed. |
OPEN_E_UNAVAIL | Parameter/feature is not supported. |
OPEN_E_INTERNAL | Internal error. |
OpEN API Version: 1.12
open_error_t openapiImageFileNameMaxLengthGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t * | fileNameLen | ||
) |
Get the maximum length of an image file name (excluding its path) in the file system.
[in] | client_handle | Client handle from registration API. |
[out] | fileNameLen | Maximum length of a file name. |
OPEN_E_NONE | Operation succeeded. |
OPEN_E_PARAM | Error in parameter passed. |
OpEN API Version: 1.20
open_error_t openapiInetAddrCompare | ( | openapiClientHandle_t * | client_handle, |
open_buffdesc * | ip1Str, | ||
open_buffdesc * | ip2Str, | ||
OPEN_BOOL_t * | equal | ||
) |
Check if the two IP address strings refer to the same address.
[in] | client_handle | Client handle from registration API |
[in] | ip1Str | IP address string one |
[in] | ip2Str | IP address string two |
[out] | equal | OPEN_TRUE if equal, else OPEN_FALSE |
OPEN_E_NONE | Success |
OPEN_E_FAIL | Failure occurred when parsing one of the supplied IP address strings |
OPEN_E_PARAM | An invalid parameter was passed. |
OpEN API Version: 1.15
open_error_t openapiInetAddrFromIPAddrHostNameStr | ( | openapiClientHandle_t * | client_handle, |
open_buffdesc * | ipOrHostStr, | ||
open_inet_addr_t * | inetAddr | ||
) |
Converts network address string containing either an IPv4/IPv6 address or a host name into an inetAddr in network byte order.
[in] | client_handle | Client handle from registration API. |
[in] | ipOrHostStr | Buffer containing string representation of address to convert. |
[out] | inetAddr | IPv4 or IPv6 address in network byte order corresponding to address. |
OPEN_E_NONE | if validation is successful. |
OPEN_E_PARAM | if parameters is not defined correctly. |
OPEN_E_UNAVAIL | Not supported for this platform. |
OpEN API Version: 1.10
open_error_t openapiInetAddrGet | ( | openapiClientHandle_t * | client_handle, |
open_buffdesc * | ipStr, | ||
open_inet_addr_t * | ipAddr | ||
) |
Get the IP address in network byte order from string format.
[in] | client_handle | Client handle from registration API. |
[in] | ipStr | IP address string. |
[out] | ipAddr | IP address in inet address format. |
OPEN_E_NONE | Valid IP address is passed and is converted to inet format. |
OPEN_E_FAIL | Invalid ip address string is passed. |
OPEN_E_PARAM | Invalid parameter is passed. |
OpEN API Version: 1.1
open_error_t openapiInternalClientRegister | ( | char * | client_name, |
openapiClientHandle_t * | client_handle | ||
) |
Register as an internal client with the OpEN API and wait until OpEN API services are available.
[in] | client_name | String containing the client name. |
[out] | client_handle | Storage to contain handle information. |
OPEN_E_NONE | OpEN is ready to accept RPC calls. |
OPEN_E_INTERNAL | OpEN is not available in this product. |
OPEN_E_PARAM | Error in parameter passed. |
The same process may register multiple times.
The client name is a zero-terminated string of any length and does not have to be unique.
Deprecated OpEN API Version: 1.6 OpEN API Version: 1.9
open_error_t openapiInternalClientTearDown | ( | openapiClientHandle_t * | client_handle | ) |
Deregister an internal OpEN client.
[in] | client_handle | Client handle from registration API. |
OPEN_E_NONE | OpEN is ready to accept RPC calls. |
OPEN_E_INTERNAL | OpEN is not available in this product. |
OPEN_E_PARAM | Error in parameter passed. |
Deprecated OpEN API Version: 1.6 OpEN API Version: 1.9
open_error_t openapiIntfDisplayNameGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t | unit, | ||
uint32_t | slot, | ||
uint32_t | port, | ||
open_buffdesc * | bufdName | ||
) |
Get the display name of given interface.
[in] | client_handle | Client handle from registration API. |
[in] | unit | Unit number. |
[in] | slot | Slot number. |
[in] | port | Port number. |
[out] | bufdName | String representation of interface. |
OPEN_E_NONE | Get successful. |
OPEN_E_PARAM | Error in parameter passed. |
OpEN API Version: 1.7
open_error_t openapiIntfNameGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t | intfNum, | ||
open_buffdesc * | bufdName | ||
) |
Get interface name for a given internal interface number.
[in] | client_handle | Client handle from registration API. |
[in] | intfNum | Internal interface name. |
[out] | bufdName | Name of the interface. |
OPEN_E_NONE | Get successful. |
OPEN_E_PARAM | Error in parameter passed. |
OpEN API Version: 1.7
open_error_t openapiIntfNameMaxLengthGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t * | maxLen | ||
) |
Get maximum length of interface name.
[in] | client_handle | Client handle from registration API. |
[out] | maxLen | Maximum length of interface name: OPEN_INTF_NAME_MAX_LENGTH |
OPEN_E_NONE | Get successful. |
OPEN_E_PARAM | Error in parameter passed. |
OpEN API Version: 1.7
open_error_t openapiIpAddressMaxStringLength | ( | openapiClientHandle_t * | client_handle, |
uint32_t * | maxLen | ||
) |
Get maximum string length of IP address.
[in] | client_handle | Client handle from registration API. |
[out] | maxLen | Maximum length of IP address string length: OPEN_IP_ADDR_DISP_LENGTH |
OPEN_E_NONE | Get successful. |
OPEN_E_PARAM | Error in parameter passed. |
OpEN API Version: 1.7
open_error_t openapiIsInetAddrZero | ( | openapiClientHandle_t * | client_handle, |
open_inet_addr_t | ipAddr, | ||
OPEN_BOOL_t * | isZero | ||
) |
Check if the given IP address is zero or not.
[in] | client_handle | Client handle from registration API. |
[in] | ipAddr | IP address in inet address format. |
[out] | isZero | Returns OPEN_TRUE if the given IP address is '0', OPEN_FALSE if not. |
OPEN_E_NONE | Valid IP address is passed. |
OPEN_E_PARAM | Invalid parameter is passed. |
OpEN API Version: 1.7
open_error_t openapiMaxInterfaceCountGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t * | max_interface_count | ||
) |
Get the maximum number of interfaces on this switch.
[in] | client_handle | Client handle from registration API. |
[out] | max_interface_count | Number of interfaces. |
OPEN_E_NONE | Got the number of interfaces. |
OPEN_E_INTERNAL | Unexpected error. |
OpEN API Version: 1.1
open_error_t openapiNetworkOSVersionGet | ( | openapiClientHandle_t * | client_handle, |
open_buffdesc * | version | ||
) |
Returns the revision of the network operating system running on the switch.
[in] | client_handle | Client handle from registration API. |
[out] | version | Pointer to structure that is used to store revision data. |
OPEN_E_NONE | Revision data successfully retrieved. |
OPEN_E_FAIL | Revision data could not be retrieved. |
OPEN_E_PARAM | Error in parameter passed. |
OpEN API Version: 1.1
open_error_t openapiOpenIPtoStringGet | ( | openapiClientHandle_t * | client_handle, |
open_inet_addr_t | openAddr, | ||
open_buffdesc * | bufdName | ||
) |
Get human readable string format of given IP address.
[in] | client_handle | Client handle from registration API. |
[in] | openAddr | IP address to convert to string. |
[out] | bufdName | IP address in string format. |
OPEN_E_NONE | Set successful. |
OPEN_E_PARAM | Error in parameter passed. |
OpEN API Version: 1.7
open_error_t openapiOspfEqualCostRoutesMax | ( | openapiClientHandle_t * | client_handle, |
uint32_t * | maxPaths | ||
) |
Get the number of equal cost routes supported by this platform.
[in] | client_handle | Client handle from registration API. |
[out] | maxPaths | Maximum number of equal cost routes. |
OPEN_E_NONE | Get successful. |
OPEN_E_PARAM | Error in parameter passed. |
OpEN API Version: 1.2
open_error_t openapiPendingEventsGet | ( | openapiClientHandle_t * | client_handle, |
openapiEventList_t * | changed_mask, | ||
openapiEventList_t * | purged_mask | ||
) |
Check what events are pending for this client.
[in] | client_handle | Client handle from registration API. |
[out] | changed_mask | Table-Change event is pending for the tables in the bit mask. |
[out] | purged_mask | Table-Purge event is pending for the tables in the bit mask. |
OPEN_E_NONE | Got the event mask. |
OPEN_E_FAIL | Unexpected failure. |
OpEN API Version: 1.1
open_error_t openapiPingCallback | ( | openapiClientHandle_t * | client_handle, |
uint16_t | seqNo, | ||
uint32_t | rtt, | ||
uint32_t | type, | ||
open_buffdesc * | srcIp | ||
) |
Send the ping response to the client(CLI/Telnet/SSH) session.
[in] | client_handle | Client handle from registration API. |
[in] | seqNo | Seq. Nb of ping response. |
[in] | rtt | Response time. |
[in] | type | Response ICMP packet type. |
[in] | srcIp | Source IP of the responding node. |
OPEN_E_NONE | Successfully passed output to the client. |
OPEN_E_FAIL | Failed to pass output to the client. |
OpEN API Version: 1.1
open_error_t openapiServiceClientRegister | ( | char * | client_name, |
int32_t | client_inst, | ||
int32_t | server_id, | ||
openapiClientHandle_t * | client_handle | ||
) |
Register as a client of a specified OpEN API service and wait until the service is available.
[in] | client_name | String containing the client name. |
[in] | client_inst | Client instance number. |
[in] | server_id | Server identifier. |
[out] | client_handle | Storage to contain handle information. |
OPEN_E_NONE | OpEN is ready to accept RPC calls. |
OPEN_E_INTERNAL | OpEN is not available in this product. |
OPEN_E_PARAM | Error in parameter passed. |
The same process may register multiple times.
The client name is a zero-terminated string of any length and does not have to be unique.
OpEN API Version: 1.9
open_error_t openapiSystemFileNameMaxLengthGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t * | fileNameLen | ||
) |
Get the maximum length of a file name (including its path) in the file system.
[in] | client_handle | Client handle from registration API. |
[out] | fileNameLen | Maximum length of a file name. |
OPEN_E_NONE | Operation succeeded. |
OPEN_E_PARAM | Error in parameter passed. |
OpEN API Version: 1.6
open_error_t openapiSystemReadyStateGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t * | system_is_ready | ||
) |
Determine whether the system is currently operational or not operational.
The function reflects whether the system is in the "Configurator Execute" state.
[in] | client_handle | Client handle from registration API. |
[out] | system_is_ready | 1 - System is ready, 0 - Not Ready |
OPEN_E_NONE | Got the system state. OPEN_E_INTERNAL Unexpected error. |
OpEN API Version: 1.1
open_error_t openapiSystemReadyStateTransitionNextGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t * | system_is_ready | ||
) |
Get the next configurator state transition event.
[in] | client_handle | Client handle from registration API. |
[out] | system_is_ready | 1 - System is ready, 0 - Not Ready |
OPEN_E_NONE | Got the system state. OPEN_E_INTERNAL Unexpected error. |
OpEN API Version: 1.1
open_error_t openapiTraceRouteCallbackFn | ( | openapiClientHandle_t * | client_handle, |
uint32_t | num_probes, | ||
uint32_t | ttl, | ||
uint32_t | ipDa, | ||
uint16_t | hopCount, | ||
uint16_t | probeCount, | ||
uint32_t | rtt, | ||
uint8_t | errSym | ||
) |
Send the traceroute response to the client(CLI/Telnet/SSH) session.
[in] | client_handle | Client handle from registration API. |
[in] | numProbes | Number of probes issued per hop. |
[in] | ttl | Starting Time to live value. |
[in] | ipDa | Destination IP address. |
[in] | hopCount | The hop for current traceroute probes. |
[in] | probeCount | The current probe number. |
[in] | rtt | Response time. |
[in] | errSym | The error symbol. |
OPEN_E_NONE | Successfully passed output to the client. |
OPEN_E_FAIL | Failed to pass output to the client. |
OpEN API Version: 1.1