On Thu, 19 May 2005, Rafael Martinez Torres wrote:

PGP public key: http://www.ngn.euro6ix.org/IPv6/rafael.martinez.gpg

On Thu, 19 May 2005, Henrik Nordstrom wrote:

On Thu, 19 May 2005, Rafael Martinez Torres wrote:

-    int as_number;
+    squidip_int_t as_number;

Hmm.. ASN numbers should not be any different even if the ASN owns IPv6 addresses.

Sure, all network or netmask addresses dealt with here needs to be
IPv6:ified, but not the ASN numbers as such from what I can understand.

-            if (a->element == b->element) {
+            if (memcmp(&a->element,&b->element,sizeof(squidip_int_t)) == 0) { 
/* A hack to check 128 bits integers */

If you redefine squidip_in_t as an class you can overload the == operator, removing the need for such hacks.

Some what like

class ASN ;

An ASN is an integer. A plain int is sufficient for ASN numbers.

Should I create asn.h at squid3-ipv6 branch ?

Why?

It would be an squid_ip_t class, with just IN_ADDR storage and simple access methods (mainly casts to/from IN_ADDR). And perhaps wrapper methods for string parsing/formating.

But still, most of the changes you did in asn.cc seems bogos. You should only change the parts dealing with IP addresses, not ASN numbers (these are not addresses, just integers)

Regards
Henrik

Reply via email to