6#ifndef __LIB_NL_CORE_H__
7#define __LIB_NL_CORE_H__
12 void * cb_args[NL_CB_TYPE_MAX+1];
39static inline int nl_cb_call(
struct nl_cb *cb,
enum nl_cb_type type,
struct nl_msg *msg)
44 ret = cb->cb_set[type](msg, cb->cb_args[type]);
49int _nl_socket_is_local_port_unspecified (
struct nl_sock *sk);
50uint32_t _nl_socket_set_local_port_no_release(
struct nl_sock *sk,
int generate_other);
52void _nl_socket_used_ports_release_all(
const uint32_t *used_ports);
53void _nl_socket_used_ports_set(uint32_t *used_ports, uint32_t port);
55extern int nl_cache_parse(
struct nl_cache_ops *,
struct sockaddr_nl *,
56 struct nlmsghdr *,
struct nl_parser_param *);
58extern void dump_from_ops(
struct nl_object *,
struct nl_dump_params *);
int(* nl_recvmsg_err_cb_t)(struct sockaddr_nl *nla, struct nlmsgerr *nlerr, void *arg)
nl_recvmsgs() callback for error message processing customization
nl_cb_type
Callback types.
int(* nl_recvmsg_msg_cb_t)(struct nl_msg *msg, void *arg)
nl_recvmsgs() callback for message processing customization
int(* cb_recvmsgs_ow)(struct nl_sock *, struct nl_cb *)
May be used to replace nl_recvmsgs with your own implementation in all internal calls to nl_recvmsgs.
enum nl_cb_type cb_active
indicates the callback that is currently active
int(* cb_recv_ow)(struct nl_sock *, struct sockaddr_nl *, unsigned char **, struct ucred **)
Overwrite internal calls to nl_recv, must return the number of octets read and allocate a buffer for ...
int(* cb_send_ow)(struct nl_sock *, struct nl_msg *)
Overwrites internal calls to nl_send, must send the netlink message.