summaryrefslogtreecommitdiffstats
path: root/sys/net/if_faith.c
Commit message (Collapse)AuthorAgeFilesLines
* add missing #include <sys/module.h>phk2004-05-301-0/+1
|
* Staticize <if>_clone_{create,destroy} functions.brooks2004-04-141-4/+4
| | | | Reviewed by: mlaier
* Remove advertising clause from University of California Regent'simp2004-04-071-4/+0
| | | | | | | license, per letter dated July 22, 1999 and email from Peter Wemm, Alan Cox and Robert Watson. Approved by: core, peter, alc, rwatson
* Introduce faith_mtx to protect the if_faith global softc list.rwatson2004-03-091-7/+27
| | | | | | Push if_faith softc destruction logic into faith_destroy() so that it can be called after softc list removal in both the clone destroy and module unload paths.
* o eliminate widespread on-stack mbuf use for bpf by introducingsam2003-12-281-14/+1
| | | | | | | | | | | | | a new bpf_mtap2 routine that does the right thing for an mbuf and a variable-length chunk of data that should be prepended. o while we're sweeping the drivers, use u_int32_t uniformly when when prepending the address family (several places were assuming sizeof(int) was 4) o return M_ASSERTVALID to BPF_MTAP* now that all stack-allocated mbufs have been eliminated; this may better be moved to the bpf routines Reviewed by: arch@ and several others
* Introduce tcp_hostcache and remove the tcp specific metrics fromandre2003-11-201-11/+2
| | | | | | | | | | | | | | | | | | | | | | | the routing table. Move all usage and references in the tcp stack from the routing table metrics to the tcp hostcache. It caches measured parameters of past tcp sessions to provide better initial start values for following connections from or to the same source or destination. Depending on the network parameters to/from the remote host this can lead to significant speedups for new tcp connections after the first one because they inherit and shortcut the learning curve. tcp_hostcache is designed for multiple concurrent access in SMP environments with high contention and is hash indexed by remote ip address. It removes significant locking requirements from the tcp stack with regard to the routing table. Reviewed by: sam (mentor), bms Reviewed by: -net, -current, core@kame.net (IPv6 parts) Approved by: re (scottl)
* Replace the if_name and if_unit members of struct ifnet with new membersbrooks2003-10-311-2/+1
| | | | | | | | | | | | | 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)
* Locking for updates to routing table entries. Each rtentry gets a mutexsam2003-10-041-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that covers updates to the contents. Note this is separate from holding a reference and/or locking the routing table itself. Other/related changes: o rtredirect loses the final parameter by which an rtentry reference may be returned; this was never used and added unwarranted complexity for locking. o minor style cleanups to routing code (e.g. ansi-fy function decls) o remove the logic to bump the refcnt on the parent of cloned routes, we assume the parent will remain as long as the clone; doing this avoids a circularity in locking during delete o convert some timeouts to MPSAFE callouts Notes: 1. rt_mtx in struct rtentry is guarded by #ifdef _KERNEL as user-level applications cannot/do-no know about mutex's. Doing this requires that the mutex be the last element in the structure. A better solution is to introduce an externalized version of struct rtentry but this is a major task because of the intertwining of rtentry and other data structures that are visible to user applications. 2. There are known LOR's that are expected to go away with forthcoming work to eliminate many held references. If not these will be resolved prior to release. 3. ATM changes are untested. Sponsored by: FreeBSD Foundation Obtained from: BSD/OS (partly)
* Introduce an M_ASSERTPKTHDR() macro which performs the very common taskdes2003-04-081-2/+1
| | | | | | | of asserting that an mbuf has a packet header. Use it instead of hand- rolled versions wherever applicable. Submitted by: Hiten Pandya <hiten@unixdaemons.com>
* Update netisr handling; Each SWI now registers its queue, and all queuejlemon2003-03-041-5/+1
| | | | | | | | | | 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
* Back out M_* changes, per decision of the TRB.imp2003-02-191-1/+1
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-1/+1
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* network interface and link layer changes:sam2002-11-151-1/+1
| | | | | | | | | | | | 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
* Move all unit number management cloned interfaces into the cloningbrooks2002-05-251-4/+3
| | | | | | | | code. The reverts the API change which made the <if>_clone_destory() functions return an int instead of void bringing us into closer alignment with NetBSD. Reviewed by: net (a long time ago)
* just merged cosmetic changes from KAME to ease sync between KAME and FreeBSD.suz2002-04-191-1/+1
| | | | | | | (based on freebsd4-snap-20020128) Reviewed by: ume MFC after: 1 week
* Remove __P.alfred2002-03-191-8/+8
|
* Simplify the interface cloning framework by handling unitmux2002-03-111-49/+5
| | | | | | | | | unit allocation with a bitmap in the generic layer. This allows us to get rid of the duplicated rman code in every clonable interface. Reviewed by: brooks Approved by: phk
* Change the network interface cloning API so the destroy function returnsbrooks2002-03-041-2/+3
| | | | | | | | an int errorcode instead of void in preperation for merging cloning of the loopback device. Submitted by: mux MFC after: 2 weeks
* Did someone turn on -Werror or something?dillon2002-02-261-0/+2
| | | | Fix kernel breakage.
* Staticise private interface lists.msmith2002-01-081-1/+1
|
* Initalize ifq_maxlen to prevent a harmless warning message.brooks2001-12-171-0/+1
| | | | | MFC After: 1 day Pointed out by: jacks@sage-american.com, bmah
* Pull post-4.4BSD change to sys/net/route.c from BSD/OS 4.2.ru2001-10-171-3/+3
| | | | | | | | | | | | | | | | | | | | Have sys/net/route.c:rtrequest1(), which takes ``rt_addrinfo *'' as the argument. Pass rt_addrinfo all the way down to rtrequest1 and ifa->ifa_rtrequest. 3rd argument of ifa->ifa_rtrequest is now ``rt_addrinfo *'' instead of ``sockaddr *'' (almost noone is using it anyways). Benefit: the following command now works. Previously we needed two route(8) invocations, "add" then "change". # route add -inet6 default ::1 -ifp gif0 Remove unsafe typecast in rtrequest(), from ``rtentry *'' to ``sockaddr *''. It was introduced by 4.3BSD-Reno and never corrected. Obtained from: BSD/OS, NetBSD MFC after: 1 month PR: kern/28360
* Make faith loadable, unloadable, and clonable.brooks2001-09-251-45/+142
|
* unbreak building kernel without option INET6ume2001-07-051-0/+2
| | | | Reported by: markp
* Sync with recent KAME.ume2001-06-111-7/+234
| | | | | | | | | | | | | | | | | | This work was based on kame-20010528-freebsd43-snap.tgz and some critical problem after the snap was out were fixed. There are many many changes since last KAME merge. TODO: - The definitions of SADB_* in sys/net/pfkeyv2.h are still different from RFC2407/IANA assignment because of binary compatibility issue. It should be fixed under 5-CURRENT. - ip6po_m member of struct ip6_pktopts is no longer used. But, it is still there because of binary compatibility issue. It should be removed under 5-CURRENT. Reviewed by: itojun Obtained from: KAME MFC after: 3 weeks
* Pull the rug from under the 'LKM Compatability' macro - PSEUDO_SET().peter2001-02-041-0/+2
| | | | | | | | There are two 3rd party code chunks using this still - the IPv6 stuff and i4b. Give them a private copy as an alternative to changing them too much. XXX sys/kernel.h still has a #include <sys/module.h> in it. I will be taking this out shortly - this affects a number of drivers.
* Remove #if NGIF > 0 and #if NFAITH > 0 as config already checks this.peter2000-01-291-2/+0
|
* Remove BROADCAST flag from faith interface,shin2000-01-091-2/+2
| | | | | | | -it not seems to be necessary -to avoid dhcp messages or something like that sent to faith interface The problem reported by: Jim Bloom <bloom@acm.org>
* udp IPv6 support, IPv6/IPv4 tunneling support in kernel,shin1999-12-071-0/+97
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
OpenPOWER on IntegriCloud