aboutsummaryrefslogtreecommitdiff
path: root/sys/net/if_ef.c
Commit message (Collapse)AuthorAgeFilesLines
* Introduce ip_fastforward and remove ip_flow.Andre Oppermann2003-11-141-1/+1
| | | | | | | | | | | | | | | | | | Short description of ip_fastforward: o adds full direct process-to-completion IPv4 forwarding code o handles ip fragmentation incl. hw support (ip_flow did not) o sends icmp needfrag to source if DF is set (ip_flow did not) o supports ipfw and ipfilter (ip_flow did not) o supports divert, ipfw fwd and ipfilter nat (ip_flow did not) o returns anything it can't handle back to normal ip_input Enable with sysctl -w net.inet.ip.fastforwarding=1 Reviewed by: sam (mentor) Notes: svn path=/head/; revision=122702
* Replace the if_name and if_unit members of struct ifnet with new membersBrooks Davis2003-10-311-13/+13
| | | | | | | | | | | | | | | | if_xname, if_dname, and if_dunit. if_xname is the name of the interface and if_dname/unit are the driver name and instance. This change paves the way for interface renaming and enhanced pseudo device creation and configuration symantics. Approved By: re (in principle) Reviewed By: njl, imp Tested On: i386, amd64, sparc64 Obtained From: NetBSD (if_xname) Notes: svn path=/head/; revision=121816
* Remove break after return.Poul-Henning Kamp2003-05-311-3/+0
| | | | | | | Found by: FlexeLint Notes: svn path=/head/; revision=115534
* Update netisr handling; Each SWI now registers its queue, and all queueJonathan Lemon2003-03-041-49/+46
| | | | | | | | | | | | | drain routines are done by swi_net, which allows for better queue control at some future point. Packets may also be directly dispatched to a netisr instead of queued, this may be of interest at some installations, but currently defaults to off. Reviewed by: hsu, silby, jayanth, sam Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=111888
* sizeof(struct llc) -> LLC_SNAPFRAMELENMatthew N. Dodd2003-03-031-1/+1
| | | | | | | | sizeof(struct ether_header) -> ETHER_HDR_LEN sizeof(struct fddi_header) -> FDDI_HDR_LEN Notes: svn path=/head/; revision=111790
* Back out M_* changes, per decision of the TRB.Warner Losh2003-02-191-5/+5
| | | | | | | Approved by: trb Notes: svn path=/head/; revision=111119
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.Alfred Perlstein2003-01-211-5/+5
| | | | | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT. Notes: svn path=/head/; revision=109623
* SMP locking for ifnet list.Jeffrey Hsu2002-12-221-1/+4
| | | | Notes: svn path=/head/; revision=108172
* network interface and link layer changes:Sam Leffler2002-11-151-20/+11
| | | | | | | | | | | | | | | o on input don't strip the Ethernet header from packets o input packet handling is now done with if_input o track changes to ether_ifattach/ether_ifdetach API o track changes to bpf tapping o call ether_ioctl for default handling of ioctl's o use constants from net/ethernet.h where possible Reviewed by: many Approved by: re Notes: svn path=/head/; revision=106939
* Fix warning; remove unused arg that was passed through uninitialized.Peter Wemm2002-05-241-2/+2
| | | | Notes: svn path=/head/; revision=97220
* Swap a bzero for an M_ZERO. Borris approved this ages ago, butDavid Malone2002-04-101-2/+1
| | | | | | | | | | the hard drive with the patch on it went south before I committed it. Approved by: bp Notes: svn path=/head/; revision=94385
* Update to C99, s/__FUNCTION__/__func__/,David E. O'Brien2001-12-101-2/+2
| | | | | | | also don't use ANSI string concatenation. Notes: svn path=/head/; revision=87599
* Wrap array accesses in macros, which also happen to be lvalues:Jonathan Lemon2001-09-061-2/+2
| | | | | | | | | | ifnet_addrs[i - 1] -> ifaddr_byindex(i) ifindex2ifnet[i] -> ifnet_byindex(i) This is intended to ease the conversion to SMPng. Notes: svn path=/head/; revision=83130
* Another round of the <sys/queue.h> FOREACH transmogriffer.Poul-Henning Kamp2001-02-041-2/+1
| | | | | | | | Created with: sed(1) Reviewed by: md5(1) Notes: svn path=/head/; revision=72012
* Mechanical change to use <sys/queue.h> macro API instead ofPoul-Henning Kamp2001-02-041-1/+1
| | | | | | | | | | fondling implementation details. Created with: sed(1) Reviewed by: md5(1) Notes: svn path=/head/; revision=71999
* Use <sys/queue.h> macro api rather than fondle its implementation detals.Poul-Henning Kamp2001-02-031-3/+3
| | | | | | | | Created with: /usr/bin/sed Reviewed by: /sbin/md5 Notes: svn path=/head/; revision=71959
* Fix breakage caused by incomplete transition to IF_HANDOFF().Boris Popov2001-02-011-2/+2
| | | | | | | Remove unused variable. Notes: svn path=/head/; revision=71891
* * Rename M_WAIT mbuf subsystem flag to M_TRYWAIT.Bosko Milekic2000-12-211-2/+2
| | | | | | | | | | | | | | | | | | | | | This is because calls with M_WAIT (now M_TRYWAIT) may not wait forever when nothing is available for allocation, and may end up returning NULL. Hopefully we now communicate more of the right thing to developers and make it very clear that it's necessary to check whether calls with M_(TRY)WAIT also resulted in a failed allocation. M_TRYWAIT basically means "try harder, block if necessary, but don't necessarily wait forever." The time spent blocking is tunable with the kern.ipc.mbuf_wait sysctl. M_WAIT is now deprecated but still defined for the next little while. * Fix a typo in a comment in mbuf.h * Fix some code that was actually passing the mbuf subsystem's M_WAIT to malloc(). Made it pass M_WAITOK instead. If we were ever to redefine the value of the M_WAIT flag, this could have became a big problem. Notes: svn path=/head/; revision=70254
* Convert more malloc+bzero to malloc+M_ZERO.David Malone2000-12-081-2/+2
| | | | | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net> Notes: svn path=/head/; revision=69781
* Lock down the network interface queues. The queue mutex must be obtainedJonathan Lemon2000-11-251-15/+3
| | | | | | | | | | | | | | | | | before adding/removing packets from the queue. Also, the if_obytes and if_omcasts fields should only be manipulated under protection of the mutex. IF_ENQUEUE, IF_PREPEND, and IF_DEQUEUE perform all necessary locking on the queue. An IF_LOCK macro is provided, as well as the old (mutex-less) versions of the macros in the form _IF_ENQUEUE, _IF_QFULL, for code which needs them, but their use is discouraged. Two new macros are introduced: IF_DRAIN() to drain a queue, and IF_HANDOFF, which takes care of locking/enqueue, and also statistics updating/start if necessary. Notes: svn path=/head/; revision=69152
* Properly setup link level header length for 802.2 and SNAP frames.Boris Popov2000-09-301-4/+7
| | | | Notes: svn path=/head/; revision=66479
* Make all Ethernet drivers attach using ether_ifattach() and detach usingArchie Cobbs2000-07-131-3/+1
| | | | | | | | | | | | ether_ifdetach(). The former consolidates the operations of if_attach(), ng_ether_attach(), and bpfattach(). The latter consolidates the corresponding detach operations. Reviewed by: julian, freebsd-net Notes: svn path=/head/; revision=63090
* Back out the previous change to the queue(3) interface.Jake Burkholder2000-05-261-2/+2
| | | | | | | | | It was not discussed and should probably not happen. Requested by: msmith and others Notes: svn path=/head/; revision=60938
* Change the way that the queue(3) structures are declared; don't assume thatJake Burkholder2000-05-231-2/+2
| | | | | | | | | | | the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd Notes: svn path=/head/; revision=60833
* Fix support for 802.2 and SNAP frames. Bug was introduced duringBoris Popov2000-04-271-19/+49
| | | | | | | | | initial import. Tested by: Jorge P Vasquez <jorge@acron.ind.br> Notes: svn path=/head/; revision=59681
* Allow if_ef driver to be compiled into kernel.Boris Popov2000-01-231-0/+1
| | | | Notes: svn path=/head/; revision=56424
* Bring up an if_ef driver which allows support for four ethernetBoris Popov1999-12-131-0/+595
frame types. Currently it supports only IPX protocol and doesn't affect existing functionality when not loaded. Reviewed by: Ollivier Robert <roberto@keltia.freenix.fr> Notes: svn path=/head/; revision=54558