This interface builds on the above interfaces to provide a clean and simple but powerful interface for passing network packets between device drivers and protocol stacks, and possibly between layers of a protocol stack as well.
The oskit_netio interface uses a symmetric sender-driven model for asynchronous communication. Each party involved (e.g., the network device driver and the protocol stack) must implement a netio object and pass a reference to its own netio object to the other party. For example, in the oskit_netdev interface, which represents a network device of some kind, this exchange of netio objects occurs when the protocol stack or other client opens the device. The oskit_netio interface defines only a single additional method beyond the basic methods inherited from oskit_iunknown; this method, appropriately named push, is used to ``push'' a network packet to the ``other'' party. For example, when a network device driver receives a packet from the hardware, the driver calls the push method on the netio object provided by the protocol stack; conversely, when the protocol stack needs to send a packet, it calls the netio object returned by the device driver at the time the device was opened. Thus, a netio object essentially represents a ``packet consumer.''
The following section describes the specifics of the push method.