Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
Functions
IP Support [OPENAPI_IP]

Functions

open_error_t openapiInetAton (openapiClientHandle_t *client_handle, open_buffdesc *ipAddr, uint32_t *value)
 Convert internet address string to a 32 bit integer. More...
 
open_error_t openapiIpAdEntAddrGet (openapiClientHandle_t *client_handle, uint32_t ipAddr, uint32_t intIfNum)
 Determines if the Ip address entry corresponding to this ip address exists. More...
 
open_error_t openapiIpAdEntAddrGetNext (openapiClientHandle_t *client_handle, uint32_t *ipAddr, uint32_t *intIfNum)
 Get the Ip Address entry which is next to the entry corresponding to this ip address entry. More...
 
open_error_t openapiIpAdEntBCastGet (openapiClientHandle_t *client_handle, uint32_t ipAddr, uint32_t *bcastAddr)
 Gets the value of the least-significant bit in the IP broadcast address used for sending datagrams on the (logical) interface associated with the IP address of this entry. More...
 
open_error_t openapiIpAdEntNetMaskGet (openapiClientHandle_t *client_handle, uint32_t ipAddr, uint32_t *netmask)
 Gets the subnet mask associated with the IP address of this entry. More...
 
open_error_t openapiIpAdEntReasmMaxSizeGet (openapiClientHandle_t *client_handle, uint32_t ipAddr, uint32_t *maxSize)
 Gets the size of the largest IP datagram which this entity can re-assemble from incoming IP fragmented datagrams received on this interface. More...
 
open_error_t openapiIpEntIfIndexGet (openapiClientHandle_t *client_handle, uint32_t ipAddr, uint32_t *ifIndex)
 Gets the index value which uniquely identifies the interface to which this entry is applicable. More...
 

Detailed Description

Function Documentation

open_error_t openapiInetAton ( openapiClientHandle_t client_handle,
open_buffdesc ipAddr,
uint32_t *  value 
)

Convert internet address string to a 32 bit integer.

Parameters
[in]client_handleclient handle from registration API.
[in]ipAddrpointer to dotted string reprensentation.
[out]valuepointer to 32 bit integer reprensentation.
Return values
OPEN_E_NONEIP address string converted successfully.
OPEN_E_FAILIP address string converted failure.
OPEN_E_PARAMError in parameter passed.
Note
Can use hex, octal or decimal input

OpEN API Version: 1.7

Examples:
ip_example.c.
open_error_t openapiIpAdEntAddrGet ( openapiClientHandle_t client_handle,
uint32_t  ipAddr,
uint32_t  intIfNum 
)

Determines if the Ip address entry corresponding to this ip address exists.

Parameters
[in]client_handleclient handle from registration API
[in]ipAddrthe ip address to which this entry's addressing information pertains.
[in]intIfNuminternal interface number for entry.
Return values
OPEN_E_NONEIf the specified address entry exists.
OPEN_E_FAILIf the specified address entry does not exist.
OPEN_E_PARAMError in parameter passed.
Note
Each entry contains addressing information for one of this entity's IP addresses.

OpEN API Version: 1.7

Examples:
ip_example.c.
open_error_t openapiIpAdEntAddrGetNext ( openapiClientHandle_t client_handle,
uint32_t *  ipAddr,
uint32_t *  intIfNum 
)

Get the Ip Address entry which is next to the entry corresponding to this ip address entry.

Parameters
[in]client_handleclient handle from registration API.
[in,out]ipAddrip address.
[in,out]intIfNuminternal interface number.
Return values
OPEN_E_NONEIf the next route entry exists.
OPEN_E_FAILIf the next route entry does not exist.
OPEN_E_PARAMError in parameter passed.
Note
Each entry contains addressing information for one of this entity's IP addresses.

OpEN API Version: 1.7

Examples:
ip_example.c.
open_error_t openapiIpAdEntBCastGet ( openapiClientHandle_t client_handle,
uint32_t  ipAddr,
uint32_t *  bcastAddr 
)

Gets the value of the least-significant bit in the IP broadcast address used for sending datagrams on the (logical) interface associated with the IP address of this entry.

Parameters
[in]client_handleclient handle from registration API.
[in]ipAddrip address of this entry.
[out]bcastAddrleast significant bit of the ip broadcast address.
Return values
OPEN_E_NONEIf the subnet mask entry exists.
OPEN_E_FAILIf the subnet mask entry does not exist.
OPEN_E_PARAMError in parameter passed.
Note
The standard specifies that any host id consisting of all 1s is reserved for broadcast. bcast addr = (ipaddr & netmask) | ~netmask

OpEN API Version: 1.7

Examples:
ip_example.c.
open_error_t openapiIpAdEntNetMaskGet ( openapiClientHandle_t client_handle,
uint32_t  ipAddr,
uint32_t *  netmask 
)

Gets the subnet mask associated with the IP address of this entry.

Parameters
[in]client_handleclient handle from registration API.
[in]ipAddrip address of this entry.
[out]netmaskthe subnet mask associated with the ip address of this entry.
Return values
OPEN_E_NONEIf the subnet mask entry exists.
OPEN_E_FAILIf the subnet mask entry does not exist.
OPEN_E_PARAMError in parameter passed.
Note
The value of the mask is an IP address with all the network bits set to 1 and all the hosts bits set to 0.

OpEN API Version: 1.7

Examples:
ip_example.c.
open_error_t openapiIpAdEntReasmMaxSizeGet ( openapiClientHandle_t client_handle,
uint32_t  ipAddr,
uint32_t *  maxSize 
)

Gets the size of the largest IP datagram which this entity can re-assemble from incoming IP fragmented datagrams received on this interface.

Parameters
[in]client_handleclient handle from registration API.
[in]ipAddrip address of this entry.
[out]maxSizesize of largest re-assembled datagram.
Return values
OPEN_E_NONEIf the max size entry exists.
OPEN_E_FAILIf the max size entry does not exist.
OPEN_E_PARAMError in parameter passed.
Note
As the OS performs reassembly this value will be retrieved from the OS.

OpEN API Version: 1.7

Examples:
ip_example.c.
open_error_t openapiIpEntIfIndexGet ( openapiClientHandle_t client_handle,
uint32_t  ipAddr,
uint32_t *  ifIndex 
)

Gets the index value which uniquely identifies the interface to which this entry is applicable.

Parameters
[in]client_handleclient handle from registration API.
[in]ipAddrip address of this entry.
[out]ifIndexthe interface index.
Return values
OPEN_E_NONEIf the interface index entry exists.
OPEN_E_FAILIf the interface index entry does not exist.
OPEN_E_PARAMError in parameter passed.
Note
The ifIndex is the index value which uniquely identifies the interface to which this entry is applicable. The interface identified by a particular value of this index is the same interface as identified by the same value of ifIndex.

OpEN API Version: 1.7

Examples:
ip_example.c.