pcap-stdinc.h revision 127664
1127664Sbms/*
2127664Sbms * Copyright (c) 2002 - 2003
3127664Sbms * NetGroup, Politecnico di Torino (Italy)
4127664Sbms * All rights reserved.
5127664Sbms *
6127664Sbms * Redistribution and use in source and binary forms, with or without
7127664Sbms * modification, are permitted provided that the following conditions
8127664Sbms * are met:
9127664Sbms *
10127664Sbms * 1. Redistributions of source code must retain the above copyright
11127664Sbms * notice, this list of conditions and the following disclaimer.
12127664Sbms * 2. Redistributions in binary form must reproduce the above copyright
13127664Sbms * notice, this list of conditions and the following disclaimer in the
14127664Sbms * documentation and/or other materials provided with the distribution.
15127664Sbms * 3. Neither the name of the Politecnico di Torino nor the names of its
16127664Sbms * contributors may be used to endorse or promote products derived from
17127664Sbms * this software without specific prior written permission.
18127664Sbms *
19127664Sbms * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20127664Sbms * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21127664Sbms * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22127664Sbms * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23127664Sbms * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24127664Sbms * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25127664Sbms * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26127664Sbms * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27127664Sbms * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28127664Sbms * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29127664Sbms * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30127664Sbms *
31127664Sbms */
32127664Sbms
33127664Sbms#define SIZEOF_CHAR 1
34127664Sbms#define SIZEOF_SHORT 2
35127664Sbms#define SIZEOF_INT 4
36127664Sbms
37127664Sbms/*
38127664Sbms * Avoids a compiler warning in case this was already defined
39127664Sbms * (someone defined _WINSOCKAPI_ when including 'windows.h', in order
40127664Sbms * to prevent it from including 'winsock.h')
41127664Sbms */
42127664Sbms#ifdef _WINSOCKAPI_
43127664Sbms#undef _WINSOCKAPI_
44127664Sbms#endif
45127664Sbms#include <winsock2.h>
46127664Sbms
47127664Sbms#include <fcntl.h>
48127664Sbms
49127664Sbms#include "bittypes.h"
50127664Sbms#include <time.h>
51127664Sbms#include <io.h>
52127664Sbms
53127664Sbms#ifndef __MINGW32__
54127664Sbms#include "IP6_misc.h"
55127664Sbms#endif
56127664Sbms
57127664Sbms#define caddr_t char*
58127664Sbms
59127664Sbms#define snprintf _snprintf
60127664Sbms#define vsnprintf _vsnprintf
61127664Sbms#define inline __inline
62