OpenVPN
Functions | Variables
test_networking.c File Reference
#include "config.h"
#include "syshead.h"
#include "networking.h"
#include <assert.h>
Include dependency graph for test_networking.c:

Go to the source code of this file.

Functions

static int net__iface_up (bool up)
 
static int net__iface_new (const char *name, const char *type)
 
static int net__iface_type (const char *name, const char *type)
 
static int net__iface_del (const char *name)
 
static int net__iface_mtu_set (int mtu)
 
static int net__addr_v4_add (const char *addr_str, int prefixlen)
 
static int net__addr_v6_add (const char *addr_str, int prefixlen)
 
static int net__route_v4_add (const char *dst_str, int prefixlen, int metric)
 
static int net__route_v4_add_gw (const char *dst_str, int prefixlen, const char *gw_str, int metric)
 
static int net__route_v6_add (const char *dst_str, int prefixlen, int metric)
 
static int net__route_v6_add_gw (const char *dst_str, int prefixlen, const char *gw_str, int metric)
 
static void usage (char *name)
 
int main (int argc, char *argv[])
 

Variables

static char * iface = "ovpn-dummy0"
 

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

◆ net__addr_v4_add()

static int net__addr_v4_add ( const char *  addr_str,
int  prefixlen 
)
static

Definition at line 51 of file test_networking.c.

References iface.

Referenced by main().

◆ net__addr_v6_add()

static int net__addr_v6_add ( const char *  addr_str,
int  prefixlen 
)
static

Definition at line 70 of file test_networking.c.

References iface.

Referenced by main().

◆ net__iface_del()

static int net__iface_del ( const char *  name)
static

Definition at line 37 of file test_networking.c.

Referenced by main().

◆ net__iface_mtu_set()

static int net__iface_mtu_set ( int  mtu)
static

Definition at line 43 of file test_networking.c.

References iface.

Referenced by main().

◆ net__iface_new()

static int net__iface_new ( const char *  name,
const char *  type 
)
static

Definition at line 18 of file test_networking.c.

Referenced by main().

◆ net__iface_type()

static int net__iface_type ( const char *  name,
const char *  type 
)
static

Definition at line 24 of file test_networking.c.

References IFACE_TYPE_LEN_MAX.

Referenced by main().

◆ net__iface_up()

static int net__iface_up ( bool  up)
static

Definition at line 10 of file test_networking.c.

References iface.

Referenced by main().

◆ net__route_v4_add()

static int net__route_v4_add ( const char *  dst_str,
int  prefixlen,
int  metric 
)
static

Definition at line 87 of file test_networking.c.

References iface.

Referenced by main().

◆ net__route_v4_add_gw()

static int net__route_v4_add_gw ( const char *  dst_str,
int  prefixlen,
const char *  gw_str,
int  metric 
)
static

Definition at line 117 of file test_networking.c.

References iface.

Referenced by main().

◆ net__route_v6_add()

static int net__route_v6_add ( const char *  dst_str,
int  prefixlen,
int  metric 
)
static

Definition at line 155 of file test_networking.c.

References iface.

Referenced by main().

◆ net__route_v6_add_gw()

static int net__route_v6_add_gw ( const char *  dst_str,
int  prefixlen,
const char *  gw_str,
int  metric 
)
static

Definition at line 183 of file test_networking.c.

References iface.

Referenced by main().

◆ usage()

static void usage ( char *  name)
static

Definition at line 218 of file test_networking.c.

Referenced by main().

Variable Documentation

◆ iface

char* iface = "ovpn-dummy0"
static