10 #ifndef K_API_NETWORK_H
11 #define K_API_NETWORK_H
28 #define kIP_VERSION_4 (4)
177 #define kIP_PORT_ANY (0)
238 #include <kApi/Io/kNetwork.x.h>
Represents a 32-bit unsigned integer.
kIpAddress address
IP address.
Definition: kNetwork.h:173
Internet Protocol version enumeration.
kStatus kIpAddress_Format(kIpAddress address, kChar *text, kSize capacity)
Formats an IP address as a string.
k32u port
Port number.
Definition: kNetwork.h:174
kIpAddress kIpAddress_Any(kIpVersion version)
Gets an address representing an automatically-assigned address.
k32u kIpAddress_ToNet32u(kIpAddress address)
Converts an IPv4 address to a network-endian 32-bit integer.
kBool kIpAddress_Equals(kIpAddress a, kIpAddress b)
Compares two addresses for equality.
Represents an unsigned integer that can store a pointer address.
kIpAddress kIpAddress_FromNet32u(k32u address)
Converts a network-endian 32-bit integer to an IPv4 address.
kIpAddress address
IP address.
Definition: kNetwork.h:187
Represents an IP address.
Definition: kNetwork.h:36
Represents a single unit (byte) in a UTF-8 character.
Represents a byte on the current platform.
kIpAddress kIpAddress_LoopbackV4()
Gets the IpV4 loopback address.
kStatus kNetwork_FindName(kIpAddress address, kChar *name, kSize capacity)
Determines the host name associated with the specified IP address.
k32u kIpAddress_ToHost32u(kIpAddress address)
Converts an IPv4 address to a host-endian 32-bit integer.
kIpAddress kIpAddress_Loopback(kIpVersion version)
Gets the loopback address.
kBool kIpAddress_IsLoopback(kIpAddress address)
Reports whether the given address is a loopback address.
Represents a 128-unit, null-terminated, kChar sequence.
kIpAddress kIpAddress_BroadcastV4()
Gets an address suitable for broadcasting IPv4 datagrams.
kStatus kNetwork_FindAddresses(const kChar *name, kArrayList addresses)
Determines the addresses associated with the specified host name.
Essential API declarations.
Represents a 32-bit signed integer.
kIpAddress kIpAddress_FromHost32u(k32u address)
Converts a host-endian 32-bit integer to an IPv4 address.
kIpVersion version
Address version.
Definition: kNetwork.h:38
kText128 name
Host interface name.
Definition: kNetwork.h:188
Represents a list implemented with a dynamic array.
Root of all class types in the Zen type system.
A collection of static network utility methods.
Represents an enumeration of error codes.
kByte address[16]
Address bytes (most significant byte first).
Definition: kNetwork.h:39
Represents an IP end point (address, port).
Definition: kNetwork.h:171
Represents information about a local IP address.
Definition: kNetwork.h:185
Represents a boolean value.
kStatus kIpAddress_Parse(kIpAddress *address, const kChar *text)
Parses a text-formatted IP address.
kIpAddress kIpAddress_AnyV4()
Gets an address representing an automatically-assigned IPv4 address.