RFC 1892 - serial arithmetic

From: Aniruddha Bohra (bohra_at_cs.rutgers.edu)
Date: 01/25/04

  • Next message: M. Warner Losh: "Re: XL driver checksum producing corrupted but checksum-correct packets"
    Date: Sat, 24 Jan 2004 22:36:08 -0500
    To: freebsd-hackers@freebsd.org
    
    

    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

    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"


  • Next message: M. Warner Losh: "Re: XL driver checksum producing corrupted but checksum-correct packets"