Abstract ======== This case seeks to build on the Crossbow (PSARC/2006/357) infrastructure and provide two new networking features for OpenSolaris: the Berkeley Packet Filter (BPF) and Linux's PF_PACKET (PFP). Providing both of these together addresses gaps in the low-level networking capabilities of OpenSolaris. BPF is aimed at providing highly reliable and performing packet capture. PFP provides a familiar, socket-based, programming interface for developers coming to OpenSolaris from Linux. These features are being introduced together, rather than as separate cases, for the following reasons: * PFP depends on BPF to provide "socket level" filtering on packets; * they both use similar interfaces at the MAC level; * both are used to provide packet capture on their respective native platforms; * advice from a PSARC member that it was a good idea to do so. Release Binding --------------- This case seeks to obtain approval for minor release binding. Interfaces used by both BPF and PFP are not yet available in Solaris 10 and would require substantial work to backport both Volo (PSARC/2007/587) and Crossbow (PSARC/2006/357) before it could be considered. Background ========== Packet capture on Solaris is currently built around the use of DLPI. Whilst the introduction of libdlpi (PSARC/2006/436[1]) has made it easier to program using DLPI and the IP Observability Project (PSARC/2006/475[2]) introduced the means by which packets that are local to the host could be intercepted, neither did anything to address the primary problem with DLPI: compared to other mechanisms, it is slow, the in-kernel filtering is either not used or very primitive and it provides very little useful information about the packet capturing itself by way of statistics. Limits ------ As one of the primary benefits proposed by this case is compatibility with the existing features in Linux/BSD open source projects, the introduction of new behaviour for OpenSolaris is not acceptable. Where it is not possible (or not desired) to provide full compatibility with existing features on other platforms, an appropriate error will be returned. Materials ========= Originally the intent was to submit two separate cases, so the materials for each feature was prepared separately. Upon further review in preparation of this document, it is felt that combining both features being integrated into a single document would create a document that was too complex and confusing for both the author to structure and reviewers to read. +------------------------------+---------------+ | Feature | Filename | +------------------------------+---------------+ | Berkeley Packet Filter (BPF) | bpf-psarc.txt | | Linux PF_PACKET (PFP | pfp-psarc.txt | +------------------------------+---------------+