* [PATCH] libnetfilter_conntrack: Add getter/setter for ids.
@ 2007-08-14 7:20 Philip Craig
2007-09-02 8:55 ` Pablo Neira Ayuso
0 siblings, 1 reply; 2+ messages in thread
From: Philip Craig @ 2007-08-14 7:20 UTC (permalink / raw)
To: Pablo Neira Ayuso; +Cc: Netfilter Developer Mailing List
[-- 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,
};
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] libnetfilter_conntrack: Add getter/setter for ids.
2007-08-14 7:20 [PATCH] libnetfilter_conntrack: Add getter/setter for ids Philip Craig
@ 2007-09-02 8:55 ` Pablo Neira Ayuso
0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2007-09-02 8:55 UTC (permalink / raw)
To: Philip Craig; +Cc: Netfilter Developer Mailing List
Philip Craig wrote:
> You may want to skip this patch until we have a replacement for ids
> in the kernel.
Ids are scheduled to be removed from kernel, so I prefer keeping this
patch back.
--
"Será preciso viajar por los ojos de los idiotas" -- Poeta en Nueva York
-- Federico García Lorca.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-09-02 8:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-14 7:20 [PATCH] libnetfilter_conntrack: Add getter/setter for ids Philip Craig
2007-09-02 8:55 ` Pablo Neira Ayuso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).