All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
To: netfilter-devel@vger.kernel.org
Cc: Patrick McHardy <kaber@trash.net>,
	Pablo Neira Ayuso <pablo@netfilter.org>,
	Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Subject: [PATCH 01/13] NFNL_SUBSYS_IPSET id and NLA_PUT_NET* macros
Date: Mon, 31 Jan 2011 23:52:56 +0100	[thread overview]
Message-ID: <1296514388-20900-2-git-send-email-kadlec@blackhole.kfki.hu> (raw)
In-Reply-To: <1296514388-20900-1-git-send-email-kadlec@blackhole.kfki.hu>

The patch adds the NFNL_SUBSYS_IPSET id and NLA_PUT_NET* macros to the vanilla
kernel.

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
---
 include/linux/netfilter/nfnetlink.h |    3 ++-
 include/net/netlink.h               |    9 +++++++++
 2 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/include/linux/netfilter/nfnetlink.h b/include/linux/netfilter/nfnetlink.h
index 361d6b5..2b11fc1 100644
--- a/include/linux/netfilter/nfnetlink.h
+++ b/include/linux/netfilter/nfnetlink.h
@@ -47,7 +47,8 @@ struct nfgenmsg {
 #define NFNL_SUBSYS_QUEUE		3
 #define NFNL_SUBSYS_ULOG		4
 #define NFNL_SUBSYS_OSF			5
-#define NFNL_SUBSYS_COUNT		6
+#define NFNL_SUBSYS_IPSET		6
+#define NFNL_SUBSYS_COUNT		7
 
 #ifdef __KERNEL__
 
diff --git a/include/net/netlink.h b/include/net/netlink.h
index 373f1a9..8a3906a 100644
--- a/include/net/netlink.h
+++ b/include/net/netlink.h
@@ -856,18 +856,27 @@ static inline int nla_put_msecs(struct sk_buff *skb, int attrtype,
 #define NLA_PUT_BE16(skb, attrtype, value) \
 	NLA_PUT_TYPE(skb, __be16, attrtype, value)
 
+#define NLA_PUT_NET16(skb, attrtype, value) \
+	NLA_PUT_BE16(skb, attrtype | NLA_F_NET_BYTEORDER, value)
+
 #define NLA_PUT_U32(skb, attrtype, value) \
 	NLA_PUT_TYPE(skb, u32, attrtype, value)
 
 #define NLA_PUT_BE32(skb, attrtype, value) \
 	NLA_PUT_TYPE(skb, __be32, attrtype, value)
 
+#define NLA_PUT_NET32(skb, attrtype, value) \
+	NLA_PUT_BE32(skb, attrtype | NLA_F_NET_BYTEORDER, value)
+
 #define NLA_PUT_U64(skb, attrtype, value) \
 	NLA_PUT_TYPE(skb, u64, attrtype, value)
 
 #define NLA_PUT_BE64(skb, attrtype, value) \
 	NLA_PUT_TYPE(skb, __be64, attrtype, value)
 
+#define NLA_PUT_NET64(skb, attrtype, value) \
+	NLA_PUT_BE64(skb, attrtype | NLA_F_NET_BYTEORDER, value)
+
 #define NLA_PUT_STRING(skb, attrtype, value) \
 	NLA_PUT(skb, attrtype, strlen(value) + 1, value)
 
-- 
1.7.0.4


  reply	other threads:[~2011-01-31 22:53 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-31 22:52 [PATCH 00/13] ipset kernel patches v3 Jozsef Kadlecsik
2011-01-31 22:52 ` Jozsef Kadlecsik [this message]
2011-01-31 22:52   ` [PATCH 02/13] IP set core support Jozsef Kadlecsik
2011-01-31 22:52     ` [PATCH 03/13] bitmap:ip set type support Jozsef Kadlecsik
2011-01-31 22:52       ` [PATCH 04/13] bitmap:ip,mac " Jozsef Kadlecsik
2011-01-31 22:53         ` [PATCH 05/13] bitmap:port set " Jozsef Kadlecsik
2011-01-31 22:53           ` [PATCH 06/13] hash:ip " Jozsef Kadlecsik
2011-01-31 22:53             ` [PATCH 07/13] hash:ip,port " Jozsef Kadlecsik
2011-01-31 22:53               ` [PATCH 08/13] hash:ip,port,ip " Jozsef Kadlecsik
2011-01-31 22:53                 ` [PATCH 09/13] hash:ip,port,net " Jozsef Kadlecsik
2011-01-31 22:53                   ` [PATCH 10/13] hash:net " Jozsef Kadlecsik
2011-01-31 22:53                     ` [PATCH 11/13] hash:net,port " Jozsef Kadlecsik
2011-01-31 22:53                       ` [PATCH 12/13] list:set " Jozsef Kadlecsik
2011-01-31 22:53                         ` [PATCH 13/13] "set" match and "SET" target support Jozsef Kadlecsik
2011-02-01 14:56                           ` Patrick McHardy
2011-02-01 14:55                         ` [PATCH 12/13] list:set set type support Patrick McHardy
2011-02-01 14:54                       ` [PATCH 11/13] hash:net,port " Patrick McHardy
2011-02-01 14:53                     ` [PATCH 10/13] hash:net " Patrick McHardy
2011-02-01 14:52                   ` [PATCH 09/13] hash:ip,port,net " Patrick McHardy
2011-02-01 14:42                 ` [PATCH 08/13] hash:ip,port,ip " Patrick McHardy
2011-02-01 14:40               ` [PATCH 07/13] hash:ip,port " Patrick McHardy
2011-02-01 14:39             ` [PATCH 06/13] hash:ip " Patrick McHardy
2011-02-01 14:37           ` [PATCH 05/13] bitmap:port " Patrick McHardy
2011-02-01 14:36         ` [PATCH 04/13] bitmap:ip,mac " Patrick McHardy
2011-02-01 14:34       ` [PATCH 03/13] bitmap:ip set " Patrick McHardy
2011-02-01 14:31     ` [PATCH 02/13] IP set core support Patrick McHardy
2011-02-01 15:34     ` Patrick McHardy
2011-02-01 19:43       ` Jozsef Kadlecsik
2011-02-01 21:22         ` Jozsef Kadlecsik
2011-02-01 21:28           ` Jozsef Kadlecsik
2011-02-02  6:50             ` Patrick McHardy
2011-02-02 19:46               ` Jozsef Kadlecsik
2011-02-02 22:56                 ` Patrick McHardy
2011-02-02  6:40         ` Patrick McHardy
2011-02-02  6:45           ` Patrick McHardy
2011-02-01 14:24   ` [PATCH 01/13] NFNL_SUBSYS_IPSET id and NLA_PUT_NET* macros Patrick McHardy
2011-02-01 14:18 ` [PATCH 00/13] ipset kernel patches v3 Patrick McHardy
2011-02-01 17:42 ` Patrick McHardy
  -- strict thread matches above, loose matches on Subject: below --
2011-01-21 14:01 [PATCH 00/13] ipset kernel patches v2 Jozsef Kadlecsik
2011-01-21 14:01 ` [PATCH 01/13] NFNL_SUBSYS_IPSET id and NLA_PUT_NET* macros Jozsef Kadlecsik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1296514388-20900-2-git-send-email-kadlec@blackhole.kfki.hu \
    --to=kadlec@blackhole.kfki.hu \
    --cc=kaber@trash.net \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.