1 /* GIO - GLib Input, Output and Streaming Library
3 * Copyright (C) 2008 Red Hat, Inc.
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General
16 * Public License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
18 * Boston, MA 02111-1307, USA.
21 #ifndef __G_NETWORKINGPRIVATE_H__
22 #define __G_NETWORKINGPRIVATE_H__
26 #define WINVER 0x0501 // FIXME?
32 #else /* !G_OS_WIN32 */
34 #include <arpa/inet.h>
35 #include <arpa/nameser.h>
36 #if HAVE_ARPA_NAMESER_COMPAT_H
37 #include <arpa/nameser_compat.h>
40 /* We're supposed to define _GNU_SOURCE to get EAI_NODATA, but that
41 * won't actually work since <features.h> has already been included at
42 * this point. So we define __USE_GNU instead.
47 #include <netinet/in.h>
48 #include <netinet/tcp.h>
50 #include <sys/socket.h>
57 extern struct addrinfo _g_resolver_addrinfo_hints;
59 GList *_g_resolver_addresses_from_addrinfo (const char *hostname,
64 void _g_resolver_address_to_sockaddr (GInetAddress *address,
65 struct sockaddr_storage *sa,
67 char *_g_resolver_name_from_nameinfo (GInetAddress *address,
72 #if defined(G_OS_UNIX)
73 GList *_g_resolver_targets_from_res_query (const gchar *rrname,
78 #elif defined(G_OS_WIN32)
79 GList *_g_resolver_targets_from_DnsQuery (const gchar *rrname,
87 #endif /* __G_NETWORKINGPRIVATE_H__ */