It derives from <GObject>.
<GInetAddress> represents an IPv4 or IPv6
internet address. Use resolver:lookup-by-name or resolver:lookup-by-name-async to look up the
<GInetAddress> for a hostname. Use
resolver:lookup-by-address or
resolver:lookup-by-address-async to look up
the hostname for a <GInetAddress>.
To actually connect to a remote host, you will need a
<GInetSocketAddress> (which includes a
<GInetAddress> as well as a port number).
parent-instanceThe raw address data.
Its value is a foreign pointer (or, to set it, a bytevector).
It can only be set when the object is made, with #:bytes.
The address family (IPv4 or IPv6).
Its value is a <GSocketFamily> (or, to set
it, one of its symbols).
It can only be set when the object is made, with #:family.
The flowinfo for an IPv6 address. See inet-address:get-flowinfo.
Its value is an unsigned 32-bit integer.
It can only be set when the object is made, with #:flowinfo.
Whether this is the "any" address for its family. See
inet-address:get-is-any?.
Its value is a boolean.
It is read only.
Whether this is a link-local address. See inet-address:get-is-link-local?.
Its value is a boolean.
It is read only.
Whether this is the loopback address for its family. See
inet-address:get-is-loopback?.
Its value is a boolean.
It is read only.
Whether this is a global multicast address. See inet-address:get-is-mc-global?.
Its value is a boolean.
It is read only.
Whether this is a link-local multicast address. See
inet-address:get-is-mc-link-local?.
Its value is a boolean.
It is read only.
Whether this is a node-local multicast address. See
inet-address:get-is-mc-node-local?.
Its value is a boolean.
It is read only.
Whether this is an organization-local multicast address. See
inet-address:get-is-mc-org-local?.
Its value is a boolean.
It is read only.
Whether this is a site-local multicast address. See
inet-address:get-is-mc-site-local?.
Its value is a boolean.
It is read only.
Whether this is a multicast address. See inet-address:get-is-multicast?.
Its value is a boolean.
It is read only.
Whether this is a site-local address. See inet-address:get-is-loopback?.
Its value is a boolean.
It is read only.
The scope-id for an IPv6 address. See inet-address:get-scope-id.
Its value is an unsigned 32-bit integer.
It can only be set when the object is made, with #:scope-id.
Checks if two <GInetAddress> instances are
equal, e.g. the same address.
Passed: a <GInetAddress>.
Passed: a <GInetAddress>.
Another <GInetAddress>.
Returned: a boolean.
#t if self and other-address are equal, #f
otherwise.
Gets self’s family
Passed: a <GInetAddress>.
Returned: a <GSocketFamily>.
self’s family
Gets the value of inet-address:flowinfo.
Passed: a <GInetAddress>.
Returned: an unsigned 32-bit integer.
The flowinfo for the address, 0 if unset or not IPv6 address.
Tests whether self is the "any" address for its family.
Passed: a <GInetAddress>.
Returned: a boolean.
#t if self is the "any" address for its family.
Tests whether self is a link-local address (that is, if it identifies a host on a local network that is not connected to the Internet).
Passed: a <GInetAddress>.
Returned: a boolean.
#t if self is a link-local address.
Tests whether self is the loopback address for its family.
Passed: a <GInetAddress>.
Returned: a boolean.
#t if self is the loopback address for its family.
Tests whether self is a global multicast address.
Passed: a <GInetAddress>.
Returned: a boolean.
#t if self is a global multicast address.
Tests whether self is a link-local multicast address.
Passed: a <GInetAddress>.
Returned: a boolean.
#t if self is a link-local multicast address.
Tests whether self is a node-local multicast address.
Passed: a <GInetAddress>.
Returned: a boolean.
#t if self is a node-local multicast address.
Tests whether self is an organization-local multicast address.
Passed: a <GInetAddress>.
Returned: a boolean.
#t if self is an organization-local multicast address.
Tests whether self is a site-local multicast address.
Passed: a <GInetAddress>.
Returned: a boolean.
#t if self is a site-local multicast address.
Tests whether self is a multicast address.
Passed: a <GInetAddress>.
Returned: a boolean.
#t if self is a multicast address.
Tests whether self is a site-local address such as 10.0.0.1 (that is, the address identifies a host on a local network that can not be reached directly from the Internet, but which may have outgoing Internet connectivity via a NAT or firewall).
Passed: a <GInetAddress>.
Returned: a boolean.
#t if self is a site-local address.
Gets the size of the native raw binary address for self. This is
the size of the data that you get from g_inet_address_to_bytes().
Passed: a <GInetAddress>.
Returned: an unsigned 64-bit integer.
the number of bytes used for the native version of self.
Gets the value of inet-address:scope-id.
Passed: a <GInetAddress>.
Returned: an unsigned 32-bit integer.
The scope-id for the address, 0 if unset or not IPv6 address.
Creates a <GInetAddress> for the "any" address
(unassigned/"don’t care") for family.
Passed: a <GSocketFamily>, or one of its
symbols.
the address family
Returned: a <GInetAddress>.
a new <GInetAddress> corresponding to the
"any" address for family. Free the returned object with
object:unref.
Creates a new <GInetAddress> from the given
family and bytes. bytes should be 4 bytes for
ipv4 and 16 bytes for
ipv6.
Passed: a foreign pointer, or a bytevector.
raw address data
Passed: a <GSocketFamily>, or one of its
symbols.
the address family of bytes
Returned: a <GInetAddress>.
a new <GInetAddress> corresponding to
family and bytes. Free the returned object with
object:unref.
Creates a new <GInetAddress> from the given
family, bytes and scope-id.
bytes must be 4 bytes for Gio.SocketFamily.IPV4 and 16
bytes for Gio.SocketFamily.IPV6.
Passed: a foreign pointer, or a bytevector.
raw address data
Passed: a <GSocketFamily>, or one of its
symbols.
the address family of bytes
Passed: an unsigned 32-bit integer.
Passed: an unsigned 32-bit integer.
the scope-id of the address
Returned: a <GInetAddress>.
a new internet address corresponding to family, bytes and scope-id
Parses string as an IP address and creates a new
<GInetAddress>.
If address is an IPv6 address, it can also contain a scope ID
(separated from the address by a %). Note that currently this
behavior is platform specific. This may change in a future release.
Passed: a string.
a string representation of an IP address
Returned: a <GInetAddress>, or #f.
a new <GInetAddress> corresponding to
string, or #f if string could not be parsed. Free
the returned object with object:unref.
Creates a <GInetAddress> for the loopback
address for family.
Passed: a <GSocketFamily>, or one of its
symbols.
the address family
Returned: a <GInetAddress>.
a new <GInetAddress> corresponding to the
loopback address for family. Free the returned object with
object:unref.
Converts self to string form.
Passed: a <GInetAddress>.
Returned: a string.
a representation of self as a string, which should be freed after use.
Converts self to string form.
To override it in a new class, give register-type #:vfuncs
`((to-string . ,procedure)). The procedure is called as
(procedure self) ⇒ %return.
Passed: the class whose implementation to call:
<GInetAddress>, or a class that derives from
it, or its GType number.
Passed: a <GInetAddress>.
Returned: a string.
a representation of self as a string, which should be freed after use.