sl@0
|
1 |
/*
|
sl@0
|
2 |
* Copyright (c) 2002 - 2003
|
sl@0
|
3 |
* NetGroup, Politecnico di Torino (Italy)
|
sl@0
|
4 |
* All rights reserved.
|
sl@0
|
5 |
*
|
sl@0
|
6 |
* Redistribution and use in source and binary forms, with or without
|
sl@0
|
7 |
* modification, are permitted provided that the following conditions
|
sl@0
|
8 |
* are met:
|
sl@0
|
9 |
*
|
sl@0
|
10 |
* 1. Redistributions of source code must retain the above copyright
|
sl@0
|
11 |
* notice, this list of conditions and the following disclaimer.
|
sl@0
|
12 |
* 2. Redistributions in binary form must reproduce the above copyright
|
sl@0
|
13 |
* notice, this list of conditions and the following disclaimer in the
|
sl@0
|
14 |
* documentation and/or other materials provided with the distribution.
|
sl@0
|
15 |
* 3. Neither the name of the Politecnico di Torino nor the names of its
|
sl@0
|
16 |
* contributors may be used to endorse or promote products derived from
|
sl@0
|
17 |
* this software without specific prior written permission.
|
sl@0
|
18 |
*
|
sl@0
|
19 |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
sl@0
|
20 |
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
sl@0
|
21 |
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
sl@0
|
22 |
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
sl@0
|
23 |
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
sl@0
|
24 |
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
sl@0
|
25 |
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
sl@0
|
26 |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
sl@0
|
27 |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
sl@0
|
28 |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
sl@0
|
29 |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
sl@0
|
30 |
*
|
sl@0
|
31 |
*/
|
sl@0
|
32 |
|
sl@0
|
33 |
#define SIZEOF_CHAR 1
|
sl@0
|
34 |
#define SIZEOF_SHORT 2
|
sl@0
|
35 |
#define SIZEOF_INT 4
|
sl@0
|
36 |
#ifndef _MSC_EXTENSIONS
|
sl@0
|
37 |
#define SIZEOF_LONG_LONG 8
|
sl@0
|
38 |
#endif
|
sl@0
|
39 |
|
sl@0
|
40 |
/*
|
sl@0
|
41 |
* Avoids a compiler warning in case this was already defined
|
sl@0
|
42 |
* (someone defined _WINSOCKAPI_ when including 'windows.h', in order
|
sl@0
|
43 |
* to prevent it from including 'winsock.h')
|
sl@0
|
44 |
*/
|
sl@0
|
45 |
#ifdef _WINSOCKAPI_
|
sl@0
|
46 |
#undef _WINSOCKAPI_
|
sl@0
|
47 |
#endif
|
sl@0
|
48 |
#include <winsock2.h>
|
sl@0
|
49 |
|
sl@0
|
50 |
#include <fcntl.h>
|
sl@0
|
51 |
|
sl@0
|
52 |
#include "bittypes.h"
|
sl@0
|
53 |
#include <time.h>
|
sl@0
|
54 |
#include <io.h>
|
sl@0
|
55 |
|
sl@0
|
56 |
#ifndef __MINGW32__
|
sl@0
|
57 |
#include "ip6_misc.h"
|
sl@0
|
58 |
#endif
|
sl@0
|
59 |
|
sl@0
|
60 |
#define caddr_t char*
|
sl@0
|
61 |
|
sl@0
|
62 |
#define snprintf _snprintf
|
sl@0
|
63 |
#define vsnprintf _vsnprintf
|
sl@0
|
64 |
#define inline __inline
|