summaryrefslogtreecommitdiffstats
path: root/sys/net/bpf.c
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* The length argument for bcopy is a size_t, not u_int. Adjustalex1998-10-041-5/+5
| | | | bpf_mcopy() and catchpacket() prototypes accordingly.
* Support hz > 1000 (Alpha) in BIOCSRTIMEOUT.alex1998-10-041-10/+5
| | | | Obtained from: OpenBSD
* Implement DLT_RAW from libpcapache1998-08-181-1/+2
|
* update ATM driver. (base version: midway.c 1.67 --> 1.68)kjc1998-07-291-1/+13
| | | | | | | | | | | | | | | | | | | | | | | 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.
* This commit fixes various 64bit portability problems required fordfr1998-06-071-2/+2
| | | | | | | | | | 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.
* Don't depend on "implicit int" or bloat the data section in thebde1998-02-201-2/+2
| | | | declaration of xxx_devsw_installed.
* Make all file-system (MFS, FFS, NFS, LFS, DEVFS) related option new-style.eivind1998-01-241-1/+4
| | | | | | | | 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.
* Removed unused #includes.bde1997-11-181-18/+6
| | | | | | Fixed nonblocking mode. It was per-device instead of per-file. This also fixes clobbering of bd_rtout by overloading it to hold a wrong version of the blocking flag. I hope nothing depends on the bugs.
* Allow interfaces to be attached to bpf at times other than boot.julian1997-10-031-2/+5
| | | | doing so without this patch leads to an infinite loop in the kernel.
* Fixed gratuitous ANSIisms.bde1997-09-161-3/+6
|
* select -> pollpeter1997-09-141-47/+15
| | | | Obtained from: NetBSD (I think)
* Added used #include - don't depend on <sys/mbuf.h> includingbde1997-09-021-1/+2
| | | | <sys/malloc.h> (unless we only use the bogusly shared M*WAIT flags).
* Don't include <sys/ioctl.h> in the kernel. Stage 6: includebde1997-03-241-2/+4
| | | | | | | <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-2/+2
| | | | | Fixed everything that depended on getting fcntl.h stuff from the wrong place. Most things don't depend on file.h stuff at all.
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Correctly account for header length in m_pkthdr.len when sendingwollman1997-01-081-1/+2
| | | | | | packets through BPF. Submitted by: seki@sysrap.cs.fujitsu.co.jp in PR#2415
* Changed some memcpy()'s back to bcopy()'s.bde1996-06-081-2/+2
| | | | | | | gcc only inlines memcpy()'s whose count is constant and didn't inline these. I want memcpy() in the kernel go away so that it's obvious that it doesn't need to be optimized. Now it is only used for one struct copy in si.c.
* Fix bug in bpf_ifname() where the unit didn't get added correctly to thedg1996-06-081-1/+2
| | | | | | | | name string. This function should be rewritten to deal with more than 10 units of a given type. Pointed out by: jmf@free-gate.com (Jean-Marc Frailong) (I fixed it slightly differently)
* Removed now-unused #includes of <machine/cpu.h>. They were for bootverbosebde1996-04-071-2/+1
| | | | being declared in the wrong place.
* Using devfs_add_devswf() instead of devfs_add_devsw()scrappy1996-03-281-6/+9
| | | | Reviewed by: julian@freebsd.org
* Clean up Ethernet drivers:wollman1996-02-061-42/+18
| | | | | | | | - 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
* Another mega commit to staticize things.phk1995-12-141-18/+9
|
* Julian forgot to make the *devsw structures static.phk1995-12-081-2/+2
|
* Pass 3 of the great devsw changesjulian1995-12-081-27/+32
| | | | | | | | | | | | | | | | | | | | | | | 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.. :)
* Replaced #includes of <sys/user.h> by less gross headers, usuallybde1995-12-061-2/+2
| | | | | | | <sys/vm.h>. Many device drivers need only the definition of vtophys() from vm. Added nearby #includes of <sys/conf.h> where appropriate.
* Completed function declarations and/or added prototypes.bde1995-12-021-1/+4
|
* If you're going to mechanically replicate something in 50 filesjulian1995-11-291-2/+2
| | | | it's best to not have a (compiles cleanly) typo in it! (sigh)
* OK, that's it..julian1995-11-291-1/+43
| | | | | | | | | | | | | | | | | | | | | | | | 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)
* Fix #includes.phk1995-11-201-2/+3
|
* Fix BPf to generate a header mbuf for writes.wollman1995-09-221-39/+5
| | | | | | | | Fix loopback and discard interfaces to understand BPF writes. (These two from Bill Fenner to fix PR 512.) Move ifpromisc() from bpf.c to if.c as suggested by comment in BPF. Send a notice to the log when promiscuous mode is enabled.
* Only print `bpf: foo0 attached' if bootverbose.wollman1995-09-201-33/+4
|
* Fix benign type mismatches in devsw functions. 82 out of 299 devswbde1995-09-081-9/+16
| | | | functions were wrong.
* Fix panic("ifpromisc failed") when shutting down a bpf tap when the attachedpeter1995-07-311-7/+7
| | | | | | | | interface is no longer IFF_UP. The test for IFF_UP in ifpromisc is only useful while enabling IFF_PROMISC and the higher levels of the bpf code do not allow for the possibility of failure while shutting down. This is a trivial change. Also, fixes PR#522.
* Don't include <sys/tty.h> in drivers that aren't tty drivers or in generalbde1995-07-161-2/+1
| | | | files that don't depend on the internals of <sys/tty.h>
* Give the BPF the ability to generate signals when a packet is available.pst1995-06-151-3/+57
| | | | | Reviewed by: pst & wollman Submitted by: grossman@cygnus.com
* Remove trailing whitespace.rgrimes1995-05-301-2/+2
|
* Replaced some bcopy()'s with memcpy()'s so that gcc while inline/optimize.dg1995-05-091-2/+2
|
* Added support for generic FDDI and the DEC DEFEA and DEFPA FDDI adapters.dg1995-03-141-1/+6
| | | | Submitted by: Matt Thomas
* Got rid of map.h. It's a leftover from the rmap code, and we use rlists.dg1994-10-091-2/+1
| | | | Changed swapmap into swaplist.
* 1) cleaned up after Garrett - fixed more redundant declarations, changeddg1994-08-201-5/+1
| | | | | | | | use of timeout_t -> timeout_func_t in aha1542 and aha1742 drivers. 2) fix a bug in the portalfs that was uncovered by better prototyping - specifically, the time must be converted from timeval to timespec before storing in va_atime. 3) fixed/added some miscellaneous prototypes
* Added $Id$dg1994-08-021-2/+1
|
* BSD 4.4 Lite Kernel Sourcesrgrimes1994-05-241-0/+1316
OpenPOWER on IntegriCloud