summaryrefslogtreecommitdiffstats
path: root/sys/net/if_fddisubr.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-5/+5
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* network interface and link layer changes:sam2002-11-151-9/+16
| | | | | | | | | | | | 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
* Use if_printf(ifp, "blah") instead ofbrooks2002-10-211-2/+1
| | | | printf("%s%d: blah", ifp->if_name, ifp->if_xname).
* When a packet is sent via a FDDI interface, perform appropriate MACrwatson2002-10-201-0/+12
| | | | | | | | | transmission checks; when it is received, label the packet appropriately. Although we don't have a local FDDI setup to test this with, the labeling and checks are identical to other interface classes. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Fix some harmless mis-indents.phk2002-10-011-1/+1
| | | | Spotted by: FlexeLint
* - Merge the pdq driver (if_fpa and if_fea) from NetBSD.mdodd2002-03-291-3/+10
| | | | | Among other things this gets us ifmedia support. - Update fddi_ifattach() to take an additional argument.
* - Define fddibroadcastaddr in if_fddisubr.c.mdodd2002-03-291-0/+99
| | | | - Add fddi_ifdetach() and fddi_ioctl().
* - Use ifp->if_broadcastaddr when possible.mdodd2002-03-291-4/+2
| | | | - Remove unnecessary preprocessor conditional.
* - Add a comment.mdodd2002-03-291-2/+4
| | | | | - Whitespace. - Remove forgotten duplicate assignments in fddi_ifattach().
* - Update interface statistics on error conditions.mdodd2002-03-291-13/+50
| | | | | | | - Make sure the interface is UP and RUNNING in fddi_input(). - Reorder and comment packet tests in fddi_input(). - Call if_attach() in fddi_ifattach(). - Test for a valid return from ifaddr_byindex().
* - Whitespace changes.mdodd2002-03-291-8/+17
| | | | | | - Formatting. - Use macro, not magic numbers. - Move a dropanyway label in fddi_input() to end of function.
* Back a small part of the last patch.mdodd2002-03-291-3/+3
|
* - Simplify first arg of nd6_storelladdr().mdodd2002-03-291-15/+29
| | | | | | | - Use struct fddi_header where appropriate. - Use bcopy() rather than memcpy(). - Use FDDI_ADDR_LEN macro instead of ETHER_ADDR_LEN macro. - Add loadable module support.
* - Use net/fddi.h rather than netinet/if_fddi.h.mdodd2002-03-291-21/+21
| | | | | | - Use FDDI_ADDR_LEN rather than a magic number or a sizeof(). - Hide distracting sizeof() behind FDDI_HDR_LEN macro. - Don't use sizeof(struct llc) in areas where we mean LLC_SNAPFRAMELEN.
* Remove unnecessary LLC defines and use the standard ones.mdodd2002-03-291-16/+6
|
* - style(9) fixes for 'return'.mdodd2002-03-291-22/+21
| | | | | - retire RTALLOC1 and ARPRESOLVE macros. - use IFP2AC to hide discracting casts.
* Un-ifdef.mdodd2002-03-291-37/+0
|
* De-register.mdodd2002-03-291-10/+10
|
* Fixed some style bugs in the removal of __P(()). The main ones werebde2002-03-241-1/+1
| | | | | | not removing tabs before "__P((", and not outdenting continuation lines to preserve non-KNF lining up of code with parentheses. Switch to KNF formatting and/or rewrap the whole prototype in some cases.
* Remove __P.alfred2002-03-191-2/+2
|
* bring in ARP support for variable length link level addressesfjoe2001-10-141-1/+2
| | | | | | | Reviewed by: jdp Approved by: jdp Obtained from: NetBSD MFC after: 6 weeks
* Wrap array accesses in macros, which also happen to be lvalues:jlemon2001-09-061-1/+1
| | | | | | | ifnet_addrs[i - 1] -> ifaddr_byindex(i) ifindex2ifnet[i] -> ifnet_byindex(i) This is intended to ease the conversion to SMPng.
* Do not perform arp send/resolve on an interface marked NOARP.jlemon2001-06-151-5/+2
| | | | | PR: 25006 MFC after: 2 weeks
* Plug several mbuf leaks in error cases (in nd6)bmilekic2001-03-111-2/+1
| | | | Submitted by: jhay
* Mechanical change to use <sys/queue.h> macro API instead ofphk2001-02-041-1/+1
| | | | | | | fondling implementation details. Created with: sed(1) Reviewed by: md5(1)
* Use <sys/queue.h> macro api rather than fondle its implementation detals.phk2001-02-031-1/+1
| | | | | Created with: /usr/bin/sed Reviewed by: /sbin/md5
* * Rename M_WAIT mbuf subsystem flag to M_TRYWAIT.bmilekic2000-12-211-1/+1
| | | | | | | | | | | | | | | | | | 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.
* Lock down the network interface queues. The queue mutex must be obtainedjlemon2000-11-251-25/+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.
* Make compilable. if_fddisubr.c depended on sys/malloc.h by myume2000-11-041-0/+1
| | | | | | previous commit. Reported by: Jim Bryant <jbryant@A010-0935.KSCY.splitrock.net>
* IPv6 was not work on FDDI.ume2000-11-011-0/+87
| | | | | | Reported by: Akihiro IIJIMA <aki@noc.titech.ac.jp> Submitted by: JINMEI Tatuya <jinmei@isl.rdc.toshiba.co.jp> Reviewed by: Akihiro IIJIMA <aki@noc.titech.ac.jp>
* Do not perform any opeartion with mbuf after it placed intobp2000-06-141-2/+2
| | | | | | interface queue. Tested by: Bosko Milekic <bmilekic@dsuper.net>
* Just need to pass the address family to if_simloop(), not the whole sockaddr.archie2000-05-241-2/+2
|
* Clean up some loose ends in the network code, including the X.25 and ISOpeter2000-02-131-159/+0
| | | | | | | #ifdefs. Clean out unused netisr's and leftover netisr linker set gunk. Tested on x86 and alpha, including world. Approved by: jkh
* M_PREPEND-related cleanups (unregisterifying struct mbuf *s).green1999-12-191-3/+2
|
* udp IPv6 support, IPv6/IPv4 tunneling support in kernel,shin1999-12-071-2/+22
| | | | | | | | | | 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
* Implement pseudo_AF_HDRCMPLT, which controls the state of the 'headermsmith1999-10-151-5/+17
| | | | | | | | | | completion' flag. If set, the interface output routine will assume that the packet already has a valid link-level source address. This defaults to off (the address is overwritten) PR: kern/10680 Submitted by: "Christopher N . Harrell" <cnh@mindspring.net> Obtained from: NetBSD
* Remove NBPF conditionality of bpf calls in most of our network drivers.phk1999-09-251-4/+0
| | | | | | | | | | | | 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
|
* Rename bpfilter to bpf.des1999-07-061-3/+3
|
* Fix warnings in preparation for adding -Wall -Wcast-qual to thedillon1999-01-271-3/+3
| | | | kernel compile
* Removed unused includes.bde1998-06-211-2/+1
|
* Try narrow down the culprit sending undefined packet types through the loopbackjulian1998-06-141-2/+4
|
* Go through the loopback code with a broom..julian1998-06-121-60/+30
| | | | | | | | | | | | | | | | 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 :-)
* 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-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-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "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
* Removed unused #includes.bde1998-02-201-3/+1
|
* NETATALK -> opt_atalk.heivind1998-01-091-1/+2
|
* Make INET a proper option.eivind1998-01-081-2/+5
| | | | | | | | | | | | 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>.
OpenPOWER on IntegriCloud