Google is committed to advancing racial equity for Black communities. See how.

fuchsia.net.dhcpv6

PROTOCOLS

Client

Defined in fuchsia.net.dhcpv6/client.fidl

Provides methods to watch for discovered network configurations.

This protocol encodes the underlying object's lifetime in both directions; the underlying object is alive iff both ends of the protocol are open. That is:

  • Closing the client end causes the object to be destroyed.
  • Observing a closure of the server end indicates the object no longer exists.

Shutdown

Gracefully tears down the underlying object.

Blocks until any held addresses are gracefully released, as described in RFC 8415, Section 18.2.7.

The server end of the protocol is closed after this method returns.

  • error a zx.status if any of the addresses were not gracefully released, e.g. the client times out waiting for Reply to Release, or the interface is down and sending Release fails.

Request

<EMPTY>

Response

NameType
result Client_Shutdown_Result

WatchAddress

Returns an address and its parameters.

Yields a value for every address acquired by the client.

It is invalid to call this method while a previous call is pending. Doing so will cause the server end of the protocol to be closed.

  • response address the assigned address.
  • response address_parameters the parameters of the address. Its address_state_provider is closed if the address becomes invalid (its valid lifetime expires and Renew and Rebind fail).

Request

<EMPTY>

Response

NameType
address fuchsia.net/Subnet
address_parameters fuchsia.net.interfaces.admin/AddressParameters

WatchServers

Returns a list of DNS servers.

First call always returns a snapshot of the current list of servers or blocks if an empty list would be returned. Subsequent calls will block until the list of servers changes.

The list of servers changes over time by configuration or network topology changes, expiration, etc. Callers must repeatedly call WatchServers and replace any previously returned servers with new ones to avoid using stale or expired entries.

It is invalid to call this method while a previous call is pending. Doing so will cause the server end of the protocol to be closed.

  • response servers The list of servers to use for DNS resolution, in priority order.

Request

<EMPTY>

Response

NameType
servers vector<fuchsia.net.name/DnsServer>

ClientProvider

Defined in fuchsia.net.dhcpv6/client.fidl

Provides a method to create new clients.

NewClient

Provides a DHCPv6 client.

  • request params the parameters to create the client with.
  • request request grants control over the client. Closed with an epitaph if the client cannot be created.

Request

NameType
params NewClientParams
request request<Client>

STRUCTS

Client_Shutdown_Response

Defined in fuchsia.net.dhcpv6/client.fidl

<EMPTY>

TABLES

AddressAssignmentConfig

Defined in fuchsia.net.dhcpv6/client.fidl

OrdinalFieldTypeDescription
1 non_temporary_address_config AddressConfig

Non-temporary address configuration.

Configures the client to negotiate non-temporary addresses (IA_NA), as defined in RFC 8415, section 6.2.

It not set, interpreted as empty (no non-temporary addresses will be negotiated).

AddressConfig

Defined in fuchsia.net.dhcpv6/client.fidl

OrdinalFieldTypeDescription
1 address_count uint8

Number of addresses.

If not set, interpreted as 0 (no addresses will be requested).

2 preferred_addresses vector<fuchsia.net/Ipv6Address>

Preferred addresses.

Used for requesting specific addresses from DHCPv6 servers. The addresses are used as hints by DHCPv6 servers, but may be ignored. If the DHCPv6 server does not assign the preferred addresses and responds with different addresses instead, the DHCPv6 client's behaviour is to accept the assigned addresses.

The size of preferred_addresses must be less than or equal to address_count, otherwise the AddressConfig is invalid.

Optional field. If not set, or if preferred_addresses is empty, no address hints are provided.

ClientConfig

Defined in fuchsia.net.dhcpv6/client.fidl

OrdinalFieldTypeDescription
1 address_assignment_config AddressAssignmentConfig

Configuration for negotiating addresses.

If set, the client runs in stateful mode, as described in RFC 8415, Section 6.2.

If not set, interpreted as empty (no addresses will be negotiated).

2 information_config InformationConfig

Configuration for requesting configuration information.

If not set, interpreted as empty (no configuration information will be requested).

InformationConfig

Defined in fuchsia.net.dhcpv6/client.fidl

OrdinalFieldTypeDescription
1 dns_servers bool

Request a list of available DNS servers RFC 3646.

If not set, interpreted as false;

NewClientParams

Defined in fuchsia.net.dhcpv6/client.fidl

OrdinalFieldTypeDescription
1 interface_id uint64

The ID of the interface the client will run on.

Required.

2 address fuchsia.net/Ipv6SocketAddress

The socket address to use when communicating with servers.

DHCPv6 servers listen for link-local multicasts, so not using a link-local address here may cause interoperability issues.

Client creation will fail with INVALID_ARGS if:

  • a multicast address is provided;
  • or a link-local address is provided, and its zone index doesn't match interface_id (Fuchsia has a 1:1 mapping from zone index to interface ID).

Client creation will fail if it fails to bind a socket to this address.

Required.

3 config ClientConfig

Configuration for starting the DHCPv6 client.

If the configuration requests both addresses and other configuration parameters, all information is requested in the same message exchange, running in stateful mode. If only configuration parameters are requested (no addresses), the client runs in stateless mode, as described in RFC 8415, Section 6.1.

Client creation will fail if config is not requesting any information, or if it contains invalid fields.

Required.

UNIONS

Client_Shutdown_Result strict

Defined in fuchsia.net.dhcpv6/client.fidl

Ordinal
VariantTypeDescription
1 response Client_Shutdown_Response
2 err zx/status

CONSTANTS

NameValueTypeDescription
DEFAULT_CLIENT_PORT 546 uint16

Default port a DHCPv6 client should listen to according to RFC 8415, Section 7.2.

RELAY_AGENT_AND_SERVER_PORT 547 uint16

The port a DHCPv6 server or relay agent listens to according to RFC 8415, Section 7.2.