Network Kernel Extensions Programming Guide
PDF
Introduction
Network Kernel Extensions Overview
NKE Implementation
Review of 4.4BSD Network Architecture
Network KPI Mechanisms
Tracking KEXT Usage
Instance-Specific Persistent Data
KEXT Dependency Information
Memory Buffers, Socket Manipulation, and Socket Input/Output
Working with Memory Buffers
Structure of an mbuf
Manipulating an mbuf or mbuf Chain
Blocking and Nonblocking mbuf Operations
Working with Sockets in the Kernel
Manipulating Sockets and File Descriptors
Socket Input and Output
For More Information
KEXT Controls and Notifications
Using the Kernel Control API for KEXT Control
Supporting Kernel Controls in Your KEXT
Connection from the Client Process
Using the kern_event API for Kernel Notifications
Receiving Kernel Event Notifications
Implementing a Preference File for an NKE
Helpful Tips
Socket Filters
Creating a Socket Filter
Socket Filter Example: tcplognke
IP Filters
The Anatomy of an IP Filter
IP Filter Gotchas
Interface Filters
Interface Filter Functions and Callbacks
Common Caveats
Network Interfaces and Protocol Plumbers
Network Interface Callbacks
Installing and Removing Network Interfaces
Protocol Plumbers
Sending Data
Receiving Data
Appendix A: Network Kernel Extensions Reference
Kernel Utilities
_MALLOC
_FREE
printf
proc_exiting
proc_is64bit
proc_rele
proc_self
proc_suser
msleep
wakeup
wakeup_one
Glossary
Revision History