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.

The lifetime of the the client is tied to the channel; closing the channel will result in shutting down the client.

Shutdown

Shuts down the Client.

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

The channel is closed after shutdown, regardless of whether an error is returned.

  • 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

NameType

Response

NameType
result Client_Shutdown_Result

WatchAddress

Returns an address and its parameters.

Yields a value for every address acquired by the client.

fuchsia.net.interfaces.admin/AddressParameters.address_state_provider is closed if the address becomes invalid (its valid lifetime expires and Renew and Rebind fail).

It is invalid to call WatchAssignmentState while a previous call is still pending. Doing so will cause the channel to be closed.

  • response address the assigned address.
  • response address_parameters the parameters of the address.

Request

NameType

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 WatchServers while a previous call is still pending. Doing so will cause the DnsServerWatcher channel to be closed.

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

Request

NameType

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 the channel handle that can be used to control the newly created client. Will be closed if a client cannot be created, with an epitaph explaining the reason.

Request

NameType
params NewClientParams
request request<Client>

STRUCTS

Client_Shutdown_Response

Defined in fuchsia.net.dhcpv6/client.fidl

NameTypeDescriptionDefault

TABLES

AddressAssignmentConfig

Defined in fuchsia.net.dhcpv6/client.fidl

Configuration for negotiating addresses.

OrdinalNameTypeDescription
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 an empty AddressConfig (no non-temporary addresses will be negotiated).

AddressConfig

Defined in fuchsia.net.dhcpv6/client.fidl

Configuration for an address type.

OrdinalNameTypeDescription
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

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.

If the configuration does not request any information (neither addresses nor other configuration information), the Client creation will fail.

OrdinalNameTypeDescription
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 an empty AddressAssignmentConfig (no addresses will be negotiated).

2 information_config InformationConfig

Configuration for requesting configuration information.

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

InformationConfig

Defined in fuchsia.net.dhcpv6/client.fidl

Configuration for requesting configuration information.

OrdinalNameTypeDescription
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

Parameters for calling ClientProvider.NewClient.

OrdinalNameTypeDescription
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

The ClientConfig the client starts with.

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

NameTypeDescription
response Client_Shutdown_Response
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.