Data Accelerator Offload
|
#include <linux/rtnetlink.h>
#include <netlink/cache.h>
#include <netlink/route/addr.h>
#include <netlink/route/link.h>
#include <netlink/route/neighbour.h>
#include <netlink/route/route.h>
Go to the source code of this file.
Data Structures | |
struct | dao_netlink_route_ip_addr |
struct | dao_netlink_route_ip_route |
struct | dao_netlink_route_ip_neigh |
struct | dao_netlink_route_link |
struct | dao_netlink_route_callback_ops |
Macros | |
#define | DAO_NETLINK_APP_IF_COOKIE_INITIALIZER (~0u) |
#define | dao_foreach_netlink_neigh_states |
#define | dao_foreach_netlink_route_proto |
#define | dao_foreach_netlink_route_types |
Typedefs | |
typedef struct dao_netlink_route_ip_addr | dao_netlink_route_ip_addr_t |
typedef struct dao_netlink_route_ip_route | dao_netlink_route_ip_route_t |
typedef struct dao_netlink_route_ip_neigh | dao_netlink_route_ip_neigh_t |
typedef struct dao_netlink_route_link | dao_netlink_route_link_t |
typedef struct dao_netlink_route_callback_ops | dao_netlink_route_callback_ops_t |
Functions | |
int | dao_netlink_route_notifier_run (void) |
Function to synchronize LINUX route tables with application. | |
int | dao_netlink_route_notifier_register (dao_netlink_route_callback_ops_t *ops, const char *prefix_interface_name) |
Register application callbacks for getting route updates. | |
DAO Netlink file for route notifications
Definition in file dao_netlink_route.h.
#define DAO_NETLINK_APP_IF_COOKIE_INITIALIZER (~0u) |
Default initializer for interface app_cookie. Interface app_cookie is retrieved via dao_netlink_route_callback_ops.get_app_interface_cookie() during dao_netlink_route_notifier_register()
Definition at line 31 of file dao_netlink_route.h.
#define dao_foreach_netlink_neigh_states |
rtnl cache neighbor entry states
Definition at line 34 of file dao_netlink_route.h.
#define dao_foreach_netlink_route_proto |
Rtnetlink protocol
Definition at line 46 of file dao_netlink_route.h.
#define dao_foreach_netlink_route_types |
rtnl route object route types
Definition at line 93 of file dao_netlink_route.h.
typedef struct dao_netlink_route_ip_addr dao_netlink_route_ip_addr_t |
Structure describing IP Address which is filled from RTM_NEWADDR, RTM_DELADDR netlink messages
typedef struct dao_netlink_route_ip_route dao_netlink_route_ip_route_t |
Structure describing IP routes updates which is filled from RTM_NEWROUTE and RTM_DELROUTE netlink messages
typedef struct dao_netlink_route_ip_neigh dao_netlink_route_ip_neigh_t |
Structure describing IP neighbor updates which is filled from RTM_NEWNEIGH RTM_DELNEIGH netlink messages
typedef struct dao_netlink_route_link dao_netlink_route_link_t |
Structure describing Link updates which is filled from RTM_NEWLINK and RTM_DELLINK netlink messages
typedef struct dao_netlink_route_callback_ops dao_netlink_route_callback_ops_t |
High level route netlink ops for getting
DAO IP Route Protocol enum
Definition at line 54 of file dao_netlink_route.h.
IP Route Types
Definition at line 108 of file dao_netlink_route.h.
Nexthop route attributes
if dao_netlink_route_ip_route_t.is_next_hop, nh_attr variables holds attributes
Enumerator | |
---|---|
DAO_NETLINK_ROUTE_NH_ATTR_ENCAP | Nexthop route holds IP encapsulation (RTA_ENCAP) |
DAO_NETLINK_ROUTE_NH_ATTR_NEWDST | Nexthop route holds new destination IP (RTA_NEWDST) |
DAO_NETLINK_ROUTE_NH_ATTR_VIA | Nexthop route holds via IP address (RTA_VIA) |
DAO_NETLINK_ROUTE_NH_ATTR_VIA_GW | Nexthop route holds via gateway IP address (RTA_VIA_GW) |
DAO_NETLINK_ROUTE_NH_ATTR_IFINDEX | Nexthop route holds Ifindex for routing |
DAO_NETLINK_ROUTE_NH_ATTR_WEIGHT | Netlink route weights for load-balancing |
DAO_NETLINK_ROUTE_NH_ATTR_REALMS | Nexthop route realms |
DAO_NETLINK_ROUTE_NH_ATTR_FLAGS | Nexthop route object holds valid flags (dao_netlink_route_nh_flags_t) |
Definition at line 121 of file dao_netlink_route.h.
Nexthop route flags
if dao_netlink_route_ip_route_t.is_next_hop, nh_flags variables holds valid flags
Definition at line 146 of file dao_netlink_route.h.
IP Neighbor states
Definition at line 198 of file dao_netlink_route.h.
int dao_netlink_route_notifier_run | ( | void | ) |
Function to synchronize LINUX route tables with application.
int dao_netlink_route_notifier_register | ( | dao_netlink_route_callback_ops_t * | ops, |
const char * | prefix_interface_name | ||
) |
Register application callbacks for getting route updates.
It uses low level dao_netlink_register() API to register for NETLINK_ROUTE protocol and multiple multicast_groups for IPv4. Netlink messages are parsed in dao_netlink_poll() processing context and passed to application via registered ops, if found relevant.
ops | Function callback ops set by application |
prefix_interface_name | String to filter out metlink messages and restrict them to those LINUX interfaces whose name has "prefix_interface_name" string. |