Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.13.1.2
Macros | Enumerations | Functions
APIs For Issuing Ping To A Host Or IPv4/IPv6 Address [OPENAPI_PING]

Macros

#define OPEN_PING_ADDRESS_MAX_LEN   256
 
#define OPEN_PING_CALLBACK_STR_MAX_LEN   256
 
#define OPEN_PING_DEFAULT_PROBE_SIZE   0
 
#define OPEN_PING_OUT_INTF_STRING_SIZE   32
 
#define OPEN_PING_STRING_SIZE   2048
 

Enumerations

enum  OPEN_PING_ADDR_TYPE_t { OPEN_PING_ADDR_TYPE_IPV4 = 0, OPEN_PING_ADDR_TYPE_IPV6 = 1, OPEN_PING_ADDR_TYPE_NONE = 2 }
 
enum  OPEN_PING_SOURCE_INTF_TYPE_t { OPEN_PING_SOURCE_INTF_SERVICE_PORT = 0, OPEN_PING_SOURCE_INTF_NETWORK_PORT = 1 }
 
enum  OPEN_PING_SOURCE_TYPE_t {
  OPEN_PING_SOURCE_SERVICE_PORT = 0, OPEN_PING_SOURCE_NETWORK_PORT = 1, OPEN_PING_SOURCE_IP_PORT = 2, OPEN_PING_SOURCE_ADDRESS = 3,
  OPEN_PING_SOURCE_NONE = 4
}
 

Functions

open_error_t openapiPing (openapiClientHandle_t *client_handle, open_buffdesc *vrfName, OPEN_AF_t family, open_buffdesc *address, uint32_t pingCount, uint32_t pingInterval, uint32_t pingSize, OPEN_PING_SOURCE_TYPE_t srcType, uint32_t intIfNum, open_buffdesc *srcAddr, open_buffdesc *output)
 Ping host or IPv4/IPv6 Address with all parameters. More...
 
open_error_t openapiPingAddress (openapiClientHandle_t *client_handle, open_buffdesc *address, open_buffdesc *output)
 Ping host or IPv4/IPv6 Address. More...
 
open_error_t openapiPingAddressExplicit (openapiClientHandle_t *client_handle, open_buffdesc *address, uint32_t pingCount, uint32_t pingInterval, uint32_t pingSize, OPEN_PING_SOURCE_INTF_TYPE_t srcIntf, open_buffdesc *output)
 Ping host or IPv4/IPv6 Address with all parameters given at a time. More...
 
open_error_t openapiPingAddressWithCount (openapiClientHandle_t *client_handle, open_buffdesc *address, uint32_t pingCount, open_buffdesc *output)
 Ping host or IPv4/IPv6 Address with specific count. More...
 
open_error_t openapiPingAddressWithInterval (openapiClientHandle_t *client_handle, open_buffdesc *address, uint32_t pingInterval, open_buffdesc *output)
 Ping host or IPv4/IPv6 Address with specific interval. More...
 
open_error_t openapiPingAddressWithPDUSize (openapiClientHandle_t *client_handle, open_buffdesc *address, uint32_t pingSize, open_buffdesc *output)
 Ping host or IPv4/IPv6 Address with specific probe size. More...
 
open_error_t openapiPingAddressWithSourceInterface (openapiClientHandle_t *client_handle, open_buffdesc *address, OPEN_PING_SOURCE_INTF_TYPE_t srcIntf, open_buffdesc *output)
 Ping host or IPv4/IPv6 Address with source interface. More...
 
open_error_t openapiPingWithSource (openapiClientHandle_t *client_handle, open_buffdesc *vrfName, OPEN_AF_t family, open_buffdesc *address, OPEN_PING_SOURCE_TYPE_t srcType, uint32_t srcIntf, open_buffdesc *srcAddr, open_buffdesc *output)
 Ping host or IPv4/IPv6 Address with given source. More...
 

Detailed Description

Enumeration Type Documentation

Enumerator
OPEN_PING_ADDR_TYPE_IPV4 

Ping IPv4 Address Type.

OPEN_PING_ADDR_TYPE_IPV6 

Ping Ipv6 Address Type.

OPEN_PING_ADDR_TYPE_NONE 

Ping Unspecified Address Type.

Definition at line 49 of file openapi_ping.h.

Enumerator
OPEN_PING_SOURCE_INTF_SERVICE_PORT 

Ping IP Address/Hostname/IPv6 Address with source interface as service port.

OPEN_PING_SOURCE_INTF_NETWORK_PORT 

Ping IP Address/Hostname/IPv6 Address with source interface as network port.

Definition at line 56 of file openapi_ping.h.

Enumerator
OPEN_PING_SOURCE_SERVICE_PORT 

Ping IP Address/Hostname/IPv6 Address with source interface as service port.

