summaryrefslogtreecommitdiffstats
path: root/sys/net/if_loop.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Lock down the network interface queues. The queue mutex must be obtainedjlemon2000-11-251-17/+9
| | | | | | | | | | | | | | 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.
* o Add missing "\n" to warning output in netinet/if_loop.c, when anrwatson2000-09-041-1/+1
| | | | | | | | | unsupported address family is used on localhost interface. looutput: af=0 unexpected Speculation as to the reasons for my seeing this error are welcome, of course. :-)
* sync with kame tree as of july00. tons of bug fixes/improvements.itojun2000-07-041-1/+1
| | | | | | | API changes: - additional IPv6 ioctls - IPsec PF_KEY API was changed, it is mandatory to upgrade setkey(8). (also syntax change)
* fix KASSERT usagemjacob2000-06-021-1/+1
|
* Rather than checking for hlen causing misalignment, we should do thegallatin2000-05-261-7/+9
| | | | | | | | | | | | m_adj() and then check the resulting mbuf for misalignment, copying backwards to align the mbuf if required. This fixes a longstanding problem where an mbuf which would have been properly aligned after an m_adj() was being misaligned and causing an unaligned access trap in ip_input(). This bug only triggered when booting diskless. Reviewed by: dfr
* Just need to pass the address family to if_simloop(), not the whole sockaddr.archie2000-05-241-10/+12
|
* Clean up some loose ends in the network code, including the X.25 and ISOpeter2000-02-131-12/+0
| | | | | | | #ifdefs. Clean out unused netisr's and leftover netisr linker set gunk. Tested on x86 and alpha, including world. Approved by: jkh
* Remove some #if NFOO > 0 that are always true because of config rules.peter2000-01-291-2/+0
|
* udp IPv6 support, IPv6/IPv4 tunneling support in kernel,shin1999-12-071-4/+5
| | | | | | | | | | packet divert at kernel for IPv6/IPv4 translater daemon This includes queue related patch submitted by jburkhol@home.com. Submitted by: queue related patch from jburkhol@home.com Reviewed by: freebsd-arch, cvs-committers Obtained from: KAME project
* KAME netinet6 basic part(no IPsec,no V6 Multicast Forwarding, no UDP/TCPshin1999-11-221-1/+52
| | | | | | | | | | for IPv6 yet) With this patch, you can assigne IPv6 addr automatically, and can reply to IPv6 ping. Reviewed by: freebsd-arch, cvs-committers Obtained from: KAME project
* Remove NBPF conditionality of bpf calls in most of our network drivers.phk1999-09-251-22/+11
| | | | | | | | | | | | 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.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Back out redundant checksbrian1999-08-061-5/+2
| | | | Pointed out by: bde
* Define IF_MAXMTU and IF_MINMTU and don't allow MTUs withbrian1999-08-061-2/+5
| | | | | | | | | out-of-range values. ``comparison is always 0'' warnings are silly ! Ok'd by: wollman, dg Advised by: bde
* Rename bpfilter to bpf.des1999-07-061-5/+5
|
* Set ifq_maxlen.dt1999-02-201-1/+2
|
* Make sure the packet is aligned correctly for the alpha in if_simloop.dfr1998-07-121-2/+13
|
* 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-141-1/+14
|
* Remove 3 occurances of __FUNCTION__julian1998-06-121-4/+3
|
* Go through the loopback code with a broom..julian1998-06-121-27/+62
| | | | | | | | | | | | | | | | 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 :-)
* This commit fixes various 64bit portability problems required fordfr1998-06-071-3/+3
| | | | | | | | | | 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.
* 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>
* NETATALK -> opt_atalk.heivind1998-01-091-1/+2
|
* Make INET a proper option.eivind1998-01-081-1/+2
| | | | | | | | | | | | This will not make any of object files that LINT create change; there might be differences with INET disabled, but hardly anything compiled before without INET anyway. Now the 'obvious' things will give a proper error if compiled without inet - ipx_ip, ipfw, tcp_debug. The only thing that _should_ work (but can't be made to compile reasonably easily) is sppp :-( This commit move struct arpcom from <netinet/if_ether.h> to <net/if_arp.h>.
* Throw options IPX, IPXIP and IPTUNNEL into opt_ipx.h.eivind1997-12-151-1/+3
| | | | | | | | The #ifdef IPXIP in netipx/ipx_if.h is OK (used from ipx_usrreq.c and ifconfig.c only). I also fixed a typo IPXTUNNEL -> IPTUNNEL (and #ifdef'ed out the code inside, as it never could have compiled - doh.)
* Removed unused #includes.bde1997-08-021-6/+1
|
* Don't include <sys/ioctl.h> in the kernel. Stage 2: includebde1997-03-241-2/+2
| | | | <sys/sockio.h> instead of <sys/ioctl.h> in network files.
* 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.
* Use queue macros for the list of interfaces. Next stop: ifaddrs!wollman1996-12-111-4/+1
|
* Set IFF_RUNNING on the loopback interface.wollman1996-06-191-2/+2
|
* Change the use if ifnet.if_lastchange to be more in line withgpalmer1996-06-101-2/+1
| | | | | SNMP requirements. Update description of ifnet.if_lastchange in if.h to indicate this.
* Obtained from: netatalk distribution netatalk@itd.umich.edujulian1996-05-241-1/+13
| | | | | | | Kernel Appletalk protocol support both CAP and netatalk can make use of this.. still needs some owrk but it seemd the right tiime to commit it so other can experiment.
* Removed never-used #includes of <machine/cpu.h>. Many were apparentlybde1996-04-071-2/+1
| | | | copied from bad examples.
* Clean up Ethernet drivers:wollman1996-02-061-3/+3
| | | | | | | | - 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
* Make me feel a little better by filling in reasonable values for rmx_sendpipewollman1996-02-051-6/+12
| | | | | | and rmx_recvpipe. This has no demonstrable effect on performance. (ttcp reports about 44 Mbit/s for all the buffer sizes I tried between 16384 and 65536.)
* Staticize, clean lint.phk1995-12-091-3/+6
|
* Finished (?) cleaning up sysinit stuff.bde1995-12-021-3/+3
|
* Reviewed by: julian and jhay@mikom.csir.co.zajulian1995-10-261-1/+12
| | | | | | | | | | | | | | | | | | | | | Submitted by: Mike Mitchell, supervisor@alb.asctmd.com This is a bulk mport of Mike's IPX/SPX protocol stacks and all the related gunf that goes with it.. it is not guaranteed to work 100% correctly at this time but as we had several people trying to work on it I figured it would be better to get it checked in so they could all get teh same thing to work on.. Mikes been using it for a year or so but on 2.0 more changes and stuff will be merged in from other developers now that this is in. Mike Mitchell, Network Engineer AMTECH Systems Corporation, Technology and Manufacturing 8600 Jefferson Street, Albuquerque, New Mexico 87113 (505) 856-8000 supervisor@alb.asctmd.com
* Fix BPf to generate a header mbuf for writes.wollman1995-09-221-1/+9
| | | | | | | | 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.
* Fixed init functions argument type - caddr_t -> void *. Fixed a couple ofdg1995-09-091-3/+3
| | | | compiler warnings.
* Fix several sysinit functions that had the wrong type and unnecessarilybde1995-08-301-5/+7
| | | | | | external linkage. Remove useless comments saying that SYSINIT() does system initialization.
* Remove trailing whitespace.rgrimes1995-05-301-2/+2
|
* Cleanup loopback interface support.pst1995-04-261-16/+24
| | | | Reviewed by: wollman
* Support for pseudo-device LKMs. Note that this is restricted to onlywollman1995-03-201-2/+2
| | | | | one pseudo per module (a restriction which will eventually be lifted) and isthus not in its final form.
* Reduced loopback MTU to 16k to work around a miriad of problems with itdg1995-03-041-2/+2
| | | | | set near or above 32k (likely caused by 16bit signed word overflow). 16k actually (surprizingly) has higher performance than other values I tested.
* Added ioctl support for SIOCSIFMTU.dg1994-08-081-3/+6
|
* Added $Id$dg1994-08-021-0/+1
|
* Reduced loopback MTU from 65535 to 65532 because some things like NFSdg1994-08-011-1/+1
| | | | really like it to be rounded to a longword.
OpenPOWER on IntegriCloud