| // Copyright 2023 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| library fuchsia.net.routes.admin; |
| |
| /// Error type returned when failing to authenticate an interface for a route |
| /// set. |
| type AuthenticateForInterfaceError = flexible enum { |
| /// The provided |
| /// [`fuchsia.net.interfaces.admin/ProofOfinterfaceAuthorization`] was |
| /// invalid. This may happen if: |
| /// - the provided proof's `interface_id' is unknown to the system, |
| /// - the provided proof's `token` is unknown to the system, or |
| /// - the provided proof`s `token` is not associated with the proof's |
| /// `interface_id` (e.g., the `token` authenticates a different |
| /// interface). |
| INVALID_AUTHENTICATION = 1; |
| }; |
| |
| /// Error type returned when failing to manipulate a route set. |
| type RouteSetError = flexible enum { |
| /// The route set attempted to add/remove a route that uses an |
| /// unauthenticated interface. Clients must first authenticate the route set |
| /// for a particular interface by calling `AuthenticateForInterface`, before |
| /// managing routes over the interface. |
| UNAUTHENTICATED = 1; |
| /// This route specified a destination subnet that is invalid. |
| /// E.g. the prefixlen was invalid, or the subnet's host bits were set. |
| INVALID_DESTINATION_SUBNET = 2; |
| /// This route specified a target whose next-hop address is invalid. |
| /// Next-hop addresses must be unicast addresses. |
| INVALID_NEXT_HOP = 3; |
| }; |