Data Accelerator Offload
Loading...
Searching...
No Matches
Data Fields
dao_netlink_route_callback_ops Struct Reference

#include <dao_netlink_route.h>

Data Fields

int(* get_app_interface_cookie )(const char *interface_name, int linux_ifindex, uint32_t *cookie)
 Get application specific cookie for relevant LINUX tap interfaces. This helps application to work with its own notion of tap interface instead of something else defined by library. Cookie is passed to all subsequent function ops for any ip_addr, ip_route, ip_neigh and link updates. If application does not sets cookie, default value is DAO_NETLINK_APP_IF_COOKIE_INITIALIZER.
 
int(* ip_local_addr_add_del )(dao_netlink_route_ip_addr_t *dao_ip_addr, int is_add)
 Add or delete Local IP address to interface.
 
int(* ip_neigh_add_del )(dao_netlink_route_ip_neigh_t *dao_ip_neigh, int is_add)
 
int(* link_add_del )(dao_netlink_route_link_t *dao_link, int is_add)
 
int(* ip_route_add_del )(dao_netlink_route_ip_route_t *dao_ip_route, dao_netlink_action_t action)
 

Detailed Description

High level route netlink ops for getting

Definition at line 261 of file dao_netlink_route.h.

Field Documentation

◆ get_app_interface_cookie

int(* get_app_interface_cookie) (const char *interface_name, int linux_ifindex, uint32_t *cookie)

Get application specific cookie for relevant LINUX tap interfaces. This helps application to work with its own notion of tap interface instead of something else defined by library. Cookie is passed to all subsequent function ops for any ip_addr, ip_route, ip_neigh and link updates. If application does not sets cookie, default value is DAO_NETLINK_APP_IF_COOKIE_INITIALIZER.

If "prefix_interface_name" is passed to dao_netlink_route_notifier_register() API, it looks for all LINUX interface names and if LINUX interface name has "prefix_interface_name" string in its name (eg: prefix_interface_name: "dtap" and LINUX interface name: dtap0, dtap1,...), get_app_interface_cookie() is called for each matched LINUX interface with

  • Exact LINUX interface name
  • LINUX notion of ifindex (See man page for if_nametoindex() information)

Application is supposed to set cookie value for any further function callbacks. Although linux_ifindex is also passed to all function callbacks for route, neigh, addr, and link updates

Parameters
interface_nameLINUX interface name that matched with "prefix_interface_name" passed to dao_netlink_route_notifier_register()
linux_ifindexLINUX notion of ifindex. See if_nametoindex() library function
[out]cookieApplication specific cookie for interface for any subsequent function calls
Returns
0: Succese <0: Failure

Definition at line 296 of file dao_netlink_route.h.

◆ ip_local_addr_add_del

int(* ip_local_addr_add_del) (dao_netlink_route_ip_addr_t *dao_ip_addr, int is_add)

Add or delete Local IP address to interface.

Parameters
dao_ip_addrSee dao_netlink_route_ip_addr_t
is_addAdd addr if is_add == 1 else delete otherwise
Returns
0: Succese <0: Failure

Definition at line 311 of file dao_netlink_route.h.

◆ ip_neigh_add_del

int(* ip_neigh_add_del) (dao_netlink_route_ip_neigh_t *dao_ip_neigh, int is_add)

Add or delete IP neighbor entry

Parameters
dao_ip_neighSee dao_netlink_route_ip_neigh_t
is_addAdd neighbor if is_add == 1 else delete otherwise
Returns
0: Succese <0: Failure

Definition at line 325 of file dao_netlink_route.h.

◆ link_add_del

int(* link_add_del) (dao_netlink_route_link_t *dao_link, int is_add)

Add or delete Link HW address

Parameters
dao_linkSee dao_netlink_route_link_t
is_addAdd link if is_add == 1 else delete otherwise
Returns
0: Succese <0: Failure

Definition at line 339 of file dao_netlink_route.h.

◆ ip_route_add_del

int(* ip_route_add_del) (dao_netlink_route_ip_route_t *dao_ip_route, dao_netlink_action_t action)

Add or delete IP route

Parameters
dao_ip_routeSee dao_netlink_route_ip_route_t
actionAdd, replace or delete based on action value
Returns
0: Succese <0: Failure

Definition at line 353 of file dao_netlink_route.h.


The documentation for this struct was generated from the following file: