static enum onload_zc_callback_rczc_recv_filter(struct onload_zc_msg* msg, void* arg, int flags)
{
return ONLOAD_ZC_CONTINUE;
}struct zc_recv_state zc_filter_state;
static int do_zc_filter(controller_t* c)
{
zc_filter_state.c = c;
zc_filter_state.bytes = 0;
return onload_set_recv_filter(the_socket, zc_recv_filter,
&zc_filter_state, 0);
}
Figure 1. Receive Filtering Example
Note: The
onload_set_recv_filter()
function should not
be used together with the onload_zc_recv()
function.