All of lore.kernel.org
 help / color / mirror / Atom feed
From: Max Kellermann <max@duempel.org>
To: netfilter-devel@lists.netfilter.org
Cc: Robert Iakobashvili <roberti@GoNetworks.com>
Subject: [PATCH pom-ng 4/5] use c99 initializers
Date: Wed, 19 Jan 2005 01:47:04 +0100	[thread overview]
Message-ID: <20050119004704.GE12967@roonstrasse.net> (raw)
In-Reply-To: <20050119004332.GA12629@roonstrasse.net>

[-- Attachment #1: Type: text/plain, Size: 23 bytes --]

use c99 initializers



[-- Attachment #2: 04-use_c99_initializers.patch --]
[-- Type: text/plain, Size: 4249 bytes --]

Wed Jan 19 01:34:09 CET 2005  max@duempel.org
  * use c99 initializers
diff -rN -u h323-3-old/h323-conntrack-nat/linux/net/ipv4/netfilter/ip_conntrack_h323.c h323-3-new/h323-conntrack-nat/linux/net/ipv4/netfilter/ip_conntrack_h323.c
--- h323-3-old/h323-conntrack-nat/linux/net/ipv4/netfilter/ip_conntrack_h323.c	2005-01-19 01:35:50.524216856 +0100
+++ h323-3-new/h323-conntrack-nat/linux/net/ipv4/netfilter/ip_conntrack_h323.c	2005-01-19 01:35:50.551212752 +0100
@@ -129,19 +129,16 @@
 }
 
 /* H.245 helper is not registered! */
-static struct ip_conntrack_helper h245 = 
-	{ { NULL, NULL },
-          "H.245",				/* name */
-          IP_CT_HELPER_F_REUSE_EXPECT,		/* flags */
-          NULL,					/* module */
-          8,					/* max_ expected */
-          240,					/* timeout */
-          { { 0, { 0 } },			/* tuple */
-            { 0, { 0 }, IPPROTO_TCP } },
-          { { 0, { 0xFFFF } },			/* mask */
-            { 0, { 0 }, 0xFFFF } },
-          h245_help				/* helper */
-	};
+static struct ip_conntrack_helper h245 = {
+	.name = "H.245",
+	.flags = IP_CT_HELPER_F_REUSE_EXPECT,
+	.max_expected = 8,
+	.timeout = 240,
+	.tuple = { .dst = { .protonum = IPPROTO_TCP } },
+	.mask = { .src = { .u = { 0xFFFF } },
+		  .dst = { .protonum = 0xFFFF } },
+	.help = h245_help
+};
 
 static int h225_expect(struct ip_conntrack *ct)
 {
@@ -278,19 +275,18 @@
 
 }
 
-static struct ip_conntrack_helper h225 = 
-	{ { NULL, NULL },
-	  "H.225",					/* name */
-	  IP_CT_HELPER_F_REUSE_EXPECT,			/* flags */
-	  THIS_MODULE,					/* module */
-	  2,						/* max_expected */
-	  240,						/* timeout */
-	  { { 0, { __constant_htons(H225_PORT) } },	/* tuple */
-	    { 0, { 0 }, IPPROTO_TCP } },
-	  { { 0, { 0xFFFF } },				/* mask */
-	    { 0, { 0 }, 0xFFFF } },
-	  h225_help					/* helper */
-	};
+static struct ip_conntrack_helper h225 = {
+	.name = "H.225",
+	.flags = IP_CT_HELPER_F_REUSE_EXPECT,
+	.me = THIS_MODULE,
+	.max_expected = 2,
+	.timeout = 240,
+	.tuple = { .src = { .u = { __constant_htons(H225_PORT) } },
+		   .dst = { .protonum = IPPROTO_TCP } },
+	.mask = { .src = { .u = { 0xFFFF } },
+		  .dst = { .protonum = 0xFFFF } },
+	.help = h225_help
+};
 
 static int __init init(void)
 {
diff -rN -u h323-3-old/h323-conntrack-nat/linux/net/ipv4/netfilter/ip_nat_h323.c h323-3-new/h323-conntrack-nat/linux/net/ipv4/netfilter/ip_nat_h323.c
--- h323-3-old/h323-conntrack-nat/linux/net/ipv4/netfilter/ip_nat_h323.c	2005-01-19 01:35:50.522217160 +0100
+++ h323-3-new/h323-conntrack-nat/linux/net/ipv4/netfilter/ip_nat_h323.c	2005-01-19 01:35:50.549213056 +0100
@@ -52,18 +52,18 @@
 				  unsigned int hooknum,
 				  struct sk_buff **pskb);
 
-static struct ip_nat_helper h245 =
-	{ { NULL, NULL },
-          "H.245",				/* name */
-	  0,					/* flags */
-	  NULL,					/* module */
-	  { { 0, { 0 } },			/* tuple */
-	    { 0, { 0 }, IPPROTO_TCP } },
-	  { { 0, { 0xFFFF } },			/* mask */
-	    { 0, { 0 }, 0xFFFF } },
-	  h225_nat_help,			/* helper */
-	  h225_nat_expected			/* expectfn */
-	};
+static struct ip_nat_helper h245 = {
+	.list = { NULL, NULL },
+	.name = "H.245",
+	.flags = 0,
+	.me = THIS_MODULE,
+	.tuple = { { 0, { 0 } },
+		   { 0, { 0 }, IPPROTO_TCP } },
+	.mask = { { 0, { 0xFFFF } },
+		  { 0, { 0 }, 0xFFFF } },
+	.help = h225_nat_help,
+	.expect = h225_nat_expected
+};
 
 static unsigned int
 h225_nat_expected(struct sk_buff **pskb,
@@ -386,18 +386,18 @@
 	return NF_ACCEPT;
 }
 
-static struct ip_nat_helper h225 = 
-	{ { NULL, NULL },
-	  "H.225",					/* name */
-	  IP_NAT_HELPER_F_ALWAYS, 			/* flags */
-	  THIS_MODULE,					/* module */
-	  { { 0, { .tcp = { __constant_htons(H225_PORT) } } },	/* tuple */
-	    { 0, { 0 }, IPPROTO_TCP } },
-	  { { 0, { .tcp = { 0xFFFF } } },		/* mask */
-	    { 0, { 0 }, 0xFFFF } },
-	  h225_nat_help,				/* helper */
-	  h225_nat_expected				/* expectfn */
-	};
+static struct ip_nat_helper h225 = {
+	.list = { NULL, NULL },
+	.name = "H.225",
+	.flags = IP_NAT_HELPER_F_ALWAYS,
+	.me = THIS_MODULE,
+	.tuple = { { 0, { .tcp = { __constant_htons(H225_PORT) } } },
+		   { 0, { 0 }, IPPROTO_TCP } },
+	.mask = { { 0, { .tcp = { 0xFFFF } } },
+		  { 0, { 0 }, 0xFFFF } },
+	.help = h225_nat_help,
+	.expect = h225_nat_expected
+};
 
 static int __init init(void)
 {


  parent reply	other threads:[~2005-01-19  0:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-19  0:43 [PATCH pom-ng 0/5] RFC: ip_nat|conntrack_h323.c on 2.6, first preview Max Kellermann
2005-01-19  0:44 ` [PATCH pom-ng 1/5] update kernel requires Max Kellermann
2005-01-19  0:45 ` [PATCH pom-ng 2/5] author update Max Kellermann
2005-01-19  0:46   ` Max Kellermann
2005-01-19  0:45 ` [PATCH pom-ng 3/5] whitespace and indentation Max Kellermann
2005-01-19  0:47 ` Max Kellermann [this message]
2005-01-19  0:47 ` [PATCH pom-ng 5/5] port the module to Linux 2.6 Max Kellermann
2005-01-19  8:30 ` [PATCH pom-ng 0/5] RFC: ip_nat|conntrack_h323.c on 2.6, first preview Jozsef Kadlecsik
2005-01-19  8:48   ` Max Kellermann
2005-01-19  8:56   ` Herve Eychenne
2005-01-19  9:06     ` Max Kellermann
2005-01-19  9:59     ` 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=20050119004704.GE12967@roonstrasse.net \
    --to=max@duempel.org \
    --cc=netfilter-devel@lists.netfilter.org \
    --cc=roberti@GoNetworks.com \
    /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.