summaryrefslogtreecommitdiffstats
path: root/sys/net
Commit message (Collapse)AuthorAgeFilesLines
* Minor hack in the netgraph interface to ethernets.julian1999-10-261-11/+60
|
* Whistle's Netgraph link-layer (sometimes more) networking infrastructure.julian1999-10-213-0/+353
| | | | | | | | | | Been in production for 3 years now. Gives Instant Frame relay to if_sr and if_ar drivers, and PPPOE support soon. See: ftp://ftp.whistle.com/pub/archie/netgraph/index.html for on-line manual pages. Reviewed by: Doug Rabson (dfr@freebsd.org) Obtained from: Whistle CVS tree
* Implement pseudo_AF_HDRCMPLT, which controls the state of the 'headermsmith1999-10-155-9/+53
| | | | | | | | | | completion' flag. If set, the interface output routine will assume that the packet already has a valid link-level source address. This defaults to off (the address is overwritten) PR: kern/10680 Submitted by: "Christopher N . Harrell" <cnh@mindspring.net> Obtained from: NetBSD
* Zap #include "tun.h" (for NTUN) - which isn't used anymore.peter1999-09-271-2/+0
|
* Minor tidy up of PPP_FILTER and NBPF stuff. Don't generate bpf.h in thepeter1999-09-261-7/+1
| | | | module and don't #include "bpf.h".
* Remove five now unused fields from struct cdevsw. They should neverphk1999-09-252-10/+0
| | | | | | | | have been there in the first place. A GENERIC kernel shrinks almost 1k. Add a slightly different safetybelt under nostop for tty drivers. Add some missing FreeBSD tags
* This patch clears the way for removing a number of tty relatedphk1999-09-251-1/+1
| | | | | | | | | | | | | | | | | | | | | fields in struct cdevsw: d_stop moved to struct tty. d_reset already unused. d_devtotty linkage now provided by dev_t->si_tty. These fields will be removed from struct cdevsw together with d_params and d_maxio Real Soon Now. The changes in this patch consist of: initialize dev->si_tty in *_open() initialize tty->t_stop remove devtotty functions rename ttpoll to ttypoll a few adjustments to these changes in the generic code a bump of __FreeBSD_version add a couple of FreeBSD tags
* Remove NBPF conditionality of bpf calls in most of our network drivers.phk1999-09-258-83/+13
| | | | | | | | | | | | This means that we will not have to have a bpf and a non-bpf version of our driver modules. This does not open any security hole, because the bpf core isn't loadable The drivers left unchanged are the "cross platform" drivers where the respective maintainers are urged to DTRT, whatever that may be. Add a couple of missing FreeBSD tags.
* Don't call if_up() here, just set IFF_UP.ru1999-09-141-1/+1
| | | | | PR: 12251 Reviewed by: wollman
* Add comments, fix typos.ru1999-09-141-2/+8
| | | | Reviewed by: wollman
* Fix kernel compile with BRIDGE, but without DUMMYNETnsayer1999-09-111-0/+3
|
* For every "promiscuous mode enabled" message printed for an interface,sheldonh1999-08-301-0/+2
| | | | | | | print a matching "disabled" message when we drop out of promiscuous mode for that interface. Discussed on the freebsd-hackers mailing list.
* $Id$ -> $FreeBSD$peter1999-08-2856-56/+56
|
* 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 :-)
OpenPOWER on IntegriCloud