]> git.ipfire.org Git - thirdparty/dhcp.git/blame - includes/omapip/convert.h
copy rights update
[thirdparty/dhcp.git] / includes / omapip / convert.h
CommitLineData
c8d531a6
DN
1/* convert.h
2
3 Safe copying of integers into and out of a non-aligned memory buffer. */
4
5/*
49a7fb58 6 * Copyright (C) 2004-2022 Internet Systems Consortium, Inc. ("ISC")
98311e4b 7 * Copyright (c) 1996-2003 by Internet Software Consortium
c8d531a6 8 *
7512d88b
TM
9 * This Source Code Form is subject to the terms of the Mozilla Public
10 * License, v. 2.0. If a copy of the MPL was not distributed with this
11 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
c8d531a6 12 *
98311e4b
DH
13 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
14 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
15 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
16 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
17 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
18 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
19 * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
c8d531a6 20 *
98311e4b 21 * Internet Systems Consortium, Inc.
429a56d7
TM
22 * PO Box 360
23 * Newmarket, NH 03857 USA
98311e4b 24 * <info@isc.org>
2c85ac9b 25 * https://www.isc.org/
c8d531a6 26 *
c8d531a6
DN
27 */
28
29#ifndef OMAPI_CONVERT_H
30#define OMAPI_CONVERT_H
31
32u_int32_t getULong (const unsigned char *);
33int32_t getLong (const unsigned char *);
34u_int32_t getUShort (const unsigned char *);
35int32_t getShort (const unsigned char *);
36u_int32_t getUChar (const unsigned char *);
37void putULong (unsigned char *, u_int32_t);
38void putLong (unsigned char *, int32_t);
39void putUShort (unsigned char *, u_int32_t);
40void putShort (unsigned char *, int32_t);
41void putUChar (unsigned char *, u_int32_t);
42int converted_length (const unsigned char *, unsigned int, unsigned int);
43int binary_to_ascii (unsigned char *, const unsigned char *,
44 unsigned int, unsigned int);
45
46#endif /* OMAPI_CONVERT_H */