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

tun-linux.c File Reference

#include "config.h"
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/uio.h>
#include <linux/if.h>
#include <linux/if_tun.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.

Classes

struct  tun

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)


Function Documentation

tun_t* tun_close tun_t tun  ) 
 

Definition at line 107 of file tun-linux.c.

References intf_close(), and NULL.

int tun_fileno tun_t tun  ) 
 

Definition at line 73 of file tun-linux.c.

References tun::fd.

const char* tun_name tun_t tun  ) 
 

Definition at line 67 of file tun-linux.c.

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

Definition at line 36 of file tun-linux.c.

References INTF_FLAG_POINTOPOINT, INTF_FLAG_UP, intf_open(), intf_set(), memset, NULL, strlcpy, and tun_close().

ssize_t tun_recv tun_t tun,
void *  buf,
size_t  size
 

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

References tun::fd.

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

Definition at line 79 of file tun-linux.c.

References ETH_TYPE_IP, and tun::fd.


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