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
Name | Type |
---|---|
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
Name | Type |
---|---|
hostname |
string[255]
|
options |
LookupIpOptions
|
Response
Name | Type |
---|---|
result |
NameLookup_LookupIp_Result
|
LookupHostname
Look up a hostname by IP address.
Request
Name | Type |
---|---|
addr |
IpAddress
|
Response
Name | Type |
---|---|
result |
NameLookup_LookupHostname_Result
|
STRUCTS
NameLookup_LookupIp_Response
generated
Name | Type | Description | Default |
---|---|---|---|
addr |
IpAddressInfo
|
No default |
NameLookup_LookupHostname_Response
generated
Name | Type | Description | Default |
---|---|---|---|
hostname |
string[255]
|
No default |
IpAddressInfo
Defined in fuchsia.net/namelookup.fidl
Name | Type | Description | Default |
---|---|---|---|
ipv4_addrs |
vector<Ipv4Address>[256]
|
All of the IPv4 addresses for the requested hostname. |
No default |
ipv6_addrs |
vector<Ipv6Address>[256]
|
All of the IPv6 addresses for the requested hostname. |
No default |
canonical_name |
string[256]?
|
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.
Name | Type | Description | Default |
---|---|---|---|
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.
Name | Type | Description | Default |
---|---|---|---|
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.
Name | Type | Description | Default |
---|---|---|---|
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.
Name | Type | Description | Default |
---|---|---|---|
addr |
IpAddress
|
The Ipv4 or Ipv6 address. Only the |
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.
Name | Type | Description | Default |
---|---|---|---|
octets |
uint8[6]
|
No default |
ENUMS
LookupError
Type: uint32
Defined in fuchsia.net/namelookup.fidl
Name | Value | Description |
---|---|---|
NOT_FOUND |
1 |
No result was found for this query. |
TRANSIENT |
2 |
The lookup failed, but may succeed at a later time. For instance, the network or DNS server may be unreachable. |
INVALID_ARGS |
3 |
The lookup failed due to an invalid argument (for instance, the hostname was not encoded correctly, or was too long). |
INTERNAL_ERROR |
4 |
The lookup failed due to an internal error. |
UNIONS
NameLookup_LookupIp_Result
generated
Name | Type | Description |
---|---|---|
response |
NameLookup_LookupIp_Response
|
|
err |
LookupError
|
NameLookup_LookupHostname_Result
generated
Name | Type | Description |
---|---|---|
response |
NameLookup_LookupHostname_Response
|
|
err |
LookupError
|
IpAddress
Defined in fuchsia.net/net.fidl
Represents an IP address that may be either v4 or v6.
Name | Type | Description |
---|---|---|
ipv4 |
Ipv4Address
|
|
ipv6 |
Ipv6Address
|
BITS
LookupIpOptions
Type: uint8
Name | Value | Description |
---|---|---|
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
Name | Value | Type | Description |
---|---|---|---|
MAX_HOSTNAME_SIZE |
255
|
uint64 |