Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Related Pages

tun-bsd.c File Reference

#include "config.h"
#include <sys/socket.h>
#include <sys/uio.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "dnet.h"

Go to the source code of this file.

Defines

#define MAX_DEVS   16

Functions

tun_ttun_open (struct addr *src, struct addr *dst, int mtu)
const char * tun_name (tun_t *tun)
int tun_fileno (tun_t *tun)
ssize_t tun_send (tun_t *tun, const void *buf, size_t size)
ssize_t tun_recv (tun_t *tun, void *buf, size_t size)
tun_ttun_close (tun_t *tun)


Define Documentation

#define MAX_DEVS   16
 

Definition at line 29 of file tun-bsd.c.

Referenced by tun_open().


Function Documentation

tun_t* tun_close tun_t tun  ) 
 

Definition at line 135 of file tun-bsd.c.

References intf_close(), intf_set(), and NULL.

int tun_fileno tun_t tun  ) 
 

Definition at line 93 of file tun-bsd.c.

References tun::fd.

const char* tun_name tun_t tun  ) 
 

Definition at line 87 of file tun-bsd.c.

tun_t* tun_open struct addr src,
struct addr dst,
int  mtu
 

Definition at line 32 of file tun-bsd.c.

References addr::addr_bits, addr::addr_type, ADDR_TYPE_IP, errno, INTF_FLAG_POINTOPOINT, INTF_FLAG_UP, intf_get(), intf_open(), intf_set(), IP_ADDR_BITS, MAX_DEVS, memset, NULL, route_add(), route_close(), route_entry::route_dst, route_entry::route_gw, route_open(), snprintf, strlcpy, and tun_close().

ssize_t tun_recv tun_t tun,
void *  buf,
size_t  size
 

Definition at line 117 of file tun-bsd.c.

ssize_t tun_send tun_t tun,
const void *  buf,
size_t  size
 

Definition at line 99 of file tun-bsd.c.

References tun::fd.


Generated on Sun May 14 14:51:22 2006 by  doxygen 1.4.2