+typedef struct dhcp_client_send_walk_ctx_t_
+{
+ vl_api_registration_t *reg;
+ u32 context;
+} dhcp_client_send_walk_ctx_t;
+
+static int
+send_dhcp_client_entry (const dhcp_client_t * client, void *arg)
+{
+ dhcp_client_send_walk_ctx_t *ctx;
+ vl_api_dhcp_client_details_t *mp;
+
+ ctx = arg;
+
+ mp = vl_msg_api_alloc (sizeof (*mp));
+ memset (mp, 0, sizeof (*mp));
+
+ mp->_vl_msg_id = ntohs (VL_API_DHCP_CLIENT_DETAILS);
+ mp->context = ctx->context;
+
+ dhcp_client_data_encode (&mp->client, client);
+ dhcp_client_lease_encode (&mp->lease, client);
+
+ vl_api_send_msg (ctx->reg, (u8 *) mp);
+
+ return (1);
+}
+
+static void
+vl_api_dhcp_client_dump_t_handler (vl_api_dhcp_client_dump_t * mp)
+{
+ vl_api_registration_t *reg;
+
+ reg = vl_api_client_index_to_registration (mp->client_index);
+ if (!reg)
+ return;
+
+ dhcp_client_send_walk_ctx_t ctx = {
+ .reg = reg,
+ .context = mp->context,
+ };
+ dhcp_client_walk (send_dhcp_client_entry, &ctx);
+}
+