2 * Copyright (c) 2015-2016 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 = "3.0.1";
18 import "vnet/interface_types.api";
19 import "vnet/ip/ip_types.api";
20 import "vnet/ethernet/ethernet_types.api";
23 VSS_TYPE_API_ASCII = 0,
24 VSS_TYPE_API_VPN_ID = 1,
25 VSS_TYPE_API_INVALID = 123,
26 VSS_TYPE_API_DEFAULT = 255,
29 enum dhcp_client_state {
30 DHCP_CLIENT_STATE_API_DISCOVER,
31 DHCP_CLIENT_STATE_API_REQUEST,
32 DHCP_CLIENT_STATE_API_BOUND,
37 DHCPV6_MSG_API_SOLICIT = 1,
38 DHCPV6_MSG_API_ADVERTISE = 2,
39 DHCPV6_MSG_API_REQUEST = 3,
40 DHCPV6_MSG_API_CONFIRM = 4,
41 DHCPV6_MSG_API_RENEW = 5,
42 DHCPV6_MSG_API_REBIND = 6,
43 DHCPV6_MSG_API_REPLY = 7,
44 DHCPV6_MSG_API_RELEASE = 8,
45 DHCPV6_MSG_API_DECLINE = 9,
46 DHCPV6_MSG_API_RECONFIGURE = 10,
47 DHCPV6_MSG_API_INFORMATION_REQUEST = 11,
48 DHCPV6_MSG_API_RELAY_FORW = 12,
49 DHCPV6_MSG_API_RELAY_REPL = 13,
52 /** \brief DHCP Proxy config add / del request
53 @param client_index - opaque cookie to identify the sender
54 @param context - sender context, to match reply w/ request
55 @param rx_vrf_id - Rx/interface vrf id
56 @param server_vrf_id - server vrf id
57 @param is_add - add the config if non-zero, else delete
58 @param insert_circuit_id - option82 suboption 1 fib number
59 @param dhcp_server[] - server address
60 @param dhcp_src_address[] - <fix this, need details>
62 autoreply define dhcp_proxy_config
69 vl_api_address_t dhcp_server;
70 vl_api_address_t dhcp_src_address;
73 /** \brief DHCP Proxy set / unset vss request
74 @param client_index - opaque cookie to identify the sender
75 @param context - sender context, to match reply w/ request
76 @param tbl_id - table id
77 @vss_type - 0: use ASCI vpn_id; 1: use oui/vpn_index; 255: global vpn
78 @vpn_ascii - null terminated ASCII VPN ID up to 128 characters
79 @param oui - first part of rfc2685 vpn id, 3 bytes oui
80 @param vpn_index - second part of rfc2685 vpn id, 4 bytes vpn index
81 @param is_ipv6 - ip6 if non-zero, else ip4
82 @param is_add - set vss if non-zero, else delete
84 autoreply define dhcp_proxy_set_vss
89 vl_api_vss_type_t vss_type;
90 string vpn_ascii_id[129];
97 /** \brief DHCP Client config data
98 @param sw_if_index - index of the interface for DHCP client
99 @param hostname - hostname
100 @param id - Client ID - option 61
101 @param want_dhcp_event - DHCP event sent to the sender
102 via dhcp_compl_event API message if non-zero
103 @param set_broadcast_flag - in the DHCP Discover to control
104 how the resulting OFFER is addressed.
105 @param dscp - DSCP value set in IP packets sent by the client
106 @param pid - sender's pid
110 vl_api_interface_index_t sw_if_index;
113 bool want_dhcp_event;
114 bool set_broadcast_flag;
115 vl_api_ip_dscp_t dscp;
119 /** \brief DHCP Client config add / del request
120 @param client_index - opaque cookie to identify the sender
121 @param context - sender context, to match reply w/ request
122 @param is_add - add the config if non-zero, else delete
123 @param client - client configuration data
125 autoreply define dhcp_client_config
130 vl_api_dhcp_client_t client;
133 /** \brief Struct representing domain server
134 @param address - IP address
136 typedef domain_server
138 vl_api_address_t address;
141 /** \brief Data learned by the client during the DHCP process
142 @param sw_if_index - the interface on which the client is configured
143 @param state - the state of the lease
144 @param is_ipv6 - if non-zero the address is ipv6, else ipv4
145 @param mask_width - The length of the subnet mask assigned
146 @param host_address - Host IP address
147 @param router_address - Router IP address
148 @param host_mac - Host MAC address
152 vl_api_interface_index_t sw_if_index;
153 vl_api_dhcp_client_state_t state;
157 vl_api_address_t host_address;
158 vl_api_address_t router_address;
159 vl_api_mac_address_t host_mac;
161 vl_api_domain_server_t domain_server[count];
164 /** \brief Tell client about a DHCP completion event
165 @param client_index - opaque cookie to identify the sender
166 @param pid - client pid registered to receive notification
167 @param lease - Data learned during the DHCP process;
169 define dhcp_compl_event
173 vl_api_dhcp_lease_t lease;
177 rpc dhcp_client_config returns dhcp_client_config_reply events dhcp_compl_event;
180 /** \brief Dump the DHCP client configurations
182 define dhcp_client_dump
188 /** \brief DHCP Client details returned from dump
189 * @param client - The configured client
190 * @param lease - The learned lease data
192 define dhcp_client_details
195 vl_api_dhcp_client_t client;
196 vl_api_dhcp_lease_t lease;
199 /** \brief Dump DHCP proxy table
200 @param client_index - opaque cookie to identify the sender
201 @param True for IPv6 proxy table
203 define dhcp_proxy_dump
213 vl_api_address_t dhcp_server;
216 /** \brief Tell client about a DHCP completion event
217 @param client_index - opaque cookie to identify the sender
219 manual_endian manual_print define dhcp_proxy_details
225 vl_api_vss_type_t vss_type;
227 string vss_vpn_ascii_id[129];
228 vl_api_address_t dhcp_src_address;
230 vl_api_dhcp_server_t servers[count];
233 /** \brief Set DHCPv6 DUID-LL
234 @param client_index - opaque cookie to identify the sender
235 @param context - sender context, to match reply w/ request
236 @param duid_ll - DUID-LL binary string
238 autoreply define dhcp6_duid_ll_set
245 /** \brief Enable/disable listening on DHCPv6 client port
246 @param client_index - opaque cookie to identify the sender
247 @param context - sender context, to match reply w/ request
249 autoreply define dhcp6_clients_enable_disable
256 /** \brief Struct representing DHCPv6 address
257 @param address - address
258 @param valid_time - valid lifetime
259 @param preferred_time - preferred lifetime
261 typedef dhcp6_address_info
263 vl_api_ip6_address_t address;
268 /** \brief Struct representing DHCPv6 PD prefix
269 @param prefix - prefix
270 @param valid_time - valid lifetime
271 @param preferred_time - preferred lifetime
273 typedef dhcp6_pd_prefix_info
275 vl_api_ip6_prefix_t prefix;
280 /** \brief Send DHCPv6 client message of specified type
281 @param client_index - opaque cookie to identify the sender
282 @param context - sender context, to match reply w/ request
283 @param sw_if_index - index of TX interface, also identifies IAID
284 @param server_index - used to dentify DHCPv6 server,
285 unique for each DHCPv6 server on the link,
286 value obrtained from dhcp6_reply_event API message,
287 use ~0 to send message to all DHCPv6 servers
288 @param irt - initial retransmission time
289 @param mrt - maximum retransmission time
290 @param mrc - maximum retransmission count
291 @param mrd - maximum retransmission duration
292 for sending the message
293 @param stop - if non-zero then stop resending the message,
294 otherwise start sending the message
295 @param msg_type - message type
296 @param T1 - value of T1 in IA_NA option
297 @param T2 - value of T2 in IA_NA option
298 @param n_addresses - number of addresses in IA_NA option
299 @param addresses - list of addresses in IA_NA option
301 autoreply define dhcp6_send_client_message
305 vl_api_interface_index_t sw_if_index;
312 vl_api_dhcpv6_msg_type_t msg_type;
316 vl_api_dhcp6_address_info_t addresses[n_addresses];
319 /** \brief Send DHCPv6 PD client message of specified type
320 @param client_index - opaque cookie to identify the sender
321 @param context - sender context, to match reply w/ request
322 @param sw_if_index - index of TX interface
323 @param server_index - used to dentify DHCPv6 server,
324 unique for each DHCPv6 server on the link,
325 value obrtained from dhcp6_pd_reply_event API message,
326 use ~0 to send message to all DHCPv6 servers
327 @param irt - initial retransmission time
328 @param mrt - maximum retransmission time
329 @param mrc - maximum retransmission count
330 @param mrd - maximum retransmission duration
331 for sending the message
332 @param stop - if non-zero then stop resending the message,
333 otherwise start sending the message
334 @param msg_type - message type
335 @param T1 - value of T1 in IA_PD option
336 @param T2 - value of T2 in IA_PD option
337 @param n_prefixes - number of addresses in IA_PD option
338 @param prefixes - list of prefixes in IA_PD option
340 autoreply define dhcp6_pd_send_client_message
344 vl_api_interface_index_t sw_if_index;
351 vl_api_dhcpv6_msg_type_t msg_type;
355 vl_api_dhcp6_pd_prefix_info_t prefixes[n_prefixes];
359 rpc want_dhcp6_reply_events returns want_dhcp6_reply_events_reply
360 events dhcp6_reply_event;
364 rpc want_dhcp6_pd_reply_events returns want_dhcp6_pd_reply_events_reply
365 events dhcp6_pd_reply_event;
368 /** \brief Register for DHCPv6 reply events
369 @param client_index - opaque cookie to identify the sender
370 @param context - sender context, to match reply w/ request
371 @param enable_disable - 1 => register for events, 0 => cancel registration
372 @param pid - sender's pid
374 autoreply define want_dhcp6_reply_events
382 /** \brief Register for DHCPv6 PD reply events
383 @param client_index - opaque cookie to identify the sender
384 @param context - sender context, to match reply w/ request
385 @param enable_disable - 1 => register for events, 0 => cancel registration
386 @param pid - sender's pid
388 autoreply define want_dhcp6_pd_reply_events
396 /** \brief Tell client about a DHCPv6 server reply event
397 @param client_index - opaque cookie to identify the sender
398 @param pid - client pid registered to receive notification
399 @param sw_if_index - index of RX interface, also identifies IAID
400 @param server_index - used to dentify DHCPv6 server,
401 unique for each DHCPv6 server on the link
402 @param msg_type - message type
403 @param T1 - value of T1 in IA_NA option
404 @param T2 - value of T2 in IA_NA option
405 @param inner_status_code - value of status code inside IA_NA option
406 @param status_code - value of status code
407 @param preference - value of preference option in reply message
408 @param n_addresses - number of addresses in IA_NA option
409 @param addresses - list of addresses in IA_NA option
411 define dhcp6_reply_event
415 vl_api_interface_index_t sw_if_index;
417 vl_api_dhcpv6_msg_type_t msg_type;
420 u16 inner_status_code;
424 vl_api_dhcp6_address_info_t addresses[n_addresses];
427 /** \brief Tell client about a DHCPv6 PD server reply event
428 @param client_index - opaque cookie to identify the sender
429 @param pid - client pid registered to receive notification
430 @param sw_if_index - index of RX interface
431 @param server_index - used to dentify DHCPv6 server,
432 unique for each DHCPv6 server on the link
433 @param msg_type - message type
434 @param T1 - value of T1 in IA_PD option
435 @param T2 - value of T2 in IA_PD option
436 @param inner_status_code - value of status code inside IA_PD option
437 @param status_code - value of the main status code of DHCPv6 message
438 @param preference - value of preference option in reply message
439 @param n_prefixes - number of prefixes in IA_PD option
440 @param prefixes - list of prefixes in IA_PD option
442 define dhcp6_pd_reply_event
446 vl_api_interface_index_t sw_if_index;
448 vl_api_dhcpv6_msg_type_t msg_type;
451 u16 inner_status_code;
455 vl_api_dhcp6_pd_prefix_info_t prefixes[n_prefixes];
460 * eval: (c-set-style "gnu")