FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
dns.api
Go to the documentation of this file.
1 /*
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:
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
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.
14  */
15 
16 option version = "1.0.0";
17 
18 /** \brief enable/disable name resolution
19 
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
23 */
24 autoreply define dns_enable_disable {
28  option vat_help = "[enable][disable]";
29 };
30 
31 /** \brief add or delete an upstream name server
32 
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
38 */
39 autoreply define dns_name_server_add_del {
44  u8 server_address[16];
45  option vat_help = "<ip-address> [del]";
46 };
47 
48 /** \brief DNS name resolution request
49 
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
53 */
57  u8 name[256];
58  option vat_help = "<hostname>";
59  };
60 
61 /** \brief DNS name resolution reply
62 
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
70 */
71 define dns_resolve_name_reply {
78 };
79 
80 /** \brief DNS IP -> name resolution request
81 
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
86 */
87 define dns_resolve_ip {
91  u8 address[16];
92  option vat_help = "<ip4|ip6>";
93  };
94 
95 /** \brief DNS ip->name resolution reply
96 
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
101 */
102 define dns_resolve_ip_reply {
105  u8 name[256];
106 };
vl_api_dns_name_server_add_del_t::context
u32 context
Definition: dns.api:41
vl_api_dns_resolve_ip_reply_t::context
u32 context
Definition: dns.api:103
vl_api_dns_resolve_name_reply_t
DNS name resolution reply.
Definition: dns.api:71
name
string name[64]
Definition: fib.api:25
vl_api_dns_resolve_name_reply_t::retval
i32 retval
Definition: dns.api:73
vl_api_dns_resolve_name_t::context
u32 context
Definition: dns.api:56
vl_api_dns_resolve_ip_t::is_ip6
u8 is_ip6
Definition: dns.api:90
vl_api_dns_name_server_add_del_t::client_index
u32 client_index
Definition: dns.api:40
vl_api_dns_resolve_ip_t::vat_help
option vat_help
Definition: dns.api:92
vl_api_dns_resolve_ip_t
DNS IP -> name resolution request.
Definition: dns.api:87
vl_api_dns_resolve_ip_reply_t::retval
i32 retval
Definition: dns.api:104
vl_api_dns_resolve_ip_t::context
u32 context
Definition: dns.api:89
vl_api_dns_resolve_name_reply_t::ip4_address
u8 ip4_address[4]
Definition: dns.api:76
vl_api_dns_resolve_name_t
DNS name resolution request.
Definition: dns.api:54
vl_api_dns_name_server_add_del_t::server_address
u8 server_address[16]
Definition: dns.api:44
i32
signed int i32
Definition: types.h:77
dns_resolve_name
__clib_export int dns_resolve_name(u8 *name, dns_cache_entry_t **ep, dns_pending_request_t *t0, dns_resolve_name_t *rn)
Definition: dns.c:1348
vl_api_dns_name_server_add_del_t::is_add
u8 is_add
Definition: dns.api:43
vl_api_dns_enable_disable_t::vat_help
option vat_help
Definition: dns.api:28
vl_api_dns_name_server_add_del_t::vat_help
option vat_help
Definition: dns.api:45
vl_api_dns_resolve_name_reply_t::ip6_set
u8 ip6_set
Definition: dns.api:75
vl_api_dns_name_server_add_del_t
add or delete an upstream name server
Definition: dns.api:39
vl_api_dns_resolve_name_reply_t::ip4_set
u8 ip4_set
Definition: dns.api:74
vl_api_dns_resolve_name_reply_t::context
u32 context
Definition: dns.api:72
vl_api_dns_resolve_name_t::name
u8 name[256]
Definition: dns.api:57
dns_enable_disable
static int dns_enable_disable(vlib_main_t *vm, dns_main_t *dm, int is_enable)
Definition: dns.c:70
vl_api_dns_enable_disable_t::enable
u8 enable
Definition: dns.api:27
address
manual_print typedef address
Definition: ip_types.api:96
vl_api_dns_resolve_ip_reply_t::name
u8 name[256]
Definition: dns.api:105
vl_api_dns_enable_disable_t
enable/disable name resolution
Definition: dns.api:24
vl_api_dns_resolve_name_t::client_index
u32 client_index
Definition: dns.api:55
vl_api_dns_enable_disable_t::client_index
u32 client_index
Definition: dns.api:25
vl_api_dns_resolve_ip_t::client_index
u32 client_index
Definition: dns.api:88
u32
unsigned int u32
Definition: types.h:88
ip4_address
manual_print typedef u8 ip4_address[4]
Definition: ip_types.api:18
ip6_address
manual_print typedef u8 ip6_address[16]
Definition: ip_types.api:19
vl_api_dns_resolve_name_reply_t::ip6_address
u8 ip6_address[16]
Definition: dns.api:77
u8
unsigned char u8
Definition: types.h:56
vl_api_dns_resolve_ip_reply_t
DNS ip->name resolution reply.
Definition: dns.api:102
vl_api_dns_name_server_add_del_t::is_ip6
u8 is_ip6
Definition: dns.api:42
vl_api_dns_enable_disable_t::context
u32 context
Definition: dns.api:26
vl_api_dns_resolve_name_t::vat_help
option vat_help
Definition: dns.api:58
vl_api_dns_resolve_ip_t::address
u8 address[16]
Definition: dns.api:91
version
option version
Definition: dns.api:16