pcap-stdinc.h.html 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <?xml version='1.0' encoding='iso-8859-1'?>
  2. <!doctype html public '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
  3. <html xmlns='http://www.w3c.org/1999/xhtml' lang='en-us'>
  4. <head>
  5. <title>
  6. pcap-stdinc.h
  7. </title>
  8. <meta http-equiv='content-type' content='text/html;iso-8859-1'/>
  9. <meta name='generator' content='motley-tools 1.9.4 13:40:33 Feb 18 2015'/>
  10. <meta name='author' content='cmaier@cmassoc.net'/>
  11. <meta name='robots' content='noindex,nofollow'/>
  12. <link href='toolkit.css' rel='stylesheet' type='text/css'/>
  13. </head>
  14. <body>
  15. <div class='headerlink'>
  16. [<a href='pcap-int.h.html' title=' pcap-int.h '>PREV</a>]
  17. [<a href='toolkit.html' title=' Index '>HOME</a>]
  18. [<a href='pib.h.html' title=' pib.h '>NEXT</a>]
  19. </div>
  20. <pre>
  21. /*
  22. * Copyright (c) 2002 - 2005 NetGroup, Politecnico di Torino (Italy)
  23. * Copyright (c) 2005 - 2009 CACE Technologies, Inc. Davis (California)
  24. * All rights reserved.
  25. *
  26. * Redistribution and use in source and binary forms, with or without
  27. * modification, are permitted provided that the following conditions
  28. * are met:
  29. *
  30. * 1. Redistributions of source code must retain the above copyright
  31. * notice, this list of conditions and the following disclaimer.
  32. * 2. Redistributions in binary form must reproduce the above copyright
  33. * notice, this list of conditions and the following disclaimer in the
  34. * documentation and/or other materials provided with the distribution.
  35. * 3. Neither the name of the Politecnico di Torino nor the names of its
  36. * contributors may be used to endorse or promote products derived from
  37. * this software without specific prior written permission.
  38. *
  39. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  40. * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  41. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  42. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  43. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  44. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  45. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  46. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  47. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  48. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  49. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  50. *
  51. * @(#) $Header: /tcpdump/master/libpcap/pcap-stdinc.h,v 1.10.2.1 2008-10-06 15:38:39 gianluca Exp $ (LBL)
  52. */
  53. #define SIZEOF_CHAR 1
  54. #define SIZEOF_SHORT 2
  55. #define SIZEOF_INT 4
  56. #ifndef _MSC_EXTENSIONS
  57. #define SIZEOF_LONG_LONG 8
  58. #endif
  59. /*
  60. * Avoids a compiler warning in case this was already defined
  61. * (someone defined _WINSOCKAPI_ when including 'windows.h', in order
  62. * to prevent it from including 'winsock.h')
  63. */
  64. #ifdef _WINSOCKAPI_
  65. #undef _WINSOCKAPI_
  66. #endif
  67. #include &lt;winsock2.h&gt;
  68. #include &lt;fcntl.h&gt;
  69. #include &quot;bittypes.h&quot;
  70. #include &lt;time.h&gt;
  71. #include &lt;io.h&gt;
  72. #ifndef __MINGW32__
  73. #include &quot;IP6_misc.h&quot;
  74. #endif
  75. #define caddr_t char*
  76. #if _MSC_VER &lt; 1500
  77. #define snprintf _snprintf
  78. #define vsnprintf _vsnprintf
  79. #define strdup _strdup
  80. #endif
  81. #define inline __inline
  82. #ifdef __MINGW32__
  83. #include &lt;stdint.h&gt;
  84. #else /*__MINGW32__*/
  85. /* MSVC compiler */
  86. #ifndef _UINTPTR_T_DEFINED
  87. #ifdef _WIN64
  88. typedef unsigned __int64 uintptr_t;
  89. #else
  90. typedef _W64 unsigned int uintptr_t;
  91. #endif
  92. #define _UINTPTR_T_DEFINED
  93. #endif
  94. #ifndef _INTPTR_T_DEFINED
  95. #ifdef _WIN64
  96. typedef __int64 intptr_t;
  97. #else
  98. typedef _W64 int intptr_t;
  99. #endif
  100. #define _INTPTR_T_DEFINED
  101. #endif
  102. #endif /*__MINGW32__*/
  103. </pre>
  104. <div class='footerlink'>
  105. [<a href='pcap-int.h.html' title=' pcap-int.h '>PREV</a>]
  106. [<a href='toolkit.html' title=' Index '>HOME</a>]
  107. [<a href='pib.h.html' title=' pib.h '>NEXT</a>]
  108. </div>
  109. </body>
  110. </html>