Date: Fri, 25 Aug 2006 16:52:31 GMT From: Paolo Pisati <piso@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 105063 for review Message-ID: <200608251652.k7PGqVVU007547@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 },
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608251652.k7PGqVVU007547>