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

Callbacks/Customization
[Core Netlink API]


Detailed Description

Customization via callbacks.


Callback Typedefs

typedef int(* nl_recvmsg_err_cb_t )(struct sockaddr_nl *nla, struct nlmsgerr *nlerr, void *arg)
typedef int(* nl_recvmsg_msg_cb_t )(struct nl_msg *msg, void *arg)

Callback Handle Management

struct nl_cb * nl_cb_clone (struct nl_cb *orig)
void nl_cb_destroy (struct nl_cb *cb)
struct nl_cb * nl_cb_new (enum nl_cb_kind kind)

Callback Setup

int nl_cb_err (struct nl_cb *cb, enum nl_cb_kind kind, nl_recvmsg_err_cb_t func, void *arg)
void nl_cb_overwrite_recv (struct nl_cb *cb, int(*func)(struct nl_handle *, struct sockaddr_nl *, unsigned char **))
void nl_cb_overwrite_recvmsgs (struct nl_cb *cb, int(*func)(struct nl_handle *, struct nl_cb *))
void nl_cb_overwrite_send (struct nl_cb *cb, int(*func)(struct nl_handle *, struct nl_msg *))
int nl_cb_set (struct nl_cb *cb, enum nl_cb_type type, enum nl_cb_kind kind, nl_recvmsg_msg_cb_t func, void *arg)
int nl_cb_set_all (struct nl_cb *cb, enum nl_cb_kind kind, nl_recvmsg_msg_cb_t func, void *arg)

Enumerations

enum  nl_cb_action { NL_PROCEED, NL_SKIP, NL_EXIT }
enum  nl_cb_kind {
  NL_CB_DEFAULT, NL_CB_VERBOSE, NL_CB_DEBUG, NL_CB_CUSTOM,
  __NL_CB_KIND_MAX
}
enum  nl_cb_type {
  NL_CB_VALID, NL_CB_FINISH, NL_CB_OVERRUN, NL_CB_SKIPPED,
  NL_CB_ACK, NL_CB_MSG_IN, NL_CB_MSG_OUT, NL_CB_INVALID,
  NL_CB_SEQ_CHECK, NL_CB_SEND_ACK, __NL_CB_TYPE_MAX
}

Functions

static void dump_hex (FILE *ofd, char *start, int len)
static int nl_ack_handler_debug (struct nl_msg *msg, void *arg)
static int nl_ack_handler_default (struct nl_msg *msg, void *arg)
static int nl_ack_handler_verbose (struct nl_msg *msg, void *arg)
static int nl_error_handler_debug (struct sockaddr_nl *who, struct nlmsgerr *e, void *arg)
static int nl_error_handler_default (struct sockaddr_nl *who, struct nlmsgerr *e, void *arg)
static int nl_error_handler_verbose (struct sockaddr_nl *who, struct nlmsgerr *e, void *arg)
static int nl_finish_handler_debug (struct nl_msg *msg, void *arg)
static int nl_finish_handler_default (struct nl_msg *msg, void *arg)
static int nl_finish_handler_verbose (struct nl_msg *msg, void *arg)
static int nl_invalid_handler_debug (struct nl_msg *msg, void *arg)
static int nl_invalid_handler_default (struct nl_msg *msg, void *arg)
static int nl_invalid_handler_verbose (struct nl_msg *msg, void *arg)
static int nl_msg_in_handler_debug (struct nl_msg *msg, void *arg)
static int nl_msg_in_handler_default (struct nl_msg *msg, void *arg)
static int nl_msg_in_handler_verbose (struct nl_msg *msg, void *arg)
static int nl_msg_out_handler_debug (struct nl_msg *msg, void *arg)
static int nl_msg_out_handler_default (struct nl_msg *msg, void *arg)
static int nl_msg_out_handler_verbose (struct nl_msg *msg, void *arg)
static int nl_overrun_handler_debug (struct nl_msg *msg, void *arg)
static int nl_overrun_handler_default (struct nl_msg *msg, void *arg)
static int nl_overrun_handler_verbose (struct nl_msg *msg, void *arg)
static int nl_skipped_handler_debug (struct nl_msg *msg, void *arg)
static int nl_skipped_handler_default (struct nl_msg *msg, void *arg)
static int nl_skipped_handler_verbose (struct nl_msg *msg, void *arg)
static int nl_valid_handler_debug (struct nl_msg *msg, void *arg)
static int nl_valid_handler_default (struct nl_msg *msg, void *arg)
static int nl_valid_handler_verbose (struct nl_msg *msg, void *arg)
static void print_hdr (FILE *ofd, struct nl_msg *msg)
static void print_header_content (FILE *ofd, struct nlmsghdr *n)
static void raw_dump_msg (FILE *ofd, struct nl_msg *msg)

Variables

static nl_recvmsg_msg_cb_t cb_def [NL_CB_TYPE_MAX+1][NL_CB_KIND_MAX+1]
static nl_recvmsg_err_cb_t cb_err_def [NL_CB_KIND_MAX+1]


Generated by  Doxygen 1.6.0   Back to index