Commit 68fc0556 authored by Dan Winship's avatar Dan Winship

Add network address and socket types

Types and methods for dealing with IPv4 and IPv6 addresses (and UNIX
domain socket addresses under UNIX). This does not include code for
actual socket I/O.

Originally from "gnio". Much of the code was written by Christian
Kellner, Samuel Cormier-Iijima, and Ryan Lortie.

Part of #548466.
parent 6a3b4fa0
......@@ -954,6 +954,26 @@ AC_CHECK_FUNCS(_NSGetEnviron)
AC_FUNC_VSNPRINTF_C99
AC_FUNC_PRINTF_UNIX98
# Internet address families
if test $glib_native_win32 = yes; then
glib_inet_includes=["
#include <winsock2.h>
"]
else
glib_inet_includes=["
#include <sys/socket.h>
"]
fi
glib_failed=false
GLIB_CHECK_VALUE(AF_INET, $glib_inet_includes, glib_failed=true)
GLIB_CHECK_VALUE(AF_INET6, $glib_inet_includes, glib_failed=true)
# winsock defines this even though it doesn't support it
GLIB_CHECK_VALUE(AF_UNIX, $glib_inet_includes, glib_failed=true)
if $glib_failed ; then
AC_MSG_ERROR([Could not determine values for AF_INET* constants])
fi
dnl
dnl if statfs() takes 2 arguments (Posix) or 4 (Solaris)
dnl
......@@ -2986,6 +3006,10 @@ _______EOF
*/
typedef $g_pid_type GPid;
#define GLIB_SYSDEF_AF_UNIX $g_af_unix
#define GLIB_SYSDEF_AF_INET $g_af_inet
#define GLIB_SYSDEF_AF_INET6 $g_af_inet6
G_END_DECLS
#endif /* GLIBCONFIG_H */
......@@ -3272,6 +3296,10 @@ g_pollhup=$glib_cv_value_POLLHUP
g_pollerr=$glib_cv_value_POLLERR
g_pollnval=$glib_cv_value_POLLNVAL
g_af_unix=$glib_cv_value_AF_UNIX
g_af_inet=$glib_cv_value_AF_INET
g_af_inet6=$glib_cv_value_AF_INET6
g_stack_grows=$glib_cv_stack_grows
g_have_eilseq=$have_eilseq
......
......@@ -90,6 +90,13 @@
<xi:include href="xml/gemblemedicon.xml"/>
<xi:include href="xml/gemblem.xml"/>
</chapter>
<chapter id="networking">
<title>Networking</title>
<xi:include href="xml/ginetaddress.xml"/>
<xi:include href="xml/gsocketaddress.xml"/>
<xi:include href="xml/ginetsocketaddress.xml"/>
<xi:include href="xml/gunixsocketaddress.xml"/>
</chapter>
<chapter id="utils">
<title>Utilities</title>
<xi:include href="xml/gfilenamecompleter.xml"/>
......
......@@ -1312,4 +1312,95 @@ g_io_extension_point_set_required_type
g_io_extension_ref_class
</SECTION>
<SECTION>
<FILE>ginetaddress</FILE>
<TITLE>GInetAddress</TITLE>
GInetAddress
g_inet_address_new_from_string
g_inet_address_new_from_bytes
g_inet_address_new_any
g_inet_address_new_loopback
g_inet_address_to_bytes
g_inet_address_to_string
g_inet_address_get_family
g_inet_address_get_is_any
g_inet_address_get_is_link_local
g_inet_address_get_is_loopback
g_inet_address_get_is_mc_global
g_inet_address_get_is_mc_link_local
g_inet_address_get_is_mc_node_local
g_inet_address_get_is_mc_org_local
g_inet_address_get_is_mc_site_local
g_inet_address_get_is_multicast
g_inet_address_get_is_site_local
<SUBSECTION Standard>
GInetAddressClass
GInetAddressPrivate
G_INET_ADDRESS
G_INET_ADDRESS_CLASS
G_INET_ADDRESS_GET_CLASS
G_IS_INET_ADDRESS
G_IS_INET_ADDRESS_CLASS
G_TYPE_INET_ADDRESS
<SUBSECTION Private>
g_inet_address_get_type
</SECTION>
<SECTION>
<FILE>gsocketaddress</FILE>
<TITLE>GSocketAddress</TITLE>
GSocketAddress
GSocketFamily
g_socket_address_new_from_native
g_socket_address_get_family
g_socket_address_to_native
g_socket_address_get_native_size
<SUBSECTION Standard>
GSocketAddressClass
G_IS_SOCKET_ADDRESS
G_IS_SOCKET_ADDRESS_CLASS
G_SOCKET_ADDRESS
G_SOCKET_ADDRESS_CLASS
G_SOCKET_ADDRESS_GET_CLASS
G_TYPE_SOCKET_ADDRESS
<SUBSECTION Private>
g_socket_address_get_type
</SECTION>
<SECTION>
<FILE>ginetsocketaddress</FILE>
<TITLE>GInetSocketAddress</TITLE>
GInetSocketAddress
g_inet_socket_address_new
g_inet_socket_address_get_address
g_inet_socket_address_get_port
<SUBSECTION Standard>
GInetSocketAddressClass
GInetSocketAddressPrivate
G_INET_SOCKET_ADDRESS
G_INET_SOCKET_ADDRESS_CLASS
G_INET_SOCKET_ADDRESS_GET_CLASS
G_IS_INET_SOCKET_ADDRESS
G_IS_INET_SOCKET_ADDRESS_CLASS
G_TYPE_INET_SOCKET_ADDRESS
<SUBSECTION Private>
g_inet_socket_address_get_type
</SECTION>
<SECTION>
<FILE>gunixsocketaddress</FILE>
<TITLE>GUnixSocketAddress</TITLE>
GUnixSocketAddress
g_unix_socket_address_new
<SUBSECTION Standard>
GUnixSocketAddressClass
GUnixSocketAddressPrivate
G_IS_UNIX_SOCKET_ADDRESS
G_IS_UNIX_SOCKET_ADDRESS_CLASS
G_TYPE_UNIX_SOCKET_ADDRESS
G_UNIX_SOCKET_ADDRESS
G_UNIX_SOCKET_ADDRESS_CLASS
G_UNIX_SOCKET_ADDRESS_GET_CLASS
<SUBSECTION Private>
g_unix_socket_address_get_type
</SECTION>
......@@ -36,6 +36,8 @@ g_file_type_get_type
g_filter_input_stream_get_type
g_filter_output_stream_get_type
g_icon_get_type
g_inet_address_get_type
g_inet_socket_address_get_type
g_input_stream_get_type
g_io_error_enum_get_type
g_io_module_get_type
......@@ -55,10 +57,12 @@ g_output_stream_splice_flags_get_type
g_password_save_get_type
g_seekable_get_type
g_simple_async_result_get_type
g_socket_address_get_type
g_themed_icon_get_type
g_unix_input_stream_get_type
g_unix_mount_monitor_get_type
g_unix_output_stream_get_type
g_unix_socket_address_get_type
g_vfs_get_type
g_volume_get_type
g_volume_monitor_get_type
......@@ -132,6 +132,7 @@ unix_sources = \
gunixmount.h \
gunixmounts.c \
gunixmounts.h \
gunixsocketaddress.c \
gunixvolume.c \
gunixvolume.h \
gunixvolumemonitor.c \
......@@ -147,12 +148,13 @@ giounixinclude_HEADERS = \
gunixmounts.h \
gunixinputstream.h \
gunixoutputstream.h \
gunixsocketaddress.h \
$(NULL)
endif
if OS_WIN32
appinfo_sources += gwin32appinfo.c gwin32appinfo.h
platform_libadd += -lshlwapi
platform_libadd += -lshlwapi -lws2_32
win32_sources = \
gwin32mount.c \
gwin32mount.h \
......@@ -196,6 +198,8 @@ libgio_2_0_la_SOURCES = \
gfilterinputstream.c \
gfilteroutputstream.c \
gicon.c \
ginetaddress.c \
ginetsocketaddress.c \
ginputstream.c \
gioenums.h \
gioerror.c \
......@@ -209,11 +213,13 @@ libgio_2_0_la_SOURCES = \
gmountoperation.c \
gnativevolumemonitor.c \
gnativevolumemonitor.h \
gnetworkingprivate.h \
goutputstream.c \
gpollfilemonitor.c \
gpollfilemonitor.h \
gseekable.c \
gsimpleasyncresult.c \
gsocketaddress.c \
gthemedicon.c \
gunionvolumemonitor.c \
gunionvolumemonitor.h \
......@@ -299,6 +305,8 @@ gio_headers = \
gfilterinputstream.h \
gfilteroutputstream.h \
gicon.h \
ginetaddress.h \
ginetsocketaddress.h \
ginputstream.h \
gio.h \
giotypes.h \
......@@ -315,6 +323,7 @@ gio_headers = \
goutputstream.h \
gseekable.h \
gsimpleasyncresult.h \
gsocketaddress.h \
gthemedicon.h \
gvfs.h \
gvolume.h \
......
This diff is collapsed.
/* GIO - GLib Input, Output and Streaming Library
*
* Copyright (C) 2008 Christian Kellner, Samuel Cormier-Iijima
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General
* Public License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307, USA.
*
* Authors: Christian Kellner <gicmo@gnome.org>
* Samuel Cormier-Iijima <sciyoshi@gmail.com>
*/
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
#error "Only <gio/gio.h> can be included directly."
#endif
#ifndef __G_INET_ADDRESS_H__
#define __G_INET_ADDRESS_H__
#include <gio/giotypes.h>
G_BEGIN_DECLS
#define G_TYPE_INET_ADDRESS (g_inet_address_get_type ())
#define G_INET_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_INET_ADDRESS, GInetAddress))
#define G_INET_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_INET_ADDRESS, GInetAddressClass))
#define G_IS_INET_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_INET_ADDRESS))
#define G_IS_INET_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_INET_ADDRESS))
#define G_INET_ADDRESS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_INET_ADDRESS, GInetAddressClass))
typedef struct _GInetAddressClass GInetAddressClass;
typedef struct _GInetAddressPrivate GInetAddressPrivate;
struct _GInetAddress
{
GObject parent_instance;
/*< private >*/
GInetAddressPrivate *priv;
};
struct _GInetAddressClass
{
GObjectClass parent_class;
gchar * (*to_string) (GInetAddress *address);
const guint8 * (*to_bytes) (GInetAddress *address);
};
GType g_inet_address_get_type (void) G_GNUC_CONST;
GInetAddress * g_inet_address_new_from_string (const gchar *string);
GInetAddress * g_inet_address_new_from_bytes (const guint8 *bytes,
GSocketFamily family);
GInetAddress * g_inet_address_new_loopback (GSocketFamily family);
GInetAddress * g_inet_address_new_any (GSocketFamily family);
gchar * g_inet_address_to_string (GInetAddress *address);
const guint8 * g_inet_address_to_bytes (GInetAddress *address);
GSocketFamily g_inet_address_get_family (GInetAddress *address);
gboolean g_inet_address_get_is_any (GInetAddress *address);
gboolean g_inet_address_get_is_loopback (GInetAddress *address);
gboolean g_inet_address_get_is_link_local (GInetAddress *address);
gboolean g_inet_address_get_is_site_local (GInetAddress *address);
gboolean g_inet_address_get_is_multicast (GInetAddress *address);
gboolean g_inet_address_get_is_mc_global (GInetAddress *address);
gboolean g_inet_address_get_is_mc_link_local (GInetAddress *address);
gboolean g_inet_address_get_is_mc_node_local (GInetAddress *address);
gboolean g_inet_address_get_is_mc_org_local (GInetAddress *address);
gboolean g_inet_address_get_is_mc_site_local (GInetAddress *address);
G_END_DECLS
#endif /* __G_INET_ADDRESS_H__ */
/* GIO - GLib Input, Output and Streaming Library
*
* Copyright (C) 2008 Christian Kellner, Samuel Cormier-Iijima
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General
* Public License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307, USA.
*
* Authors: Christian Kellner <gicmo@gnome.org>
* Samuel Cormier-Iijima <sciyoshi@gmail.com>
*/
#include <config.h>
#include <glib.h>
#include <string.h>
#include "ginetsocketaddress.h"
#include "ginetaddress.h"
#include "gnetworkingprivate.h"
#include "gioalias.h"
/**
* SECTION:ginetsocketaddress
* @short_description: Internet socket addresses
*
* An IPv4 or IPv6 socket address; that is, the combination of a
* #GInetAddress and a port number.
**/
/**
* GInetSocketAddress:
*
* An IPv4 or IPv6 socket address, corresponding to a <type>struct
* sockaddr_in</type> or <type>struct sockaddr_in6</type>.
**/
G_DEFINE_TYPE (GInetSocketAddress, g_inet_socket_address, G_TYPE_SOCKET_ADDRESS);
enum {
PROP_0,
PROP_ADDRESS,
PROP_PORT
};
struct _GInetSocketAddressPrivate
{
GInetAddress *address;
guint16 port;
};
static void
g_inet_socket_address_finalize (GObject *object)
{
GInetSocketAddress *address G_GNUC_UNUSED = G_INET_SOCKET_ADDRESS (object);
if (G_OBJECT_CLASS (g_inet_socket_address_parent_class)->finalize)
(*G_OBJECT_CLASS (g_inet_socket_address_parent_class)->finalize) (object);
}
static void
g_inet_socket_address_dispose (GObject *object)
{
GInetSocketAddress *address G_GNUC_UNUSED = G_INET_SOCKET_ADDRESS (object);
g_object_unref (address->priv->address);
if (G_OBJECT_CLASS (g_inet_socket_address_parent_class)->dispose)
(*G_OBJECT_CLASS (g_inet_socket_address_parent_class)->dispose) (object);
}
static void
g_inet_socket_address_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
GInetSocketAddress *address = G_INET_SOCKET_ADDRESS (object);
switch (prop_id)
{
case PROP_ADDRESS:
g_value_set_object (value, address->priv->address);
break;
case PROP_PORT:
g_value_set_uint (value, address->priv->port);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
}
static void
g_inet_socket_address_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
GInetSocketAddress *address = G_INET_SOCKET_ADDRESS (object);
switch (prop_id)
{
case PROP_ADDRESS:
address->priv->address = g_object_ref (g_value_get_object (value));
break;
case PROP_PORT:
address->priv->port = (guint16) g_value_get_uint (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
}
static GSocketFamily
g_inet_socket_address_get_family (GSocketAddress *address)
{
GInetSocketAddress *addr;
g_return_val_if_fail (G_IS_INET_SOCKET_ADDRESS (address), 0);
addr = G_INET_SOCKET_ADDRESS (address);
return g_inet_address_get_family (addr->priv->address);
}
static gssize
g_inet_socket_address_get_native_size (GSocketAddress *address)
{
GInetSocketAddress *addr;
GSocketFamily family;
g_return_val_if_fail (G_IS_INET_SOCKET_ADDRESS (address), 0);
addr = G_INET_SOCKET_ADDRESS (address);
family = g_inet_address_get_family (addr->priv->address);
if (family == AF_INET)
return sizeof (struct sockaddr_in);
else if (family == AF_INET6)
return sizeof (struct sockaddr_in6);
else
return -1;
}
static gboolean
g_inet_socket_address_to_native (GSocketAddress *address,
gpointer dest,
gsize destlen)
{
GInetSocketAddress *addr;
GSocketFamily family;
g_return_val_if_fail (G_IS_INET_SOCKET_ADDRESS (address), 0);
addr = G_INET_SOCKET_ADDRESS (address);
family = g_inet_address_get_family (addr->priv->address);
if (family == AF_INET)
{
struct sockaddr_in *sock = (struct sockaddr_in *) dest;
if (destlen < sizeof (*sock))
return FALSE;
sock->sin_family = AF_INET;
sock->sin_port = g_htons (addr->priv->port);
memcpy (&(sock->sin_addr.s_addr), g_inet_address_to_bytes (addr->priv->address), sizeof (sock->sin_addr));
memset (sock->sin_zero, 0, sizeof (sock->sin_zero));
return TRUE;
}
else if (family == AF_INET6)
{
struct sockaddr_in6 *sock = (struct sockaddr_in6 *) dest;
if (destlen < sizeof (*sock))
return FALSE;
memset (sock, 0, sizeof (sock));
sock->sin6_family = AF_INET6;
sock->sin6_port = g_htons (addr->priv->port);
memcpy (&(sock->sin6_addr.s6_addr), g_inet_address_to_bytes (addr->priv->address), sizeof (sock->sin6_addr));
return TRUE;
}
else
return FALSE;
}
static void
g_inet_socket_address_class_init (GInetSocketAddressClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GSocketAddressClass *gsocketaddress_class = G_SOCKET_ADDRESS_CLASS (klass);
g_type_class_add_private (klass, sizeof (GInetSocketAddressPrivate));
gobject_class->finalize = g_inet_socket_address_finalize;
gobject_class->dispose = g_inet_socket_address_dispose;
gobject_class->set_property = g_inet_socket_address_set_property;
gobject_class->get_property = g_inet_socket_address_get_property;
gsocketaddress_class->get_family = g_inet_socket_address_get_family;
gsocketaddress_class->to_native = g_inet_socket_address_to_native;
gsocketaddress_class->get_native_size = g_inet_socket_address_get_native_size;
g_object_class_install_property (gobject_class, PROP_ADDRESS,
g_param_spec_object ("address",
"address",
"address",
G_TYPE_INET_ADDRESS,
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_BLURB | G_PARAM_STATIC_NICK));
g_object_class_install_property (gobject_class, PROP_PORT,
g_param_spec_uint ("port",
"port",
"port",
0,
65535,
0,
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_BLURB | G_PARAM_STATIC_NICK));
}
static void
g_inet_socket_address_init (GInetSocketAddress *address)
{
address->priv = G_TYPE_INSTANCE_GET_PRIVATE (address,
G_TYPE_INET_SOCKET_ADDRESS,
GInetSocketAddressPrivate);
address->priv->address = NULL;
address->priv->port = 0;
}
/**
* g_inet_socket_address_new:
* @address: a #GInetAddress
* @port: a port number
*
* Creates a new #GInetSocketAddress for @address and @port.
*
* Returns: a new #GInetSocketAddress
*
* Since: 2.22
*/
GSocketAddress *
g_inet_socket_address_new (GInetAddress *address,
guint16 port)
{
return g_object_new (G_TYPE_INET_SOCKET_ADDRESS,
"address", address,
"port", port,
NULL);
}
/**
* g_inet_socket_address_get_address:
* @address: a #GInetSocketAddress
*
* Gets @address's #GInetAddress.
*
* Returns: the #GInetAddress for @address, which must be
* g_object_ref()'d if it will be stored
*
* Since: 2.22
*/
GInetAddress *
g_inet_socket_address_get_address (GInetSocketAddress *address)
{
g_return_val_if_fail (G_IS_INET_SOCKET_ADDRESS (address), NULL);
return address->priv->address;
}
/**
* g_inet_socket_address_get_port:
* @address: a #GInetSocketAddress
*
* Gets @address's port.
*
* Returns: the port for @address
*
* Since: 2.22
*/
guint16
g_inet_socket_address_get_port (GInetSocketAddress *address)
{
g_return_val_if_fail (G_IS_INET_SOCKET_ADDRESS (address), 0);
return address->priv->port;
}
#define __G_INET_SOCKET_ADDRESS_C__
#include "gioaliasdef.c"
/* GIO - GLib Input, Output and Streaming Library
*
* Copyright (C) 2008 Christian Kellner, Samuel Cormier-Iijima
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General
* Public License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307, USA.
*
* Authors: Christian Kellner <gicmo@gnome.org>
* Samuel Cormier-Iijima <sciyoshi@gmail.com>
*/
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
#error "Only <gio/gio.h> can be included directly."
#endif
#ifndef __G_INET_SOCKET_ADDRESS_H__
#define __G_INET_SOCKET_ADDRESS_H__
#include <gio/gsocketaddress.h>
G_BEGIN_DECLS
#define G_TYPE_INET_SOCKET_ADDRESS (g_inet_socket_address_get_type ())
#define G_INET_SOCKET_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_INET_SOCKET_ADDRESS, GInetSocketAddress))
#define G_INET_SOCKET_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_INET_SOCKET_ADDRESS, GInetSocketAddressClass))
#define G_IS_INET_SOCKET_ADDRESS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_INET_SOCKET_ADDRESS))
#define G_IS_INET_SOCKET_ADDRESS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_INET_SOCKET_ADDRESS))
#define G_INET_SOCKET_ADDRESS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_INET_SOCKET_ADDRESS, GInetSocketAddressClass))
typedef struct _GInetSocketAddressClass GInetSocketAddressClass;
typedef struct _GInetSocketAddressPrivate GInetSocketAddressPrivate;
struct _GInetSocketAddress
{
GSocketAddress parent_instance;
/*< private >*/
GInetSocketAddressPrivate *priv;
};
struct _GInetSocketAddressClass
{
GSocketAddressClass parent_class;
};
GType g_inet_socket_address_get_type (void) G_GNUC_CONST;
GSocketAddress *g_inet_socket_address_new (GInetAddress *address,
guint16 port);
GInetAddress * g_inet_socket_address_get_address (GInetSocketAddress *address);
guint16 g_inet_socket_address_get_port (GInetSocketAddress *address);
G_END_DECLS
#endif /* __G_INET_SOCKET_ADDRESS_H__ */
......@@ -49,6 +49,8 @@
#include <gio/gfilterinputstream.h>
#include <gio/gfilteroutputstream.h>
#include <gio/gicon.h>
#include <gio/ginetaddress.h>
#include <gio/ginetsocketaddress.h>
#include <gio/ginputstream.h>
#include <gio/gioenums.h>
#include <gio/gioenumtypes.h>
......@@ -64,6 +66,7 @@
#include <gio/goutputstream.h>
#include <gio/gseekable.h>
#include <gio/gsimpleasyncresult.h>
#include <gio/gsocketaddress.h>
#include <gio/gthemedicon.h>
#include <gio/gvfs.h>
#include <gio/gvolume.h>
......
......@@ -833,6 +833,7 @@ g_output_stream_splice_flags_get_type G_GNUC_CONST
g_ask_password_flags_get_type G_GNUC_CONST
g_password_save_get_type G_GNUC_CONST
g_emblem_origin_get_type G_GNUC_CONST
g_socket_family_get_type G_GNUC_CONST
#endif
#endif
......@@ -857,3 +858,53 @@ g_emblem_get_origin
#endif
#endif
#if IN_HEADER(__G_INET_ADDRESS_H__)
#if IN_FILE(__G_INET_ADDRESS_C__)
g_inet_address_new_from_string
g_inet_address_new_from_bytes
g_inet_address_new_any
g_inet_address_new_loopback
g_inet_address_get_family
g_inet_address_get_type G_GNUC_CONST
g_inet_address_get_is_any
g_inet_address_get_is_link_local
g_inet_address_get_is_loopback