Skip to content

Commit

Permalink
Merge branch 'master' of git://1984.lsi.us.es/net-next
Browse files Browse the repository at this point in the history
  • Loading branch information
David S. Miller committed Mar 8, 2012
2 parents b4fb05e + ace30d7 commit c75a312
Show file tree
Hide file tree
Showing 60 changed files with 3,478 additions and 1,427 deletions.
2 changes: 2 additions & 0 deletions include/linux/netfilter/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ header-y += nfnetlink.h
header-y += nfnetlink_acct.h
header-y += nfnetlink_compat.h
header-y += nfnetlink_conntrack.h
header-y += nfnetlink_cttimeout.h
header-y += nfnetlink_log.h
header-y += nfnetlink_queue.h
header-y += x_tables.h
Expand All @@ -22,6 +23,7 @@ header-y += xt_CT.h
header-y += xt_DSCP.h
header-y += xt_IDLETIMER.h
header-y += xt_LED.h
header-y += xt_LOG.h
header-y += xt_MARK.h
header-y += xt_nfacct.h
header-y += xt_NFLOG.h
Expand Down
35 changes: 22 additions & 13 deletions include/linux/netfilter/ipset/ip_set.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
* published by the Free Software Foundation.
*/

#include <linux/types.h>

/* The protocol version */
#define IPSET_PROTOCOL 6

Expand Down Expand Up @@ -148,6 +150,7 @@ enum ipset_cmd_flags {
IPSET_FLAG_LIST_SETNAME = (1 << IPSET_FLAG_BIT_LIST_SETNAME),
IPSET_FLAG_BIT_LIST_HEADER = 2,
IPSET_FLAG_LIST_HEADER = (1 << IPSET_FLAG_BIT_LIST_HEADER),
IPSET_FLAG_CMD_MAX = 15, /* Lower half */
};

/* Flags at CADT attribute level */
Expand All @@ -156,6 +159,9 @@ enum ipset_cadt_flags {
IPSET_FLAG_BEFORE = (1 << IPSET_FLAG_BIT_BEFORE),
IPSET_FLAG_BIT_PHYSDEV = 1,
IPSET_FLAG_PHYSDEV = (1 << IPSET_FLAG_BIT_PHYSDEV),
IPSET_FLAG_BIT_NOMATCH = 2,
IPSET_FLAG_NOMATCH = (1 << IPSET_FLAG_BIT_NOMATCH),
IPSET_FLAG_CADT_MAX = 15, /* Upper half */
};

/* Commands with settype-specific attributes */
Expand All @@ -168,19 +174,10 @@ enum ipset_adt {
IPSET_CADT_MAX,
};

#ifdef __KERNEL__
#include <linux/ip.h>
#include <linux/ipv6.h>
#include <linux/netlink.h>
#include <linux/netfilter.h>
#include <linux/netfilter/x_tables.h>
#include <linux/vmalloc.h>
#include <net/netlink.h>

/* Sets are identified by an index in kernel space. Tweak with ip_set_id_t
* and IPSET_INVALID_ID if you want to increase the max number of sets.
*/
typedef u16 ip_set_id_t;
typedef __u16 ip_set_id_t;

#define IPSET_INVALID_ID 65535

Expand All @@ -203,6 +200,15 @@ enum ip_set_kopt {
IPSET_DIM_THREE_SRC = (1 << IPSET_DIM_THREE),
};

#ifdef __KERNEL__
#include <linux/ip.h>
#include <linux/ipv6.h>
#include <linux/netlink.h>
#include <linux/netfilter.h>
#include <linux/netfilter/x_tables.h>
#include <linux/vmalloc.h>
#include <net/netlink.h>

/* Set features */
enum ip_set_feature {
IPSET_TYPE_IP_FLAG = 0,
Expand Down Expand Up @@ -288,7 +294,10 @@ struct ip_set_type {
u8 features;
/* Set type dimension */
u8 dimension;
/* Supported family: may be AF_UNSPEC for both AF_INET/AF_INET6 */
/*
* Supported family: may be NFPROTO_UNSPEC for both
* NFPROTO_IPV4/NFPROTO_IPV6.
*/
u8 family;
/* Type revisions */
u8 revision_min, revision_max;
Expand Down Expand Up @@ -450,6 +459,8 @@ bitmap_bytes(u32 a, u32 b)
return 4 * ((((b - a + 8) / 8) + 3) / 4);
}

#endif /* __KERNEL__ */

/* Interface to iptables/ip6tables */

#define SO_IP_SET 83
Expand All @@ -475,6 +486,4 @@ struct ip_set_req_version {
unsigned version;
};

#endif /* __KERNEL__ */

#endif /*_IP_SET_H */
Loading

0 comments on commit c75a312

Please sign in to comment.