Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.11.1.2
Functions
Functions For Reading Routing Router Discovery Configuration [OPENAPI_ROUTING_RTRDISC]

Functions

open_error_t openapiRtrDiscAdvAddrGet (openapiClientHandle_t *client_handle, uint32_t intIfNum, open_inet_addr_t *ipAddr)
 Gets the advertisement address that is used as the destination ip address in the advertisement packet. More...
 
open_error_t openapiRtrDiscAdvAddrSet (openapiClientHandle_t *client_handle, uint32_t intIfNum, open_inet_addr_t ipAddr)
 Sets the advertisement address that is used as the destination ip address in the advertisement packet. More...
 
open_error_t openapiRtrDiscAdvertiseGet (openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_BOOL_t *flag)
 Gets the router discovery mode on the interface. More...
 
open_error_t openapiRtrDiscAdvertiseSet (openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_BOOL_t flag)
 Sets the router discovery mode on the interface. More...
 
open_error_t openapiRtrDiscAdvLifetimeDefaultGet (openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *defLifetime)
 Gets the default value of lifetime field of router advertisement sent from the interface. More...
 
open_error_t openapiRtrDiscAdvLifetimeGet (openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *time)
 Gets the value of lifetime field of router advertisement sent from the interface. More...
 
open_error_t openapiRtrDiscAdvLifetimeRevert (openapiClientHandle_t *client_handle, uint32_t intIfNum)
 Revert AdvertisementLifetime to its default value. More...
 
open_error_t openapiRtrDiscAdvLifetimeSet (openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t time)
 Sets the value of lifetime field of router advertisement sent from the interface. More...
 
open_error_t openapiRtrDiscMaxAdvIntervalGet (openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *time)
 Gets the maximum time allowed between sending router advertisements from the interface. More...
 
open_error_t openapiRtrDiscMaxAdvIntervalSet (openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t time)
 Sets the maximum time allowed between sending router advertisements from the interface. More...
 
open_error_t openapiRtrDiscMinAdvIntervalDefaultGet (openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *defMinAdvInt)
 Gets the default minimum advertisement interval. More...
 
open_error_t openapiRtrDiscMinAdvIntervalGet (openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *time)
 Gets the minimum time allowed between sending router advertisements from the interface. More...
 
open_error_t openapiRtrDiscMinAdvIntervalRevert (openapiClientHandle_t *client_handle, uint32_t intIfNum)
 Revert MinAdvertisementInterval to its default value. More...
 
open_error_t openapiRtrDiscMinAdvIntervalSet (openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t time)
 Sets the minimum time allowed between sending router advertisements from the interface. More...
 
open_error_t openapiRtrDiscPreferenceLevelGet (openapiClientHandle_t *client_handle, uint32_t intIfNum, int32_t *integer)
 Gets the preferability of the address as a default router address, relative to other router addresses on the same subnet. More...
 
open_error_t openapiRtrDiscPreferenceLevelSet (openapiClientHandle_t *client_handle, uint32_t intIfNum, int32_t integer)
 Sets the preferability of the address as a default router address, relative to other router addresses on the same subnet. More...
 

Detailed Description

Function Documentation

open_error_t openapiRtrDiscAdvAddrGet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
open_inet_addr_t ipAddr 
)

Gets the advertisement address that is used as the destination ip address in the advertisement packet.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNuminternal interface number
[out]ipAddradvertisement address
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.25

Examples:
routing_example.c.
open_error_t openapiRtrDiscAdvAddrSet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
open_inet_addr_t  ipAddr 
)

Sets the advertisement address that is used as the destination ip address in the advertisement packet.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNuminternal interface number
[in]ipAddradvertisement address
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.25

Examples:
routing_example.c.
open_error_t openapiRtrDiscAdvertiseGet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
OPEN_BOOL_t flag 
)

Gets the router discovery mode on the interface.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNuminternal interface number
[out]flagadvertisement flag
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.25

Examples:
routing_example.c.
open_error_t openapiRtrDiscAdvertiseSet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
OPEN_BOOL_t  flag 
)

Sets the router discovery mode on the interface.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNuminternal interface number
[in]flagadvertisement flag
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.25

Examples:
routing_example.c.
open_error_t openapiRtrDiscAdvLifetimeDefaultGet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
uint32_t *  defLifetime 
)

