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 Get the plugin version
53 @param client_index - opaque cookie to identify the sender
54 @param context - sender context, to match reply w/ request
57 define dhcp_plugin_get_version
63 /** \brief Reply to get the plugin version
64 @param context - returned sender context, to match reply w/ request
65 @param major - Incremented every time a known breaking behavior change is introduced
66 @param minor - Incremented with small changes, may be used to avoid buggy versions
69 define dhcp_plugin_get_version_reply
76 /** \brief Control ping from client to api server request
77 @param client_index - opaque cookie to identify the sender
78 @param context - sender context, to match reply w/ request
80 define dhcp_plugin_control_ping
86 /** \brief Control ping from the client to the server response
87 @param client_index - opaque cookie to identify the sender
88 @param context - sender context, to match reply w/ request
89 @param retval - return code for the request
90 @param vpe_pid - the pid of the vpe, returned by the server
92 define dhcp_plugin_control_ping_reply
100 /** \brief DHCP Proxy config add / del request
101 @param client_index - opaque cookie to identify the sender
102 @param context - sender context, to match reply w/ request
103 @param rx_vrf_id - Rx/interface vrf id
104 @param server_vrf_id - server vrf id
105 @param is_add - add the config if non-zero, else delete
106 @param insert_circuit_id - option82 suboption 1 fib number
107 @param dhcp_server[] - server address
108 @param dhcp_src_address[] - sc address for packets sent to the server
110 autoreply define dhcp_proxy_config
117 vl_api_address_t dhcp_server;
118 vl_api_address_t dhcp_src_address;
121 /** \brief DHCP Proxy set / unset vss request
122 @param client_index - opaque cookie to identify the sender
123 @param context - sender context, to match reply w/ request
124 @param tbl_id - table id
125 @vss_type - 0: use ASCI vpn_id; 1: use oui/vpn_index; 255: global vpn
126 @vpn_ascii - null terminated ASCII VPN ID up to 128 characters
127 @param oui - first part of rfc2685 vpn id, 3 bytes oui
128 @param vpn_index - second part of rfc2685 vpn id, 4 bytes vpn index
129 @param is_ipv6 - ip6 if non-zero, else ip4
130 @param is_add - set vss if non-zero, else delete
132 autoreply define dhcp_proxy_set_vss
137 vl_api_vss_type_t vss_type;
138 string vpn_ascii_id[129];
145 /** \brief DHCP Client config data
146 @param sw_if_index - index of the interface for DHCP client
147 @param hostname - hostname
148 @param id - Client ID - option 61
149 @param want_dhcp_event - DHCP event sent to the sender
150 via dhcp_compl_event API message if non-zero
151 @param set_broadcast_flag - in the DHCP Discover to control
152 how the resulting OFFER is addressed.
153 @param dscp - DSCP value set in IP packets sent by the client
154 @param pid - sender's pid
158 vl_api_interface_index_t sw_if_index;
161 bool want_dhcp_event;
162 bool set_broadcast_flag;
163 vl_api_ip_dscp_t dscp;
167 /** \brief DHCP Client config add / del request
168 @param client_index - opaque cookie to identify the sender
169 @param context - sender context, to match reply w/ request
170 @param is_add - add the config if non-zero, else delete
171 @param client - client configuration data
173 autoreply define dhcp_client_config
178 vl_api_dhcp_client_t client;
181 /** \brief Struct representing domain server
182 @param address - IP address
184 typedef domain_server
186 vl_api_address_t address;
189 /** \brief Data learned by the client during the DHCP process
190 @param sw_if_index - the interface on which the client is configured
191 @param state - the state of the lease
192 @param is_ipv6 - if non-zero the address is ipv6, else ipv4
193 @param mask_width - The length of the subnet mask assigned
194 @param host_address - Host IP address
195 @param router_address - Router IP address
196 @param host_mac - Host MAC address
200 vl_api_interface_index_t sw_if_index;
201 vl_api_dhcp_client_state_t state;
205 vl_api_address_t host_address;
206 vl_api_address_t router_address;
207 vl_api_mac_address_t host_mac;
209 vl_api_domain_server_t domain_server[count];
212 /** \brief Tell client about a DHCP completion event
213 @param client_index - opaque cookie to identify the sender
214 @param pid - client pid registered to receive notification
215 @param lease - Data learned during the DHCP process;
217 define dhcp_compl_event
221 vl_api_dhcp_lease_t lease;
225 rpc dhcp_client_config returns dhcp_client_config_reply events dhcp_compl_event;
228 /** \brief Dump the DHCP client configurations
230 define dhcp_client_dump
236 /** \brief DHCP Client details returned from dump
237 * @param client - The configured client
238 * @param lease - The learned lease data
240 define dhcp_client_details
243 vl_api_dhcp_client_t client;
244 vl_api_dhcp_lease_t lease;
247 /** \brief Dump DHCP proxy table
248 @param client_index - opaque cookie to identify the sender
249 @param True for IPv6 proxy table
251 define dhcp_proxy_dump
261 vl_api_address_t dhcp_server;
264 /** \brief Tell client about a DHCP completion event
265 @param client_index - opaque cookie to identify the sender
267 define dhcp_proxy_details
273 vl_api_vss_type_t vss_type;
275 string vss_vpn_ascii_id[129];
276 vl_api_address_t dhcp_src_address;
278 vl_api_dhcp_server_t servers[count];
281 autoreply define dhcp_client_detect_enable_disable
286 vl_api_interface_index_t sw_if_index;
290 /** \brief Set DHCPv6 DUID-LL
291 @param client_index - opaque cookie to identify the sender
292 @param context - sender context, to match reply w/ request
293 @param duid_ll - DUID-LL binary string
295 autoreply define dhcp6_duid_ll_set
302 /** \brief Enable/disable listening on DHCPv6 client port
303 @param client_index - opaque cookie to identify the sender
304 @param context - sender context, to match reply w/ request
306 autoreply define dhcp6_clients_enable_disable
313 /** \brief Struct representing DHCPv6 address
314 @param address - address
315 @param valid_time - valid lifetime
316 @param preferred_time - preferred lifetime
318 typedef dhcp6_address_info
320 vl_api_ip6_address_t address;
325 /** \brief Struct representing DHCPv6 PD prefix
326 @param prefix - prefix
327 @param valid_time - valid lifetime
328 @param preferred_time - preferred lifetime
330 typedef dhcp6_pd_prefix_info
332 vl_api_ip6_prefix_t prefix;
337 /** \brief Send DHCPv6 client message of specified type
338 @param client_index - opaque cookie to identify the sender
339 @param context - sender context, to match reply w/ request
340 @param sw_if_index - index of TX interface, also identifies IAID
341 @param server_index - used to dentify DHCPv6 server,
342 unique for each DHCPv6 server on the link,
343 value obrtained from dhcp6_reply_event API message,
344 use ~0 to send message to all DHCPv6 servers
345 @param irt - initial retransmission time
346 @param mrt - maximum retransmission time
347 @param mrc - maximum retransmission count
348 @param mrd - maximum retransmission duration
349 for sending the message
350 @param stop - if non-zero then stop resending the message,
351 otherwise start sending the message
352 @param msg_type - message type
353 @param T1 - value of T1 in IA_NA option
354 @param T2 - value of T2 in IA_NA option
355 @param n_addresses - number of addresses in IA_NA option
356 @param addresses - list of addresses in IA_NA option
358 autoreply define dhcp6_send_client_message
362 vl_api_interface_index_t sw_if_index;
369 vl_api_dhcpv6_msg_type_t msg_type;
373 vl_api_dhcp6_address_info_t addresses[n_addresses];
376 /** \brief Send DHCPv6 PD client message of specified type
377 @param client_index - opaque cookie to identify the sender
378 @param context - sender context, to match reply w/ request
379 @param sw_if_index - index of TX interface
380 @param server_index - used to dentify DHCPv6 server,
381 unique for each DHCPv6 server on the link,
382 value obrtained from dhcp6_pd_reply_event API message,
383 use ~0 to send message to all DHCPv6 servers
384 @param irt - initial retransmission time
385 @param mrt - maximum retransmission time
386 @param mrc - maximum retransmission count
387 @param mrd - maximum retransmission duration
388 for sending the message
389 @param stop - if non-zero then stop resending the message,
390 otherwise start sending the message
391 @param msg_type - message type
392 @param T1 - value of T1 in IA_PD option
393 @param T2 - value of T2 in IA_PD option
394 @param n_prefixes - number of addresses in IA_PD option
395 @param prefixes - list of prefixes in IA_PD option
397 autoreply define dhcp6_pd_send_client_message
401 vl_api_interface_index_t sw_if_index;
408 vl_api_dhcpv6_msg_type_t msg_type;
412 vl_api_dhcp6_pd_prefix_info_t prefixes[n_prefixes];
416 rpc want_dhcp6_reply_events returns want_dhcp6_reply_events_reply
417 events dhcp6_reply_event;
421 rpc want_dhcp6_pd_reply_events returns want_dhcp6_pd_reply_events_reply
422 events dhcp6_pd_reply_event;
425 /** \brief Register for DHCPv6 reply events
426 @param client_index - opaque cookie to identify the sender
427 @param context - sender context, to match reply w/ request
428 @param enable_disable - 1 => register for events, 0 => cancel registration
429 @param pid - sender's pid
431 autoreply define want_dhcp6_reply_events
439 /** \brief Register for DHCPv6 PD reply events
440 @param client_index - opaque cookie to identify the sender
441 @param context - sender context, to match reply w/ request
442 @param enable_disable - 1 => register for events, 0 => cancel registration
443 @param pid - sender's pid
445 autoreply define want_dhcp6_pd_reply_events
453 /** \brief Tell client about a DHCPv6 server reply event
454 @param client_index - opaque cookie to identify the sender
455 @param pid - client pid registered to receive notification
456 @param sw_if_index - index of RX interface, also identifies IAID
457 @param server_index - used to dentify DHCPv6 server,
458 unique for each DHCPv6 server on the link
459 @param msg_type - message type
460 @param T1 - value of T1 in IA_NA option
461 @param T2 - value of T2 in IA_NA option
462 @param inner_status_code - value of status code inside IA_NA option
463 @param status_code - value of status code
464 @param preference - value of preference option in reply message
465 @param n_addresses - number of addresses in IA_NA option
466 @param addresses - list of addresses in IA_NA option
468 define dhcp6_reply_event
472 vl_api_interface_index_t sw_if_index;
474 vl_api_dhcpv6_msg_type_t msg_type;
477 u16 inner_status_code;
481 vl_api_dhcp6_address_info_t addresses[n_addresses];
484 /** \brief Tell client about a DHCPv6 PD server reply event
485 @param client_index - opaque cookie to identify the sender
486 @param pid - client pid registered to receive notification
487 @param sw_if_index - index of RX interface
488 @param server_index - used to dentify DHCPv6 server,
489 unique for each DHCPv6 server on the link
490 @param msg_type - message type
491 @param T1 - value of T1 in IA_PD option
492 @param T2 - value of T2 in IA_PD option
493 @param inner_status_code - value of status code inside IA_PD option
494 @param status_code - value of the main status code of DHCPv6 message
495 @param preference - value of preference option in reply message
496 @param n_prefixes - number of prefixes in IA_PD option
497 @param prefixes - list of prefixes in IA_PD option
499 define dhcp6_pd_reply_event
503 vl_api_interface_index_t sw_if_index;
505 vl_api_dhcpv6_msg_type_t msg_type;
508 u16 inner_status_code;
512 vl_api_dhcp6_pd_prefix_info_t prefixes[n_prefixes];
517 * eval: (c-set-style "gnu")