Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
tun.c File Reference
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/major.h>
#include <linux/slab.h>
#include <linux/poll.h>
#include <linux/fcntl.h>
#include <linux/init.h>
#include <linux/skbuff.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/miscdevice.h>
#include <linux/ethtool.h>
#include <linux/rtnetlink.h>
#include <linux/compat.h>
#include <linux/if.h>
#include <linux/if_arp.h>
#include <linux/if_ether.h>
#include <linux/if_tun.h>
#include <linux/crc32.h>
#include <linux/nsproxy.h>
#include <linux/virtio_net.h>
#include <linux/rcupdate.h>
#include <net/net_namespace.h>
#include <net/netns/generic.h>
#include <net/rtnetlink.h>
#include <net/sock.h>
#include <net/cls_cgroup.h>
#include <asm/uaccess.h>

Go to the source code of this file.

Data Structures

struct  tap_filter
 
struct  tun_file
 
struct  tun_struct
 
struct  tun_sock
 

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define DRV_NAME   "tun"
 
#define DRV_VERSION   "1.6"
 
#define DRV_DESCRIPTION   "Universal TUN/TAP device driver"
 
#define DRV_COPYRIGHT   "(C) 1999-2004 Max Krasnyansky <[email protected]>"
 
#define tun_debug(level, tun, fmt, args...)
 
#define DBG1(level, fmt, args...)
 
#define GOODCOPY_LEN   128
 
#define FLT_EXACT_COUNT   8
 
#define TUN_USER_FEATURES
 
#define MIN_MTU   68
 
#define MAX_MTU   65535
 

Functions

struct sockettun_get_socket (struct file *file)
 
 EXPORT_SYMBOL_GPL (tun_get_socket)
 
 module_init (tun_init)
 
 module_exit (tun_cleanup)
 
 MODULE_DESCRIPTION (DRV_DESCRIPTION)
 
 MODULE_AUTHOR (DRV_COPYRIGHT)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_ALIAS_MISCDEV (TUN_MINOR)
 
 MODULE_ALIAS ("devname:net/tun")
 

Macro Definition Documentation

#define DBG1 (   level,
  fmt,
  args... 
)
Value:
do { \
if (0) \
printk(level fmt, ##args); \
} while (0)

Definition at line 97 of file tun.c.

#define DRV_COPYRIGHT   "(C) 1999-2004 Max Krasnyansky <[email protected]>"

Definition at line 42 of file tun.c.

#define DRV_DESCRIPTION   "Universal TUN/TAP device driver"

Definition at line 41 of file tun.c.

#define DRV_NAME   "tun"

Definition at line 39 of file tun.c.

#define DRV_VERSION   "1.6"

Definition at line 40 of file tun.c.

#define FLT_EXACT_COUNT   8

Definition at line 106 of file tun.c.

#define GOODCOPY_LEN   128

Definition at line 104 of file tun.c.

#define MAX_MTU   65535

Definition at line 451 of file tun.c.

#define MIN_MTU   68

Definition at line 450 of file tun.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 37 of file tun.c.

#define tun_debug (   level,
  tun,
  fmt,
  args... 
)
Value:
do { \
if (0) \
netdev_printk(level, tun->dev, fmt, ##args); \
} while (0)

Definition at line 92 of file tun.c.

#define TUN_USER_FEATURES
Value:

Definition at line 129 of file tun.c.

Function Documentation

EXPORT_SYMBOL_GPL ( tun_get_socket  )
MODULE_ALIAS ( "devname:net/tun"  )
MODULE_ALIAS_MISCDEV ( TUN_MINOR  )
MODULE_AUTHOR ( DRV_COPYRIGHT  )
MODULE_DESCRIPTION ( DRV_DESCRIPTION  )
module_exit ( tun_cleanup  )
module_init ( tun_init  )
MODULE_LICENSE ( "GPL"  )
struct socket* tun_get_socket ( struct file file)
read

Definition at line 1823 of file tun.c.