summaryrefslogtreecommitdiffstats
path: root/sys/net/if_ethersubr.c
Commit message (Collapse)AuthorAgeFilesLines
* fix broken loopback code for ddp (again)julian1998-08-041-3/+6
| | | | Submitted by: Stefan Bethke <stb@hanse.de>
* Try narrow down the culprit sending undefined packet types through the loopbackjulian1998-06-141-5/+4
|
* 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.
* Go through the loopback code with a broom..julian1998-06-121-97/+35
| | | | | | | | | | | | | | | | 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 :-)
* Added fast IP forwarding code by Matt Thomas <matt@3am-software.com> viadg1998-05-191-1/+3
| | | | | | | | | | | | 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.
* Eradicate the variable "time" from the kernel, using various measures.phk1998-03-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "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
* Add preliminary support for IEEE 802.1Q VLAN tagging. It doesn't actuallywollman1998-03-181-9/+24
| | | | | | | | work reliably yet (I've had panics), but it does seem to occasionally be able to transmit and receive syntactically-correct packets. Also fixes one of if_ethersubr.c's legion style bugs, and removes the hostcache code from standard kernels---the code that depends on it is not going to happen any time soon, I'm afraid.
* Removed unused #includes.bde1998-02-201-4/+1
|
* Make the debug options new-style.eivind1998-01-311-2/+2
| | | | | This also zaps a DPT option from lint; it wasn't referenced from anywhere.
* NETATALK -> opt_atalk.heivind1998-01-091-1/+2
|
* Make INET a proper option.eivind1998-01-081-2/+6
| | | | | | | | | | | | 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>.
* Fixed gratuitous ANSIisms.bde1997-12-201-2/+5
|
* 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.)
* Remove a bunch of variables which were unused both in GENERIC and LINT.phk1997-11-071-5/+4
| | | | Found by: -Wunused
* Fix various problems with netatalk kernel support.julian1997-10-291-14/+39
| | | | | | | | Some of these changes are a bit rough and will become more polished later. the changes to if_ethersubr should largely be moved to within the appletalk code, but that will happen later. A few of these were related to network-byteorder problems, and more were related to loopback failures.
* Removed unused #includes.bde1997-10-281-5/+1
|
* Finally track down the reason for some of my occasional kernel crashes.julian1997-07-151-1/+4
| | | | | | | Route(1) has a bug that sends a bad message to the kernel. The kernel trusts it and crashes. Add some sanity checks so that we don't trust the user quite as much any more. (also add a comment in if_ethersubr.c)
* Use the MAC address of an interface for the host part of an IPX addressjhay1997-05-101-3/+15
| | | | | | and not the MAC address of the first interface for every IPX address. This is more inline with the way others like Novell do it. Originally Submitted by: "Serge A. Babkin" <babkin@hq.icb.chel.su>
* 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 the new if_multiaddrs list for multicast addresses rather than thewollman1997-01-131-183/+1
| | | | | | | previous hackery involving struct in_ifaddr and arpcom. Get rid of the abominable multi_kludge. Update all network interfaces to use the new machanism. Distressingly few Ethernet drivers program the multicast filter properly (assuming the hardware has one, which it usually does).
* Checkpoint the beginnings of the new kernel interface forwollman1997-01-071-1/+52
| | | | | | | multicast group memberships. This is not actually operative at the moment (a lot of other code still needs to be changed), but this seemed like a useful reference point to check in so that others (i.e. Bill Fenner) have fair warning of where we are going.
* Convert the interface address and IP interface address structureswollman1996-12-131-11/+11
| | | | | | to TAILQs. Fix places which referenced these for no good reason that I can see (the references remain, but were fixed to compile again; they are still questionable).
* 1) Implement SIOCSIFMTU in ether_ioctl(), and change ether_ioctl's returndg1996-12-101-3/+15
| | | | | | | | | type to be int so that errors can be returned. 2) Use the new SIOCSIFMTU ether_ioctl support in the few drivers that are using ether_ioctl(). 3) In if_fxp.c: treat if_bpf as a token, not as a pointer. Don't bother testing for FXP_NTXSEG being reached in fxp_start()...just check for non-NULL 'm'. Change fxp_ioctl() to use ether_ioctl().
* Fixed broken SIOCGIFADDR. It was copying out garbage as the ethernetdg1996-11-181-2/+2
| | | | address.
* ns_nettype should be declared, not externed.jkh1996-10-181-2/+2
|
* Netcon's changes for their extended NS support. This only effectsjkh1996-10-171-11/+72
| | | | people compiling with NS, so the effects on everyone else are nil.
* use <net/ethernet.h>phk1996-08-051-1/+2
|
* Make the NS and IPX cases compile again.phk1996-08-041-7/+10
|
* Add a callback pointer to the interfaces "init" routine.phk1996-08-041-1/+85
| | | | | Add ether_ioctl() which can take care of the SIOC[SG]IFADDR cases for most (ethernet) drivers.
* Submitted by: archie@whistle.comjulian1996-06-191-2/+2
| | | | | | gary went a little overboard on commenting out unused variables. Variables needed for ISO, LLC and NETATALK were only enabled for ISO & LLC.. so NETATALK bombed.
* Keep ether_type in network order for BPF to be consistent with otherdg1996-06-131-9/+8
| | | | | | | systems. Submitted by: Ted Lemon, Matt Thomas, and others. Retrofitted for -current by me.
* Clean up -Wunused warnings.gpalmer1996-06-121-2/+4
| | | | Reviewed by: bde
* Change the use if ifnet.if_lastchange to be more in line withgpalmer1996-06-101-6/+4
| | | | | SNMP requirements. Update description of ifnet.if_lastchange in if.h to indicate this.
* Set ifnet.baudrate for ethernet / FDDI interfaces too. Makesgpalmer1996-06-011-1/+3
| | | | | | SNMP slightly more informative Reviewed by: Garrett Wollman
* Obtained from: netatalk distribution netatalk@itd.umich.edujulian1996-05-241-6/+98
| | | | | | | 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-3/+1
| | | | copied from bad examples.
* Use new printf features rather than local kludges.phk1996-01-241-22/+1
|
* in_proto.c: spell ``Internet'' right and put whitespace after commas.wollman1995-12-201-1/+4
| | | | | | | | others: start to populate the link-layer branch of the net mib, by moving ARP to its proper place. (ARP is not a protocol family, it's an interface layer between a medium-access layer and a protocol family.) sysctl(8) needs to be taught about the structure of this branch, unless Poul-Henning implements dynamic MIB exploration soon.
* Staticize, clean lint.phk1995-12-091-5/+9
|
* Second batch of cleanup changes.phk1995-10-291-2/+1
| | | | | This time mostly making a lot of things static and some unused variables here and there.
* Reviewed by: julian and jhay@mikom.csir.co.zajulian1995-10-261-2/+24
| | | | | | | | | | | | | | | | | | | | | 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
* Merge RELENG_2_0_5 into HEADrgrimes1995-06-111-1/+11
|
* Remove trailing whitespace.rgrimes1995-05-301-10/+10
|
* Replaced some bcopy()'s with memcpy()'s so that gcc while inline/optimize.dg1995-05-091-5/+5
|
* Add and move declarations to fix all of the warnings from `gcc -Wimplicit'bde1995-03-161-2/+1
| | | | | | (except in netccitt, netiso and netns) and most of the warnings from `gcc -Wnested-externs'. Fix all the bugs found. There were no serious ones.
* Add support for two separate cloning flags, one set by the lower layers,wollman1994-12-131-3/+4
| | | | | | | | | | | | | | | | | and one set by the protocol family. Also add another parameter to rtalloc1() to allow for any interface flags to be ignored; currently this is only useful for RTF_PRCLONING. Get rid of rt_prflags and re-unite with rt_flags. Add T/TCP ``route metrics''. NB: YOU MUST RECOMPILE `route' AND OTHER RELATED PROGRAMS AS A RESULT OF THIS CHANGE. This also adds a new interface parameter, `ifi_physical', which will eventually replace IFF_ALTPHYS as the mechanism for specifying the particular physical connection desired on a multiple-connection card. NB: YOU MUST RECOMPILE `ifconfig' AND OTHER RELATED PROGRAMS AS A RESULT OF THIS CHANGE.
* Moved conversion of ether_type to host byte order out of ethernet driversdg1994-11-241-8/+11
| | | | | | and into ether_input(). It was silly to have bpf want this one way and ether_input want it another way. Ripped out trailer support from the few remaining drivers that still had it.
* Fix a bug which caused panics when attempting to change just the flags ofwollman1994-10-111-2/+2
| | | | | | | | a route. (This still doesn't work, but it doesn't panic now.) It looks like there may be a number of incipient bugs in this code. Also, get ready for the time when all IP gateway routes are cloning, which is necessary to keep proper TCP statistics.
OpenPOWER on IntegriCloud