sf_data_out_func
Declaration
typedef errno_t (*sf_data_out_func)(void *cookie, socket_t so, const struct sockaddr *to, mbuf_t *data, mbuf_t *control, sflt_data_flag_t flags);Parameters
- cookie:
Cookie value specified when the filter attach was called.
- so:
The socket the filter is attached to.
- from:
The address the data is from, may be NULL if the socket is connected.
- data:
The data being received. Control data may appear in the mbuf chain, be sure to check the mbuf types to find control data.
- control:
Control data being passed separately from the data.
- flags:
Flags to indicate if this is out of band data or a record.
Return Value
Return: 0 - The caller will continue with normal processing of the data. EJUSTRETURN - The caller will stop processing the data, the data will not be freed. Anything Else - The caller will free the data and stop processing.
Discussion
sf_data_out_func is called to filter outbound data. If your filter intercepts data for later reinjection, it must queue all outbound data to preserve the order of the data when reinjecting. Use sock_inject_data_out to later reinject this data.