a7b4f989a6
The patch adds the IP set core support to the kernel. The IP set core implements a netlink (nfnetlink) based protocol by which one can create, destroy, flush, rename, swap, list, save, restore sets, and add, delete, test elements from userspace. For simplicity (and backward compatibilty and for not to force ip(6)tables to be linked with a netlink library) reasons a small getsockopt-based protocol is also kept in order to communicate with the ip(6)tables match and target. The netlink protocol passes all u16, etc values in network order with NLA_F_NET_BYTEORDER flag. The protocol enforces the proper use of the NLA_F_NESTED and NLA_F_NET_BYTEORDER flags. For other kernel subsystems (netfilter match and target) the API contains the functions to add, delete and test elements in sets and the required calls to get/put refereces to the sets before those operations can be performed. The set types (which are implemented in independent modules) are stored in a simple RCU protected list. A set type may have variants: for example without timeout or with timeout support, for IPv4 or for IPv6. The sets (i.e. the pointers to the sets) are stored in an array. The sets are identified by their index in the array, which makes possible easy and fast swapping of sets. The array is protected indirectly by the nfnl mutex from nfnetlink. The content of the sets are protected by the rwlock of the set. There are functional differences between the add/del/test functions for the kernel and userspace: - kernel add/del/test: works on the current packet (i.e. one element) - kernel test: may trigger an "add" operation in order to fill out unspecified parts of the element from the packet (like MAC address) - userspace add/del: works on the netlink message and thus possibly on multiple elements from the IPSET_ATTR_ADT container attribute. - userspace add: may trigger resizing of a set Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> Signed-off-by: Patrick McHardy <kaber@trash.net> |
||
---|---|---|
.. | ||
ipset | ||
Kbuild | ||
nf_conntrack_amanda.h | ||
nf_conntrack_common.h | ||
nf_conntrack_dccp.h | ||
nf_conntrack_ftp.h | ||
nf_conntrack_h323.h | ||
nf_conntrack_h323_asn1.h | ||
nf_conntrack_h323_types.h | ||
nf_conntrack_irc.h | ||
nf_conntrack_pptp.h | ||
nf_conntrack_proto_gre.h | ||
nf_conntrack_sane.h | ||
nf_conntrack_sctp.h | ||
nf_conntrack_sip.h | ||
nf_conntrack_snmp.h | ||
nf_conntrack_tcp.h | ||
nf_conntrack_tftp.h | ||
nf_conntrack_tuple_common.h | ||
nfnetlink.h | ||
nfnetlink_compat.h | ||
nfnetlink_conntrack.h | ||
nfnetlink_log.h | ||
nfnetlink_queue.h | ||
x_tables.h | ||
xt_AUDIT.h | ||
xt_CHECKSUM.h | ||
xt_CLASSIFY.h | ||
xt_cluster.h | ||
xt_comment.h | ||
xt_connbytes.h | ||
xt_connlimit.h | ||
xt_CONNMARK.h | ||
xt_connmark.h | ||
xt_CONNSECMARK.h | ||
xt_conntrack.h | ||
xt_cpu.h | ||
xt_CT.h | ||
xt_dccp.h | ||
xt_DSCP.h | ||
xt_dscp.h | ||
xt_esp.h | ||
xt_hashlimit.h | ||
xt_helper.h | ||
xt_IDLETIMER.h | ||
xt_iprange.h | ||
xt_ipvs.h | ||
xt_LED.h | ||
xt_length.h | ||
xt_limit.h | ||
xt_mac.h | ||
xt_mark.h | ||
xt_MARK.h | ||
xt_multiport.h | ||
xt_NFLOG.h | ||
xt_NFQUEUE.h | ||
xt_osf.h | ||
xt_owner.h | ||
xt_physdev.h | ||
xt_pkttype.h | ||
xt_policy.h | ||
xt_quota.h | ||
xt_RATEEST.h | ||
xt_rateest.h | ||
xt_realm.h | ||
xt_recent.h | ||
xt_sctp.h | ||
xt_SECMARK.h | ||
xt_socket.h | ||
xt_state.h | ||
xt_statistic.h | ||
xt_string.h | ||
xt_TCPMSS.h | ||
xt_tcpmss.h | ||
xt_TCPOPTSTRIP.h | ||
xt_tcpudp.h | ||
xt_TEE.h | ||
xt_time.h | ||
xt_TPROXY.h | ||
xt_u32.h |