Receive Filtering Example

Onload User Guide (UG1586)

Document ID
UG1586
Release Date
2023-07-31
Revision
1.2 English
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.