Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Jan 2004 22:36:08 -0500
From:      Aniruddha Bohra <bohra@cs.rutgers.edu>
To:        freebsd-hackers@freebsd.org
Subject:   RFC 1892 - serial arithmetic
Message-ID:  <401339A8.7020104@cs.rutgers.edu>

next in thread | raw e-mail | index | archive | help
Hello,
	I was wondering if there is a standard
header file that implements the RFC 1982 ?
It basically defines serial numbers and the
arithmetic operations on them.

All it does is :
         s' = (s + n) modulo (2 ^ SERIAL_BITS)
i1 is the arithmetic integer whose value is
the same as s1, and i2 has the same value as i2
s1 is said to be less than s2 if, and only if, s1 is not equal to s2,
    and
         (i1 < i2 and i2 - i1 < 2^(SERIAL_BITS - 1)) or
         (i1 > i2 and i1 - i2 > 2^(SERIAL_BITS - 1))

s1 is said to be greater than s2 if, and only if, s1 is not equal to
s2, and

         (i1 < i2 and i2 - i1 > 2^(SERIAL_BITS - 1)) or
         (i1 > i2 and i1 - i2 < 2^(SERIAL_BITS - 1))


I am currently using these as my local defns but would like
to use a standard header if possible.

Thanks

Aniruddha





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?401339A8.7020104>