OPEN_PING_SOURCE_NETWORK_PORT 

Ping IP Address/Hostname/IPv6 Address with source interface as network port.

OPEN_PING_SOURCE_IP_PORT 

Ping IP Address/Hostname/IPv6 Address with source interface as routing interface.

OPEN_PING_SOURCE_ADDRESS 

Ping IP Address/Hostname/IPv6 Address with source address.

OPEN_PING_SOURCE_NONE 

Ping IP Address/Hostname/IPv6 Address without source.

Definition at line 62 of file openapi_ping.h.

Function Documentation

open_error_t openapiPing ( openapiClientHandle_t client_handle,
open_buffdesc vrfName,
OPEN_AF_t  family,
open_buffdesc address,
uint32_t  pingCount,
uint32_t  pingInterval,
uint32_t  pingSize,
OPEN_PING_SOURCE_TYPE_t  srcType,
uint32_t  intIfNum,
open_buffdesc srcAddr,
open_buffdesc output 
)

Ping host or IPv4/IPv6 Address with all parameters.

Parameters
[in]client_handleClient handle from registration API
[in]vrfNameVRF name
[in]familyAddress family
[in]addresshost or IPv4/IPv6 Address
[in]pingCountnumber of times to ping
[in]pingIntervalinterval between probes in seconds
[in]pingSizeping probe PDU size
[in]srcTypenetwork port/service port/ip port/address
[in]intIfNuminternal interface number incase of ip port
[in]srcAddrsource address incase of source type is address
[out]outputping output
Return values
OPEN_E_NONEif ping to host or IPv4/IPv6 address is successful.
OPEN_E_FAILif failed to ping host or IPv4/IPv6 address.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_UNAVAILif service port/network port/ip port/address is not supported for source type.
Note
Buffer size for address should be OPEN_PING_ADDRESS_MAX_LEN.
Buffer size for output should be OPEN_PING_STRING_SIZE.
Min and Max values for pingCount are OPEN_PING_MIN_PROBES and OPEN_PING_MAX_PROBES.
Min and Max values for pingInterval are OPEN_PING_MIN_INTERVAL and OPEN_PING_MAX_INTERVAL.
Min and Max values for pingSize are OPEN_PING_MIN_SIZE and OPEN_PING_MAX_SIZE.

OpEN API Version: 1.26

Examples:
ping_example.c.
open_error_t openapiPingAddress ( openapiClientHandle_t client_handle,
open_buffdesc address,
open_buffdesc output 
)

Ping host or IPv4/IPv6 Address.

Parameters
[in]client_handleClient handle from registration API
[in]addresshost or IPv4/IPv6 Address
[out]outputping output
Return values
OPEN_E_NONEif ping to host or IPv4/IPv6 address is successful.
OPEN_E_FAILif failed to ping host or IPv4/IPv6 address.
OPEN_E_PARAMif invalid parameter is passed.
Note
Buffer size for address should be OPEN_PING_ADDRESS_MAX_LEN.
Buffer size for output should be OPEN_PING_STRING_SIZE.

OpEN API Version: 1.18

Examples:
ping_example.c.
open_error_t openapiPingAddressExplicit ( openapiClientHandle_t client_handle,
open_buffdesc address,
uint32_t  pingCount,
uint32_t  pingInterval,
uint32_t  pingSize,
OPEN_PING_SOURCE_INTF_TYPE_t  srcIntf,
open_buffdesc output 
)

Ping host or IPv4/IPv6 Address with all parameters given at a time.

Parameters
[in]client_handleClient handle from registration API
[in]addresshost or IPv4/IPv6 Address
[in]pingCountnumber of times to ping
[in]pingIntervalinterval between probes in seconds
[in]pingSizeping probe PDU size
[in]srcIntfnetwork port/service port
[out]outputping output
Return values
OPEN_E_NONEif ping to host or IPv4/IPv6 address is successful.
OPEN_E_FAILif failed to ping host or IPv4/IPv6 address.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_UNAVAILif service port/network port is not supported for source interface
Note
Buffer size for address should be OPEN_PING_ADDRESS_MAX_LEN.
Buffer size for output should be OPEN_PING_STRING_SIZE.
Min and Max values for pingCount are OPEN_PING_MIN_PROBES and OPEN_PING_MAX_PROBES.
Min and Max values for pingInterval are OPEN_PING_MIN_INTERVAL and OPEN_PING_MAX_INTERVAL.
Min and Max values for pingSize are OPEN_PING_MIN_SIZE and OPEN_PING_MAX_SIZE.

OpEN API Version: 1.18

Examples:
ping_example.c.
open_error_t openapiPingAddressWithCount ( openapiClientHandle_t client_handle,
open_buffdesc address,
uint32_t  pingCount,
open_buffdesc output 
)

Ping host or IPv4/IPv6 Address with specific count.

