2 * Copyright (c) 2017 Cisco and/or its affiliates.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at:
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
16 option version = "1.0.0";
18 /** \brief enable/disable name resolution
20 @param client_index - opaque cookie to identify the sender
21 @param context - sender context, to match reply w/ request
22 @param is_enable - 1 = enable, 0 = disable
24 autoreply define dns_enable_disable {
28 option vat_help = "[enable][disable]";
31 /** \brief add or delete an upstream name server
33 @param client_index - opaque cookie to identify the sender
34 @param context - sender context, to match reply w/ request
35 @param is_ip6 - an ip6 name server
36 @param is_add - add = 1, delete = 0
37 @param server_address - server ip address
39 autoreply define dns_name_server_add_del {
44 u8 server_address[16];
45 option vat_help = "<ip-address> [del]";
48 /** \brief DNS name resolution request
50 @param client_index - opaque cookie to identify the sender
51 @param context - sender context, to match reply w/ request
52 @param name - the name to resolve
54 define dns_resolve_name {
58 option vat_help = "<hostname>";
61 /** \brief DNS name resolution reply
63 @param client_index - opaque cookie to identify the sender
64 @param context - sender context, to match reply w/ request
65 @param retval - return value, 0 => success
66 @param ip4_set - indicates that the ip4 address is valid
67 @param ip6_set - indicates that the ip6 address is valid
68 @param ip4_address - the ip4 name resolution reply
69 @param ip6_address - the ip6 name resolution reply
71 define dns_resolve_name_reply {
80 /** \brief DNS IP -> name resolution request
82 @param client_index - opaque cookie to identify the sender
83 @param context - sender context, to match reply w/ request
84 @param is_ip6 - set if the reverse-DNS request is an ip6 address
85 @param address - the address to map to a name
87 define dns_resolve_ip {
92 option vat_help = "<ip4|ip6>";
95 /** \brief DNS ip->name resolution reply
97 @param client_index - opaque cookie to identify the sender
98 @param context - sender context, to match reply w/ request
99 @param retval - return value, 0 => success
100 @param name - canonical name for the indicated IP address
102 define dns_resolve_ip_reply {