Date: Thu, 6 Jul 2006 14:48:19 GMT From: Paolo Pisati <piso@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 100756 for review Message-ID: <200607061448.k66EmJhT089494@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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... 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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607061448.k66EmJhT089494>