summaryrefslogtreecommitdiffstats
path: root/sys/net
Commit message (Collapse)AuthorAgeFilesLines
* * Use explicitly sized types for grovelling around inside packets.dfr1998-10-311-21/+21
| | | | | | * On the alpha, make sure memory accesses are only made to aligned boundaries. Submitted by: Alex Nash <nash@mcs.net>
* Check the timeval passed to BIOCSRTIMEOUT with itimerfix. Use tvtohz()alex1998-10-081-8/+9
| | | | | | | | | | | | | to convert the timeval into a tick count. Suggested by: bde Reviewed by: bde Handle hz > 1000 in BIOCGRTIMEOUT. Pointed out by: bde Reviewed by: bde Obtained from: OpenBSD
* Minor cleanup: kill a couple of unused variables, and a couple ofjoerg1998-10-061-3/+7
| | | | | | uninitialized variables. Obtained from: The isdn4bsd project (partially)
* In an attempt to reduce the huge number of differences between thejoerg1998-10-061-225/+337
| | | | | | | | | | | | | | | | | | | | | | | | | | FreeBSD repository version of this file and the isdn4bsd version, adopt those changes from the i4b version that make this file BSD-version independent. I attempted to avoid uglifying this file too much, thus deviated a little from the i4b version (and hope they will adopt the changes, too). The diffs mostly concentrate on: . #include differences between the systems . different callout handling between FreeBSD vs. Net/OpenBSD . interface naming (Net/OpenBSD store the ASCII name including the unit # in struct ifnet, FreeBSD only the name) . use of random() in FreeBSD vs. time-based pseudo-randomization in Net/OpenBSD (for loopback detection ad CHAP challenges -- i assume at least OpenBSD could also benefit from random(), but that's the way i've got this file) . interface address list elements are named a little differently between FreeBSD and Net/OpenBSD I attempted to segregate those compat fixes from other code fixes and enhancements. Obtained from: The isdn4bsd project
* Fix a =/== confusion that caused the CHAP type renegotiation tojoerg1998-10-051-2/+2
| | | | | | completely fail. Obtained from: The isdn4bsd project (original author unknown right now)
* The length argument for bcopy is a size_t, not u_int. Adjustalex1998-10-041-5/+5
| | | | bpf_mcopy() and catchpacket() prototypes accordingly.
* Change BPF_ALIGNMENT to long, necessary for correct alignment on Alpha.alex1998-10-041-2/+2
|
* Support hz > 1000 (Alpha) in BIOCSRTIMEOUT.alex1998-10-041-10/+5
| | | | Obtained from: OpenBSD
* fix an mbuf leak when using ipfw to filger bridged packetsluigi1998-09-181-2/+5
| | | | (from -stable, since this code is not yet active in -current)
* Add DLT_{SLIP,PPP}_BSDOS from libpcap 0.4fenner1998-09-151-1/+3
|
* Bring in files for bridging support.luigi1998-09-122-0/+753
|
* Yow! Completely change the way socket options are handled, eliminatingwollman1998-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.
* Implement DLT_RAW from libpcapache1998-08-182-2/+4
|
* Fixed printf format errors. sppp_dotted_quad() was yet another private,bde1998-08-171-9/+10
| | | | broken, version of inet_ntoa(). It should go away.
* Fixed yet more ioctl breakage due to the type of the `cmd' arg changingbde1998-08-152-7/+7
| | | | from int to u_long but not changing here.
* One-liner: add a call to the underlying device driver's SIOCDELMULTIwpaul1998-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.
* fix broken loopback code for ddp (again)julian1998-08-041-3/+6
| | | | Submitted by: Stefan Bethke <stb@hanse.de>
* update ATM driver. (base version: midway.c 1.67 --> 1.68)kjc1998-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.
* Make sure the link level sockaddr size is rounded up correctly on alpha.dfr1998-07-201-2/+2
|
* Cast pointers to uintptr_t/intptr_t instead of to u_long/long,bde1998-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.
* Don't attempt to optimize the space allocated for bpf headers ifbde1998-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.
* Make sure the packet is aligned correctly for the alpha in if_simloop.dfr1998-07-121-2/+13
|
* Fixed printf format errors.bde1998-07-111-3/+4
|
* Removed unused includes.bde1998-06-212-4/+2
|
* Zap what appears to be a relic of the older version of zlib. The otherpeter1998-06-201-5/+2
| | | | maintained mbuf based ppp-deflate.c's have removed this.
* Missing splx().peter1998-06-201-2/+4
|
* Merge ppp changes from 2.3.3 -> 2.3.5. I have spotted some morepeter1998-06-205-27/+17
| | | | problems, which I'll have a go at shortly.
* Oopsjulian1998-06-141-1/+2
| | | | | left a "break;" out of the last patch it complains for every loopback packet..
* Try narrow down the culprit sending undefined packet types through the loopbackjulian1998-06-143-8/+22
|
* Allow a protocol to specify that it does NOT want to be looped backjulian1998-06-131-3/+6
| | | | | even if it looks like it should (backwards compatibility with old broken code) should get rid of some annoying messags.
* Remove 3 occurances of __FUNCTION__julian1998-06-121-4/+3
|
* Go through the loopback code with a broom..julian1998-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 :-)
* Don't let ifunit() modify the string passed as an argument.julian1998-06-081-16/+26
| | | | it may be in the text segment and write protected.
* This commit fixes various 64bit portability problems required fordfr1998-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.
* Added a used include (in ifdefed code).bde1998-06-071-1/+3
|
* Fixed pedantic syntax errors caused by a trailing semicolon in a macrobde1998-06-071-2/+2
| | | | definition.
* Backed out last fix and fixed my typo:dg1998-05-211-2/+2
| | | | ipflow(fastforward -> ipflow_fastforward
* Add missing close parendufault1998-05-201-2/+2
|
* Added fast IP forwarding code by Matt Thomas <matt@3am-software.com> viadg1998-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.
* s/nanoruntime/nanouptime/gphk1998-05-171-2/+2
| | | | | | s/microruntime/microuptime/g Reviewed by: bde
* Fix an obvious parameter-order bogon. (Don't know what happened towollman1998-05-151-2/+2
| | | | the warning message before.)
* Oops, the previous commit should have changed `i386' to `__i386__',bde1998-05-011-3/+3
| | | | not `__i386'.
* Loopback network interface driver (net/if_loop.c) has no SIOCSIFFLAGSphk1998-04-301-1/+4
| | | | | | | | ioctl handler. PR: 6466 Reviewed by: phk Submitted by: Ruslan Ermilov <ru@ucb.crimea.ua>
* 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-173-6/+6
|
* Support compiling with `gcc -ansi'.bde1998-04-152-6/+6
|
* Use getmicrotime() for if_lastchange, 10msec is plenty precision.phk1998-04-064-15/+15
|
* Use random() for seq numbers and read_random for CHAP challenge.phk1998-04-061-6/+11
|
* Make read_random() take a (void *) argument instead of (char *)phk1998-04-061-4/+4
|
* Time changes mark 2:phk1998-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
OpenPOWER on IntegriCloud