Re: [Squid-cvs] squid3-ipv6 squid3/src asn.cc,1.16.6.3,1.16.6.4

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Thu, 19 May 2005 20:41:39 +0200 (CEST)

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
Received on Thu May 19 2005 - 12:41:41 MDT

This archive was generated by hypermail pre-2.1.9 : Tue May 31 2005 - 12:00:03 MDT