Neighbour table configuration

Overview

// global functions

te_errno tapi_cfg_get_neigh_entry(const char* ta, const char* ifname, const struct sockaddr* net_addr, void* ret_addr, te_bool* is_static, cs_neigh_entry_state* state);
te_errno tapi_cfg_add_neigh_entry(const char* ta, const char* ifname, const struct sockaddr* net_addr, const void* link_addr, te_bool is_static);
te_errno tapi_cfg_set_neigh_entry(const char* ta, const char* ifname, const struct sockaddr* net_addr, const void* link_addr, te_bool is_static);
te_errno tapi_cfg_del_neigh_entry(const char* ta, const char* ifname, const struct sockaddr* net_addr);
te_errno tapi_cfg_del_neigh_dynamic(const char* ta, const char* ifname);
te_errno tapi_cfg_add_neigh_proxy(const char* ta, const char* ifname, const struct sockaddr* net_addr, cfg_handle* p_handle);

Detailed Documentation

Global Functions

te_errno tapi_cfg_get_neigh_entry(const char* ta, const char* ifname, const struct sockaddr* net_addr, void* ret_addr, te_bool* is_static, cs_neigh_entry_state* state)

Get neighbour entry.

Currently the function supports only (IP -> IEEE 802.3 ethernet) entries. In the future it might be extended with an additional parameter hw_type to support different classes of link layer addresses.

Parameters:

ta

Test Agent name

ifname

Interface name

net_addr

IP address

ret_addr

Returned IEEE 802.3 Link layer address

is_static

NULL or location for a flag: is found entry static?

state

NULL or location for state of dynamic entry

0

on success

Returns:

Status code

te_errno tapi_cfg_add_neigh_entry(const char* ta, const char* ifname, const struct sockaddr* net_addr, const void* link_addr, te_bool is_static)

Add a new neighbour entry.

Currently the function supports only (IP -> IEEE 802.3 ethernet) entries. In the future it might be extended with an additional parameter hw_type to support different classes of link layer addresses.

Parameters:

ta

Test Agent name

ifname

Interface name

net_addr

IP address

link_addr

IEEE 802.3 Link layer address

is_static

Is static (or dynamic) entry should be added

0

  • on success

Returns:

Status code

te_errno tapi_cfg_set_neigh_entry(const char* ta, const char* ifname, const struct sockaddr* net_addr, const void* link_addr, te_bool is_static)

Set a new value for neighbour entry.

Currently the function supports only (IP -> IEEE 802.3 ethernet) entries. In the future it might be extended with an additional parameter hw_type to support different classes of link layer addresses.

Parameters:

ta

Test Agent name

ifname

Interface name

net_addr

IP address

link_addr

IEEE 802.3 Link layer address

is_static

Whether static or dynamic entry should be set

0

  • on success

Returns:

Status code

te_errno tapi_cfg_del_neigh_entry(const char* ta, const char* ifname, const struct sockaddr* net_addr)

Delete a neighbour entry.

Currently the function supports only (IP -> IEEE 802.3 ethernet) entries. In the future it might be extended with an additional parameter address_family to support different classes of link layer addresses.

Parameters:

ta

Test Agent name

ifname

Interface name

net_addr

IP address

0

  • on success

Returns:

Status code

te_errno tapi_cfg_del_neigh_dynamic(const char* ta, const char* ifname)

Clenup dynamic neighbour entries.

Parameters:

ta

Test agent name

ifname

Interface name or NULL if all interfaces should be processed

0

  • on success

Returns:

Status code

te_errno tapi_cfg_add_neigh_proxy(const char* ta, const char* ifname, const struct sockaddr* net_addr, cfg_handle* p_handle)

Add neighbor proxy entry for a given interface.

Parameters:

ta

Test Agent name.

ifname

Interface name.

net_addr

Network address to proxy.

p_handle

Where to save pointer to configuration handle (may be NULL).

Returns:

Status code.