netatalk  4.4.0
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
tunnel_bsd.c File Reference
#include <sys/types.h>
#include <sys/param.h>
#include <sys/socket.h>
#include <sys/select.h>
#include <sys/ioctl.h>
#include <netinet/in_systm.h>
#include <netinet/in.h>
#include <net/if.h>
#include <net/if_tun.h>
#include <errno.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include "common.h"
#include "util.h"
#include "tunnel.h"

Data Structures

struct  tunnel

Macros

#define ROUTE_DEL   0
#define ROUTE_ADD   1

Functions

static int tunnel_ifconfig (void)
static int tunnel_route (int op, uint32_t net, uint32_t mask, uint32_t gw)
int tunnel_open (uint32_t net, uint32_t mask, outputfunc_t o)
void tunnel_close (void)
void tunnel_input (void)
void tunnel_output (char *buffer, int len)

Variables

static struct tunnel gTunnel
static outputfunc_t gOutput

Macro Definition Documentation

◆ ROUTE_ADD

#define ROUTE_ADD   1

◆ ROUTE_DEL

#define ROUTE_DEL   0

Function Documentation

◆ tunnel_close()

void tunnel_close ( void )

◆ tunnel_ifconfig()

int tunnel_ifconfig ( void )
static

◆ tunnel_input()

void tunnel_input ( void )

◆ tunnel_open()

int tunnel_open ( uint32_t net,
uint32_t mask,
outputfunc_t o )

◆ tunnel_output()

void tunnel_output ( char * buffer,
int len )

◆ tunnel_route()

int tunnel_route ( int op,
uint32_t net,
uint32_t mask,
uint32_t gw )
static

Variable Documentation

◆ gOutput

outputfunc_t gOutput
static

◆ gTunnel

struct tunnel gTunnel
static