aboutsummaryrefslogtreecommitdiff
path: root/sys/net
Commit message (Collapse)AuthorAgeFilesLines
* Fix a =/== confusion that caused the CHAP type renegotiation toJoerg Wunsch1998-10-051-2/+2
| | | | | | | | | completely fail. Obtained from: The isdn4bsd project (original author unknown right now) Notes: svn path=/head/; revision=39981
* The length argument for bcopy is a size_t, not u_int. AdjustAlexander Langer1998-10-041-5/+5
| | | | | | | bpf_mcopy() and catchpacket() prototypes accordingly. Notes: svn path=/head/; revision=39964
* Change BPF_ALIGNMENT to long, necessary for correct alignment on Alpha.Alexander Langer1998-10-041-2/+2
| | | | Notes: svn path=/head/; revision=39963
* Support hz > 1000 (Alpha) in BIOCSRTIMEOUT.Alexander Langer1998-10-041-10/+5
| | | | | | | Obtained from: OpenBSD Notes: svn path=/head/; revision=39955
* fix an mbuf leak when using ipfw to filger bridged packetsLuigi Rizzo1998-09-181-2/+5
| | | | | | | (from -stable, since this code is not yet active in -current) Notes: svn path=/head/; revision=39464
* Add DLT_{SLIP,PPP}_BSDOS from libpcap 0.4Bill Fenner1998-09-151-1/+3
| | | | Notes: svn path=/head/; revision=39296
* Bring in files for bridging support.Luigi Rizzo1998-09-122-0/+753
| | | | Notes: svn path=/head/; revision=39120
* Yow! Completely change the way socket options are handled, eliminatingGarrett Wollman1998-08-231-3/+3
| | | | | | | | | another specialized mbuf type in the process. Also clean up some of the cruft surrounding IPFW, multicast routing, RSVP, and other ill-explored corners. Notes: svn path=/head/; revision=38482
* Implement DLT_RAW from libpcapAndrey A. Chernov1998-08-182-2/+4
| | | | Notes: svn path=/head/; revision=38423
* Fixed printf format errors. sppp_dotted_quad() was yet another private,Bruce Evans1998-08-171-9/+10
| | | | | | | broken, version of inet_ntoa(). It should go away. Notes: svn path=/head/; revision=38372
* Fixed yet more ioctl breakage due to the type of the `cmd' arg changingBruce Evans1998-08-152-7/+7
| | | | | | | from int to u_long but not changing here. Notes: svn path=/head/; revision=38343
* One-liner: add a call to the underlying device driver's SIOCDELMULTIBill Paul1998-08-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | ioctl() routine at the end of if_delmulti() so that interfaces with hardware multicast filtering can update their filters in a timely manner. If the interface doesn't support hardware multicast filtering, then reception of multicast frames is done using 'promiscious mode' or 'capture all multicast frames' mode and software filtering in the kernel. In this case, it doesn't matter if if_delmulti() ever does an SCIODELMULTI on the interface or not: if MULTICAST support is enabled, then we join the 'all hosts' group when the interface is configured, and remain in it until the interface is brought down. Without hardware filtering, joining one group means joining all groups, so it makes no difference if we call the SIOCDELMULTI routine. If the interface does support hardware multicast filtering, then by not reprogramming the hardware filter in if_delmulti(), we have to wait until somebody calls if_setmulti(), during which time the interface is receiving frames for multicast groups in which we are no longer interested. Notes: svn path=/head/; revision=38293
* fix broken loopback code for ddp (again)Julian Elischer1998-08-041-3/+6
| | | | | | | Submitted by: Stefan Bethke <stb@hanse.de> Notes: svn path=/head/; revision=38114
* update ATM driver. (base version: midway.c 1.67 --> 1.68)Kenjiro Cho1998-07-293-130/+409
| | | | | | | | | | | | | | | | | | | | | | | | | | several new features are added: - support vc/vp shaping - support pvc shadow interface code cleanup: - remove WMAYBE related code. ENI WMAYBE DMA doen't work. - remove updating if_lastchange for every packet. - BPF related code is moved to midway.c as it should be. (bpfwrite should work if atm_pseudohdr and LLC/SNAP are prepended.) - BPF link type is changed to DLT_ATM_RFC1483. BPF now understands only LLC/SNAP!! (because bpf can't handle variable link header length.) It is recommended to use LLC/SNAP instead of NULL encapsulation for various reasons. (BPF, IPv6, interoperability, etc.) the code has been used for months in ALTQ and KAME IPv6. OKed by phk long time ago. Notes: svn path=/head/; revision=37939
* Make sure the link level sockaddr size is rounded up correctly on alpha.Doug Rabson1998-07-201-2/+2
| | | | Notes: svn path=/head/; revision=37778
* Cast pointers to uintptr_t/intptr_t instead of to u_long/long,Bruce Evans1998-07-152-6/+6
| | | | | | | | | | respectively. Most of the longs should probably have been u_longs, but this changes is just to prevent warnings about casts between pointers and integers of different sizes, not to fix poorly chosen types. Notes: svn path=/head/; revision=37649
* Don't attempt to optimize the space allocated for bpf headers ifBruce Evans1998-07-131-2/+3
| | | | | | | | | | | sizeof(struct bpf_hdr) > 20. 20 is normal on 32-bit systems with 32-bit alignment, but we still assume that the last 2 bytes of the struct are unnecessary padding on such systems. On systems with 64-bit longs, struct timeval is bloated to 16 bytes, so bpf headers certainly don't fit in 18 bytes. Notes: svn path=/head/; revision=37619
* Make sure the packet is aligned correctly for the alpha in if_simloop.Doug Rabson1998-07-121-2/+13
| | | | Notes: svn path=/head/; revision=37600
* Fixed printf format errors.Bruce Evans1998-07-111-3/+4
| | | | Notes: svn path=/head/; revision=37560
* Removed unused includes.Bruce Evans1998-06-212-4/+2
| | | | Notes: svn path=/head/; revision=37094
* Zap what appears to be a relic of the older version of zlib. The otherPeter Wemm1998-06-201-5/+2
| | | | | | | maintained mbuf based ppp-deflate.c's have removed this. Notes: svn path=/head/; revision=37067
* Missing splx().Peter Wemm1998-06-201-2/+4
| | | | Notes: svn path=/head/; revision=37066
* Merge ppp changes from 2.3.3 -> 2.3.5. I have spotted some morePeter Wemm1998-06-205-27/+17
| | | | | | | problems, which I'll have a go at shortly. Notes: svn path=/head/; revision=37065
* OopsJulian Elischer1998-06-141-1/+2
| | | | | | | | left a "break;" out of the last patch it complains for every loopback packet.. Notes: svn path=/head/; revision=36994
* Try narrow down the culprit sending undefined packet types through the loopbackJulian Elischer1998-06-143-8/+22
| | | | Notes: svn path=/head/; revision=36992
* Allow a protocol to specify that it does NOT want to be looped backJulian Elischer1998-06-131-3/+6
| | | | | | | | even if it looks like it should (backwards compatibility with old broken code) should get rid of some annoying messags. Notes: svn path=/head/; revision=36940
* Remove 3 occurances of __FUNCTION__Julian Elischer1998-06-121-4/+3
| | | | Notes: svn path=/head/; revision=36933
* Go through the loopback code with a broom..Julian Elischer1998-06-124-187/+130
| | | | | | | | | | | | | | | | | | | Remove lots'o'hacks. looutput is now static. Other callers who want to use loopback to allow shortcutting should call the special entrypoint for this, if_simloop(), which is specifically designed for this purpose. Using looutput for this purpose was problematic, particularly with bpf and trying to keep track of whether one should be using the charateristics of the loopback interface or the interface (e.g. if_ethersubr.c) that was requesting the loopback. There was a whole class of errors due to this mis-use each of which had hacks to cover them up. Consists largly of hack removal :-) Notes: svn path=/head/; revision=36908
* Don't let ifunit() modify the string passed as an argument.Julian Elischer1998-06-081-16/+26
| | | | | | | it may be in the text segment and write protected. Notes: svn path=/head/; revision=36775
* This commit fixes various 64bit portability problems required forDoug Rabson1998-06-0710-33/+35
| | | | | | | | | | | | | FreeBSD/alpha. The most significant item is to change the command argument to ioctl functions from int to u_long. This change brings us inline with various other BSD versions. Driver writers may like to use (__FreeBSD_version == 300003) to detect this change. The prototype FreeBSD/alpha machdep will follow in a couple of days time. Notes: svn path=/head/; revision=36735
* Added a used include (in ifdefed code).Bruce Evans1998-06-071-1/+3
| | | | Notes: svn path=/head/; revision=36726
* Fixed pedantic syntax errors caused by a trailing semicolon in a macroBruce Evans1998-06-071-2/+2
| | | | | | | definition. Notes: svn path=/head/; revision=36724
* Backed out last fix and fixed my typo:David Greenman1998-05-211-2/+2
| | | | | | | ipflow(fastforward -> ipflow_fastforward Notes: svn path=/head/; revision=36265
* Add missing close parenPeter Dufault1998-05-201-2/+2
| | | | Notes: svn path=/head/; revision=36256
* Added fast IP forwarding code by Matt Thomas <matt@3am-software.com> viaDavid Greenman1998-05-193-3/+11
| | | | | | | | | | | | | | | NetBSD, ported to FreeBSD by Pierre Beyssac <pb@fasterix.freenix.org> and minorly tweaked by me. This is a standard part of FreeBSD, but must be enabled with: "sysctl -w net.inet.ip.fastforwarding=1" ...and of course forwarding must also be enabled. This should probably be modified to use the zone allocator for speed and space efficiency. The current algorithm also appears to lose if the number of active paths exceeds IPFLOW_MAX (256), in which case it wastes lots of time trying to figure out which cache entry to drop. Notes: svn path=/head/; revision=36192
* s/nanoruntime/nanouptime/gPoul-Henning Kamp1998-05-171-2/+2
| | | | | | | | | s/microruntime/microuptime/g Reviewed by: bde Notes: svn path=/head/; revision=36119
* Fix an obvious parameter-order bogon. (Don't know what happened toGarrett Wollman1998-05-151-2/+2
| | | | | | | the warning message before.) Notes: svn path=/head/; revision=36078
* Oops, the previous commit should have changed `i386' to `__i386__',Bruce Evans1998-05-011-3/+3
| | | | | | | not `__i386'. Notes: svn path=/head/; revision=35596
* Loopback network interface driver (net/if_loop.c) has no SIOCSIFFLAGSPoul-Henning Kamp1998-04-301-1/+4
| | | | | | | | | | | ioctl handler. PR: 6466 Reviewed by: phk Submitted by: Ruslan Ermilov <ru@ucb.crimea.ua> Notes: svn path=/head/; revision=35563
* Support more than 256 tun devices:Brian Somers1998-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 Notes: svn path=/head/; revision=35472
* Seventy-odd "its" / "it's" typos in comments fixed as per kern/6108.Dag-Erling Smørgrav1998-04-173-6/+6
| | | | Notes: svn path=/head/; revision=35256
* Support compiling with `gcc -ansi'.Bruce Evans1998-04-152-6/+6
| | | | Notes: svn path=/head/; revision=35210
* Use getmicrotime() for if_lastchange, 10msec is plenty precision.Poul-Henning Kamp1998-04-064-15/+15
| | | | Notes: svn path=/head/; revision=35067
* Use random() for seq numbers and read_random for CHAP challenge.Poul-Henning Kamp1998-04-061-6/+11
| | | | Notes: svn path=/head/; revision=35064
* Make read_random() take a (void *) argument instead of (char *)Poul-Henning Kamp1998-04-061-4/+4
| | | | Notes: svn path=/head/; revision=35060
* Time changes mark 2:Poul-Henning Kamp1998-04-041-4/+6
| | | | | | | | | | | | | | | | | | | | * Figure out UTC relative to boottime. Four new functions provide time relative to boottime. * move "runtime" into struct proc. This helps fix the calcru() problem in SMP. * kill mono_time. * add timespec{add|sub|cmp} macros to time.h. (XXX: These may change!) * nanosleep, select & poll takes long sleeps one day at a time Reviewed by: bde Tested by: ache and others Notes: svn path=/head/; revision=35029
* Eradicate the variable "time" from the kernel, using various measures.Poul-Henning Kamp1998-03-307-31/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "time" wasn't a atomic variable, so splfoo() protection were needed around any access to it, unless you just wanted the seconds part. Most uses of time.tv_sec now uses the new variable time_second instead. gettime() changed to getmicrotime(0. Remove a couple of unneeded splfoo() protections, the new getmicrotime() is atomic, (until Bruce sets a breakpoint in it). A couple of places needed random data, so use read_random() instead of mucking about with time which isn't random. Add a new nfs_curusec() function. Mark a couple of bogosities involving the now disappeard time variable. Update ffs_update() to avoid the weird "== &time" checks, by fixing the one remaining call that passwd &time as args. Change profiling in ncr.c to use ticks instead of time. Resolution is the same. Add new function "tvtohz()" to avoid the bogus "splfoo(), add time, call hzto() which subtracts time" sequences. Reviewed by: bde Notes: svn path=/head/; revision=34961
* Moved some #includes from <sys/param.h> nearer to where they are actuallyBruce Evans1998-03-281-2/+2
| | | | | | | used. Notes: svn path=/head/; revision=34924
* Quieten a debug message.. This happens under "normal" operation by 4 bytesPeter Wemm1998-03-251-2/+2
| | | | | | | | on a frequent enough rate to be annoying. There is a real bug somewhere, but it looks harmless enough. Notes: svn path=/head/; revision=34885
* Added a forward struct declaration so that this file is lessBruce Evans1998-03-231-2/+2
| | | | | | | self-insufficient. Notes: svn path=/head/; revision=34823