nexmon – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 /* inet_addr-int.h
2 *
3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <gerald@wireshark.org>
5 * Copyright 1998 Gerald Combs
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 */
21  
22 #ifndef __WS_INET_ADDR_INT_H__
23 #define __WS_INET_ADDR_INT_H__
24  
25 #include "config.h"
26  
27 #ifdef HAVE_ARPA_INET_H
28 #include <arpa/inet.h>
29 #endif
30  
31 #ifdef HAVE_SYS_TYPES_H
32 #include <sys/types.h>
33 #endif
34  
35 #ifdef HAVE_SYS_SOCKET_H
36 #include <sys/socket.h> /* needed to define AF_ values on UNIX */
37 #endif
38  
39 #ifdef HAVE_WINSOCK2_H
40 #include <winsock2.h> /* needed to define AF_ values on Windows */
41 #if _MSC_VER < 1600 /* errno.h defines EAFNOSUPPORT in Windows VC10 (and presumably eventually in VC11 ...) */
42 #define EAFNOSUPPORT WSAEAFNOSUPPORT
43 #endif
44 #endif
45  
46 /*
47 * Versions of "inet_pton()" and "inet_ntop()", for the benefit of OSes that
48 * don't have it.
49 */
50 #ifndef HAVE_INET_PTON
51 extern int inet_pton(int af, const char *src, void *dst);
52 #endif
53  
54 #ifndef HAVE_INET_NTOP
55 extern const char *inet_ntop(int af, const void *src, char *dst, size_t size);
56 #endif
57  
58 /*
59 * Those OSes may also not have AF_INET6, so declare it here if it's not
60 * already declared, so that we can pass it to "inet_ntop()" and "inet_pton()".
61 */
62 #ifndef AF_INET6
63 #define AF_INET6 127 /* pick a value unlikely to duplicate an existing AF_ value */
64 #endif
65  
66 #endif