From: Philip Craig <philipc@snapgear.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Netfilter Developer Mailing List <netfilter-devel@lists.netfilter.org>
Subject: [PATCH] libnetfilter_conntrack: Add getter/setter for ids.
Date: Tue, 14 Aug 2007 17:20:24 +1000 [thread overview]
Message-ID: <46C157B8.7050806@snapgear.com> (raw)
[-- Attachment #1: libnfct-id.patch --]
[-- Type: text/x-diff, Size: 1713 bytes --]
You may want to skip this patch until we have a replacement for ids
in the kernel.
Signed-off-by: Philip Craig <philipc@snapgear.com>
Index: libnetfilter_conntrack/src/conntrack/getter.c
===================================================================
--- libnetfilter_conntrack.orig/src/conntrack/getter.c 2007-08-14 15:48:10.000000000 +1000
+++ libnetfilter_conntrack/src/conntrack/getter.c 2007-08-14 15:57:22.000000000 +1000
@@ -157,6 +157,11 @@
return &ct->counters[__DIR_REPL].bytes;
}
+static const void *get_attr_id(const struct nf_conntrack *ct)
+{
+ return &ct->id;
+}
+
static const void *get_attr_status(const struct nf_conntrack *ct)
{
return &ct->status;
@@ -199,5 +204,6 @@
[ATTR_REPL_COUNTER_PACKETS] = get_attr_repl_counter_packets,
[ATTR_REPL_COUNTER_BYTES] = get_attr_repl_counter_bytes,
[ATTR_USE] = get_attr_use,
+ [ATTR_ID] = get_attr_id,
[ATTR_STATUS] = get_attr_status,
};
Index: libnetfilter_conntrack/src/conntrack/setter.c
===================================================================
--- libnetfilter_conntrack.orig/src/conntrack/setter.c 2007-08-14 15:48:10.000000000 +1000
+++ libnetfilter_conntrack/src/conntrack/setter.c 2007-08-14 15:57:22.000000000 +1000
@@ -137,6 +137,11 @@
ct->mark = *((u_int32_t *) value);
}
+static void set_attr_id(struct nf_conntrack *ct, const void *value)
+{
+ ct->id = *((u_int32_t *) value);
+}
+
static void set_attr_status(struct nf_conntrack *ct, const void *value)
{
ct->status = *((u_int32_t *) value);
@@ -169,5 +174,6 @@
[ATTR_DNAT_PORT] = set_attr_dnat_port,
[ATTR_TIMEOUT] = set_attr_timeout,
[ATTR_MARK] = set_attr_mark,
+ [ATTR_ID] = set_attr_id,
[ATTR_STATUS] = set_attr_status,
};
next reply other threads:[~2007-08-14 7:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-14 7:20 Philip Craig [this message]
2007-09-02 8:55 ` [PATCH] libnetfilter_conntrack: Add getter/setter for ids Pablo Neira Ayuso
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=46C157B8.7050806@snapgear.com \
--to=philipc@snapgear.com \
--cc=netfilter-devel@lists.netfilter.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.