Date: Fri, 25 Aug 2006 15:10:22 GMT From: Paolo Pisati <piso@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 105056 for review Message-ID: <200608251510.k7PFAMJE078994@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=105056 Change 105056 by piso@piso_newluxor on 2006/08/25 15:10:03 Use protocol numbers from netinet/in.h instead of redefining them. Affected files ... .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias.c#10 edit .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_cuseeme.c#7 edit .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_dummy.c#7 edit .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_ftp.c#7 edit .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_irc.c#8 edit .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_mod.h#17 edit .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_nbt.c#8 edit .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_pptp.c#6 edit .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_skinny.c#6 edit .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_smedia.c#7 edit Differences ... ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias.c#10 (text+ko) ==== @@ -741,7 +741,7 @@ ud->uh_dport = GetOriginalPort(lnk); /* Walk out chain. */ - error = find_handler(IN, UDP, la, pip, &ad); + error = find_handler(IN, IPPROTO_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, UDP, la, pip, &ad); + error = find_handler(OUT, IPPROTO_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, TCP, la, pip, &ad); + error = find_handler(IN, IPPROTO_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, TCP, la, pip, &ad); + error = find_handler(OUT, IPPROTO_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, IP, la, pip, &ad); + error = find_handler(IN, IPPROTO_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, IP, la, pip, &ad); + error = find_handler(OUT, IPPROTO_IP, la, pip, &ad); if (error == 0) iresult = PKT_ALIAS_OK; else ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_cuseeme.c#7 (text+ko) ==== @@ -98,14 +98,14 @@ { .pri = 120, .dir = OUT, - .proto = UDP, + .proto = IPPROTO_UDP, .fingerprint = &fingerprint, .protohandler = &protohandlerout }, { .pri = 120, .dir = IN, - .proto = UDP, + .proto = IPPROTO_UDP, .fingerprint = &fingerprint, .protohandler = &protohandlerin }, ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_dummy.c#7 (text+ko) ==== @@ -111,7 +111,7 @@ { .pri = 666, .dir = IN|OUT, - .proto = UDP|TCP, + .proto = IPPROTO_UDP | IPPROTO_TCP, .fingerprint = &fingerprint, .protohandler = &protohandler }, ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_ftp.c#7 (text+ko) ==== @@ -130,7 +130,7 @@ { .pri = 80, .dir = OUT, - .proto = TCP, + .proto = IPPROTO_TCP, .fingerprint = &fingerprint, .protohandler = &protohandler }, ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_irc.c#8 (text+ko) ==== @@ -115,7 +115,7 @@ { .pri = 90, .dir = OUT, - .proto = TCP, + .proto = IPPROTO_TCP, .fingerprint = &fingerprint, .protohandler = &protohandler }, ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_mod.h#17 (text+ko) ==== @@ -38,12 +38,6 @@ #define IN 1 #define OUT 2 -/* Working protocol. */ -#define IP 1 -#define TCP 2 -#define UDP 4 -#define ICMP 8 - /* * Data passed to protocol handler module, it must be filled * right before calling find_handler() to determine which ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_nbt.c#8 (text+ko) ==== @@ -136,21 +136,21 @@ { .pri = 130, .dir = IN|OUT, - .proto = UDP, + .proto = IPPROTO_UDP, .fingerprint = &fingerprint1, .protohandler = &protohandler1 }, { .pri = 140, .dir = IN, - .proto = UDP, + .proto = IPPROTO_UDP, .fingerprint = &fingerprint2, .protohandler = &protohandler2in }, { .pri = 140, .dir = OUT, - .proto = UDP, + .proto = IPPROTO_UDP, .fingerprint = &fingerprint2, .protohandler = &protohandler2out }, ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_pptp.c#6 (text+ko) ==== @@ -145,14 +145,14 @@ { .pri = 200, .dir = IN, - .proto = TCP, + .proto = IPPROTO_TCP, .fingerprint = &fingerprint, .protohandler = &protohandlerin }, { .pri = 210, .dir = OUT, - .proto = TCP, + .proto = IPPROTO_TCP, .fingerprint = &fingerprint, .protohandler = &protohandlerout }, @@ -164,14 +164,14 @@ { .pri = INT_MAX, .dir = IN, - .proto = IP, + .proto = IPPROTO_IP, .fingerprint = &fingerprintgre, .protohandler = &protohandlergrein }, { .pri = INT_MAX, .dir = OUT, - .proto = IP, + .proto = IPPROTO_IP, .fingerprint = &fingerprintgre, .protohandler = &protohandlergreout }, ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_skinny.c#6 (text+ko) ==== @@ -89,7 +89,7 @@ { .pri = 110, .dir = IN|OUT, - .proto = TCP, + .proto = IPPROTO_TCP, .fingerprint = &fingerprint, .protohandler = &protohandler }, ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_smedia.c#7 (text+ko) ==== @@ -165,7 +165,7 @@ { .pri = 100, .dir = OUT, - .proto = TCP|UDP, + .proto = IPPROTO_TCP|IPPROTO_UDP, .fingerprint = &fingerprint, .protohandler = &protohandler },
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608251510.k7PFAMJE078994>