pcap-stdinc.h revision 162012
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 36162012Ssam#ifndef _MSC_EXTENSIONS 37162012Ssam#define SIZEOF_LONG_LONG 8 38162012Ssam#endif 39127664Sbms 40127664Sbms/* 41127664Sbms * Avoids a compiler warning in case this was already defined 42127664Sbms * (someone defined _WINSOCKAPI_ when including 'windows.h', in order 43127664Sbms * to prevent it from including 'winsock.h') 44127664Sbms */ 45127664Sbms#ifdef _WINSOCKAPI_ 46127664Sbms#undef _WINSOCKAPI_ 47127664Sbms#endif 48127664Sbms#include <winsock2.h> 49127664Sbms 50127664Sbms#include <fcntl.h> 51127664Sbms 52127664Sbms#include "bittypes.h" 53127664Sbms#include <time.h> 54127664Sbms#include <io.h> 55127664Sbms 56127664Sbms#ifndef __MINGW32__ 57127664Sbms#include "IP6_misc.h" 58127664Sbms#endif 59127664Sbms 60127664Sbms#define caddr_t char* 61127664Sbms 62127664Sbms#define snprintf _snprintf 63127664Sbms#define vsnprintf _vsnprintf 64127664Sbms#define inline __inline 65