netfilter: xt_conntrack: support matching on port ranges
[linux-2.6.git] / include / linux / netfilter / nfnetlink.h
index e61a8a5..361d6b5 100644 (file)
@@ -25,8 +25,8 @@ enum nfnetlink_groups {
 /* General form of address family dependent message.
  */
 struct nfgenmsg {
-       u_int8_t  nfgen_family;         /* AF_xxx */
-       u_int8_t  version;              /* nfnetlink version */
+       __u8  nfgen_family;             /* AF_xxx */
+       __u8  version;          /* nfnetlink version */
        __be16    res_id;               /* resource id */
 };
 
@@ -46,7 +46,8 @@ struct nfgenmsg {
 #define NFNL_SUBSYS_CTNETLINK_EXP      2
 #define NFNL_SUBSYS_QUEUE              3
 #define NFNL_SUBSYS_ULOG               4
-#define NFNL_SUBSYS_COUNT              5
+#define NFNL_SUBSYS_OSF                        5
+#define NFNL_SUBSYS_COUNT              6
 
 #ifdef __KERNEL__
 
@@ -54,15 +55,15 @@ struct nfgenmsg {
 #include <linux/capability.h>
 #include <net/netlink.h>
 
-struct nfnl_callback
-{
+struct nfnl_callback {
        int (*call)(struct sock *nl, struct sk_buff *skb, 
-               struct nlmsghdr *nlh, struct nlattr *cda[]);
-       u_int16_t attr_count;   /* number of nlattr's */
+                   const struct nlmsghdr *nlh,
+                   const struct nlattr * const cda[]);
+       const struct nla_policy *policy;        /* netlink attribute policy */
+       const u_int16_t attr_count;             /* number of nlattr's */
 };
 
-struct nfnetlink_subsystem
-{
+struct nfnetlink_subsystem {
        const char *name;
        __u8 subsys_id;                 /* nfnetlink subsystem ID */
        __u8 cb_count;                  /* number of callbacks */
@@ -72,23 +73,14 @@ struct nfnetlink_subsystem
 extern int nfnetlink_subsys_register(const struct nfnetlink_subsystem *n);
 extern int nfnetlink_subsys_unregister(const struct nfnetlink_subsystem *n);
 
-#define nlattr_bad_size(tb, max, cta_min)                              \
-({     int __i, __res = 0;                                             \
-       for (__i=1; __i <= max; __i++) {                                        \
-               if (!cta_min[__i])                                      \
-                       continue;                                       \
-               if (tb[__i] && nla_len(tb[__i]) < cta_min[__i]){        \
-                       __res = 1;                                      \
-                       break;                                          \
-               }                                                       \
-       }                                                               \
-       __res;                                                          \
-})
+extern int nfnetlink_has_listeners(struct net *net, unsigned int group);
+extern int nfnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, unsigned group,
+                         int echo, gfp_t flags);
+extern int nfnetlink_set_err(struct net *net, u32 pid, u32 group, int error);
+extern int nfnetlink_unicast(struct sk_buff *skb, struct net *net, u_int32_t pid, int flags);
 
-extern int nfnetlink_has_listeners(unsigned int group);
-extern int nfnetlink_send(struct sk_buff *skb, u32 pid, unsigned group, 
-                         int echo);
-extern int nfnetlink_unicast(struct sk_buff *skb, u_int32_t pid, int flags);
+extern void nfnl_lock(void);
+extern void nfnl_unlock(void);
 
 #define MODULE_ALIAS_NFNL_SUBSYS(subsys) \
        MODULE_ALIAS("nfnetlink-subsys-" __stringify(subsys))