Adam Tkac | be4c3ac | 2008-12-10 16:42:33 +0000 | [diff] [blame] | 1 | /* 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 Tkac | 8aee1a8 | 2009-09-04 12:08:56 +0000 | [diff] [blame] | 22 | #ifdef HAVE_CONFIG_H |
| 23 | #include <config.h> |
Adam Tkac | be4c3ac | 2008-12-10 16:42:33 +0000 | [diff] [blame] | 24 | #endif |
| 25 | |
| 26 | #ifdef __cplusplus |
| 27 | extern "C" { |
| 28 | #endif |
| 29 | |
| 30 | #ifndef HAVE_SOCKLEN_T |
| 31 | typedef 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 Åstrand | 52cb7b4 | 2008-12-11 08:22:36 +0000 | [diff] [blame] | 41 | const char *tight_inet_ntop(int af, const void *src, |
| 42 | char *dst, socklen_t size); |
Adam Tkac | be4c3ac | 2008-12-10 16:42:33 +0000 | [diff] [blame] | 43 | #define inet_ntop tight_inet_ntop |
| 44 | #endif |
| 45 | |
| 46 | #ifdef __cplusplus |
| 47 | }; |
| 48 | #endif |
| 49 | |
| 50 | #endif /* OS_NET_H */ |