summaryrefslogtreecommitdiffstats
path: root/src/vnet/dhcp/dhcp.api
diff options
context:
space:
mode:
authorNeale Ranns <neale.ranns@cisco.com>2018-05-16 04:12:18 -0700
committerNeale Ranns <nranns@cisco.com>2018-06-07 03:11:10 -0400
commitdaff1784037376f4a5caec2f5975f9b5fc23d5a4 (patch)
tree186701f7fcd64d691de5b5d11b477a5d8b7840a2 /src/vnet/dhcp/dhcp.api
parent0e969ac8431c80ff4bca5f6985876b1c584eefcd (diff)
DHCP Client Dump
- use types on the DHCP API so that the same data is sent in comfing messages and in dumps - add the DHCP client dump API - update VOM to refelct API changes - rename VOM class dhcp_config* dhcp_client* - the VOM dhcp_client class maintains the lease data (which it reads on a dump) for clients to read Change-Id: I2a43463937cbd80c01d45798e74b21288d8b8ead Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Diffstat (limited to 'src/vnet/dhcp/dhcp.api')
-rw-r--r--src/vnet/dhcp/dhcp.api71
1 files changed, 55 insertions, 16 deletions
diff --git a/src/vnet/dhcp/dhcp.api b/src/vnet/dhcp/dhcp.api
index 975aa6ee9e7..30ead320089 100644
--- a/src/vnet/dhcp/dhcp.api
+++ b/src/vnet/dhcp/dhcp.api
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-option version = "1.0.1";
+option version = "2.0.0";
/** \brief DHCP Proxy config add / del request
@param client_index - opaque cookie to identify the sender
@@ -62,45 +62,53 @@ autoreply define dhcp_proxy_set_vss
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;
@@ -109,10 +117,41 @@ define dhcp_compl_event
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