fuchsia.net

PROTOCOLS

Connectivity

Defined in fuchsia.net/connectivity.fidl

OnNetworkReachable

This is triggered on a state change in network reachability. Clients should expect that network requests will succeed when reachable is true.

Response

NameType
reachable bool

NameLookup

Defined in fuchsia.net/namelookup.fidl

LookupIp

Look up a list of IP addresses by hostname.

If hostname is an Internationalized Domain Name, it must be encoded as per RFC 3490.

Request

NameType
hostname string[255]
options LookupIpOptions

Response

NameType
result NameLookup_LookupIp_Result

LookupHostname

Look up a hostname by IP address.

Request

NameType
addr IpAddress

Response

NameType
result NameLookup_LookupHostname_Result

SocketProvider

Defined in fuchsia.net/socket.fidl

SocketProvider implements the POSIX sockets API.

GetAddrInfo

Retrieves information about the address of a node and/or service. The number of valid results in res is given by the count return value.

Request

NameType
node string[256]?
service string[256]?
hints AddrInfoHints?

Response

NameType
status AddrInfoStatus
nres uint32
res [4]

STRUCTS

NameLookup_LookupIp_Response

generated

NameTypeDescriptionDefault
addr IpAddressInfo No default

NameLookup_LookupHostname_Response

generated

NameTypeDescriptionDefault
hostname string[255] No default

IpAddressInfo

Defined in fuchsia.net/namelookup.fidl

NameTypeDescriptionDefault
ipv4_addrs vector<Ipv4Address> All of the IPv4 addresses for the requested hostname. No default
ipv6_addrs vector<Ipv6Address> All of the IPv6 addresses for the requested hostname. No default
canonical_name string? The canonical name of the requested hostname (usually the DNS CNAME record, if one exists). No default

Ipv4Address

Defined in fuchsia.net/net.fidl

Ipv4Address is expressed in network byte order, so the most significant byte ("127" in the address "127.0.0.1") will be at index 0.

NameTypeDescriptionDefault
addr uint8[4] No default

Ipv6Address

Defined in fuchsia.net/net.fidl

Ipv6Address is expressed in network byte order, so the most significant byte ("ff" in the address "ff02::1") will be at index 0.

NameTypeDescriptionDefault
addr uint8[16] No default

Endpoint

Defined in fuchsia.net/net.fidl

Endpoint describes an IP address and port. The network protocol associated with the Endpoint will be known from context or communicated through additional structures.

NameTypeDescriptionDefault
addr IpAddress The IP address of the endpoint. No default
port uint16 The port number of the endpoint. No default

Subnet

Defined in fuchsia.net/net.fidl

Subnet describes an IP subnetwork, where all host IP addresses share the same most significant bits.

NameTypeDescriptionDefault
addr IpAddress The Ipv4 or Ipv6 address. Only the `prefix_len` most significant bits may be set in `addr`; all bits in the host portion of the address must be zero. No default
prefix_len uint8 The prefix length of the netmask. E.g. for 192.168.1.0/24, the prefix length is 24, corresponding to a netmask of 255.255.255.0. For Ipv4, prefix_len must be in the range [0, 32]. For Ipv6, prefix_len must be in the range [0, 128]. No default

MacAddress

Defined in fuchsia.net/net.fidl

A MAC address used to identify a network interface on the data link layer within the network.

NameTypeDescriptionDefault
octets uint8[6] No default

AddrInfoHints

Defined in fuchsia.net/socket.fidl

NameTypeDescriptionDefault
flags int32 No default
family int32 No default
sock_type int32 No default
protocol int32 No default

AddrStorage

Defined in fuchsia.net/socket.fidl

NameTypeDescriptionDefault
val uint8[16] No default
len uint32 No default

AddrInfo

Defined in fuchsia.net/socket.fidl

NameTypeDescriptionDefault
flags int32 No default
family int32 No default
sock_type int32 No default
protocol int32 No default
addr AddrStorage No default
port uint16 No default

ENUMS

LookupError

Type: uint32

Defined in fuchsia.net/namelookup.fidl

NameValueDescription
NOT_FOUND 1
TRANSIENT 2
INVALID_ARGS 3
INTERNAL_ERROR 4

AddrInfoStatus

Type: uint32

Defined in fuchsia.net/socket.fidl

NameValueDescription
ok 0
bad_flags 1
no_name 2
again 3
fail 4
no_data 5
buffer_overflow 6
system_error 7

UNIONS

NameLookup_LookupIp_Result

generated

NameTypeDescription
response NameLookup_LookupIp_Response
err LookupError

NameLookup_LookupHostname_Result

generated

NameTypeDescription
response NameLookup_LookupHostname_Response
err LookupError

IpAddress

Defined in fuchsia.net/net.fidl

Represents an IP address that may be either v4 or v6.

NameTypeDescription
ipv4 Ipv4Address
ipv6 Ipv6Address

BITS

LookupIpOptions

Type: uint8

NameValueDescription
V4_ADDRS 1 If the lookup should return IPv4 addresses.
V6_ADDRS 2 If the lookup should return IPv6 addresses.
CNAME_LOOKUP 4 If the lookup should return a canonical_name, if one exists.

CONSTANTS

NameValueTypeDescription
MAX_HOSTNAME_SIZE 255 uint64