Add `gnutls/dtls.h' to the distribution.
[gnutls.git] / lib / gnutls_num.h
blob456e34e5884540257cb7bb8e59f1f64f9cc5f90e
1 /*
2 * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2010 Free
3 * Software Foundation, Inc.
5 * Author: Nikos Mavrogiannopoulos
7 * This file is part of GnuTLS.
9 * The GnuTLS is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public License
11 * as published by the Free Software Foundation; either version 2.1 of
12 * the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
22 * USA
26 #ifndef GNUTLS_NUM_H
27 #define GNUTLS_NUM_H
29 #include <gnutls_int.h>
31 #include <minmax.h>
33 uint32_t _gnutls_uint24touint32 (uint24 num);
34 uint24 _gnutls_uint32touint24 (uint32_t num);
35 uint64_t _gnutls_read_uint48 (const opaque * data);
36 uint32_t _gnutls_read_uint32 (const opaque * data);
37 uint16_t _gnutls_read_uint16 (const opaque * data);
38 uint32_t _gnutls_conv_uint32 (uint32_t data);
39 uint16_t _gnutls_conv_uint16 (uint16_t data);
40 uint32_t _gnutls_read_uint24 (const opaque * data);
41 void _gnutls_write_uint24 (uint32_t num, opaque * data);
42 void _gnutls_write_uint32 (uint32_t num, opaque * data);
43 void _gnutls_write_uint16 (uint16_t num, opaque * data);
44 uint32_t _gnutls_uint64touint32 (const uint64 *);
46 int _gnutls_uint64pp (uint64 *);
47 int _gnutls_uint48pp (uint64 *);
49 # define UINT64DATA(x) ((x).i)
51 #endif /* GNUTLS_NUM_H */