summaryrefslogtreecommitdiffstats
path: root/sys/net
Commit message (Collapse)AuthorAgeFilesLines
* Hopefully make IFMEDIA_DEBUG compile. if_xname[] is a NetBSD addition,peter1999-08-181-3/+3
| | | | | | we need if_name, if_unit. (maybe we should pick up if_xname[] ?) Pointed out by: jkb@yahoo-inc.com
* Give if_tun the "almost clone" makeover.phk1999-08-151-68/+60
|
* Give BPF the "almost-clone" update. If you need more of them, makephk1999-08-151-78/+31
| | | | | more entries in /dev and be happy you don't need to recompile your kernel.
* Back out redundant check, and remove the MAXMTU comparison as it'sbrian1999-08-061-7/+4
| | | | | outside of the (bogus) tuninfo mtu range. Pointed out by: bde
* Back out redundant checksbrian1999-08-062-12/+5
| | | | Pointed out by: bde
* Define IF_MAXMTU and IF_MINMTU and don't allow MTUs withbrian1999-08-065-15/+31
| | | | | | | | | out-of-range values. ``comparison is always 0'' warnings are silly ! Ok'd by: wollman, dg Advised by: bde
* Don't complain if 0 bytes are written to the tun device, simplybrian1999-07-261-1/+4
| | | | do nothing.
* fix a problem w/ zero byte writes to the tunnel device. It would bypassjmg1999-07-231-1/+1
| | | | | | | | | | the loop and not set an error, so we would then try to access an invalid mbuf... PR: 12780 Submitted by: bright@rush.net aka zb^3 a new record in length a pr was open... only about a half hour...
* Rename bpfilter to bpf.des1999-07-069-55/+55
|
* Fixed English errors, spelling errors and formatting errors in rev.1.51bde1999-07-051-7/+9
| | | | and rev.1.53.
* Quick fix for breakage of bounds checking in rev.1.12. Only onebde1999-07-041-2/+2
| | | | | | | | | of the additional checks in rev.1.12 was wrong. The others are a bit inconsistent and are probably unnecessarily pessimal. Checking for overflow of addition, if necessary at all, should be done in bpf_validate(). PR: 12484
* Fix a printf int/long problem on the Alphapeter1999-07-011-2/+3
|
* Fix two easy warnings when using BRIDGE without IPFIREWALL.peter1999-07-011-2/+3
|
* Increase the size of the route reference count from 15 bits to 31 bits.msmith1999-06-301-3/+2
| | | | | | | | This doesn't change the size or alignment of the structure on either i386 or Alpha, and thus should be binary-compatible (modulo problems with old applications and routes with more than 2^15 references). Reviewed by: peter
* Never return the root node itself from rn_match(); return NULL instead.pb1999-06-251-2/+5
| | | | | | | | | | | | This caused a panic in rtfreee() called with a root node from the routing socket code (when processing a RTM_GET message looking for the default route while there is none). Since no existing code seems to have any use getting the root node from rn_match(), it seems cleaner never to return it rather than check for this condition at the caller's. PR: kern/12265
* Add a new interface ioctl, to return "aux status".phk1999-06-194-4/+34
| | | | | | | | | | | | | | | | | | | This is inteded for to allow ifconfig to print various unstructured information from an interface. The data is returned from the kernel in ASCII form, see the comment in if.h for some technicalities. Canonical cut&paste example to be found in if_tun.c Initial use: Now tun* interfaces tell the PID of the process which opened them. Future uses could be (volounteers welcome!): Have ppp/slip interfaces tell which tty they use. Make sync interfaces return their media state: red/yellow/blue alarm, timeslot assignment and so on. Make ethernets warn about missing heartbeats and/or cables
* typo in previous commitphk1999-06-061-2/+2
|
* Introduce IFF_SMART bit.phk1999-06-062-6/+10
| | | | | | | | This means that the driver will add/delete routes when it knows it is up/down, rather than have the generic code belive it is up if configured. This is probably most useful for serial lines, although many PHY chips could probably tell us if we're connected to the cable/hub as well.
* Simplify cdevsw registration.phk1999-05-312-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | The cdevsw_add() function now finds the major number(s) in the struct cdevsw passed to it. cdevsw_add_generic() is no longer needed, cdevsw_add() does the same thing. cdevsw_add() will print an message if the d_maj field looks bogus. Remove nblkdev and nchrdev variables. Most places they were used bogusly. Instead check a dev_t for validity by seeing if devsw() or bdevsw() returns NULL. Move bdevsw() and devsw() functions to kern/kern_conf.c Bump __FreeBSD_version to 400006 This commit removes: 72 bogus makedev() calls 26 bogus SYSINIT functions if_xe.c bogusly accessed cdevsw[], author/maintainer please fix. I4b and vinum not changed. Patches emailed to authors. LINT probably broken until they catch up.
* This commit should be a extensive NO-OP:phk1999-05-302-8/+41
| | | | | | | | | | | | | Reformat and initialize correctly all "struct cdevsw". Initialize the d_maj and d_bmaj fields. The d_reset field was not removed, although it is never used. I used a program to do most of this, so all the files now use the same consistent format. Please keep it that way. Vinum and i4b not modified, patches emailed to respective authors.
* In tunclose():brian1999-05-271-11/+15
| | | | | Delete all routes if IFF_RUNNING is set, irrespective of IFF_UP Unset IFF_RUNNING.
* PR: kern/10570pb1999-05-161-2/+2
| | | | | | | | | | Submitted by: adrian@freebsd.org Change reference count in struct ifaddr to a u_int, to be able to handle more than 2^16 routes to the same interface. Fix suggested by Andrew Bangs <andrewb@demon.net> in PR kern/10570. Tested by <adrian@freebsd.org> and me under -current.
* clean up en atm driverkjc1999-05-082-329/+8
| | | | | | | | | | | | | o fix DDB support - include "opt_ddb.h" - fix Debugger() arg pointed out by bde o back out pvc shadow interface support - it is currently not used - to make it easier to merge another implementation o misc minor cleanup
* Fix some disordering I introduced with the jail code.phk1999-05-081-2/+3
|
* I got tired of seeing all the cdevsw[major(foo)] all over the place.phk1999-05-081-2/+2
| | | | | | | | Made a new (inline) function devsw(dev_t dev) and substituted it. Changed to the BDEV variant to this format as well: bdevsw(dev_t dev) DEVFS will eventually benefit from this change too.
* Add sufficient braces to keep egcs happy about potentially ambiguouspeter1999-05-063-12/+16
| | | | if/else nesting.
* Free the dummynet descriptor in ip_dummynet, not in the calledluigi1999-05-041-3/+1
| | | | | | | routines. The descriptor contains parameters which could be used within those routines (eg. ip_output() ). On passing, add IPPROTO_PGM entry to netinet/in.h
* Postpone route_init() until all domains are attached.luoqi1999-04-293-5/+7
|
* This Implements the mumbled about "Jail" feature.phk1999-04-284-17/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a seriously beefed up chroot kind of thing. The process is jailed along the same lines as a chroot does it, but with additional tough restrictions imposed on what the superuser can do. For all I know, it is safe to hand over the root bit inside a prison to the customer living in that prison, this is what it was developed for in fact: "real virtual servers". Each prison has an ip number associated with it, which all IP communications will be coerced to use and each prison has its own hostname. Needless to say, you need more RAM this way, but the advantage is that each customer can run their own particular version of apache and not stomp on the toes of their neighbors. It generally does what one would expect, but setting up a jail still takes a little knowledge. A few notes: I have no scripts for setting up a jail, don't ask me for them. The IP number should be an alias on one of the interfaces. mount a /proc in each jail, it will make ps more useable. /proc/<pid>/status tells the hostname of the prison for jailed processes. Quotas are only sensible if you have a mountpoint per prison. There are no privisions for stopping resource-hogging. Some "#ifdef INET" and similar may be missing (send patches!) If somebody wants to take it from here and develop it into more of a "virtual machine" they should be most welcome! Tools, comments, patches & documentation most welcome. Have fun... Sponsored by: http://www.rndassociates.com/ Run for almost a year by: http://www.servetheweb.com/
* Allow loadable interface drivers with BPF support to be loaded into a kernelmsmith1999-04-281-3/+42
| | | | | | | | that doesn't have it. This is achieved by having minimal do-nothing stubs enabled when there are no bpfilter devices configured. Driver modules should be built with BPF enabled for maximum convenience (but can be built without it for maximum performance).
* Suser() simplification:phk1999-04-276-25/+25
| | | | | | | | | | | | | | | | | | | 1: s/suser/suser_xxx/ 2: Add new function: suser(struct proc *), prototyped in <sys/proc.h>. 3: s/suser_xxx(\([a-zA-Z0-9_]*\)->p_ucred, \&\1->p_acflag)/suser(\1)/ The remaining suser_xxx() calls will be scrutinized and dealt with later. There may be some unneeded #include <sys/cred.h>, but they are left as an exercise for Bruce. More changes to the suser() API will come along with the "jail" code.
* Temporary hack. The radix code shouldn't need this, it should bepeter1999-04-261-1/+2
| | | | | | | | able to expand the zeros, ones etc masks on the fly. It seems a good number of domains don't set the rn_maxkey variable anyway, and because this is a domain itself, there is no guarantee we've been called after a protocol that actually has set it (ie: inet), so start with a maxkey of a relatively sane size as a base point until it can adapt on the fly.
* Protect the ifinit() function's internals with splimp() for safety sincepeter1999-04-261-4/+5
| | | | | | | | it used to be that way. I'm not sure that it's needed, but it does walk the ifp list.. Incidently, there's nothing to sanity check the ifq_maxlen on loaded interfaces..
* Minor seatbelt tweak. The init code used to be splimp() protected,peter1999-04-261-2/+7
| | | | maintain that in case.
* Make NETISR_SET use a SYSINIT() rather than a linker set.peter1999-04-261-5/+5
|
* Fix my breakage of BRIDGE compiling option without IPFIREWALL..peter1999-04-211-1/+5
| | | | | (Note that if you have bridge compiled in and then kldload ipfw, bridge won't automatically use it - knowledge of ipfw/dummynet is compiled in)
* Tidy up some stray / unused stuff in the IPFW package and friends.peter1999-04-201-3/+1
| | | | | | | | - unifdef -DCOMPAT_IPFW (this was on by default already) - remove traces of in-kernel ip_nat package, it was never committed. - Make IPFW and DUMMYNET initialize themselves rather than depend on compiled-in hooks in ip_init(). This means they initialize the same way both in-kernel and as kld modules. (IPFW initializes now :-)
* Bring the 'new-bus' to the i386. This extensively changes the way thepeter1999-04-164-4/+54
| | | | | | | | | | | | | | | | | | i386 platform boots, it is no longer ISA-centric, and is fully dynamic. Most old drivers compile and run without modification via 'compatability shims' to enable a smoother transition. eisa, isapnp and pccard* are not yet using the new resource manager. Once fully converted, all drivers will be loadable, including PCI and ISA. (Some other changes appear to have snuck in, including a port of Soren's ATA driver to the Alpha. Soren, back this out if you need to.) This is a checkpoint of work-in-progress, but is quite functional. The bulk of the work was done over the last few years by Doug Rabson and Garrett Wollman. Approved by: core
* Break long lines that I introduced in a previous commit.eivind1999-04-111-4/+7
|
* Add missing SYSCTL_DECL(_net_link); required by newer sysctl implementation.wpaul1999-04-071-1/+2
| | | | Noticed by: Matthew Dodd <winter@jurai.net>
* Add a missing declaration that broke the compilation of this file.jdp1999-04-031-0/+1
|
* Merge from RELENG_2_2, per luigi. Fixes the ntoh?() issue for thensayer1999-03-301-3/+30
| | | | | | | | firewall code when called from the bridge code. PR: 10818 Submitted by: nsayer Obtained from: luigi
* rganize the various modes (CISCO/AUTO/DEMAND/LEASED) a little bit better,phk1999-03-302-30/+51
| | | | | | centralize the code. Remember to call TLF/TLS on the hardware in CISCO mode.
* Implement TUNSIFMODE and TUNSLMODE.des1999-03-243-3/+47
| | | | Submitted by: Alfred Perlstein <bright@cygnus.rush.net>
* Grrr... botched remote commit. Let's try this again: vlan updates,wpaul1999-03-152-2/+11
| | | | take two.
* Updates for vlan stuff:wpaul1999-03-151-25/+228
| | | | | | | | | | | | | - add support for devices that do vlan tag insertion/deletion in firmware - add multicast support - add vlan_unconfig() to complement vlan_config() - update ifconfig(8) to configure vlan interfaces (vlan tag and parent device) Also fix a small bug in ifconfig; sometimes sa_family is overwritten by ioctls. Reviewed by: wollman
* Submitted by: Larry Lilejulian1999-03-103-34/+69
| | | | | | | | Move the Olicom token ring driver to the officially sanctionned location of /sys/contrib. Also fix some brokenness in the generic token ring support. Be warned that if_dl.h has been changed and SOME programs might like recompilation.
* Also add 1000baseSX, 1000baseLX, 1000baseCX and 1000baseTX media types. Atwpaul1999-03-071-0/+12
| | | | | this point I don't know if there are any actual gigabit ethernet devices that support media other than 1000baseSX (multi-mode fiber) but who knows.
* Add 1000baseFX, 10baseSTP and 10baseFL media types. The 1000baseFXwpaul1999-03-061-1/+19
| | | | | | | | type may become necessary soon. :) Also add a couple of additional macros that NetBSD has which we don't. Nothing in FreeBSD uses these (yet) so adding them in shouldn't hurt anything.
* The fe driver supports bridging, so added it to lists.kato1999-02-251-3/+3
|
OpenPOWER on IntegriCloud