1 /* $NetBSD: serial.h,v 1.4 2014/12/10 04:38:00 christos Exp $ */ 2 3 /* 4 * Copyright (C) 2004-2007, 2009 Internet Systems Consortium, Inc. ("ISC") 5 * Copyright (C) 1999-2001 Internet Software Consortium. 6 * 7 * Permission to use, copy, modify, and/or distribute this software for any 8 * purpose with or without fee is hereby granted, provided that the above 9 * copyright notice and this permission notice appear in all copies. 10 * 11 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH 12 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 13 * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 14 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 15 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 16 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17 * PERFORMANCE OF THIS SOFTWARE. 18 */ 19 20 /* Id: serial.h,v 1.18 2009/01/18 23:48:14 tbox Exp */ 21 22 #ifndef ISC_SERIAL_H 23 #define ISC_SERIAL_H 1 24 25 #include <isc/lang.h> 26 #include <isc/types.h> 27 28 /*! \file isc/serial.h 29 * \brief Implement 32 bit serial space arithmetic comparison functions. 30 * Note: Undefined results are returned as ISC_FALSE. 31 */ 32 33 /*** 34 *** Functions 35 ***/ 36 37 ISC_LANG_BEGINDECLS 38 39 isc_boolean_t 40 isc_serial_lt(isc_uint32_t a, isc_uint32_t b); 41 /*%< 42 * Return true if 'a' < 'b' otherwise false. 43 */ 44 45 isc_boolean_t 46 isc_serial_gt(isc_uint32_t a, isc_uint32_t b); 47 /*%< 48 * Return true if 'a' > 'b' otherwise false. 49 */ 50 51 isc_boolean_t 52 isc_serial_le(isc_uint32_t a, isc_uint32_t b); 53 /*%< 54 * Return true if 'a' <= 'b' otherwise false. 55 */ 56 57 isc_boolean_t 58 isc_serial_ge(isc_uint32_t a, isc_uint32_t b); 59 /*%< 60 * Return true if 'a' >= 'b' otherwise false. 61 */ 62 63 isc_boolean_t 64 isc_serial_eq(isc_uint32_t a, isc_uint32_t b); 65 /*%< 66 * Return true if 'a' == 'b' otherwise false. 67 */ 68 69 isc_boolean_t 70 isc_serial_ne(isc_uint32_t a, isc_uint32_t b); 71 /*%< 72 * Return true if 'a' != 'b' otherwise false. 73 */ 74 75 ISC_LANG_ENDDECLS 76 77 #endif /* ISC_SERIAL_H */ 78