Date: Thu, 6 Jul 2006 09:16:59 -0700 From: Brooks Davis <brooks@one-eyed-alien.net> To: Paolo Pisati <piso@freebsd.org> Cc: Perforce Change Reviews <perforce@freebsd.org> Subject: Re: PERFORCE change 100756 for review Message-ID: <20060706161659.GB13815@odin.ac.hmc.edu> In-Reply-To: <200607061448.k66EmJhT089494@repoman.freebsd.org> References: <200607061448.k66EmJhT089494@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] 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@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 [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFErTd6XY6L6fI4GtQRAvRzAJ9UTVO860lnK+cKUxau+ZKPM7jwggCggODj qmXBHBI7tKJ7bsWw9EzXvw4= =QGqC -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060706161659.GB13815>
