1135446Strhodes/*
2193149Sdougb * Copyright (C) 2004-2007, 2009  Internet Systems Consortium, Inc. ("ISC")
3135446Strhodes * Copyright (C) 1999-2001  Internet Software Consortium.
4135446Strhodes *
5193149Sdougb * Permission to use, copy, modify, and/or distribute this software for any
6135446Strhodes * purpose with or without fee is hereby granted, provided that the above
7135446Strhodes * copyright notice and this permission notice appear in all copies.
8135446Strhodes *
9135446Strhodes * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10135446Strhodes * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11135446Strhodes * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12135446Strhodes * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13135446Strhodes * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14135446Strhodes * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15135446Strhodes * PERFORMANCE OF THIS SOFTWARE.
16135446Strhodes */
17135446Strhodes
18234010Sdougb/* $Id: serial.h,v 1.18 2009/01/18 23:48:14 tbox Exp $ */
19135446Strhodes
20135446Strhodes#ifndef ISC_SERIAL_H
21135446Strhodes#define ISC_SERIAL_H 1
22135446Strhodes
23135446Strhodes#include <isc/lang.h>
24135446Strhodes#include <isc/types.h>
25135446Strhodes
26193149Sdougb/*! \file isc/serial.h
27193149Sdougb *	\brief Implement 32 bit serial space arithmetic comparison functions.
28135446Strhodes *	Note: Undefined results are returned as ISC_FALSE.
29135446Strhodes */
30135446Strhodes
31135446Strhodes/***
32135446Strhodes ***	Functions
33135446Strhodes ***/
34135446Strhodes
35135446StrhodesISC_LANG_BEGINDECLS
36135446Strhodes
37135446Strhodesisc_boolean_t
38135446Strhodesisc_serial_lt(isc_uint32_t a, isc_uint32_t b);
39170222Sdougb/*%<
40135446Strhodes *	Return true if 'a' < 'b' otherwise false.
41135446Strhodes */
42135446Strhodes
43135446Strhodesisc_boolean_t
44135446Strhodesisc_serial_gt(isc_uint32_t a, isc_uint32_t b);
45170222Sdougb/*%<
46135446Strhodes *	Return true if 'a' > 'b' otherwise false.
47135446Strhodes */
48135446Strhodes
49135446Strhodesisc_boolean_t
50135446Strhodesisc_serial_le(isc_uint32_t a, isc_uint32_t b);
51170222Sdougb/*%<
52135446Strhodes *	Return true if 'a' <= 'b' otherwise false.
53135446Strhodes */
54135446Strhodes
55135446Strhodesisc_boolean_t
56135446Strhodesisc_serial_ge(isc_uint32_t a, isc_uint32_t b);
57170222Sdougb/*%<
58135446Strhodes *	Return true if 'a' >= 'b' otherwise false.
59135446Strhodes */
60135446Strhodes
61135446Strhodesisc_boolean_t
62135446Strhodesisc_serial_eq(isc_uint32_t a, isc_uint32_t b);
63170222Sdougb/*%<
64135446Strhodes *	Return true if 'a' == 'b' otherwise false.
65135446Strhodes */
66135446Strhodes
67135446Strhodesisc_boolean_t
68135446Strhodesisc_serial_ne(isc_uint32_t a, isc_uint32_t b);
69170222Sdougb/*%<
70135446Strhodes *	Return true if 'a' != 'b' otherwise false.
71135446Strhodes */
72135446Strhodes
73135446StrhodesISC_LANG_ENDDECLS
74135446Strhodes
75135446Strhodes#endif /* ISC_SERIAL_H */
76