The Netsukuku Project
0.0.9
An Alternative routing method
|
#include "includes.h"
#include "inet.h"
#include <linux/ip.h>
#include <linux/if_tunnel.h>
#include "libnetlink.h"
#include "ll_map.h"
#include "krnl_route.h"
#include "route.h"
#include "iptunnel.h"
#include "common.h"
Macros | |
#define | IP_DF 0x4000 /* Flag: "Don't Fragment" */ |
Functions | |
static int | do_add (int cmd, inet_prefix *remote, inet_prefix *local, char *dev, char *tunl_prefix, int tunl_number) |
int | do_del (inet_prefix *remote, inet_prefix *local, char *dev, char *tunl_prefix, int tunl_number) |
int | tunnel_add (inet_prefix *remote, inet_prefix *local, char *dev, char *tunl_prefix, int tunl_number) |
int | tunnel_change (inet_prefix *remote, inet_prefix *local, char *dev, char *tunl_prefix, int tunl_number) |
int | tunnel_del (inet_prefix *remote, inet_prefix *local, char *dev, char *tunl_prefix, int tunl_number) |
static int | do_ioctl_get_ifindex (const char *dev) |
static int | do_get_ioctl (const char *basedev, struct ip_tunnel_parm *p) |
static int | do_add_ioctl (int cmd, const char *basedev, struct ip_tunnel_parm *p) |
static int | do_del_ioctl (const char *basedev, struct ip_tunnel_parm *p) |
static int | fill_tunnel_parm (int cmd, inet_prefix *remote, inet_prefix *local, char *dev, char *tunl_prefix, int tunl_number, struct ip_tunnel_parm *p) |
int | do_get (char *dev) |
int | tun_add_tunl (interface *ifs, char *tunl_prefix, u_char tunl_number) |
int | tun_del_tunl (interface *ifs, char *tunl_prefix, u_char tunl_number) |
void | init_tunnels_ifs (void) |
int | first_free_tunnel_if (void) |
int | set_tunnel_ip (char *tunl_prefix, int tunl_number, inet_prefix *tunl_ip) |
int | add_tunnel_if (inet_prefix *remote, inet_prefix *local, char *dev, char *tunl_prefix, int tunl_number, inet_prefix *tunl_ip) |
int | del_tunnel_if (inet_prefix *remote, inet_prefix *local, char *dev, char *tunl_prefix, int tunl_number) |
void | del_all_tunnel_ifs (inet_prefix *remote, inet_prefix *local, char *dev, char *tunl_prefix) |
#define IP_DF 0x4000 /* Flag: "Don't Fragment" */ |
int add_tunnel_if | ( | inet_prefix * | remote, |
inet_prefix * | local, | ||
char * | dev, | ||
char * | tunl_prefix, | ||
int | tunl_number, | ||
inet_prefix * | tunl_ip | ||
) |
void del_all_tunnel_ifs | ( | inet_prefix * | remote, |
inet_prefix * | local, | ||
char * | dev, | ||
char * | tunl_prefix | ||
) |
int del_tunnel_if | ( | inet_prefix * | remote, |
inet_prefix * | local, | ||
char * | dev, | ||
char * | tunl_prefix, | ||
int | tunl_number | ||
) |
|
static |
|
static |
int do_del | ( | inet_prefix * | remote, |
inet_prefix * | local, | ||
char * | dev, | ||
char * | tunl_prefix, | ||
int | tunl_number | ||
) |
|
static |
int do_get | ( | char * | dev | ) |
|
static |
|
static |
|
static |
int first_free_tunnel_if | ( | void | ) |
void init_tunnels_ifs | ( | void | ) |
int set_tunnel_ip | ( | char * | tunl_prefix, |
int | tunl_number, | ||
inet_prefix * | tunl_ip | ||
) |
int tun_add_tunl | ( | interface * | ifs, |
char * | tunl_prefix, | ||
u_char | tunl_number | ||
) |
int tun_del_tunl | ( | interface * | ifs, |
char * | tunl_prefix, | ||
u_char | tunl_number | ||
) |
int tunnel_add | ( | inet_prefix * | remote, |
inet_prefix * | local, | ||
char * | dev, | ||
char * | tunl_prefix, | ||
int | tunl_number | ||
) |
int tunnel_change | ( | inet_prefix * | remote, |
inet_prefix * | local, | ||
char * | dev, | ||
char * | tunl_prefix, | ||
int | tunl_number | ||
) |
int tunnel_del | ( | inet_prefix * | remote, |
inet_prefix * | local, | ||
char * | dev, | ||
char * | tunl_prefix, | ||
int | tunl_number | ||
) |