EXAMPLES
Assuming ACCEPT_FILTER_DATA has been included in the kernel config file or the accf_data module has been loaded, this will enable the data accept filter on the socket sok.
struct accept_filter_arg afa;
bzero(&afa, sizeof(afa));
strcpy(afa.af_name, "dataready");
setsockopt(sok, SOL_SOCKET, SO_ACCEPTFILTER, &afa, sizeof(afa));
SEE ALSO
setsockopt(2), accept_filter(9), accf_http(9)
HISTORY
AUTHORS