From owner-p4-projects@FreeBSD.ORG Fri Aug 25 16:52:32 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 C35FA16A4EC; Fri, 25 Aug 2006 16:52:32 +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 9E70316A4EB for ; Fri, 25 Aug 2006 16:52:32 +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 4F46143D46 for ; Fri, 25 Aug 2006 16:52:32 +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 k7PGqWHh007550 for ; Fri, 25 Aug 2006 16:52:32 GMT (envelope-from piso@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7PGqVVU007547 for perforce@freebsd.org; Fri, 25 Aug 2006 16:52:31 GMT (envelope-from piso@freebsd.org) Date: Fri, 25 Aug 2006 16:52:31 GMT Message-Id: <200608251652.k7PGqVVU007547@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 105063 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: Fri, 25 Aug 2006 16:52:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=105063 Change 105063 by piso@piso_newluxor on 2006/08/25 16:52:15 Backout previous commit: unfortunately i can't use protocols defined in netinet/in.h in my code (having IPPROTO_IP defined as 0 doesn't fit wth the rest of my work...). Affected files ... .. //depot/projects/soc2005/libalias/sys/modules/libalias/libalias/Makefile#2 edit .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias.c#11 edit .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_cuseeme.c#8 edit .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_dummy.c#8 edit .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_ftp.c#8 edit .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_irc.c#9 edit .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_mod.c#18 edit .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_mod.h#18 edit .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_nbt.c#9 edit .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_pptp.c#7 edit .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_skinny.c#7 edit .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_smedia.c#8 edit Differences ... ==== //depot/projects/soc2005/libalias/sys/modules/libalias/libalias/Makefile#2 (text+ko) ==== ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias.c#11 (text+ko) ==== @@ -741,7 +741,7 @@ ud->uh_dport = GetOriginalPort(lnk); /* Walk out chain. */ - error = find_handler(IN, IPPROTO_UDP, la, pip, &ad); + error = find_handler(IN, UDP, la, pip, &ad); /* If UDP checksum is not zero, then adjust since destination port */ /* is being unaliased and destination address is being altered. */ @@ -801,7 +801,7 @@ alias_port = GetAliasPort(lnk); /* Walk out chain. */ - error = find_handler(OUT, IPPROTO_UDP, la, pip, &ad); + error = find_handler(OUT, UDP, la, pip, &ad); /* If UDP checksum is not zero, adjust since source port is */ /* being aliased and source address is being altered */ @@ -866,7 +866,7 @@ }; /* Walk out chain. */ - error = find_handler(IN, IPPROTO_TCP, la, pip, &ad); + error = find_handler(IN, TCP, la, pip, &ad); alias_address = GetAliasAddress(lnk); original_address = GetOriginalAddress(lnk); @@ -1025,7 +1025,7 @@ TcpMonitorOut(pip, lnk); /* Walk out chain. */ - error = find_handler(OUT, IPPROTO_TCP, la, pip, &ad); + error = find_handler(OUT, TCP, la, pip, &ad); /* Adjust TCP checksum since source port is being aliased */ /* and source address is being altered */ @@ -1239,7 +1239,7 @@ }; /* Walk out chain. */ - error = find_handler(IN, IPPROTO_IP, la, pip, &ad); + error = find_handler(IN, IP, la, pip, &ad); if (error == 0) iresult = PKT_ALIAS_OK; else @@ -1364,7 +1364,7 @@ .maxpktsize = 0 }; /* Walk out chain. */ - error = find_handler(OUT, IPPROTO_IP, la, pip, &ad); + error = find_handler(OUT, IP, la, pip, &ad); if (error == 0) iresult = PKT_ALIAS_OK; else ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_cuseeme.c#8 (text+ko) ==== @@ -98,14 +98,14 @@ { .pri = 120, .dir = OUT, - .proto = IPPROTO_UDP, + .proto = UDP, .fingerprint = &fingerprint, .protohandler = &protohandlerout }, { .pri = 120, .dir = IN, - .proto = IPPROTO_UDP, + .proto = UDP, .fingerprint = &fingerprint, .protohandler = &protohandlerin }, ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_dummy.c#8 (text+ko) ==== @@ -111,7 +111,7 @@ { .pri = 666, .dir = IN|OUT, - .proto = IPPROTO_UDP | IPPROTO_TCP, + .proto = UDP|TCP, .fingerprint = &fingerprint, .protohandler = &protohandler }, ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_ftp.c#8 (text+ko) ==== @@ -130,7 +130,7 @@ { .pri = 80, .dir = OUT, - .proto = IPPROTO_TCP, + .proto = TCP, .fingerprint = &fingerprint, .protohandler = &protohandler }, ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_irc.c#9 (text+ko) ==== @@ -115,7 +115,7 @@ { .pri = 90, .dir = OUT, - .proto = IPPROTO_TCP, + .proto = TCP, .fingerprint = &fingerprint, .protohandler = &protohandler }, ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_mod.c#18 (text+ko) ==== ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_mod.h#18 (text+ko) ==== @@ -92,8 +92,8 @@ void handler_chain_init(void); void handler_chain_destroy(void); -int attach_handlers(struct proto_handler *); -int detach_handlers(struct proto_handler *); +int LibAliasAttachHandlers(struct proto_handler *); +int LibAliasDetachHandlers(struct proto_handler *); int detach_handler(struct proto_handler *); int find_handler(int8_t, int8_t, struct libalias *, struct ip *, struct alias_data *); ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_nbt.c#9 (text+ko) ==== @@ -136,21 +136,21 @@ { .pri = 130, .dir = IN|OUT, - .proto = IPPROTO_UDP, + .proto = UDP, .fingerprint = &fingerprint1, .protohandler = &protohandler1 }, { .pri = 140, .dir = IN, - .proto = IPPROTO_UDP, + .proto = UDP, .fingerprint = &fingerprint2, .protohandler = &protohandler2in }, { .pri = 140, .dir = OUT, - .proto = IPPROTO_UDP, + .proto = UDP, .fingerprint = &fingerprint2, .protohandler = &protohandler2out }, ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_pptp.c#7 (text+ko) ==== @@ -145,14 +145,14 @@ { .pri = 200, .dir = IN, - .proto = IPPROTO_TCP, + .proto = TCP, .fingerprint = &fingerprint, .protohandler = &protohandlerin }, { .pri = 210, .dir = OUT, - .proto = IPPROTO_TCP, + .proto = TCP, .fingerprint = &fingerprint, .protohandler = &protohandlerout }, @@ -164,14 +164,14 @@ { .pri = INT_MAX, .dir = IN, - .proto = IPPROTO_IP, + .proto = IP, .fingerprint = &fingerprintgre, .protohandler = &protohandlergrein }, { .pri = INT_MAX, .dir = OUT, - .proto = IPPROTO_IP, + .proto = IP, .fingerprint = &fingerprintgre, .protohandler = &protohandlergreout }, ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_skinny.c#7 (text+ko) ==== @@ -89,7 +89,7 @@ { .pri = 110, .dir = IN|OUT, - .proto = IPPROTO_TCP, + .proto = TCP, .fingerprint = &fingerprint, .protohandler = &protohandler }, ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_smedia.c#8 (text+ko) ==== @@ -165,7 +165,7 @@ { .pri = 100, .dir = OUT, - .proto = IPPROTO_TCP|IPPROTO_UDP, + .proto = TCP|UDP, .fingerprint = &fingerprint, .protohandler = &protohandler },