summaryrefslogtreecommitdiffstats
path: root/sys/net/if_stf.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove __P.alfred2002-03-191-14/+14
|
* Simplify the interface cloning framework by handling unitmux2002-03-111-47/+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
* Fix warnings.peter2002-02-281-2/+2
|
* Staticise private interface lists.msmith2002-01-081-1/+1
|
* - malloc should be passed M_WAITOK, not M_WAIT (a mbuf flag)arr2001-12-071-4/+1
| | | | - make use of M_ZERO to remove a call to bzero()
* 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
* Use in_ifaddrhashtbl instead of in_ifaddrhead to look up IP address.jlemon2001-09-291-5/+1
|
* Make stf a clonable device.brooks2001-09-191-41/+109
| | | | | | Yes this really is rather silly and the implementation is overkill given that you are only allowed one of them, but NetBSD implements cloning on this device and it's a less cluttered example of cloning then most.
* Patches from KAME to remove usage of Varargs in existingjulian2001-09-071-10/+3
| | | | | | | IPV4 code. For now they will still have some in the developing stuff (IPv6) Submitted by: Keiichi SHIMA / <keiichi@iij.ad.jp> Obtained from: KAME
* Patches from Keiichi SHIMA <keiichi@iij.ad.jp>julian2001-09-031-3/+2
| | | | | | to make ip use the standard protosw structure again. Obtained from: Well, KAME I guess.
* gif(4) and stf(4) modernization:brooks2001-07-021-46/+44
| | | | | | | | | | | - Remove gif dependencies from stf. - Make gif and stf into modules - Make gif cloneable. PR: kern/27983 Reviewed by: ru, ume Obtained from: NetBSD MFC after: 1 week
* inject outbound packet to BPF.ume2001-06-241-1/+25
| | | | | | Submitted by: itojun Obtained from: KAME MFC after: 10 days
* Sync with recent KAME.ume2001-06-111-31/+62
| | | | | | | | | | | | | | | | | | 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
* Use <sys/queue.h> macro api rather than fondle its implementation detals.phk2001-02-031-2/+2
| | | | | 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-10/+4
| | | | | | | | | | | | | | 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.
* Convert all users of fldoff() to offsetof(). fldoff() is badphk2000-10-271-4/+0
| | | | | | | | | | | | | | | | | | | | | | | because it only takes a struct tag which makes it impossible to use unions, typedefs etc. Define __offsetof() in <machine/ansi.h> Define offsetof() in terms of __offsetof() in <stddef.h> and <sys/types.h> Remove myriad of local offsetof() definitions. Remove includes of <stddef.h> in kernel code. NB: Kernelcode should *never* include from /usr/include ! Make <sys/queue.h> include <machine/ansi.h> to avoid polluting the API. Deprecate <struct.h> with a warning. The warning turns into an error on 01-12-2000 and the file gets removed entirely on 01-01-2001. Paritials reviews by: various. Significant brucifications by: bde
* repair endianness issue in IN_MULTICAST().itojun2000-08-151-2/+2
| | | | | | again, *BSD difference... From: Nick Sayer <nsayer@quack.kfu.com>
* sync with kame tree as of july00. tons of bug fixes/improvements.itojun2000-07-041-0/+662
API changes: - additional IPv6 ioctls - IPsec PF_KEY API was changed, it is mandatory to upgrade setkey(8). (also syntax change)
OpenPOWER on IntegriCloud