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>
69 #define NL_PROCEED NL_OK
70 #define NL_EXIT NL_STOP
88 #define NL_CB_KIND_MAX (__NL_CB_KIND_MAX - 1)
118 #define NL_CB_TYPE_MAX (__NL_CB_TYPE_MAX - 1)
122 extern struct nl_cb * nl_cb_get(
struct nl_cb *);
123 extern void nl_cb_put(
struct nl_cb *);
133 int (*func)(
struct nl_handle *,
136 int (*func)(
struct nl_handle *,
141 int (*func)(
struct nl_handle *,
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.
int(* nl_recvmsg_err_cb_t)(struct sockaddr_nl *nla, struct nlmsgerr *nlerr, void *arg)
nl_recvmsgs() callback for error message processing customization
Sending of an acknowledge message has been requested.
Customized handler specified by the user.
Message wants to be skipped.
Stop parsing altogether and discard remaining messages.
void nl_cb_overwrite_recv(struct nl_cb *, int(*func)(struct nl_handle *, struct sockaddr_nl *, unsigned char **, struct ucred **))
Overwrite internal calls to nl_recv()
Called for every message received.
nl_cb_kind
Callback kinds.
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.
int(* nl_recvmsg_msg_cb_t)(struct nl_msg *msg, void *arg)
nl_recvmsgs() callback for message processing customization
void nl_cb_overwrite_send(struct nl_cb *, int(*func)(struct nl_handle *, struct nl_msg *))
Overwrite internal calls to nl_send()
Message is malformed and invalid.
Last message in a series of multi part messages received.
Debug handlers for debugging.
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.
void nl_cb_overwrite_recvmsgs(struct nl_cb *, int(*func)(struct nl_handle *, struct nl_cb *))
Overwrite internal calls to nl_recvmsgs()
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)