netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
nexthop.c File Reference
#include <netlink-local.h>
#include <netlink/netlink.h>
#include <netlink/utils.h>
#include <netlink/route/rtnl.h>
#include <netlink/route/route.h>
Include dependency graph for nexthop.c:

Macros

#define NH_DIFF(ATTR, EXPR)   ATTR_DIFF(attrs, NH_ATTR_##ATTR, a, b, EXPR)
 

Functions

int rtnl_route_nh_compare (struct rtnl_nexthop *a, struct rtnl_nexthop *b, uint32_t attrs, int loose)
 
void rtnl_route_nh_dump (struct rtnl_nexthop *nh, struct nl_dump_params *dp)
 
Allocation/Freeing
struct rtnl_nexthoprtnl_route_nh_alloc (void)
 
struct rtnl_nexthoprtnl_route_nh_clone (struct rtnl_nexthop *src)
 
void rtnl_route_nh_free (struct rtnl_nexthop *nh)
 
Attributes
void rtnl_route_nh_set_weight (struct rtnl_nexthop *nh, uint8_t weight)
 
uint8_t rtnl_route_nh_get_weight (struct rtnl_nexthop *nh)
 
void rtnl_route_nh_set_ifindex (struct rtnl_nexthop *nh, int ifindex)
 
int rtnl_route_nh_get_ifindex (struct rtnl_nexthop *nh)
 
void rtnl_route_nh_set_gateway (struct rtnl_nexthop *nh, struct nl_addr *addr)
 
struct nl_addrrtnl_route_nh_get_gateway (struct rtnl_nexthop *nh)
 
void rtnl_route_nh_set_flags (struct rtnl_nexthop *nh, unsigned int flags)
 
void rtnl_route_nh_unset_flags (struct rtnl_nexthop *nh, unsigned int flags)
 
unsigned int rtnl_route_nh_get_flags (struct rtnl_nexthop *nh)
 
void rtnl_route_nh_set_realms (struct rtnl_nexthop *nh, uint32_t realms)
 
uint32_t rtnl_route_nh_get_realms (struct rtnl_nexthop *nh)
 

Nexthop Flags Translations

char * rtnl_route_nh_flags2str (int flags, char *buf, size_t len)
 
int rtnl_route_nh_str2flags (const char *name)
 

Macro Definition Documentation

#define NH_DIFF (   ATTR,
  EXPR 
)    ATTR_DIFF(attrs, NH_ATTR_##ATTR, a, b, EXPR)

Referenced by rtnl_route_nh_compare().