[quagga-dev 754] Re: q about prefix_same

Paul Jakma paul at clubi.ie
Thu Jan 15 01:47:37 GMT 2004

On Wed, 14 Jan 2004, Greg Troxel wrote:

> My point was that there are two semantic objects, and the
> representation invariant and the range of the abstraction function
> differ. Essentially, if one is dealing with what should be a CIDR
> prefix, then certain values of struct prefix are not allowed.  
> Further, for things know to be prefixes, certain kinds of
> comparisons make sense.

Hmm.. I guess its a way of thinking. To my mind 10.9/8 is a prefix
regardless. whether i care about the host part or not depends on what
i'm thinking of. :)

> For things known to be addresses/masks, the allowable values are
> much less constrained, and it makes sense to ask both 'same prefix'
> (where host bits are ignored) and 'same address/mask', where they
> aren't.

Hmm.. yes, maybe. :)

> This is particularly important since the routine prefix_same has an
> unfortunate name; it checks whether two address/masks are equal,
> and someone could reasonably expect this to behave like prefix_cmp.

Ok yes. Its a good a place to comment it as any.

Paul Jakma	paul at clubi.ie	paul at jakma.org	Key ID: 64A2FF6A
	warning: do not ever send email to spam at dishone.st
We can predict everything, except the future.

More information about the Quagga-dev mailing list