From owner-p4-projects@FreeBSD.ORG Thu Jul 6 14:48:21 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C8FE116A4DF; Thu, 6 Jul 2006 14:48:20 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1FE4B16A4DD for ; Thu, 6 Jul 2006 14:48:20 +0000 (UTC) (envelope-from piso@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C791F43D49 for ; Thu, 6 Jul 2006 14:48:19 +0000 (GMT) (envelope-from piso@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k66EmJK1089497 for ; Thu, 6 Jul 2006 14:48:19 GMT (envelope-from piso@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k66EmJhT089494 for perforce@freebsd.org; Thu, 6 Jul 2006 14:48:19 GMT (envelope-from piso@freebsd.org) Date: Thu, 6 Jul 2006 14:48:19 GMT Message-Id: <200607061448.k66EmJhT089494@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to piso@freebsd.org using -f From: Paolo Pisati To: Perforce Change Reviews Cc: Subject: PERFORCE change 100756 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2006 14:48:21 -0000 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)