Gets the default value of lifetime field of router advertisement sent from the interface.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNuminternal interface number
[out]defLifetimelifetime in seconds
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.25

Examples:
routing_example.c.
open_error_t openapiRtrDiscAdvLifetimeGet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
uint32_t *  time 
)

Gets the value of lifetime field of router advertisement sent from the interface.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNuminternal interface number
[out]timetime in seconds
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.25

Examples:
routing_example.c.
open_error_t openapiRtrDiscAdvLifetimeRevert ( openapiClientHandle_t client_handle,
uint32_t  intIfNum 
)

Revert AdvertisementLifetime to its default value.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNuminternal interface number
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
The default value is dynamic and depends on the current value of MaxAdvertisementInterval.

OpEN API Version: 1.25

Examples:
routing_example.c.
open_error_t openapiRtrDiscAdvLifetimeSet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
uint32_t  time 
)

Sets the value of lifetime field of router advertisement sent from the interface.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNuminternal interface number
[in]timetime in seconds
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMInvalid argument.
OPEN_E_ERRORIf lifetime is > max value
OPEN_E_FAILIf lifetime is < max adv interval
OPEN_E_INTERNALOn any other failure.

OpEN API Version: 1.25

Examples:
routing_example.c.
open_error_t openapiRtrDiscMaxAdvIntervalGet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
uint32_t *  time 
)

Gets the maximum time allowed between sending router advertisements from the interface.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNuminternal interface number
[out]timetime in seconds
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.25

Examples:
routing_example.c.
open_error_t openapiRtrDiscMaxAdvIntervalSet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
uint32_t  time 
)

Sets the maximum time allowed between sending router advertisements from the interface.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNuminternal interface number
[in]timetime in seconds
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMInvalid argument.
OPEN_E_ERRORIf maximum advertisement interval given is out of range.
OPEN_E_FAILIf given maximum advertisement interval is less than configured minimum advertisement interval.
OPEN_E_INTERNALOn any other failure.

OpEN API Version: 1.25

Examples:
routing_example.c.
open_error_t openapiRtrDiscMinAdvIntervalDefaultGet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
uint32_t *  defMinAdvInt 
)

Gets the default minimum advertisement interval.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNuminternal interface number
[out]defMinAdvIntdefault minimum advertisement interval in seconds
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
The default value is dynamic and depends on the current value of MaxAdvertisementInterval.

OpEN API Version: 1.25

open_error_t openapiRtrDiscMinAdvIntervalGet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
uint32_t *  time 
)

Gets the minimum time allowed between sending router advertisements from the interface.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNuminternal interface number
[out]timetime in seconds (3 < t < MaxAdvertisementInterval)
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.25

Examples:
routing_example.c.
open_error_t openapiRtrDiscMinAdvIntervalRevert ( openapiClientHandle_t client_handle,
uint32_t  intIfNum 
)

Revert MinAdvertisementInterval to its default value.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNuminternal interface number
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.
Note
The default value is dynamic and depends on the current value of MaxAdvertisementInterval.

OpEN API Version: 1.25

Examples:
routing_example.c.
open_error_t openapiRtrDiscMinAdvIntervalSet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
uint32_t  time 
)

Sets the minimum time allowed between sending router advertisements from the interface.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNuminternal interface number
[in]timetime in seconds
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMInvalid argument.
OPEN_E_ERRORIf minimum advertisement interval given is out of range.
OPEN_E_FAILIf given minimum advertisement interval is greater than configured maximum advertisement interval.
OPEN_E_INTERNALOn any other failure.

OpEN API Version: 1.25

Examples:
routing_example.c.
open_error_t openapiRtrDiscPreferenceLevelGet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
int32_t *  integer 
)

Gets the preferability of the address as a default router address, relative to other router addresses on the same subnet.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNuminternal interface number
[out]integerpreference level
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.25

Examples:
routing_example.c.
open_error_t openapiRtrDiscPreferenceLevelSet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum,
int32_t  integer 
)

Sets the preferability of the address as a default router address, relative to other router addresses on the same subnet.

Parameters
[in]client_handleclient handle from registration API
[in]intIfNuminternal interface number
[in]integerpreference level
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.25

Examples:
routing_example.c.