.de Sc
\\s-1\\$1\\s0\\$2
..
.ds cA 2009/232
.ds aR \s-1PSARC\s0
.LP
.so ../../amac
.Co
.ds LF \fI\*(aR/\*(cA\fP
.ds RF \fICopyright 2009 Sun Microsystems\fP
.if n .ds CF
.IP \fBSubject:\fP 15
Solaris Packet Capture
.IP "\fBSubmitted by:\fP" 15
Darren Reed
.IP \fBFile:\fP 15
\*(aR/\*(cA/opinion.ms
.IP \fBDate:\fP 15
20 May 2009
.IP "\fBCommittee:\fP" 15
Jim Carlson, Mark Carlson, Richard Matthews, Sebastian Roy
.IP "\fBProduct Approval Committee:\fP" 15

Solaris PAC
.br
solaris-pac-opinion@sun.com

.pn 2
.NH
Summary
.LP
This project proposes to integrate the Berkely Packet Capture feature into
the Solaris Kernel, bringing with it the Berkeley Packet Filter (BPF.)
This feature is usually refered to as BPF and will be for the remainder
of this document.
This project also proposes to integrate the PF_PACKET API from Linux as a 
socket plugin.
.NH
Decision & Precedence Information
.LP
The project is approved as specified in reference [1][2][3].
.LP
The project may be delivered in a minor release of the ON consolidation.
.LP
.NH
Interfaces
.LP
The project exports the following interfaces.
.if n .ne 8
.if t .ne 3
.TS H
box;
c s s
l | l | l.
Interfaces Exported
_
Interface	Classification	Comments
_
.TH
usr/kernel/drv/bpf	Project Private
usr/kernel/drv/bpf.conf	Project Private
/dev/bpf	Uncommitted
<net/bpf.h>	Committed
<net/bpfdesc.h>	Project Private
BPF_MAJOR_VERSION	Committed	<net/bpf.h>
BPF_MINOR_VERSION	Committed	<net/bpf.h>
BIOCGBLEN	Committed	<net/bpf.h>
BIOCSBLEN	Committed	<net/bpf.h>
BIOCSETF	Committed	<net/bpf.h>
BIOCFLUSH	Committed	<net/bpf.h>
BIOCPROMIS	Committed	<net/bpf.h>
BIOCGDLT	Committed	<net/bpf.h>
BIOCGETIF	Committed	<net/bpf.h>
BIOCSETIF	Committed	<net/bpf.h>
BIOCGETLIF	Committed	<net/bpf.h>
BIOCSETLIF	Committed	<net/bpf.h>
BIOCSORTIMEOUT	Committed	<net/bpf.h>
BIOCGORTIMEOUT	Committed	<net/bpf.h>
BIOCGSTATS	Committed	<net/bpf.h>
BIOCIMMEDIATE	Committed	<net/bpf.h>
BIOCVERSION	Committed	<net/bpf.h>
BIOCSTCPF	Committed	<net/bpf.h>
BIOCSUDPF	Committed	<net/bpf.h>
BIOCGHDRCMPLT	Committed	<net/bpf.h>
BIOCSHDRCMPLT	Committed	<net/bpf.h>
BIOCSDLT	Committed	<net/bpf.h>
BIOCGDLTLIST	Committed	<net/bpf.h>
BIOCGSEESENT	Committed	<net/bpf.h>
BIOCSSEESENT	Committed	<net/bpf.h>
BIOCSRTIMEOUT	Committed	<net/bpf.h>
BIOCGRTIMEOUT	Committed	<net/bpf.h>
BBIOCSETF32	Project private	<net/bpf.h>
BIOCGDLTLIST32	Project private	<net/bpf.h>
BIOCSRTIMEOUT32	Project private	<net/bpf.h>
BIOCGRTIMEOUT32	Project private	<net/bpf.h>
struct bpf_dltlist	Committed	<net/bpf.h>
struct bpf_hdr	Committed	<net/bpf.h>
struct bpf_insn	Committed	<net/bpf.h>
struct bpf_program	Committed	<net/bpf.h>
struct bpf_stat	Committed	<net/bpf.h>
struct bpf_timeval	Committed	<net/bpf.h>
struct bpf_version	Committed	<net/bpf.h>
NH_OBSERVING	Committed
hook_pkt_observe_t	Committed
DLT_IPNET	Committed
dl_ipnetinfo_v2_t	Committed
bpf-capture	Uncommitted	SDT probe
MAC_PROMISC_FLAGS_NO_COPY	Consolidation Private
dls_set_bpfattach	Project Private
mac_addr_length	Consolidation Private
mac_type	Consolidation Private
/usr/kernel/socketmod/sockpfp	Project Private
/usr/kernel/socketmod/amd64/sockpfp	Project Private
/usr/kernel/socketmod/sparcv9/sockpfp	Project Private
<netpacket/packet.h>	Committed
PF_PACKET	Committed
SOL_PACKET	Committed
SO_ATTACH_FILTER	Committed
SO_DETACH_FILTER	Committed
SIOCGIFHWADDR	Committed
SIOCGSTAMP	Committed
PACKET_STATISTICS	Committed
PACKET_ADD_MEMBERSHIP	Committed
PACKET_DROP_MEMBERSHIP	Committed
PACKET_AUXDATA	Committed
PACKET_HOST	Committed
PACKET_BROADCAST	Committed
PACKET_MULTICAST	Committed
PACKET_OTHERHOST	Committed
PACKET_OUTGOING	Committed
struct packet_mreq	Committed
struct sock_filter	Committed
struct sock_fprog	Committed
struct sockaddr_ll	Committed
struct tpacket_auxdata*	Committed
struct tpacket_hdr*	Committed
struct tpacket_stats	Committed
struct tpacket2_hdr*	Committed
.TE
.LP
The project imports the following interfaces.
.if n .ne 8
.if t .ne 3
.TS H
box;
c s s
l | l | l.
Interfaces Imported
_
Interface	Classification	Comments
_
.TH
<sys/socket_proto.h>
struct modlsockmod
smod_reg_t
sock_downcalls_t
sock_lower_handle_t
sock_upcalls_t
mac_addr_len
mac_client_open
mac_client_close
mac_close
mac_header
mac_multicast_add
mac_multicast_remove
mac_open_by_linkid
mac_promisc_add
mac_promisc_remove
mac_sdu_get
mac_tx
mac_unicast_primary_get
dls_devnet_macname2linkid
mac_client_handle_t
mac_client_promisc_type_t
mac_handle_t
MAC_ADDRTYPE_MULTICAST
MAC_ADDRTYPE_BROADCAST
MAC_ADDRTYPE_UNICAST
MAC_CLIENT_PROMISC_ALL
MAC_CLIENT_PROMISC_FILTERED
MAC_CLIENT_PROMISC_MULTI
MAC_DROP_ON_NO_DESC
<sys/mac.h>
<sys/mac_client.h>
<sys/mac_provider.h>
<sys/mac_client_priv.h>
.TE
.NH
Opinion
.LP
.NH 2
Setting the Packet Capture DLT
.LP
The BPF architecture which allows a single network device name to be
used to generate different types of packet capture data, determined by
where and how it is presented to BPF by the networking stack. This is
different to existing architecture where a specific pathname or socket
can only be used to receive a single type of packet. The delivery of
the man page for BPF will document the ioctls used with this mechanism
and the man page for tcpdump will document how users can use it from
the command line.
.NH
Minority Opinion(s)
.LP
.RS
.IP
None.
.RE
.NH
Advisory Information
.LP
.RS
.IP
None.
.RE
.NH
Appendices
.NH 2
Appendix A: Technical Changes Required
.LP
.RS
.IP
No technical changes required.
.RE
.NH 2
Appendix B: Technical Changes Advised
.LP
.RS
.IP
No technical changes advised.
.RE
.NH 2
Appendix C: Reference Material
.LP
Unless stated otherwise, path names are relative to the case
directory \*(aR/\*(cA.
.RS
.IP 1
commitment.materials/bpf-psarc.txt
.IP 2
commitment.materials/pfp-psarc.txt
.IP 3
commitment.materials/questions.txt
.RE
