From owner-svn-src-all@FreeBSD.ORG Wed Dec 25 02:06:59 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6D35FA59; Wed, 25 Dec 2013 02:06:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 57DC11571; Wed, 25 Dec 2013 02:06:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBP26xoh084904; Wed, 25 Dec 2013 02:06:59 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBP26wsD084895; Wed, 25 Dec 2013 02:06:58 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201312250206.rBP26wsD084895@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 25 Dec 2013 02:06:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259858 - head/sys/netinet/libalias X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Dec 2013 02:06:59 -0000 Author: glebius Date: Wed Dec 25 02:06:57 2013 New Revision: 259858 URL: http://svnweb.freebsd.org/changeset/base/259858 Log: Kill space at eols. Modified: head/sys/netinet/libalias/alias_cuseeme.c head/sys/netinet/libalias/alias_dummy.c head/sys/netinet/libalias/alias_irc.c head/sys/netinet/libalias/alias_nbt.c head/sys/netinet/libalias/alias_pptp.c head/sys/netinet/libalias/alias_skinny.c head/sys/netinet/libalias/alias_smedia.c Modified: head/sys/netinet/libalias/alias_cuseeme.c ============================================================================== --- head/sys/netinet/libalias/alias_cuseeme.c Wed Dec 25 01:58:19 2013 (r259857) +++ head/sys/netinet/libalias/alias_cuseeme.c Wed Dec 25 02:06:57 2013 (r259858) @@ -56,14 +56,14 @@ __FBSDID("$FreeBSD$"); #define CUSEEME_PORT_NUMBER 7648 static void -AliasHandleCUSeeMeOut(struct libalias *la, struct ip *pip, +AliasHandleCUSeeMeOut(struct libalias *la, struct ip *pip, struct alias_link *lnk); static void -AliasHandleCUSeeMeIn(struct libalias *la, struct ip *pip, +AliasHandleCUSeeMeIn(struct libalias *la, struct ip *pip, struct in_addr original_addr); -static int +static int fingerprint(struct libalias *la, struct alias_data *ah) { @@ -74,7 +74,7 @@ fingerprint(struct libalias *la, struct return (-1); } -static int +static int protohandlerin(struct libalias *la, struct ip *pip, struct alias_data *ah) { @@ -82,7 +82,7 @@ protohandlerin(struct libalias *la, stru return (0); } -static int +static int protohandlerout(struct libalias *la, struct ip *pip, struct alias_data *ah) { @@ -92,20 +92,20 @@ protohandlerout(struct libalias *la, str /* Kernel module definition. */ struct proto_handler handlers[] = { - { - .pri = 120, - .dir = OUT, - .proto = UDP, - .fingerprint = &fingerprint, + { + .pri = 120, + .dir = OUT, + .proto = UDP, + .fingerprint = &fingerprint, .protohandler = &protohandlerout - }, + }, { - .pri = 120, - .dir = IN, - .proto = UDP, - .fingerprint = &fingerprint, + .pri = 120, + .dir = IN, + .proto = UDP, + .fingerprint = &fingerprint, .protohandler = &protohandlerin - }, + }, { EOH } }; @@ -130,9 +130,9 @@ mod_handler(module_t mod, int type, void } #ifdef _KERNEL -static +static #endif -moduledata_t +moduledata_t alias_mod = { "alias_cuseeme", mod_handler, NULL }; Modified: head/sys/netinet/libalias/alias_dummy.c ============================================================================== --- head/sys/netinet/libalias/alias_dummy.c Wed Dec 25 01:58:19 2013 (r259857) +++ head/sys/netinet/libalias/alias_dummy.c Wed Dec 25 02:06:57 2013 (r259858) @@ -27,7 +27,7 @@ #include __FBSDID("$FreeBSD$"); -/* +/* * Alias_dummy is just an empty skeleton used to demostrate how to write * a module for libalias, that will run unalterated in userland or in * kernel land. @@ -59,19 +59,19 @@ __FBSDID("$FreeBSD$"); static void AliasHandleDummy(struct libalias *la, struct ip *ip, struct alias_data *ah); -static int +static int fingerprint(struct libalias *la, struct alias_data *ah) { - /* - * Check here all the data that will be used later, if any field + /* + * Check here all the data that will be used later, if any field * is empy/NULL, return a -1 value. */ - if (ah->dport == NULL || ah->sport == NULL || ah->lnk == NULL || + if (ah->dport == NULL || ah->sport == NULL || ah->lnk == NULL || ah->maxpktsize == 0) return (-1); - /* - * Fingerprint the incoming packet, if it matches any conditions + /* + * Fingerprint the incoming packet, if it matches any conditions * return an OK value. */ if (ntohs(*ah->dport) == 123 @@ -80,12 +80,12 @@ fingerprint(struct libalias *la, struct return (-1); /* I don't recognize this packet. */ } -/* - * Wrap in this general purpose function, the real function used to alias the +/* + * Wrap in this general purpose function, the real function used to alias the * packets. */ -static int +static int protohandler(struct libalias *la, struct ip *pip, struct alias_data *ah) { @@ -93,22 +93,22 @@ protohandler(struct libalias *la, struct return (0); } -/* - * NOTA BENE: the next variable MUST NOT be renamed in any case if you want - * your module to work in userland, cause it's used to find and use all +/* + * NOTA BENE: the next variable MUST NOT be renamed in any case if you want + * your module to work in userland, cause it's used to find and use all * the protocol handlers present in every module. - * So WATCH OUT, your module needs this variables and it needs it with + * So WATCH OUT, your module needs this variables and it needs it with * ITS EXACT NAME: handlers. */ struct proto_handler handlers [] = { - { - .pri = 666, - .dir = IN|OUT, - .proto = UDP|TCP, - .fingerprint = &fingerprint, + { + .pri = 666, + .dir = IN|OUT, + .proto = UDP|TCP, + .fingerprint = &fingerprint, .protohandler = &protohandler - }, + }, { EOH } }; @@ -117,7 +117,7 @@ mod_handler(module_t mod, int type, void { int error; - switch (type) { + switch (type) { case MOD_LOAD: error = 0; LibAliasAttachHandlers(handlers); Modified: head/sys/netinet/libalias/alias_irc.c ============================================================================== --- head/sys/netinet/libalias/alias_irc.c Wed Dec 25 01:58:19 2013 (r259857) +++ head/sys/netinet/libalias/alias_irc.c Wed Dec 25 02:06:57 2013 (r259858) @@ -92,11 +92,11 @@ static void AliasHandleIrcOut(struct libalias *, struct ip *, struct alias_link *, int maxpacketsize); -static int +static int fingerprint(struct libalias *la, struct alias_data *ah) { - if (ah->dport == NULL || ah->dport == NULL || ah->lnk == NULL || + if (ah->dport == NULL || ah->dport == NULL || ah->lnk == NULL || ah->maxpktsize == 0) return (-1); if (ntohs(*ah->dport) == IRC_CONTROL_PORT_NUMBER_1 @@ -105,7 +105,7 @@ fingerprint(struct libalias *la, struct return (-1); } -static int +static int protohandler(struct libalias *la, struct ip *pip, struct alias_data *ah) { @@ -118,13 +118,13 @@ protohandler(struct libalias *la, struct } struct proto_handler handlers[] = { - { - .pri = 90, - .dir = OUT, - .proto = TCP, - .fingerprint = &fingerprint, + { + .pri = 90, + .dir = OUT, + .proto = TCP, + .fingerprint = &fingerprint, .protohandler = &protohandler - }, + }, { EOH } }; @@ -149,7 +149,7 @@ mod_handler(module_t mod, int type, void } #ifdef _KERNEL -static +static #endif moduledata_t alias_mod = { "alias_irc", mod_handler, NULL Modified: head/sys/netinet/libalias/alias_nbt.c ============================================================================== --- head/sys/netinet/libalias/alias_nbt.c Wed Dec 25 01:58:19 2013 (r259857) +++ head/sys/netinet/libalias/alias_nbt.c Wed Dec 25 02:06:57 2013 (r259858) @@ -70,17 +70,17 @@ __FBSDID("$FreeBSD$"); #define NETBIOS_DGM_PORT_NUMBER 138 static int -AliasHandleUdpNbt(struct libalias *, struct ip *, struct alias_link *, +AliasHandleUdpNbt(struct libalias *, struct ip *, struct alias_link *, struct in_addr *, u_short); static int AliasHandleUdpNbtNS(struct libalias *, struct ip *, struct alias_link *, struct in_addr *, u_short *, struct in_addr *, u_short *); -static int +static int fingerprint1(struct libalias *la, struct alias_data *ah) { - if (ah->dport == NULL || ah->sport == NULL || ah->lnk == NULL || + if (ah->dport == NULL || ah->sport == NULL || ah->lnk == NULL || ah->aaddr == NULL || ah->aport == NULL) return (-1); if (ntohs(*ah->dport) == NETBIOS_DGM_PORT_NUMBER @@ -89,18 +89,18 @@ fingerprint1(struct libalias *la, struct return (-1); } -static int +static int protohandler1(struct libalias *la, struct ip *pip, struct alias_data *ah) { return (AliasHandleUdpNbt(la, pip, ah->lnk, ah->aaddr, *ah->aport)); } -static int +static int fingerprint2(struct libalias *la, struct alias_data *ah) { - if (ah->dport == NULL || ah->sport == NULL || ah->lnk == NULL || + if (ah->dport == NULL || ah->sport == NULL || ah->lnk == NULL || ah->aaddr == NULL || ah->aport == NULL) return (-1); if (ntohs(*ah->dport) == NETBIOS_NS_PORT_NUMBER @@ -109,7 +109,7 @@ fingerprint2(struct libalias *la, struct return (-1); } -static int +static int protohandler2in(struct libalias *la, struct ip *pip, struct alias_data *ah) { @@ -118,7 +118,7 @@ protohandler2in(struct libalias *la, str return (0); } -static int +static int protohandler2out(struct libalias *la, struct ip *pip, struct alias_data *ah) { @@ -128,27 +128,27 @@ protohandler2out(struct libalias *la, st /* Kernel module definition. */ struct proto_handler handlers[] = { - { - .pri = 130, - .dir = IN|OUT, - .proto = UDP, - .fingerprint = &fingerprint1, + { + .pri = 130, + .dir = IN|OUT, + .proto = UDP, + .fingerprint = &fingerprint1, .protohandler = &protohandler1 - }, - { - .pri = 140, - .dir = IN, - .proto = UDP, - .fingerprint = &fingerprint2, + }, + { + .pri = 140, + .dir = IN, + .proto = UDP, + .fingerprint = &fingerprint2, .protohandler = &protohandler2in - }, - { - .pri = 140, - .dir = OUT, - .proto = UDP, - .fingerprint = &fingerprint2, + }, + { + .pri = 140, + .dir = OUT, + .proto = UDP, + .fingerprint = &fingerprint2, .protohandler = &protohandler2out - }, + }, { EOH } }; @@ -173,7 +173,7 @@ mod_handler(module_t mod, int type, void } #ifdef _KERNEL -static +static #endif moduledata_t alias_mod = { "alias_nbt", mod_handler, NULL Modified: head/sys/netinet/libalias/alias_pptp.c ============================================================================== --- head/sys/netinet/libalias/alias_pptp.c Wed Dec 25 01:58:19 2013 (r259857) +++ head/sys/netinet/libalias/alias_pptp.c Wed Dec 25 02:06:57 2013 (r259858) @@ -78,7 +78,7 @@ AliasHandlePptpGreOut(struct libalias *, static int AliasHandlePptpGreIn(struct libalias *, struct ip *); -static int +static int fingerprint(struct libalias *la, struct alias_data *ah) { @@ -90,14 +90,14 @@ fingerprint(struct libalias *la, struct return (-1); } -static int +static int fingerprintgre(struct libalias *la, struct alias_data *ah) { return (0); } -static int +static int protohandlerin(struct libalias *la, struct ip *pip, struct alias_data *ah) { @@ -105,7 +105,7 @@ protohandlerin(struct libalias *la, stru return (0); } -static int +static int protohandlerout(struct libalias *la, struct ip *pip, struct alias_data *ah) { @@ -113,7 +113,7 @@ protohandlerout(struct libalias *la, str return (0); } -static int +static int protohandlergrein(struct libalias *la, struct ip *pip, struct alias_data *ah) { @@ -123,7 +123,7 @@ protohandlergrein(struct libalias *la, s return (-1); } -static int +static int protohandlergreout(struct libalias *la, struct ip *pip, struct alias_data *ah) { @@ -134,39 +134,39 @@ protohandlergreout(struct libalias *la, /* Kernel module definition. */ struct proto_handler handlers[] = { - { - .pri = 200, - .dir = IN, - .proto = TCP, - .fingerprint = &fingerprint, + { + .pri = 200, + .dir = IN, + .proto = TCP, + .fingerprint = &fingerprint, .protohandler = &protohandlerin }, - { - .pri = 210, - .dir = OUT, - .proto = TCP, - .fingerprint = &fingerprint, + { + .pri = 210, + .dir = OUT, + .proto = TCP, + .fingerprint = &fingerprint, .protohandler = &protohandlerout }, -/* - * WATCH OUT!!! these 2 handlers NEED a priority of INT_MAX (highest possible) +/* + * 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. */ - { - .pri = INT_MAX, - .dir = IN, - .proto = IP, - .fingerprint = &fingerprintgre, + { + .pri = INT_MAX, + .dir = IN, + .proto = IP, + .fingerprint = &fingerprintgre, .protohandler = &protohandlergrein }, - { - .pri = INT_MAX, - .dir = OUT, - .proto = IP, - .fingerprint = &fingerprintgre, + { + .pri = INT_MAX, + .dir = OUT, + .proto = IP, + .fingerprint = &fingerprintgre, .protohandler = &protohandlergreout - }, + }, { EOH } }; static int @@ -190,7 +190,7 @@ mod_handler(module_t mod, int type, void } #ifdef _KERNEL -static +static #endif moduledata_t alias_mod = { "alias_pptp", mod_handler, NULL Modified: head/sys/netinet/libalias/alias_skinny.c ============================================================================== --- head/sys/netinet/libalias/alias_skinny.c Wed Dec 25 01:58:19 2013 (r259857) +++ head/sys/netinet/libalias/alias_skinny.c Wed Dec 25 02:06:57 2013 (r259858) @@ -56,7 +56,7 @@ static void AliasHandleSkinny(struct libalias *, struct ip *, struct alias_link *); -static int +static int fingerprint(struct libalias *la, struct alias_data *ah) { @@ -68,7 +68,7 @@ fingerprint(struct libalias *la, struct return (-1); } -static int +static int protohandler(struct libalias *la, struct ip *pip, struct alias_data *ah) { @@ -77,13 +77,13 @@ protohandler(struct libalias *la, struct } struct proto_handler handlers[] = { - { - .pri = 110, - .dir = IN|OUT, - .proto = TCP, - .fingerprint = &fingerprint, + { + .pri = 110, + .dir = IN|OUT, + .proto = TCP, + .fingerprint = &fingerprint, .protohandler = &protohandler - }, + }, { EOH } }; @@ -108,7 +108,7 @@ mod_handler(module_t mod, int type, void } #ifdef _KERNEL -static +static #endif moduledata_t alias_mod = { "alias_skinny", mod_handler, NULL Modified: head/sys/netinet/libalias/alias_smedia.c ============================================================================== --- head/sys/netinet/libalias/alias_smedia.c Wed Dec 25 01:58:19 2013 (r259857) +++ head/sys/netinet/libalias/alias_smedia.c Wed Dec 25 02:06:57 2013 (r259858) @@ -131,14 +131,14 @@ __FBSDID("$FreeBSD$"); static void AliasHandleRtspOut(struct libalias *, struct ip *, struct alias_link *, int maxpacketsize); -static int +static int fingerprint(struct libalias *la, struct alias_data *ah) { if (ah->dport != NULL && ah->aport != NULL && ah->sport != NULL && ntohs(*ah->dport) == TFTP_PORT_NUMBER) return (0); - if (ah->dport == NULL || ah->sport == NULL || ah->lnk == NULL || + if (ah->dport == NULL || ah->sport == NULL || ah->lnk == NULL || ah->maxpktsize == 0) return (-1); if (ntohs(*ah->dport) == RTSP_CONTROL_PORT_NUMBER_1 @@ -149,7 +149,7 @@ fingerprint(struct libalias *la, struct return (-1); } -static int +static int protohandler(struct libalias *la, struct ip *pip, struct alias_data *ah) { @@ -161,13 +161,13 @@ protohandler(struct libalias *la, struct } struct proto_handler handlers[] = { - { - .pri = 100, - .dir = OUT, + { + .pri = 100, + .dir = OUT, .proto = TCP|UDP, - .fingerprint = &fingerprint, + .fingerprint = &fingerprint, .protohandler = &protohandler - }, + }, { EOH } }; @@ -192,7 +192,7 @@ mod_handler(module_t mod, int type, void } #ifdef _KERNEL -static +static #endif moduledata_t alias_mod = { "alias_smedia", mod_handler, NULL @@ -406,7 +406,7 @@ alias_rtsp_out(struct libalias *la, stru SetAckModified(lnk); tc = (struct tcphdr *)ip_next(pip); delta = GetDeltaSeqOut(tc->th_seq, lnk); - AddSeq(lnk, delta + new_dlen - dlen, pip->ip_hl, pip->ip_len, + AddSeq(lnk, delta + new_dlen - dlen, pip->ip_hl, pip->ip_len, tc->th_seq, tc->th_off); new_len = htons(hlen + new_dlen);