* limitations under the License.
*/
-option version = "1.0.1";
+option version = "2.0.1";
/** \brief DHCP Proxy config add / del request
@param client_index - opaque cookie to identify the sender
u8 is_add;
};
-/** \brief DHCP Client config add / del request
- @param client_index - opaque cookie to identify the sender
- @param context - sender context, to match reply w/ request
+/** \brief DHCP Client config data
@param sw_if_index - index of the interface for DHCP client
@param hostname - hostname
- @param client_id - Client ID - option 61
- @param is_add - add the config if non-zero, else delete
+ @param id - Client ID - option 61
@param want_dhcp_event - DHCP event sent to the sender
via dhcp_compl_event API message if non-zero
@param set_broadcast_flag - in the DHCP Discover to control
how the resulting OFFER is addressed.
@param pid - sender's pid
*/
-autoreply define dhcp_client_config
+typeonly define dhcp_client
{
- u32 client_index;
- u32 context;
u32 sw_if_index;
u8 hostname[64];
- u8 client_id[64];
- u8 is_add;
+ u8 id[64];
u8 want_dhcp_event;
u8 set_broadcast_flag;
u32 pid;
};
-/** \brief Tell client about a DHCP completion event
+/** \brief DHCP Client config add / del request
@param client_index - opaque cookie to identify the sender
- @param pid - client pid registered to receive notification
+ @param context - sender context, to match reply w/ request
+ @param is_add - add the config if non-zero, else delete
+ @param client - client configuration data
+*/
+autoreply define dhcp_client_config
+{
+ u32 client_index;
+ u32 context;
+ u8 is_add;
+ vl_api_dhcp_client_t client;
+};
+
+/** \brief Data learned by the client during the DHCP process
+ @param sw_if_index - the interface on which the client is configured
+ @param state - the state of the lease (see dhcp_client_state_t)
@param is_ipv6 - if non-zero the address is ipv6, else ipv4
@param mask_width - The length of the subnet mask assigned
@param host_address - Host IP address
@param router_address - Router IP address
@param host_mac - Host MAC address
*/
-define dhcp_compl_event
+typeonly define dhcp_lease
{
- u32 client_index;
- u32 pid;
+ u32 sw_if_index;
+ u8 state;
u8 hostname[64];
u8 is_ipv6;
u8 mask_width;
u8 host_mac[6];
};
+/** \brief Tell client about a DHCP completion event
+ @param client_index - opaque cookie to identify the sender
+ @param pid - client pid registered to receive notification
+ @param lease - Data learned during the DHCP process;
+*/
+define dhcp_compl_event
+{
+ u32 client_index;
+ u32 pid;
+ vl_api_dhcp_lease_t lease;
+};
+
+service {
+ rpc dhcp_client_config returns dhcp_client_config_reply events dhcp_compl_event;
+};
+
+/** \brief Dump the DHCP client configurations
+ */
+define dhcp_client_dump
+{
+ u32 client_index;
+ u32 context;
+};
+
+/** \brief DHCP Client details returned from dump
+ * @param client - The configured client
+ * @param lease - The learned lease data
+ */
+define dhcp_client_details
+{
+ u32 context;
+ vl_api_dhcp_client_t client;
+ vl_api_dhcp_lease_t lease;
+};
+
/** \brief Dump DHCP proxy table
@param client_index - opaque cookie to identify the sender
@param True for IPv6 proxy table
vl_api_dhcp_server_t servers[count];
};
+/** \brief Set DHCPv6 DUID-LL
+ @param client_index - opaque cookie to identify the sender
+ @param context - sender context, to match reply w/ request
+ @param duid_ll - DUID-LL binary string
+*/
+autoreply define dhcp6_duid_ll_set
+{
+ u32 client_index;
+ u32 context;
+ u8 duid_ll[10];
+};
+
+/** \brief Enable/disable listening on DHCPv6 client port
+ @param client_index - opaque cookie to identify the sender
+ @param context - sender context, to match reply w/ request
+*/
+autoreply define dhcp6_clients_enable_disable
+{
+ u32 client_index;
+ u32 context;
+ u8 enable;
+};
+
+/** \brief Struct representing DHCPv6 address
+ @param address - address
+ @param valid_time - valid lifetime
+ @param preferred_time - preferred lifetime
+*/
+typeonly define dhcp6_address_info
+{
+ u8 address[16];
+ u32 valid_time;
+ u32 preferred_time;
+};
+
+/** \brief Struct representing DHCPv6 PD prefix
+ @param prefix - prefix
+ @param prefix_length - prefix length
+ @param valid_time - valid lifetime
+ @param preferred_time - preferred lifetime
+*/
+typeonly define dhcp6_pd_prefix_info
+{
+ u8 prefix[16];
+ u8 prefix_length;
+ u32 valid_time;
+ u32 preferred_time;
+};
+
+/** \brief Send DHCPv6 client message of specified type
+ @param client_index - opaque cookie to identify the sender
+ @param context - sender context, to match reply w/ request
+ @param sw_if_index - index of TX interface, also identifies IAID
+ @param server_index - used to dentify DHCPv6 server,
+ unique for each DHCPv6 server on the link,
+ value obrtained from dhcp6_reply_event API message,
+ use ~0 to send message to all DHCPv6 servers
+ @param irt - initial retransmission time
+ @param mrt - maximum retransmission time
+ @param mrc - maximum retransmission count
+ @param mrd - maximum retransmission duration
+ for sending the message
+ @param stop - if non-zero then stop resending the message,
+ otherwise start sending the message
+ @param msg_type - message type
+ @param T1 - value of T1 in IA_NA option
+ @param T2 - value of T2 in IA_NA option
+ @param n_addresses - number of addresses in IA_NA option
+ @param addresses - list of addresses in IA_NA option
+*/
+autoreply define dhcp6_send_client_message
+{
+ u32 client_index;
+ u32 context;
+ u32 sw_if_index;
+ u32 server_index;
+ u32 irt;
+ u32 mrt;
+ u32 mrc;
+ u32 mrd;
+ u8 stop;
+ u8 msg_type;
+ u32 T1;
+ u32 T2;
+ u32 n_addresses;
+ vl_api_dhcp6_address_info_t addresses[n_addresses];
+};
+
+/** \brief Send DHCPv6 PD client message of specified type
+ @param client_index - opaque cookie to identify the sender
+ @param context - sender context, to match reply w/ request
+ @param sw_if_index - index of TX interface
+ @param server_index - used to dentify DHCPv6 server,
+ unique for each DHCPv6 server on the link,
+ value obrtained from dhcp6_pd_reply_event API message,
+ use ~0 to send message to all DHCPv6 servers
+ @param irt - initial retransmission time
+ @param mrt - maximum retransmission time
+ @param mrc - maximum retransmission count
+ @param mrd - maximum retransmission duration
+ for sending the message
+ @param stop - if non-zero then stop resending the message,
+ otherwise start sending the message
+ @param msg_type - message type
+ @param T1 - value of T1 in IA_PD option
+ @param T2 - value of T2 in IA_PD option
+ @param n_prefixes - number of addresses in IA_PD option
+ @param prefixes - list of prefixes in IA_PD option
+*/
+autoreply define dhcp6_pd_send_client_message
+{
+ u32 client_index;
+ u32 context;
+ u32 sw_if_index;
+ u32 server_index;
+ u32 irt;
+ u32 mrt;
+ u32 mrc;
+ u32 mrd;
+ u8 stop;
+ u8 msg_type;
+ u32 T1;
+ u32 T2;
+ u32 n_prefixes;
+ vl_api_dhcp6_pd_prefix_info_t prefixes[n_prefixes];
+};
+
+service {
+ rpc want_dhcp6_reply_events returns want_dhcp6_reply_events_reply
+ events dhcp6_reply_event;
+};
+
+service {
+ rpc want_dhcp6_pd_reply_events returns want_dhcp6_pd_reply_events_reply
+ events dhcp6_pd_reply_event;
+};
+
+/** \brief Register for DHCPv6 reply events
+ @param client_index - opaque cookie to identify the sender
+ @param context - sender context, to match reply w/ request
+ @param enable_disable - 1 => register for events, 0 => cancel registration
+ @param pid - sender's pid
+*/
+autoreply define want_dhcp6_reply_events
+{
+ u32 client_index;
+ u32 context;
+ u8 enable_disable;
+ u32 pid;
+};
+
+/** \brief Register for DHCPv6 PD reply events
+ @param client_index - opaque cookie to identify the sender
+ @param context - sender context, to match reply w/ request
+ @param enable_disable - 1 => register for events, 0 => cancel registration
+ @param pid - sender's pid
+*/
+autoreply define want_dhcp6_pd_reply_events
+{
+ u32 client_index;
+ u32 context;
+ u8 enable_disable;
+ u32 pid;
+};
+
+/** \brief Tell client about a DHCPv6 server reply event
+ @param client_index - opaque cookie to identify the sender
+ @param pid - client pid registered to receive notification
+ @param sw_if_index - index of RX interface, also identifies IAID
+ @param server_index - used to dentify DHCPv6 server,
+ unique for each DHCPv6 server on the link
+ @param msg_type - message type
+ @param T1 - value of T1 in IA_NA option
+ @param T2 - value of T2 in IA_NA option
+ @param inner_status_code - value of status code inside IA_NA option
+ @param status_code - value of status code
+ @param preference - value of preference option in reply message
+ @param n_addresses - number of addresses in IA_NA option
+ @param addresses - list of addresses in IA_NA option
+*/
+define dhcp6_reply_event
+{
+ u32 client_index;
+ u32 pid;
+ u32 sw_if_index;
+ u32 server_index;
+ u8 msg_type;
+ u32 T1;
+ u32 T2;
+ u16 inner_status_code;
+ u16 status_code;
+ u8 preference;
+ u32 n_addresses;
+ vl_api_dhcp6_address_info_t addresses[n_addresses];
+};
+
+/** \brief Tell client about a DHCPv6 PD server reply event
+ @param client_index - opaque cookie to identify the sender
+ @param pid - client pid registered to receive notification
+ @param sw_if_index - index of RX interface
+ @param server_index - used to dentify DHCPv6 server,
+ unique for each DHCPv6 server on the link
+ @param msg_type - message type
+ @param T1 - value of T1 in IA_PD option
+ @param T2 - value of T2 in IA_PD option
+ @param inner_status_code - value of status code inside IA_PD option
+ @param status_code - value of the main status code of DHCPv6 message
+ @param preference - value of preference option in reply message
+ @param n_prefixes - number of prefixes in IA_PD option
+ @param prefixes - list of prefixes in IA_PD option
+*/
+define dhcp6_pd_reply_event
+{
+ u32 client_index;
+ u32 pid;
+ u32 sw_if_index;
+ u32 server_index;
+ u8 msg_type;
+ u32 T1;
+ u32 T2;
+ u16 inner_status_code;
+ u16 status_code;
+ u8 preference;
+ u32 n_prefixes;
+ vl_api_dhcp6_pd_prefix_info_t prefixes[n_prefixes];
+};
+
/*
* Local Variables:
* eval: (c-set-style "gnu")