![]() |
The Netsukuku Project
0.0.9
An Alternative routing method
|
#include "includes.h"#include "if.h"#include "libnetlink.h"#include "inet.h"#include "krnl_route.h"#include "ll_map.h"#include "common.h"
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 |
| #define RP_FILTER_PATH_SZ |
| int add_nexthops | ( | struct nlmsghdr * | n, |
| struct rtmsg * | r, | ||
| struct nexthop * | nhop | ||
| ) |


| int route_add | ( | 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 route_change | ( | 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_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_flush_cache | ( | int | family | ) |


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


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


| int route_ip_forward | ( | int | family, |
| int | enable | ||
| ) |


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


| void route_reset_filter | ( | ) |

| 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 | ||
| ) |


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