12 #ifndef NETLINK_HANDLERS_H_ 13 #define NETLINK_HANDLERS_H_ 17 #include <sys/types.h> 18 #include <netlink/netlink-compat.h> 19 #include <netlink/netlink-kernel.h> 51 struct nlmsgerr *nlerr,
void *arg);
84 #define NL_CB_KIND_MAX (__NL_CB_KIND_MAX - 1) 116 #define NL_CB_TYPE_MAX (__NL_CB_TYPE_MAX - 1) 120 extern struct nl_cb * nl_cb_get(
struct nl_cb *);
121 extern void nl_cb_put(
struct nl_cb *);
131 int (*func)(
struct nl_sock *,
134 int (*func)(
struct nl_sock *,
135 struct sockaddr_nl *,
139 int (*func)(
struct nl_sock *,
Report received that data was lost.
Called for every message sent out except for nl_sendto()
Message is an acknowledge.
int nl_cb_set_all(struct nl_cb *, enum nl_cb_kind, nl_recvmsg_msg_cb_t, void *)
Set up a all callbacks.
void nl_cb_overwrite_recv(struct nl_cb *cb, int(*func)(struct nl_sock *, struct sockaddr_nl *, unsigned char **, struct ucred **))
Overwrite internal calls to nl_recv()
Sending of an acknowledge message has been requested.
Customized handler specified by the user.
void nl_cb_overwrite_send(struct nl_cb *cb, int(*func)(struct nl_sock *, struct nl_msg *))
Overwrite internal calls to nl_send()
Message wants to be skipped.
Stop parsing altogether and discard remaining messages.
Called for every message received.
nl_cb_kind
Callback kinds.
void nl_cb_overwrite_recvmsgs(struct nl_cb *, int(*func)(struct nl_sock *, struct nl_cb *))
Overwrite internal calls to nl_recvmsgs()
struct nl_cb * nl_cb_clone(struct nl_cb *)
Clone an existing callback handle.
int nl_cb_set(struct nl_cb *, enum nl_cb_type, enum nl_cb_kind, nl_recvmsg_msg_cb_t, void *)
Set up a callback.
Message is malformed and invalid.
Flag NLM_F_DUMP_INTR is set in message.
Last message in a series of multi part messages received.
int(* nl_recvmsg_err_cb_t)(struct sockaddr_nl *nla, struct nlmsgerr *nlerr, void *arg)
nl_recvmsgs() callback for error message processing customization
Debug handlers for debugging.
int(* nl_recvmsg_msg_cb_t)(struct nl_msg *msg, void *arg)
nl_recvmsgs() callback for message processing customization
Called instead of internal sequence number checking.
Proceed with wathever would come next.
nl_cb_type
Callback types.
struct nl_cb * nl_cb_alloc(enum nl_cb_kind)
Allocate a new callback handle.
nl_cb_action
Callback actions.
enum nl_cb_type nl_cb_active_type(struct nl_cb *cb)
Obtain type of current active callback.
int nl_cb_err(struct nl_cb *, enum nl_cb_kind, nl_recvmsg_err_cb_t, void *)
Set up an error callback.
Verbose default handlers (error messages printed)