includes/omapip/convert.h

Go to the documentation of this file.
00001 /* convert.h
00002 
00003    Safe copying of integers into and out of a non-aligned memory buffer. */
00004 
00005 /*
00006  * Copyright (c) 2004,2009,2014 by Internet Systems Consortium, Inc. ("ISC")
00007  * Copyright (c) 1996-2003 by Internet Software Consortium
00008  *
00009  * Permission to use, copy, modify, and distribute this software for any
00010  * purpose with or without fee is hereby granted, provided that the above
00011  * copyright notice and this permission notice appear in all copies.
00012  *
00013  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
00014  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
00015  * MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
00016  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
00017  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
00018  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
00019  * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
00020  *
00021  *   Internet Systems Consortium, Inc.
00022  *   950 Charter Street
00023  *   Redwood City, CA 94063
00024  *   <info@isc.org>
00025  *   https://www.isc.org/
00026  *
00027  */
00028 
00029 #ifndef OMAPI_CONVERT_H
00030 #define OMAPI_CONVERT_H
00031 
00032 u_int32_t getULong (const unsigned char *);
00033 int32_t getLong (const unsigned char *);
00034 u_int32_t getUShort (const unsigned char *);
00035 int32_t getShort (const unsigned char *);
00036 u_int32_t getUChar (const unsigned char *);
00037 void putULong (unsigned char *, u_int32_t);
00038 void putLong (unsigned char *, int32_t);
00039 void putUShort (unsigned char *, u_int32_t);
00040 void putShort (unsigned char *, int32_t);
00041 void putUChar (unsigned char *, u_int32_t);
00042 int converted_length (const unsigned char *, unsigned int, unsigned int);
00043 int binary_to_ascii (unsigned char *, const unsigned char *,
00044                      unsigned int, unsigned int);
00045 
00046 #endif /* OMAPI_CONVERT_H */

Generated on 5 Apr 2014 for ISC DHCP by  doxygen 1.6.1