--------------------- PatchSet 1386 Date: 2005/05/19 14:13:21 Author: rmartinez Branch: squid3-ipv6 Tag: (none) Log: There is no either native support for int128_t nor hton128(...),ntoh128(...) functions, so we have to simulate them by typedefining a 128-bit type. This will mangle/ofuscate a bit the code of the IPv4 side, if we want to preserve almost the same source-code for IPv6-IPv4 modes. (Take a look into asn.cc) Members: include/config.h:1.7.4.3->1.7.4.4 Index: squid3/include/config.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/include/config.h,v retrieving revision 1.7.4.3 retrieving revision 1.7.4.4 diff -u -r1.7.4.3 -r1.7.4.4 --- squid3/include/config.h 15 May 2005 14:08:24 -0000 1.7.4.3 +++ squid3/include/config.h 19 May 2005 14:13:21 -0000 1.7.4.4 @@ -1,5 +1,5 @@ /* - * $Id: config.h,v 1.7.4.3 2005/05/15 14:08:24 rmartinez Exp $ + * $Id: config.h,v 1.7.4.4 2005/05/19 14:13:21 rmartinez Exp $ * * AUTHOR: Duane Wessels * @@ -197,9 +197,27 @@ /* * This is hack to allow compiling IPv6-IPv4 version, * not disturbing branches others than squid3-ipv6 + * FIXME: + * I know most part of this macros have to be + * moved into "inline" functions and moved into "squid.h" + * Some of them, must be also renamed for clarify. + * Let them here until merging the Beta IPv6-branch + * so you can control de compilation modes from this _only_ file */ #ifdef INET6 +/* + * FIXME: + * There is no native support for an int128_t + * so we have to simulate it + * This may lead to mangle some code of the IPv4 side + * if we want to preserve unity on tow compilation modes + * (Hopefully not much) + */ +typedef unsigned char int128_t[16]; +typedef int128_t squidip_int_t; + + #define IN_ADDR in6_addr #define SOCKADDR_IN sockaddr_in6 #define INADDR_ANY_ASSIGN in6addr_any @@ -239,6 +257,12 @@ SAFE_INET_ADDR(s,NULL) #else +/* + * FIXME: + * Before merging the Beta IPv6-branch redefine + * the above macros for IPv4. + * If transition is O.K, at least IPv4 will be kept + */ #define IN_ADDR in_addr #endif