Logo Search packages:      
Sourcecode: libnl2 version File versions  Download package

int nl_cb_err ( struct nl_cb *  cb,
enum nl_cb_kind  kind,
nl_recvmsg_err_cb_t  func,
void *  arg 
)

Set up an error callback

  • cb callback set
  • kind kind of callback
  • func callback function
  • arg argument to be passed to callback function

Definition at line 335 of file handlers.c.

References NL_CB_CUSTOM.

Referenced by nl_cb_alloc().

{
      if (kind < 0 || kind > NL_CB_KIND_MAX)
            return -NLE_RANGE;

      if (kind == NL_CB_CUSTOM) {
            cb->cb_err = func;
            cb->cb_err_arg = arg;
      } else {
            cb->cb_err = cb_err_def[kind];
            cb->cb_err_arg = arg;
      }

      return 0;
}


Generated by  Doxygen 1.6.0   Back to index