Data Structures | |
struct | sockaddr_nl |
Netlink socket address. More... | |
struct | nlmsghdr |
Netlink message header. More... | |
struct | nlmsgerr |
Netlink error message. More... | |
struct | nl_pktinfo |
struct | nlattr |
Macros | |
#define | NETLINK_ROUTE 0 /* Routing/device hook */ |
#define | NETLINK_UNUSED 1 /* Unused number */ |
#define | NETLINK_USERSOCK 2 /* Reserved for user mode socket protocols */ |
#define | NETLINK_FIREWALL 3 /* Unused number, formerly ip_queue */ |
#define | NETLINK_SOCK_DIAG 4 /* socket monitoring */ |
#define | NETLINK_NFLOG 5 /* netfilter/iptables ULOG */ |
#define | NETLINK_XFRM 6 /* ipsec */ |
#define | NETLINK_SELINUX 7 /* SELinux event notifications */ |
#define | NETLINK_ISCSI 8 /* Open-iSCSI */ |
#define | NETLINK_AUDIT 9 /* auditing */ |
#define | NETLINK_FIB_LOOKUP 10 |
#define | NETLINK_CONNECTOR 11 |
#define | NETLINK_NETFILTER 12 /* netfilter subsystem */ |
#define | NETLINK_IP6_FW 13 |
#define | NETLINK_DNRTMSG 14 /* DECnet routing messages */ |
#define | NETLINK_KOBJECT_UEVENT 15 /* Kernel messages to userspace */ |
#define | NETLINK_GENERIC 16 |
#define | NETLINK_SCSITRANSPORT 18 /* SCSI Transports */ |
#define | NETLINK_ECRYPTFS 19 |
#define | NETLINK_RDMA 20 |
#define | NETLINK_CRYPTO 21 /* Crypto layer */ |
#define | NETLINK_INET_DIAG NETLINK_SOCK_DIAG |
#define | MAX_LINKS 32 |
#define | NLM_F_REQUEST 1 /* It is request message. */ |
#define | NLM_F_MULTI 2 /* Multipart message, terminated by NLMSG_DONE */ |
#define | NLM_F_ACK 4 /* Reply with ack, with zero or error code */ |
#define | NLM_F_ECHO 8 /* Echo this request */ |
#define | NLM_F_DUMP_INTR 16 /* Dump was inconsistent due to sequence change */ |
#define | NLM_F_ROOT 0x100 /* specify tree root */ |
#define | NLM_F_MATCH 0x200 /* return all matching */ |
#define | NLM_F_ATOMIC 0x400 /* atomic GET */ |
#define | NLM_F_DUMP (NLM_F_ROOT|NLM_F_MATCH) |
#define | NLM_F_REPLACE 0x100 /* Override existing */ |
#define | NLM_F_EXCL 0x200 /* Do not touch, if it exists */ |
#define | NLM_F_CREATE 0x400 /* Create, if it does not exist */ |
#define | NLM_F_APPEND 0x800 /* Add to end of list */ |
#define | NLMSG_ALIGNTO 4U |
#define | NLMSG_ALIGN(len) ( ((len)+NLMSG_ALIGNTO-1) & ~(NLMSG_ALIGNTO-1) ) |
#define | NLMSG_HDRLEN ((int) NLMSG_ALIGN(sizeof(struct nlmsghdr))) |
#define | NLMSG_LENGTH(len) ((len)+NLMSG_ALIGN(NLMSG_HDRLEN)) |
#define | NLMSG_SPACE(len) NLMSG_ALIGN(NLMSG_LENGTH(len)) |
#define | NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0))) |
#define | NLMSG_NEXT(nlh, len) |
#define | NLMSG_OK(nlh, len) |
#define | NLMSG_PAYLOAD(nlh, len) ((nlh)->nlmsg_len - NLMSG_SPACE((len))) |
#define | NLMSG_NOOP 0x1 /* Nothing. */ |
#define | NLMSG_ERROR 0x2 /* Error */ |
#define | NLMSG_DONE 0x3 /* End of a dump */ |
#define | NLMSG_OVERRUN 0x4 /* Data lost */ |
#define | NLMSG_MIN_TYPE 0x10 /* < 0x10: reserved control messages */ |
#define | NETLINK_ADD_MEMBERSHIP 1 |
#define | NETLINK_DROP_MEMBERSHIP 2 |
#define | NETLINK_PKTINFO 3 |
#define | NETLINK_BROADCAST_ERROR 4 |
#define | NETLINK_NO_ENOBUFS 5 |
#define | NET_MAJOR 36 /* Major 36 is reserved for networking */ |
#define | NLA_F_NESTED (1 << 15) |
#define | NLA_F_NET_BYTEORDER (1 << 14) |
#define | NLA_TYPE_MASK ~(NLA_F_NESTED | NLA_F_NET_BYTEORDER) |
#define | NLA_ALIGNTO 4 |
#define | NLA_ALIGN(len) (((len) + NLA_ALIGNTO - 1) & ~(NLA_ALIGNTO - 1)) |
#define | NLA_HDRLEN ((int) NLA_ALIGN(sizeof(struct nlattr))) |
Enumerations | |
enum | { NETLINK_UNCONNECTED = 0, NETLINK_CONNECTED } |
#define MAX_LINKS 32 |
#define NET_MAJOR 36 /* Major 36 is reserved for networking */ |
#define NETLINK_ADD_MEMBERSHIP 1 |
Referenced by nl_socket_add_memberships().
#define NETLINK_AUDIT 9 /* auditing */ |
#define NETLINK_BROADCAST_ERROR 4 |
#define NETLINK_CONNECTOR 11 |
#define NETLINK_CRYPTO 21 /* Crypto layer */ |
#define NETLINK_DNRTMSG 14 /* DECnet routing messages */ |
#define NETLINK_DROP_MEMBERSHIP 2 |
Referenced by nl_socket_drop_memberships().
#define NETLINK_ECRYPTFS 19 |
#define NETLINK_FIB_LOOKUP 10 |
Referenced by main().
#define NETLINK_FIREWALL 3 /* Unused number, formerly ip_queue */ |
Referenced by ipq_create_handle().
#define NETLINK_GENERIC 16 |
Referenced by genl_connect(), genl_register(), and main().
#define NETLINK_INET_DIAG NETLINK_SOCK_DIAG |
#define NETLINK_IP6_FW 13 |
Referenced by ipq_create_handle().
#define NETLINK_ISCSI 8 /* Open-iSCSI */ |
#define NETLINK_KOBJECT_UEVENT 15 /* Kernel messages to userspace */ |
#define NETLINK_NETFILTER 12 /* netfilter subsystem */ |
#define NETLINK_NFLOG 5 /* netfilter/iptables ULOG */ |
#define NETLINK_NO_ENOBUFS 5 |
Referenced by main(), and nl_init_event_handler().
#define NETLINK_PKTINFO 3 |
Referenced by nl_socket_recv_pktinfo().
#define NETLINK_RDMA 20 |
#define NETLINK_ROUTE 0 /* Routing/device hook */ |
Referenced by main(), and rtnl_open().
#define NETLINK_SCSITRANSPORT 18 /* SCSI Transports */ |
#define NETLINK_SELINUX 7 /* SELinux event notifications */ |
#define NETLINK_SOCK_DIAG 4 /* socket monitoring */ |
#define NETLINK_UNUSED 1 /* Unused number */ |
#define NETLINK_USERSOCK 2 /* Reserved for user mode socket protocols */ |
#define NETLINK_XFRM 6 /* ipsec */ |
#define NLA_ALIGN | ( | len | ) | (((len) + NLA_ALIGNTO - 1) & ~(NLA_ALIGNTO - 1)) |
Referenced by nfnl_queue_msg_send_verdict_payload(), nla_next(), nla_total_size(), and rtnl_ematch_parse().
#define NLA_ALIGNTO 4 |
#define NLA_F_NESTED (1 << 15) |
Referenced by mnl_attr_nest_start().
#define NLA_F_NET_BYTEORDER (1 << 14) |
Referenced by nla_attr_size(), nla_data(), and nla_len().
#define NLA_TYPE_MASK ~(NLA_F_NESTED | NLA_F_NET_BYTEORDER) |
Referenced by mnl_attr_get_type(), and nla_type().
#define NLM_F_ACK 4 /* Reply with ack, with zero or error code */ |
Referenced by mnl_batch_supported(), mnl_nft_chain_add(), mnl_nft_chain_batch_del(), mnl_nft_chain_delete(), mnl_nft_chain_get(), mnl_nft_rule_add(), mnl_nft_rule_delete(), mnl_nft_set_add(), mnl_nft_set_delete(), mnl_nft_set_dump(), mnl_nft_set_get(), mnl_nft_setelem_add(), mnl_nft_setelem_delete(), mnl_nft_setelem_get(), mnl_nft_table_add(), mnl_nft_table_batch_del(), mnl_nft_table_delete(), mnl_nft_table_get(), mnl_set_dump(), mnl_setelem_get(), nflog_set_flags(), nflog_set_mode(), nflog_set_nlbufsiz(), nflog_set_qthresh(), nflog_set_timeout(), nfnl_talk(), nfq_set_mode(), nfq_set_queue_flags(), nfq_set_queue_maxlen(), nft_batch_is_supported(), nft_chain_add(), nft_chain_user_add(), nft_chain_user_rename(), nft_chain_zero_counters(), nft_compatible_revision(), nft_table_add(), and nl_auto_complete().
#define NLM_F_APPEND 0x800 /* Add to end of list */ |
Referenced by netlink_add_rule_list().
#define NLM_F_ATOMIC 0x400 /* atomic GET */ |
#define NLM_F_CREATE 0x400 /* Create, if it does not exist */ |
Referenced by __build_conntrack(), __parse_expect_message_type(), __parse_message_type(), author_new(), debug_nfct_cb(), main(), mnl_nft_chain_add(), mnl_nft_chain_batch_add(), mnl_nft_rule_add(), mnl_nft_rule_batch_add(), mnl_nft_set_add(), mnl_nft_set_batch_add(), mnl_nft_setelem_add(), mnl_nft_setelem_batch_add(), nfnl_nft_chain_build_add_request(), nfnl_nft_rule_add(), nfnl_nft_set_build_add_request(), nfnl_nft_setelem_add(), nfnl_nft_table_build_add_request(), nfnlmsg_ct_group(), nft_chain_add(), rtnl_addr_build_add_request(), rtnl_class_build_add_request(), rtnl_cls_build_add_request(), rtnl_qdisc_build_add_request(), rtnl_route_build_add_request(), and rtnl_rule_build_add_request().
#define NLM_F_DUMP (NLM_F_ROOT|NLM_F_MATCH) |
Referenced by mnl_chain_dump(), mnl_nft_chain_dump(), mnl_nft_rule_dump(), mnl_nft_set_dump(), mnl_nft_setelem_get(), mnl_nft_table_dump(), mnl_rule_dump(), mnl_set_dump(), mnl_setelem_get(), mnl_table_dump(), nfnl_ct_dump_request(), nfnl_nft_chain_dump_request(), nfnl_nft_rule_dump_request(), nfnl_nft_set_dump_request(), nfnl_nft_setelem_dump_request(), and nfnl_nft_table_dump_request().
#define NLM_F_DUMP_INTR 16 /* Dump was inconsistent due to sequence change */ |
#define NLM_F_ECHO 8 /* Echo this request */ |
#define NLM_F_EXCL 0x200 /* Do not touch, if it exists */ |
#define NLM_F_MATCH 0x200 /* return all matching */ |
Referenced by rtnl_dump_type().
#define NLM_F_MULTI 2 /* Multipart message, terminated by NLMSG_DONE */ |
Referenced by ipulog_get_packet(), and nfnl_get_msg_next().
#define NLM_F_REPLACE 0x100 /* Override existing */ |
Referenced by main(), rtnl_cls_build_change_request(), and rtnl_qdisc_build_change_request().
#define NLM_F_REQUEST 1 /* It is request message. */ |
Referenced by ipq_set_mode(), ipq_set_verdict(), netem_build_msg(), nfacct_nlmsg_build_hdr(), nfct_helper_nlmsg_build_hdr(), nfct_timeout_nlmsg_build_hdr(), nflog_set_flags(), nflog_set_mode(), nflog_set_nlbufsiz(), nflog_set_qthresh(), nflog_set_timeout(), nfq_set_mode(), nfq_set_queue_flags(), nfq_set_queue_maxlen(), nft_compatible_revision(), nft_nlmsg_build_hdr(), nl_auto_complete(), and rtnl_dump_type().
#define NLM_F_ROOT 0x100 /* specify tree root */ |
Referenced by rtnl_dump_type().
#define NLMSG_ALIGN | ( | len | ) | ( ((len)+NLMSG_ALIGNTO-1) & ~(NLMSG_ALIGNTO-1) ) |
Referenced by genlmsg_attrdata(), genlmsg_attrlen(), genlmsg_valid_hdr(), netem_build_msg(), nfnl_addattr_l(), nfnl_check_attributes(), nfnl_handle_packet(), nfnl_listen(), nfnl_talk(), nla_reserve(), nlmsg_attrdata(), nlmsg_attrlen(), nlmsg_convert(), nlmsg_next(), nlmsg_tail(), and nlmsg_total_size().
#define NLMSG_ALIGNTO 4U |
#define NLMSG_DATA | ( | nlh | ) | ((void*)(((char*)nlh) + NLMSG_LENGTH(0))) |
#define NLMSG_DONE 0x3 /* End of a dump */ |
Referenced by ipset_debug_msg(), ipulog_get_packet(), nfnl_get_msg_next(), nfnl_listen(), and rtnl_receive().
#define NLMSG_ERROR 0x2 /* Error */ |
Referenced by ipset_debug_msg(), nfnl_listen(), nfnl_talk(), nl_msg_dump(), and rtnl_receive().
#define NLMSG_HDRLEN ((int) NLMSG_ALIGN(sizeof(struct nlmsghdr))) |
Referenced by genlmsg_len(), mnl_batch_ready(), nlmsg_data(), nlmsg_len(), nlmsg_msg_size(), and nlmsg_put().
#define NLMSG_LENGTH | ( | len | ) | ((len)+NLMSG_ALIGN(NLMSG_HDRLEN)) |
Referenced by __callback(), ipq_set_mode(), netem_build_msg(), nfct_parse_conntrack(), nfexp_parse_expect(), nfnl_fill_hdr(), nfnl_parse_hdr(), and rtnl_receive().
#define NLMSG_MIN_TYPE 0x10 /* < 0x10: reserved control messages */ |
Referenced by ipulog_get_packet(), nfnl_get_msg_next(), nfnl_iterator_next(), nfnl_process(), and rtnl_receive().
#define NLMSG_NOOP 0x1 /* Nothing. */ |
Referenced by ipset_debug_msg().
Referenced by ipulog_get_packet(), nfnl_get_msg_first(), nfnl_get_msg_next(), nfnl_iterator_create(), nfnl_iterator_process(), nfnl_process(), and rtnl_receive().
#define NLMSG_OVERRUN 0x4 /* Data lost */ |
Referenced by ipset_debug_msg().
#define NLMSG_SPACE | ( | len | ) | NLMSG_ALIGN(NLMSG_LENGTH(len)) |
Referenced by nfnl_check_attributes(), nfnl_handle_packet(), nfnl_iterator_create(), nfnl_iterator_process(), and nfnl_process().