Re: [HACKERS] inet data type regression test fails - Mailing list pgsql-hackers

From Taral
Subject Re: [HACKERS] inet data type regression test fails
Date
Msg-id Pine.LNX.4.10.9905102047520.18241-100000@dragon.taral.net
Whole thread Raw
In response to Re: [HACKERS] inet data type regression test fails  (Tatsuo Ishii <t-ishii@sra.co.jp>)
Responses Re: [HACKERS] inet data type regression test fails  (Tatsuo Ishii <t-ishii@sra.co.jp>)
List pgsql-hackers
On Tue, 11 May 1999, Tatsuo Ishii wrote:

> >On Tue, 11 May 1999, Tatsuo Ishii wrote:
> >
> >>         unsigned long mask = 0xffffffff;
> >> 
> >>         if (ip_bits(ip) < 32)
> >>             mask >>= ip_bits(ip);
> >>         addr = htonl(ntohl(ip_v4addr(ip)) | mask);

> No. it is expected addr == 0xffffffff if ip_bits() returns >= 32. This 
> is how the function (network_broadcast()) is made.
> See included posting.

ip_bits(ip) = 0  => mask = 0xffffffff
ip_bits(ip) = 31 => mask = 1
ip_bits(ip) = 32 => mask = 0xffffffff

You sure?

Taral



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: IRC, webcam, IM
Next
From: Taral
Date:
Subject: Re: [HACKERS] Optimization info