Go to main content

man pages section 9: DDI and DKI Kernel Functions

Exit Print View

Updated: July 2017
 
 

sof_flowctrl_data_in(9F)

Name

sof_flowctrl_data_in, sof_flowctrl_data_out - assert flow control

Synopsis

#include <sys/sockfilter.h>

void sof_flowctrl_data_in(sof_handle_t hdl, boolean_t on);
void sof_flowctrl_data_out(sof_handle_t hdl, boolean_t on);

Parameters

hdl

per-socket filter handle

on

set to B_TRUE or B_FALSE to assert or clear flow control, respectively

Description

The sof_flowctrl_data_in() and sof_flowctrl_data_out() functions are used to enforce flow control on the transmit and receive paths, respectively. Unlike send side flow control, which is enforced by the socket layer, the behavior on the receive side is dependent on the transport protocol. Asserting flow control for a protocol that supports it at the protocol level, such TCP, will cause the peer to stop transmitting data. Other protocols, like UDP, will start dropping packets as they are received.

Neither sof_flowctrl_data_in() nor sof_flowctrl_data_out() can be used to clear a flow control condition that was not asserted by the filter. For example, a socket may be flow controlled as a result of an application not consuming data, and clearing the filter's flow control condition will not change the socket's state.

Flow control may not take effect right away, and during this transient period both the socket and protocol may generate data that will call the data entry points. It is also possible that another filter inject data while the socket is flow controlled.

Context

The sof_flowctrl_data_in() and sof_flowctrl_data_out() functions can be called from any context

Attributes

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
system/kernel
Interface Stability
Uncommitted

See Also

attributes(5), sofop_data_in(9E), sof_inject_data_in(9F)