Parameters
[in]client_handleClient handle from registration API
[in]addresshost or IPv4/IPv6 Address
[in]pingCountnumber of times to ping
[out]outputping output
Return values
OPEN_E_NONEif ping to host or IPv4/IPv6 address is successful.
OPEN_E_FAILif failed to ping host or IPv4/IPv6 address.
OPEN_E_PARAMif invalid parameter is passed.
Note
Buffer size for address should be OPEN_PING_ADDRESS_MAX_LEN.
Buffer size for output should be OPEN_PING_STRING_SIZE.
Min and Max values for pingCount are OPEN_PING_MIN_PROBES and OPEN_PING_MAX_PROBES.

OpEN API Version: 1.18

Examples:
ping_example.c.
open_error_t openapiPingAddressWithInterval ( openapiClientHandle_t client_handle,
open_buffdesc address,
uint32_t  pingInterval,
open_buffdesc output 
)

Ping host or IPv4/IPv6 Address with specific interval.

Parameters
[in]client_handleClient handle from registration API
[in]addresshost or IPv4/IPv6 Address
[in]pingIntervalinterval between probes in seconds
[out]outputping output
Return values
OPEN_E_NONEif ping to host or IPv4/IPv6 address is successful.
OPEN_E_FAILif failed to ping host or IPv4/IPv6 address.
OPEN_E_PARAMif invalid parameter is passed.
Note
Buffer size for address should be OPEN_PING_ADDRESS_MAX_LEN.
Buffer size for output should be OPEN_PING_STRING_SIZE.
Min and Max values for pingInterval are OPEN_PING_MIN_INTERVAL and OPEN_PING_MAX_INTERVAL.

OpEN API Version: 1.18

Examples:
ping_example.c.
open_error_t openapiPingAddressWithPDUSize ( openapiClientHandle_t client_handle,
open_buffdesc address,
uint32_t  pingSize,
open_buffdesc output 
)

Ping host or IPv4/IPv6 Address with specific probe size.

Parameters
[in]client_handleClient handle from registration API
[in]addresshost or IPv4/IPv6 Address
[in]pingSizeping probe PDU size
[out]outputping output
Return values
OPEN_E_NONEif ping to host or IPv4/IPv6 address is successful.
OPEN_E_FAILif failed to ping host or IPv4/IPv6 address.
OPEN_E_PARAMif invalid parameter is passed.
Note
Buffer size for address should be OPEN_PING_ADDRESS_MAX_LEN.
Buffer size for output should be OPEN_PING_STRING_SIZE.
Min and Max values for pingSize are OPEN_PING_MIN_SIZE and OPEN_PING_MAX_SIZE.

OpEN API Version: 1.18

Examples:
ping_example.c.
open_error_t openapiPingAddressWithSourceInterface ( openapiClientHandle_t client_handle,
open_buffdesc address,
OPEN_PING_SOURCE_INTF_TYPE_t  srcIntf,
open_buffdesc output 
)

Ping host or IPv4/IPv6 Address with source interface.

Parameters
[in]client_handleClient handle from registration API
[in]addresshost or IPv4/IPv6 Address
[in]srcIntfnetwork port/service port
[out]outputping output
Return values
OPEN_E_NONEif ping to host or IPv4/IPv6 address is successful.
OPEN_E_FAILif failed to ping host or IPv4/IPv6 address.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_UNAVAILif service port/network port is not supported for source interface
Note
Buffer size for address should be OPEN_PING_ADDRESS_MAX_LEN.
Buffer size for output should be OPEN_PING_STRING_SIZE.

OpEN API Version: 1.18

Examples:
ping_example.c.
open_error_t openapiPingWithSource ( openapiClientHandle_t client_handle,
open_buffdesc vrfName,
OPEN_AF_t  family,
open_buffdesc address,
OPEN_PING_SOURCE_TYPE_t  srcType,
uint32_t  srcIntf,
open_buffdesc srcAddr,
open_buffdesc output 
)

Ping host or IPv4/IPv6 Address with given source.

Parameters
[in]client_handleClient handle from registration API
[in]vrfNameVRF name
[in]familyAddress family
[in]addresshost or IPv4/IPv6 Address
[in]srcTypenetwork port/service port/ip port/address
[in]srcIntfinternal interface number incase of ip port
[in]srcAddrsource address incase of source type is address
[out]outputping output
Return values
OPEN_E_NONEif ping to host or IPv4/IPv6 address is successful.
OPEN_E_FAILif failed to ping host or IPv4/IPv6 address.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_UNAVAILif service port/network port/ip port/address is not supported for source type.
Note
Buffer size for address should be OPEN_PING_ADDRESS_MAX_LEN.
Buffer size for output should be OPEN_PING_STRING_SIZE.

OpEN API Version: 1.26

Examples:
ping_example.c.