#include <netlink-local.h>
#include <netlink/netlink.h>
#include <netlink/utils.h>
#include <netlink/handlers.h>
#include <netlink/msg.h>
#include <netlink/attr.h>
Functions | |
Allocation | |
struct nl_sock * | nl_socket_alloc (void) |
Allocate new netlink socket. More... | |
struct nl_sock * | nl_socket_alloc_cb (struct nl_cb *cb) |
Allocate new socket with custom callbacks. More... | |
void | nl_socket_free (struct nl_sock *sk) |
Free a netlink socket. More... | |
Sequence Numbers | |
void | nl_socket_disable_seq_check (struct nl_sock *sk) |
Disable sequence number checking. More... | |
unsigned int | nl_socket_use_seq (struct nl_sock *sk) |
Use next sequence number. More... | |
void | nl_socket_disable_auto_ack (struct nl_sock *sk) |
Disable automatic request for ACK. More... | |
void | nl_socket_enable_auto_ack (struct nl_sock *sk) |
Enable automatic request for ACK (default) More... | |
Source Idenficiation | |
uint32_t | nl_socket_get_local_port (struct nl_sock *sk) |
void | nl_socket_set_local_port (struct nl_sock *sk, uint32_t port) |
Set local port of socket. More... | |
Group Subscriptions | |
int | nl_socket_add_memberships (struct nl_sock *sk, int group,...) |
Join groups. More... | |
int | nl_socket_add_membership (struct nl_sock *sk, int group) |
int | nl_socket_drop_memberships (struct nl_sock *sk, int group,...) |
Leave groups. More... | |
int | nl_socket_drop_membership (struct nl_sock *sk, int group) |
void | nl_join_groups (struct nl_sock *sk, int groups) |
Join multicast groups (deprecated) More... | |
Peer Identfication | |
uint32_t | nl_socket_get_peer_port (struct nl_sock *sk) |
void | nl_socket_set_peer_port (struct nl_sock *sk, uint32_t port) |
File Descriptor | |
int | nl_socket_get_fd (struct nl_sock *sk) |
int | nl_socket_set_nonblocking (struct nl_sock *sk) |
Set file descriptor of socket to non-blocking state. More... | |
void | nl_socket_enable_msg_peek (struct nl_sock *sk) |
Enable use of MSG_PEEK when reading from socket. More... | |
void | nl_socket_disable_msg_peek (struct nl_sock *sk) |
Disable use of MSG_PEEK when reading from socket. More... | |
Callback Handler | |
struct nl_cb * | nl_socket_get_cb (struct nl_sock *sk) |
void | nl_socket_set_cb (struct nl_sock *sk, struct nl_cb *cb) |
int | nl_socket_modify_cb (struct nl_sock *sk, enum nl_cb_type type, enum nl_cb_kind kind, nl_recvmsg_msg_cb_t func, void *arg) |
Modify the callback handler associated to the socket. More... | |
Utilities | |
int | nl_socket_set_buffer_size (struct nl_sock *sk, int rxbuf, int txbuf) |
Set socket buffer size of netlink socket. More... | |
int | nl_socket_set_passcred (struct nl_sock *sk, int state) |
Enable/disable credential passing on netlink socket. More... | |
int | nl_socket_recv_pktinfo (struct nl_sock *sk, int state) |
Enable/disable receival of additional packet information. More... | |