OpenVPN
test_networking.c File Reference
#include "config.h"
#include "syshead.h"
#include "networking.h"
#include <setjmp.h>
#include <cmocka.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()

◆ net__addr_v4_add()

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

Definition at line 52 of file test_networking.c.

References iface.

Referenced by main().

◆ net__addr_v6_add()

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

Definition at line 71 of file test_networking.c.

References iface.

Referenced by main().

◆ net__iface_del()

int net__iface_del ( const char * name)
static

Definition at line 38 of file test_networking.c.

Referenced by main().

◆ net__iface_mtu_set()

int net__iface_mtu_set ( int mtu)
static

Definition at line 44 of file test_networking.c.

References iface.

Referenced by main().

◆ net__iface_new()

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

Definition at line 19 of file test_networking.c.

Referenced by main().

◆ net__iface_type()

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

Definition at line 25 of file test_networking.c.

References IFACE_TYPE_LEN_MAX.

Referenced by main().

◆ net__iface_up()

int net__iface_up ( bool up)
static

Definition at line 11 of file test_networking.c.

References iface.

Referenced by main().

◆ net__route_v4_add()

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

Definition at line 88 of file test_networking.c.

References iface.

Referenced by main().

◆ net__route_v4_add_gw()

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

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

Definition at line 153 of file test_networking.c.

References iface.

Referenced by main().

◆ net__route_v6_add_gw()

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

Definition at line 180 of file test_networking.c.

References iface.

Referenced by main().

◆ usage()

void usage ( char * name)
static

Definition at line 213 of file test_networking.c.

Variable Documentation

◆ iface