|Skip Navigation Links|
|Exit Print View|
|man pages section 9: DDI and DKI Kernel Functions Oracle Solaris 11.1 Information Library|
- inject data
#include <sys/sockfilter.h> int sof_inject_data_in(sof_handle_t hdl, mblk_t *mp, boolean_t *stop);
int sof_inject_data_out(sof_handle_t hdl, mblk_t *mp, boolean_t *stop);
per-socket filter handle
pointer to a msgb(9S) structure containing data to inject. Multiple mblk structures can be chained together via b_cont. The first mblk can contain address and/or control information, which can be constructed from a message header structure using sof_mblk_create(9F).
result parameter indicating whether the socket is flow controlled. The filter should stop injecting any more data if stop is B_TRUE, and only resume once the SOF_EV_FLOWCTRL_CLR (sofop_notify(9E)) event is observed.
The sof_inject_data_in() function is used to enqueue data in socket's receive buffer, which can then be consumed using recv(3SOCKET).
The sof_inject_data_out() function is used to transmit data from the socket to its peer.
The framework takes ownership of the message chain on both successful and failed inject attempts.
The filter can check flow control state by calling sof_inject_data_in() and sof_inject_data_out() with a NULL message, which will update stop.
The sof_inject_data_in() and sof_inject_data_out() functions returns 0 if data was successfully injected, and a non-zero error value, as described in Intro(2), on failure.
The sof_inject_data_in() and sof_inject_data_out() functions can be called from user and kernel context
See attributes(5) for descriptions of the following attributes: