blob: bd8b21cc45e768b1e8d6f4a9a61a234e538e1bae [file] [log] [blame]
Adam Tkacbe4c3ac2008-12-10 16:42:33 +00001/* Copyright (C) 2008 TightVNC Team. All Rights Reserved.
2 *
3 * This is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This software is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this software; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16 * USA.
17 */
18
19#ifndef OS_NET_H
20#define OS_NET_H
21
Adam Tkac8aee1a82009-09-04 12:08:56 +000022#ifdef HAVE_CONFIG_H
23#include <config.h>
Adam Tkacbe4c3ac2008-12-10 16:42:33 +000024#endif
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30#ifndef HAVE_SOCKLEN_T
31typedef int socklen_t;
32#endif
33
34/* IPv6 support on server side - we have to have all those functions */
35#if defined(HAVE_INET_NTOP)
36#define HAVE_IPV6
37#endif
38
39/* IPv4-only stub implementation */
40#ifndef HAVE_INET_NTOP
Peter Åstrand52cb7b42008-12-11 08:22:36 +000041const char *tight_inet_ntop(int af, const void *src,
42 char *dst, socklen_t size);
Adam Tkacbe4c3ac2008-12-10 16:42:33 +000043#define inet_ntop tight_inet_ntop
44#endif
45
46#ifdef __cplusplus
47};
48#endif
49
50#endif /* OS_NET_H */