freebsd-nq/sys/net
John Polstra 81bda851db Make bpf's read timeout feature work more correctly with
select/poll, and therefore with pthreads.  I doubt there is any way
to make this 100% semantically identical to the way it behaves in
unthreaded programs with blocking reads, but the solution here
should do the right thing for all reasonable usage patterns.

The basic idea is to schedule a callout for the read timeout when a
select/poll is done.  When the callout fires, it ends the select if
it is still in progress, or marks the state as "timed out" if the
select has already ended for some other reason.  Additional logic in
bpfread then does the right thing in the case where the timeout has
fired.

Note, I co-opted the bd_state member of the bpf_d structure.  It has
been present in the structure since the initial import of 4.4-lite,
but as far as I can tell it has never been used.

PR:		kern/22063 and bin/31649
MFC after:	3 days
2001-12-14 22:17:54 +00:00
..
bpf_compat.h Small fix for bpf compat: 2000-12-27 22:20:13 +00:00
bpf_filter.c Add ia64 to the list of machines which don't do unaligned reads. 2001-10-05 19:04:23 +00:00
bpf.c Make bpf's read timeout feature work more correctly with 2001-12-14 22:17:54 +00:00
bpf.h Update our bpf.h with tcpdump.org's new DLT_ types. 2001-07-31 23:27:06 +00:00
bpfdesc.h Make bpf's read timeout feature work more correctly with 2001-12-14 22:17:54 +00:00
bridge.c Whitespace change - replace leading spaces with tabs. 2001-11-24 01:47:50 +00:00
bridge.h MFS: sync the ipfw/dummynet/bridge code with the one recently merged 2001-11-04 22:56:25 +00:00
bsd_comp.c Undo part of the tangle of having sys/lock.h and sys/mutex.h included in 2001-05-01 08:13:21 +00:00
ethernet.h Don't pass an interface pointer to VLAN_INPUT{,_TAG}. Get it from the 2001-12-03 17:28:27 +00:00
fddi.h
if_arc.h bring in ARP support for variable length link level addresses 2001-10-14 20:17:53 +00:00
if_arp.h bring in ARP support for variable length link level addresses 2001-10-14 20:17:53 +00:00
if_atm.h
if_atmsubr.c Fix warning; remove unused variable 2001-06-15 07:32:25 +00:00
if_disc.c minor style fix. 2001-12-14 19:28:06 +00:00
if_dl.h
if_ef.c Update to C99, s/__FUNCTION__/__func__/, 2001-12-10 08:09:49 +00:00
if_ethersubr.c minor style fix. 2001-12-14 19:28:06 +00:00
if_faith.c Pull post-4.4BSD change to sys/net/route.c from BSD/OS 4.2. 2001-10-17 18:07:05 +00:00
if_fddisubr.c bring in ARP support for variable length link level addresses 2001-10-14 20:17:53 +00:00
if_gif.c /home/brooks/ng_gif.message 2001-09-26 23:50:17 +00:00
if_gif.h /home/brooks/ng_gif.message 2001-09-26 23:50:17 +00:00
if_ieee80211.h Currently, each wireless networking driver has it's own control program 2001-05-26 09:27:08 +00:00
if_iso88025subr.c whitespace fixes. 2001-12-14 19:32:47 +00:00
if_llc.h
if_loop.c whitespace fixes. 2001-12-14 19:32:47 +00:00
if_media.c Currently, each wireless networking driver has it's own control program 2001-05-26 09:27:08 +00:00
if_media.h Currently, each wireless networking driver has it's own control program 2001-05-26 09:27:08 +00:00
if_mib.c The interface index space may be sparsely populated (e.g. when an 2001-10-17 04:12:29 +00:00
if_mib.h
if_ppp.c KSE Milestone 2 2001-09-12 08:38:13 +00:00
if_ppp.h
if_pppvar.h KSE Milestone 2 2001-09-12 08:38:13 +00:00
if_sl.c KSE Milestone 2 2001-09-12 08:38:13 +00:00
if_slvar.h sc_lasttime and sc_starttime are time_t's, not long's. 2001-10-27 20:31:24 +00:00
if_sppp.h Sync with recent KAME. 2001-06-11 12:39:29 +00:00
if_spppsubr.c Update the hash table when sppp mucks directly with the interface address. 2001-10-01 18:14:49 +00:00
if_stf.c - malloc should be passed M_WAITOK, not M_WAIT (a mbuf flag) 2001-12-07 01:32:40 +00:00
if_stf.h Patches from KAME to remove usage of Varargs in existing 2001-09-07 07:19:12 +00:00
if_tap.c whitespace fixes. 2001-12-14 19:32:47 +00:00
if_tap.h Add the tap driver. 2000-07-20 17:01:10 +00:00
if_tapvar.h Add cloning support for the tap(4) device similar to that in the tun(4) 2001-09-05 01:06:21 +00:00
if_tun.c Use the passed in thread to selrecord() instead of curthread. 2001-09-21 22:46:54 +00:00
if_tun.h
if_tunvar.h Support /dev/tun cloning. Ansify if_tun.c while I'm there. 2001-06-01 15:51:10 +00:00
if_types.h Add recently assigned interface types. 2001-04-04 14:18:57 +00:00
if_var.h whitespace fixes. 2001-12-14 19:32:47 +00:00
if_vlan_var.h Make vlan(4) loadable, unloadable, and clonable. As a side effect, 2001-09-05 21:10:28 +00:00
if_vlan.c - Utilize the great M_ZERO flag rather than allocating memory then do 2001-11-21 20:29:08 +00:00
if.c Add a SIOCGIFINDEX ioctl, which returns the index of a named interface. 2001-10-17 19:40:44 +00:00
if.h Device Polling code for -current. 2001-12-14 17:56:12 +00:00
intrq.c Insert entropy harvesting calls for network traffic. By 2001-02-18 17:54:52 +00:00
intrq.h
iso88025.h - Define payload length constants for 4Mbps and 16Mbps. 2001-03-18 05:41:07 +00:00
net_osdep.c incorrect bounds-check on snprintf. 2001-07-26 19:14:52 +00:00
net_osdep.h Sync with recent KAME. 2001-06-11 12:39:29 +00:00
netisr.h Device Polling code for -current. 2001-12-14 17:56:12 +00:00
pfil.c Mechanical change to use <sys/queue.h> macro API instead of 2001-02-04 13:13:25 +00:00
pfil.h Remove extra memory region kept by "struct pfil_head pfil_head_t;". 2001-10-22 08:46:23 +00:00
pfkeyv2.h printed current sequence number of the SA. accordingly, changed 2001-08-06 19:40:01 +00:00
ppp_comp.h Remove bogus undocumented macros used to control conditional assembly. 2000-10-27 08:39:41 +00:00
ppp_deflate.c Undo part of the tangle of having sys/lock.h and sys/mutex.h included in 2001-05-01 08:13:21 +00:00
ppp_defs.h Sync with recent KAME. 2001-06-11 12:39:29 +00:00
ppp_tty.c KSE Milestone 2 2001-09-12 08:38:13 +00:00
radix.c Initialize rn_mklist in rn_newpair(). The undocumented assumption 2000-10-27 20:50:14 +00:00
radix.h A couple months ago, Kirk and I were doing a walkthrough of the radix-tree 2000-04-23 04:00:00 +00:00
raw_cb.c Give struct socket structures a ref counting interface similar to 2001-11-17 03:07:11 +00:00
raw_cb.h KSE Milestone 2 2001-09-12 08:38:13 +00:00
raw_usrreq.c Give struct socket structures a ref counting interface similar to 2001-11-17 03:07:11 +00:00
route.c Fix a typo in a comment 2001-11-28 16:15:52 +00:00
route.h Introduce a syncache, which enables FreeBSD to withstand a SYN flood 2001-11-22 04:50:44 +00:00
rtsock.c Pull post-4.4BSD change to sys/net/route.c from BSD/OS 4.2. 2001-10-17 18:07:05 +00:00
slcompress.c
slcompress.h
slip.h
zlib.c
zlib.h