The Netsukuku Project  0.0.9
An Alternative routing method
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
krnl_route.c File Reference
#include "includes.h"
#include "if.h"
#include "libnetlink.h"
#include "inet.h"
#include "krnl_route.h"
#include "ll_map.h"
#include "common.h"
Include dependency graph for krnl_route.c:

Macros

#define RP_FILTER_PATH_SZ
 

Functions

void route_reset_filter ()
 
int route_exec (int route_cmd, int route_type, int route_scope, unsigned flags, inet_prefix *src, inet_prefix *to, struct nexthop *nhops, char *dev, u_char table)
 
int route_add (int type, int scope, inet_prefix *src, inet_prefix *to, struct nexthop *nhops, char *dev, u_char table)
 
int route_del (int type, int scope, inet_prefix *src, inet_prefix *to, struct nexthop *nhops, char *dev, u_char table)
 
int route_replace (int type, int scope, inet_prefix *src, inet_prefix *to, struct nexthop *nhops, char *dev, u_char table)
 
int route_change (int type, int scope, inet_prefix *src, inet_prefix *to, struct nexthop *nhops, char *dev, u_char table)
 
int route_append (int type, int scope, inet_prefix *src, inet_prefix *to, struct nexthop *nhops, char *dev, u_char table)
 
int add_nexthops (struct nlmsghdr *n, struct rtmsg *r, struct nexthop *nhop)
 
int route_get_gw (const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
 
int route_get_exact_prefix_dst (inet_prefix prefix, inet_prefix *dst, char *dev_name)
 
int route_flush_cache (int family)
 
int route_ip_forward (int family, int enable)
 
int route_rp_filter (int family, char *dev, int enable)
 
int route_rp_filter_all_dev (int family, interface *ifs, int ifs_n, int enable)
 

Variables

struct {
   int   tb
 
   int   flushed
 
   char *   flushb
 
   int   flushp
 
   int   flushe
 
   struct rtnl_handle *   rth
 
   int   protocol
 
   int   protocolmask
 
   int   scope
 
   int   scopemask
 
   int   type
 
   int   typemask
 
   int   tos
 
   int   tosmask
 
   int   iif
 
   int   iifmask
 
   int   oif
 
   int   oifmask
 
   int   realm
 
   int   realmmask
 
   inet_prefix   rprefsrc
 
   inet_prefix   rvia
 
   inet_prefix   rdst
 
   inet_prefix   mdst
 
   inet_prefix   rsrc
 
   inet_prefix   msrc
 
filter
 

Macro Definition Documentation

#define RP_FILTER_PATH_SZ
Value:
(strlen(RP_FILTER_SYSCTL_1)+ \
strlen(RP_FILTER_SYSCTL_2)+IF_NAMESIZE+1)

Function Documentation

int add_nexthops ( struct nlmsghdr *  n,
struct rtmsg *  r,
struct nexthop nhop 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int route_add ( int  type,
int  scope,
inet_prefix src,
inet_prefix to,
struct nexthop nhops,
char *  dev,
u_char  table 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int route_append ( int  type,
int  scope,
inet_prefix src,
inet_prefix to,
struct nexthop nhops,
char *  dev,
u_char  table 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int route_change ( int  type,
int  scope,
inet_prefix src,
inet_prefix to,
struct nexthop nhops,
char *  dev,
u_char  table 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int route_del ( int  type,
int  scope,
inet_prefix src,
inet_prefix to,
struct nexthop nhops,
char *  dev,
u_char  table 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int route_exec ( int  route_cmd,
int  route_type,
int  route_scope,
unsigned  flags,
inet_prefix src,
inet_prefix to,
struct nexthop nhops,
char *  dev,
u_char  table 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int route_flush_cache ( int  family)

Here is the call graph for this function:

Here is the caller graph for this function:

int route_get_exact_prefix_dst ( inet_prefix  prefix,
inet_prefix dst,
char *  dev_name 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int route_get_gw ( const struct sockaddr_nl *  who,
struct nlmsghdr *  n,
void *  arg 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int route_ip_forward ( int  family,
int  enable 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int route_replace ( int  type,
int  scope,
inet_prefix src,
inet_prefix to,
struct nexthop nhops,
char *  dev,
u_char  table 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void route_reset_filter ( )

Here is the caller graph for this function:

int route_rp_filter ( int  family,
char *  dev,
int  enable 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int route_rp_filter_all_dev ( int  family,
interface ifs,
int  ifs_n,
int  enable 
)

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

struct { ... } filter
char* flushb
int flushe
int flushed
int flushp
int iif
int iifmask
int oif
int oifmask
int protocol
int protocolmask
int realm
int realmmask
inet_prefix rprefsrc
struct rtnl_handle* rth
int scope
int scopemask
int tb
int tos
int tosmask
int type
int typemask