NetBSD/sys/net
bouyer ccc8030189 Provide netbsd32 compat for bpf. Beside the ioctls, the structure
returned to userland by read(2) also needs to be converted.
For this, the bpf descriptor is flagged as compat32 (or not) in the
open and ioctl functions (where the user process's pid is also updated
in the descriptor). When the bpf buffer is filled in, the 32bits or native
header is used depending on the information stored in the descriptor.

This won't work if a 64bit binary does the open and ioctls, and then
exec a 32bit program which will do the read. But this is very
unlikely to happen in real life ...

Tested on i386 and loongson; with these changes my loongson can run
dhclient and tcpdump with a n32 userland.
2011-08-30 14:22:22 +00:00
..
agr Retire varargs.h support. Move machine/stdarg.h logic into MI 2011-07-17 20:54:30 +00:00
npf fix module build 2011-04-25 22:16:21 +00:00
Makefile Import NPF - a packet filter. Some features: 2010-08-22 18:56:18 +00:00
bpf.c Provide netbsd32 compat for bpf. Beside the ioctls, the structure 2011-08-30 14:22:22 +00:00
bpf.h Provide netbsd32 compat for bpf. Beside the ioctls, the structure 2011-08-30 14:22:22 +00:00
bpf_filter.c back out previous - this should be unnecessary on NetBSD due to 2011-07-14 12:44:10 +00:00
bpf_stub.c Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf 2010-04-05 07:19:28 +00:00
bpfdesc.h Provide netbsd32 compat for bpf. Beside the ioctls, the structure 2011-08-30 14:22:22 +00:00
bridgestp.c Fix multiple problems: 2009-01-18 10:28:55 +00:00
bsd-comp.c Fix handling of ppp compressor modules, from Andrew Doran's input. 2008-11-29 23:15:20 +00:00
dlt.h
ethertypes.h
files.pf build pf module with WARNS=3, and remove the need for -Wno-shadow 2011-08-29 09:50:04 +00:00
if.c Define if_free() for ixg(4) to use. 2011-08-12 22:09:36 +00:00
if.h Declare if_free(). 2011-08-12 22:09:17 +00:00
if_arc.h
if_arcsubr.c Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf 2010-04-05 07:19:28 +00:00
if_arp.h
if_atm.h udpate license clauses on my code to match the new-style BSD licenses. 2011-02-01 19:40:24 +00:00
if_atmsubr.c udpate license clauses on my code to match the new-style BSD licenses. 2011-02-01 19:40:24 +00:00
if_bridge.c simplify 2011-05-23 21:52:54 +00:00
if_bridgevar.h Fix for if_start() and pfil_hook() being called from hardware interrupt 2009-04-04 10:00:23 +00:00
if_dl.h
if_eco.h
if_ecosubr.c Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf 2010-04-05 07:19:28 +00:00
if_ether.h Replace ether_nonstatic_aton with a 2010-05-19 20:41:59 +00:00
if_etherip.c Replace ether_nonstatic_aton with a 2010-05-19 20:41:59 +00:00
if_etherip.h
if_ethersubr.c use ETHERTYPE_MPLS only for unicast packets (RFC3032) 2011-06-16 19:47:30 +00:00
if_faith.c Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf 2010-04-05 07:19:28 +00:00
if_faith.h
if_fddi.h
if_fddisubr.c Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf 2010-04-05 07:19:28 +00:00
if_gif.c Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf 2010-04-05 07:19:28 +00:00
if_gif.h
if_gre.c Use proper format string 2011-05-24 16:37:49 +00:00
if_gre.h Add __cacheline_aligned and __read_mostly annotations. 2010-06-01 22:13:30 +00:00
if_hippi.h
if_hippisubr.c Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf 2010-04-05 07:19:28 +00:00
if_ieee1394.h
if_ieee1394subr.c Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf 2010-04-05 07:19:28 +00:00
if_llc.h
if_loop.c Avoid computing INET[6] cksums for MPLS packets 2011-06-20 09:43:27 +00:00
if_media.c Replace u_quad_t with uint64_t. u_quad_t is just a typedef for 2009-10-05 21:25:05 +00:00
if_media.h add MBSS. From FreeBSD. 2011-02-20 13:51:17 +00:00
if_mpls.c Avoid putting implicit null labels on the wire 2011-07-03 18:46:12 +00:00
if_mpls.h Add MPLS support, proposed on tech-net@ a couple of days ago 2010-06-26 14:24:27 +00:00
if_ppp.c Convert ppp_list_lock to mutex(9). 2011-08-07 13:51:37 +00:00
if_ppp.h Fix handling of ppp compressor modules, from Andrew Doran's input. 2008-11-29 23:15:20 +00:00
if_pppoe.c Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf 2010-04-05 07:19:28 +00:00
if_pppoe.h
if_pppvar.h
if_sl.c Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf 2010-04-05 07:19:28 +00:00
if_slvar.h
if_sppp.h COMPAT_50 support for SPPP[GS]ETIDLETO and SPPP[GS]ETKEEPALIVE, ok martin@ 2010-04-20 14:32:03 +00:00
if_spppsubr.c Retire varargs.h support. Move machine/stdarg.h logic into MI 2011-07-17 20:54:30 +00:00
if_spppvar.h Replace u_quad_t with uint64_t. u_quad_t is just a typedef for 2009-10-05 21:25:05 +00:00
if_srt.c Retire varargs.h support. Move machine/stdarg.h logic into MI 2011-07-17 20:54:30 +00:00
if_srt.h KNF. 2009-12-09 00:44:26 +00:00
if_stf.c Retire varargs.h support. Move machine/stdarg.h logic into MI 2011-07-17 20:54:30 +00:00
if_stf.h
if_strip.c Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf 2010-04-05 07:19:28 +00:00
if_stripvar.h
if_tap.c PR/44131: Matthew Mondor: if_tap.c tap_dev_ioctl() not propagating error, 2010-11-22 21:31:51 +00:00
if_tap.h
if_token.h
if_tokensubr.c Fix weird hardware address assignment that GCC 4.5 complains about. 2011-07-19 19:42:27 +00:00
if_tun.c Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf 2010-04-05 07:19:28 +00:00
if_tun.h
if_types.h
if_vlan.c PR kern/38871 2011-04-08 13:56:51 +00:00
if_vlanvar.h
link_proto.c Add RTM_CHGADDR to signal that an address on the interface has changed. 2010-11-12 16:30:26 +00:00
net_osdep.h Provide privilege checking code snippets for all significant NetBSD 2009-05-06 22:17:41 +00:00
net_stats.c
net_stats.h
netisr.h Style fix: Tab consistency with the lines around it 2010-06-27 06:48:40 +00:00
netisr_dispatch.h dependant -> dependent 2011-06-30 20:09:15 +00:00
pfil.c
pfil.h
pfkeyv2.h more "const" 2011-06-09 19:54:18 +00:00
ppp-comp.h Fix handling of ppp compressor modules, from Andrew Doran's input. 2008-11-29 23:15:20 +00:00
ppp-deflate.c kill MALLOC and FREE macros. 2008-12-17 20:51:31 +00:00
ppp_defs.h
ppp_tty.c Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf 2010-04-05 07:19:28 +00:00
radix.c Retire varargs.h support. Move machine/stdarg.h logic into MI 2011-07-17 20:54:30 +00:00
radix.h Make it possible to register delayed radix tree head inits which 2009-05-27 17:46:49 +00:00
raw_cb.c
raw_cb.h
raw_usrreq.c Retire varargs.h support. Move machine/stdarg.h logic into MI 2011-07-17 20:54:30 +00:00
route.c Hide the radix-trie implementation of the forwarding table so that we 2011-03-31 19:40:51 +00:00
route.h Hide the radix-trie implementation of the forwarding table so that we 2011-03-31 19:40:51 +00:00
rtbl.c Hide the radix-trie implementation of the forwarding table so that we 2011-03-31 19:40:51 +00:00
rtsock.c Retire varargs.h support. Move machine/stdarg.h logic into MI 2011-07-17 20:54:30 +00:00
slcompress.c Use memcmp(9) and memcpy(9) directly rather than via 2009-04-18 15:20:06 +00:00
slcompress.h
slip.h
zlib.c Ansify function definitions w/o arguments. Generated with sed. 2009-03-18 10:22:21 +00:00
zlib.h Fixes PR kern/41069 and PR kern/41070. 2009-03-25 01:26:12 +00:00