PERFORCE change 100756 for review
Brooks Davis
brooks at one-eyed-alien.net
Thu Jul 6 16:17:56 UTC 2006
On Thu, Jul 06, 2006 at 02:48:19PM +0000, Paolo Pisati wrote:
> http://perforce.freebsd.org/chv.cgi?CH=100756
>
> Change 100756 by piso at piso_newluxor on 2006/07/06 14:48:07
>
> C99 struct init: style(9) doesn't contemplate C99 struct
> init so i had to 'invent' by myself how to indent the code...
FYI, in the various GEOM files a full tab seems to be the norm. i.e.
(from sys/geom/geom_ccd.c):
static struct g_class g_ccd_class = {
.name = "CCD",
.version = G_VERSION,
.ctlreq = g_ccd_config,
.destroy_geom = g_ccd_destroy_geom,
.start = g_ccd_start,
.orphan = g_ccd_orphan,
.access = g_ccd_access,
};
-- Brooks
> Affected files ...
>
> .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_cuseeme.c#4 edit
> .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_dummy.c#3 edit
> .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_ftp.c#4 edit
> .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_irc.c#4 edit
> .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_nbt.c#4 edit
> .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_pptp.c#4 edit
> .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_skinny.c#4 edit
> .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_smedia.c#4 edit
>
> Differences ...
>
> ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_cuseeme.c#4 (text+ko) ====
>
> @@ -103,8 +103,23 @@
> }
>
> /* Kernel module definition. */
> -struct proto_handler handlers[] = {{120, OUT, UDP, &fingerprint, &protohandlerout},
> - {120, IN, UDP, &fingerprint, &protohandlerin}, {EOH}};
> +struct proto_handler handlers[] = {
> + {
> + .pri = 120,
> + .dir = OUT,
> + .proto = UDP,
> + .fingerprint = &fingerprint,
> + .protohandler = &protohandlerout
> + },
> + {
> + .pri = 120,
> + .dir = IN,
> + .proto = UDP,
> + .fingerprint = &fingerprint,
> + .protohandler = &protohandlerin
> + },
> + { EOH }
> +};
>
> static int
> mod_handler(module_t mod, int type, void *data)
>
> ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_dummy.c#3 (text+ko) ====
>
> @@ -114,8 +114,16 @@
> * THEIR EXACT NAMES: handlers and entries.
> */
>
> -struct proto_handler handlers [] = {{666, IN|OUT, UDP|TCP, &fingerprint,
> - &protohandler}, {EOH}};
> +struct proto_handler handlers [] = {
> + {
> + .pri = 666,
> + .dir = IN|OUT,
> + .proto = UDP|TCP,
> + .fingerprint = &fingerprint,
> + .protohandler = &protohandler
> + },
> + { EOH }
> +};
>
> static int
> mod_handler(module_t mod, int type, void *data)
>
> ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_ftp.c#4 (text+ko) ====
>
> @@ -132,8 +132,16 @@
> return (0);
> }
>
> -struct proto_handler handlers[] = {{80, OUT, TCP, &fingerprint,
> - &protohandler}, {EOH}};
> +struct proto_handler handlers[] = {
> + {
> + .pri = 80,
> + .dir = OUT,
> + .proto = TCP,
> + .fingerprint = &fingerprint,
> + .protohandler = &protohandler
> + },
> + { EOH }
> +};
>
> static int
> mod_handler(module_t mod, int type, void *data)
>
> ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_irc.c#4 (text+ko) ====
>
> @@ -121,8 +121,16 @@
> return (0);
> }
>
> -struct proto_handler handlers[] = {{90, OUT, TCP, &fingerprint,
> - &protohandler}, {EOH}};
> +struct proto_handler handlers[] = {
> + {
> + .pri = 90,
> + .dir = OUT,
> + .proto = TCP,
> + .fingerprint = &fingerprint,
> + .protohandler = &protohandler
> + },
> + { EOH }
> +};
>
> static int
> mod_handler(module_t mod, int type, void *data) {
>
> ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_nbt.c#4 (text+ko) ====
>
> @@ -136,8 +136,23 @@
> }
>
> /* Kernel module definition. */
> -struct proto_handler handlers[] = {{130, IN|OUT, UDP, &fingerprint1, &protohandler1},
> - {140, IN|OUT, UDP, &fingerprint2, &protohandler2}, {EOH}};
> +struct proto_handler handlers[] = {
> + {
> + .pri = 130,
> + .dir = IN|OUT,
> + .proto = UDP,
> + .fingerprint = &fingerprint1,
> + .protohandler = &protohandler1
> + },
> + {
> + .pri = 140,
> + .dir = IN|OUT,
> + .proto = UDP,
> + .fingerprint = &fingerprint2,
> + .protohandler = &protohandler2
> + },
> + { EOH }
> +};
>
> static int
> mod_handler(module_t mod, int type, void *data)
>
> ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_pptp.c#4 (text+ko) ====
>
> @@ -159,15 +159,42 @@
> }
>
> /* Kernel module definition. */
> -struct proto_handler handlers[] = {{200, IN, TCP, &fingerprint, &protohandlerin},
> - {210, OUT, TCP, &fingerprint, &protohandlerout},
> +struct proto_handler handlers[] = {
> + {
> + .pri = 200,
> + .dir = IN,
> + .proto = TCP,
> + .fingerprint = &fingerprint,
> + .protohandler = &protohandlerin
> + },
> + {
> + .pri = 210,
> + .dir = OUT,
> + .proto = TCP,
> + .fingerprint = &fingerprint,
> + .protohandler = &protohandlerout
> + },
> /*
> * WATCH OUT!!! these 2 handlers NEED a priority of INT_MAX (highest possible)
> * cause they will ALWAYS process packets, so they must be the last one
> * in chain: look fingerprintgre() above.
> */
> - {INT_MAX, IN, IP, &fingerprintgre, &protohandlergrein},
> - {INT_MAX, OUT, IP, &fingerprintgre, &protohandlergreout}, {EOH}};
> + {
> + .pri = INT_MAX,
> + .dir = IN,
> + .proto = IP,
> + .fingerprint = &fingerprintgre,
> + .protohandler = &protohandlergrein
> + },
> + {
> + .pri = INT_MAX,
> + .dir = OUT,
> + .proto = IP,
> + .fingerprint = &fingerprintgre,
> + .protohandler = &protohandlergreout
> + },
> + { EOH }
> +};
> static int
> mod_handler(module_t mod, int type, void *data)
> {
>
> ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_skinny.c#4 (text+ko) ====
>
> @@ -91,8 +91,16 @@
> return (0);
> }
>
> -struct proto_handler handlers[] = {{110, IN|OUT, TCP, &fingerprint,
> - &protohandler}, {EOH}};
> +struct proto_handler handlers[] = {
> + {
> + .pri = 110,
> + .dir = IN|OUT,
> + .proto = TCP,
> + .fingerprint = &fingerprint,
> + .protohandler = &protohandler
> + },
> + { EOH }
> +};
>
> static int
> mod_handler(module_t mod, int type, void *data)
>
> ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_smedia.c#4 (text+ko) ====
>
> @@ -167,8 +167,16 @@
> return (0);
> }
>
> -struct proto_handler handlers[] = {{100, OUT, TCP|UDP, &fingerprint,
> - &protohandler}, {EOH}};
> +struct proto_handler handlers[] = {
> + {
> + .pri = 100,
> + .dir = OUT,
> + .proto = TCP|UDP,
> + .fingerprint = &fingerprint,
> + .protohandler = &protohandler
> + },
> + { EOH }
> +};
>
> static int
> mod_handler(module_t mod, int type, void *data)
--
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/p4-projects/attachments/20060706/c013042f/attachment.pgp
More information about the p4-projects
mailing list