Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

wvtundev.h

Go to the documentation of this file.
00001 /* -*- Mode: C++ -*-
00002  * Worldvisions Weaver Software:
00003  *   Copyright (C) 1997-2002 Net Integration Technologies, Inc.
00004  *
00005  * A tun device wrapper.
00006  */
00007 #ifndef __WV_TUNDEV_H
00008 #define __WV_TUNDEV_H
00009 
00010 #include "wvfile.h"
00011 #include "wvinterface.h"
00012 #include "wvaddr.h"
00013 
00014 /**
00015  * WvTunDev provides a convenient way of using Linux tunnel devices.
00016  * 
00017  * If you don't have the /dev/net/tun device, try doing:
00018  * mknod /dev/net/tun c 10 200.
00019  * 
00020  */
00021 class WvTunDev : public WvFile
00022 {
00023 public:
00024     /**
00025      * Creates a tunnel device and its associated interface.
00026      *
00027      * "addr" is the initial ip address for the interface
00028      * "mtu" is the max transfer unit, default 1400
00029      */
00030     WvTunDev(const WvIPNet &addr, int mtu = 1400);
00031 
00032     /** Contains the name of the interface associated with the device. */
00033     WvString ifcname;
00034 
00035 private:
00036     void init(const WvIPNet &addr, int mtu);
00037 };
00038 
00039 
00040 #endif

Generated on Sat Feb 21 21:05:34 2004 for WvStreams by doxygen 1.3.5