1 /*
2  * Copyright (C) 2023 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package android.net.resolv.aidl;
18 
19 /**
20  * DNS-over-HTTPS configuration parameters. Represents a single DoH server.
21  *
22  * Note that although this parcelable is for DNS-over-HTTPS configuration parameters, there is
23  * no field in this parcelable to specify an exact HTTPS protocol (h2 or h3) because DnsResolver
24  * only supports DNS-over-HTTPS/3. The configuration parameters are for h3.
25  *
26  * {@hide}
27  */
28 @JavaDerive(equals=true, toString=true) @JavaOnlyImmutable
29 parcelable DohParamsParcel {
30     /**
31      * The server hostname.
32      */
33      String name = "";
34 
35     /**
36      * The server IP addresses. They are not sorted.
37      */
38      String[] ips = {};
39 
40     /**
41      * A part of the URI template used to construct the URL for DNS resolution.
42      * It's derived only from DNS SVCB SvcParamKey "dohpath".
43      */
44      String dohpath = "";
45 
46     /**
47      * The port used to reach the servers.
48      */
49      int port = -1;
50 }
51