Re: [HACKERS] inet data type regression test fails

From: Taral <taral(at)taral(dot)net>
To: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
Cc: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>, hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] inet data type regression test fails
Date: 1999-05-11 01:48:54
Message-ID: Pine.LNX.4.10.9905102047520.18241-100000@dragon.taral.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Taral 1999-05-11 01:52:28 Re: [HACKERS] Optimization info
Previous Message Bruce Momjian 1999-05-11 01:41:35 Re: IRC, webcam, IM