summaryrefslogtreecommitdiffstats
path: root/sys/net/if_tun.c
Commit message (Collapse)AuthorAgeFilesLines
* Support more than 256 tun devices:brian1998-04-271-9/+13
| | | | | | | | $ ls -l /dev/tun25[4-7] crw------- 1 fax dialer 52, 254 Apr 27 02:27 /dev/tun254 crw------- 1 fax dialer 52, 255 Apr 27 02:27 /dev/tun255 crw------- 1 fax dialer 52, 0x00010000 Apr 27 02:31 /dev/tun256 crw------- 1 fax dialer 52, 0x00010001 Apr 27 02:31 /dev/tun257
* Seventy-odd "its" / "it's" typos in comments fixed as per kern/6108.des1998-04-171-1/+1
|
* Use getmicrotime() for if_lastchange, 10msec is plenty precision.phk1998-04-061-1/+1
|
* Don't depend on "implicit int" or bloat the data section in thebde1998-02-201-1/+1
| | | | declaration of xxx_devsw_installed.
* Revert previous commit. Remove all ifp->if_* = 0 initializations,steve1998-02-011-7/+0
| | | | | | | since pkh made tunctl static in revision 1.17 these are already guaranteed to be zero'd and tunattach will only be called once. Pointed out by: Bruce Evans and Bill Fenner
* Initialize if_ibytes and if_obytes to zero.steve1998-01-251-0/+2
| | | | | PR: 1376 Submitted by: risner@stdio.com
* Make all file-system (MFS, FFS, NFS, LFS, DEVFS) related option new-style.eivind1998-01-241-0/+1
| | | | | | | | This introduce an xxxFS_BOOT for each of the rootable filesystems. (Presently not required, but encouraged to allow a smooth move of option *FS to opt_dontuse.h later.) LFS is temporarily disabled, and will be re-enabled tomorrow.
* Move softc stuff into if_tunvar.hbrian1998-01-111-0/+1
| | | | | | Suggested by: Peter Wemm <peter@netplex.com.au> Hinted at by: Bruce Evans <bde@FreeBSD.org> À³
* Make INET a proper option.eivind1998-01-081-2/+8
| | | | | | | | | | | | This will not make any of object files that LINT create change; there might be differences with INET disabled, but hardly anything compiled before without INET anyway. Now the 'obvious' things will give a proper error if compiled without inet - ipx_ip, ipfw, tcp_debug. The only thing that _should_ work (but can't be made to compile reasonably easily) is sppp :-( This commit move struct arpcom from <netinet/if_ether.h> to <net/if_arp.h>.
* Removed unused #includes.bde1997-11-181-18/+26
| | | | | | Fixed gratuitous ANSIisms. Fixed nonblocking mode. It was per-device instead of per-file.
* Update select -> pollpeter1997-09-141-20/+20
|
* As the Tunnel device has no real inherrent MRU limit,julian1997-06-111-1/+1
| | | | | | | | so don't enforce the MTU as an MRU. Allow bidirectional ppp MTU negotiation, by checking against a differnt figure for MRU. Make it large enough for ATM frames at least. Submitted by: archie@whistle.com (archie cobbs)
* Don't include <sys/ioctl.h> in the kernel. Stage 6: includebde1997-03-241-1/+3
| | | | | | | <sys/filio.h>, <sys/sockio.h> and <sys/ttycom.h> instead of <sys/ioctl.h> in a couple of files. This is still only 1/3 as spammish as <sys/ioctl.h> - 5 or 6 old tty ioctl headers aren't needed.
* Don't #include <sys/fcntl.h> in <sys/file.h> if KERNEL is defined.bde1997-03-231-1/+1
| | | | | Fixed everything that depended on getting fcntl.h stuff from the wrong place. Most things don't depend on file.h stuff at all.
* Don't try to do anything with the `ifr' parameter for SIOCADDMULTIwollman1997-01-171-15/+0
| | | | and SIOCDELMULTI; it is guaranteed to be null in the new system.
* Change default tun MTU back to 1500.fenner1996-12-161-1/+6
| | | | | | | Use the interface MTU instead of the constant when deciding what packets to accept. Allow using the SIOCSIFMTU ioctl (e.g. "ifconfig tun0 mtu XXX") to set the MTU.
* Convert the interface address and IP interface address structureswollman1996-12-131-2/+4
| | | | | | to TAILQs. Fix places which referenced these for no good reason that I can see (the references remain, but were fixed to compile again; they are still questionable).
* 2 small changes:julian1996-12-021-1/+5
| | | | | | | | | | | | | | 1/ increase the tun MTU from 1500 to 1600 to allow it to be used with packets formatted according to RFC1490 and RFC1717 2/ allow the tsleep() when reading, to be interruptable by signals so that one can now do: od -xc </dev/tun0 to dump packets for debugging without getting hung. Passed on by: Archie@whistle.com (archie Cobbs) Nice but not neccessary in 2.2
* Remove an un-necessary call to microtime() to set if_lastchangegpalmer1996-06-231-1/+0
| | | | as it is set in the call to if_down in the line above
* Since the updates to ifnet.if_lastchange are so rare (relativelygpalmer1996-06-121-2/+2
| | | | | | | speaking), go for the extra accuracy and call microtime() to get the current time. Pointed Out By: bde
* Change the use if ifnet.if_lastchange to be more in line withgpalmer1996-06-101-2/+5
| | | | | SNMP requirements. Update description of ifnet.if_lastchange in if.h to indicate this.
* Also count bytes in if_tun. kern/1253phk1996-06-091-0/+2
| | | | | Reviewed by: phk Submitted by: John Capo <jc@irbs.com>
* added missing semicolonscrappy1996-05-261-1/+1
| | | | Submitted by: Jeffrey Hsu <hsu@freefall.freebsd.org>
* If tunnel is busy we return EBUSY, not ENXIO.phk1996-05-261-1/+1
|
* Removed never-used #includes of <machine/cpu.h>. Many were apparentlybde1996-04-071-2/+0
| | | | copied from bad examples.
* Fixed ownerships of callout devices.bde1996-03-271-7/+3
|
* Make tundebug sysctl writable.phk1996-02-091-1/+1
|
* Clean up Ethernet drivers:wollman1996-02-061-5/+5
| | | | | | | | - fill in and use ifp->if_softc - use if_bpf rather than private cookie variables - change bpf interface to take advantage of this - call ether_ifattach() directly from Ethernet drivers - delete kludge in if_attach() that did this indirectly
* Make FIONREAD return the actual that a read() would return, not just thepeter1995-12-111-3/+5
| | | | | | amount of data in the first mbuf. Obtained from: Bob Smart <smart@mel.dit.csiro.au> (for NetBSD & SunOS)
* Restored used variable `name[32]' (used by DEVFS).bde1995-12-101-3/+3
| | | | | Removed an `#ifdef __FreeBSD__'. Hundreds, if not thousands of other FreeBSD-specific things aren't ifdefed.
* Staticize, clean lint.phk1995-12-091-9/+9
|
* Pass 3 of the great devsw changesjulian1995-12-081-53/+38
| | | | | | | | | | | | | | | | | | | | | | | most devsw referenced functions are now static, as they are in the same file as their devsw structure. I've also added DEVFS support for nearly every device in the system, however many of the devices have 'incorrect' names under DEVFS because I couldn't quickly work out the correct naming conventions. (but devfs won't be coming on line for a month or so anyhow so that doesn't matter) If you "OWN" a device which would normally have an entry in /dev then search for the devfs_add_devsw() entries and munge to make them right.. check out similar devices to see what I might have done in them in you can't see what's going on.. for a laugh compare conf.c conf.h defore and after... :) I have not doen DEVFS entries for any DISKSLICE devices yet as that will be a much more complicated job.. (pass 5 :) pass 4 will be to make the devsw tables of type (cdevsw * ) rather than (cdevsw) seems to work here.. complaints to the usual places.. :)
* If you're going to mechanically replicate something in 50 filesjulian1995-11-291-1/+1
| | | | it's best to not have a (compiles cleanly) typo in it! (sigh)
* OK, that's it..julian1995-11-291-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | That's EVERY SINGLE driver that has an entry in conf.c.. my next trick will be to define cdevsw[] and bdevsw[] as empty arrays and remove all those DAMNED defines as well.. Each of these drivers has a SYSINIT linker set entry that comes in very early.. and asks teh driver to add it's own entry to the two devsw[] tables. some slight reworking of the commits from yesterday (added the SYSINIT stuff and some usually wrong but token DEVFS entries to all these devices. BTW does anyone know where the 'ata' entries in conf.c actually reside? seems we don't actually have a 'ataopen() etc... If you want to add a new device in conf.c please make sure I know so I can keep it up to date too.. as before, this is all dependent on #if defined(JREMOD) (and #ifdef DEVFS in parts)
* Replaced bogus macros for dummy devswitch entries by functions.bde1995-11-061-6/+7
| | | | | | | | | | | | | | | | | | These functions went away: enosys (hasn't been used for some time) enxio enodev enoioctl (was used only once, actually for a vop) if_tun.c: Continued cleaning up... conf.h: Probably fixed the type of d_reset_t. It is hard to tell the correct type because there are no non-dummy device reset functions. Removed last vestige of ambiguous sleep message strings.
* Moved prototypes for devswitch functions from conf.c and driver sourcesbde1995-11-041-6/+0
| | | | | | | to <machine/conf.h>. conf.h was mechanically generated by `grep ^d_ conf.c >conf.h'. This accounts for part of its ugliness. The prototypes should be moved back to the driver sources when the functions are staticalized.
* Second batch of cleanup changes.phk1995-10-291-2/+0
| | | | | This time mostly making a lot of things static and some unused variables here and there.
* Add BPF and IP multicast capabilities to the `tun' and `lp' networkwollman1995-09-251-1/+30
| | | | | | interfaces. Submitted by: Bill Fenner <fenner@parc.xerox.com>
* Fixed init functions argument type - caddr_t -> void *. Fixed a couple ofdg1995-09-091-2/+2
| | | | compiler warnings.
* Fix several sysinit functions that had the wrong type and unnecessarilybde1995-08-301-7/+8
| | | | | | external linkage. Remove useless comments saying that SYSINIT() does system initialization.
* Make everything except the unsupported network sources compile cleanlybde1995-08-161-1/+0
| | | | with -Wnested-externs.
* Remove trailing whitespace.rgrimes1995-05-301-2/+2
|
* Tunnel driver is nmow capable of installing its own cdevsw[] entry,wollman1995-04-101-20/+24
| | | | | with a little help from conf.c. While e're at it, actually declare the tunnel entry points to have the correct types. This fixes PR #306.
* Support for pseudo-device LKMs. Note that this is restricted to onlywollman1995-03-201-4/+3
| | | | | one pseudo per module (a restriction which will eventually be lifted) and isthus not in its final form.
* Add and move declarations to fix all of the warnings from `gcc -Wimplicit'bde1995-03-161-0/+1
| | | | | | (except in netccitt, netiso and netns) and most of the warnings from `gcc -Wnested-externs'. Fix all the bugs found. There were no serious ones.
* New user Process PPP based on iij-ppp0.94beta2.amurai1995-02-261-115/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Supporting SYNC SIO device (But need a device driver) - add "set speed sync" o Fixing bug for Predictor-1 function. o Add new parameter that re-sent interval for set timeout commands. o Improving RTT (Round Trip Time) and reducing processor time. - Previous Timer service was using polling, and now using SIGALRM ;-) - A 0.94beta2 will not work correctly.... -- Follows are additinal feature not including 0.94beta2 o Support Proxy ARP - add "enable/disable proxy" commands o Marging common routine in CHAP/PAP. o Enhancing LCP/IPCP log information. o Support local Authfication connection on port 300x and tty. - You can set up pair of your "hostname -s" and password in ppp.secret. if either ppp.secret file nor your hostname line don't exist, It will notify a message and working as same as previous version.(Backword compatibility) - If you did set up them, It's allow connection but nothing to do except help and passwd command. - add "passwd yourpasswd" commands o Support afilter - keep Alive filter that a packet can send/receiving according to ifilter/ofilter but doesn't count it as preventing idle timer expires. - Same syntax of other filters. o Fixing bugs reported by current user for previous one. Thanks !! Reviewed by: Atsushi Murai (amurai@spec.co.jp)
* (no commit message)amurai1995-01-311-0/+615
OpenPOWER on IntegriCloud