diff --git a/src/vnet.am b/src/vnet.am
index 669ea1f..c692249 100644
--- a/src/vnet.am
+++ b/src/vnet.am
@@ -657,10 +657,14 @@
 ########################################
 libvnet_la_SOURCES +=				\
  vnet/dhcp/client.c				\
- vnet/dhcp/client.h
+ vnet/dhcp/client.h				\
+ vnet/dhcp/dhcp_api.c
 
 nobase_include_HEADERS +=			\
- vnet/dhcp/client.h
+ vnet/dhcp/client.h					\
+ vnet/dhcp/dhcp.api.h
+
+API_FILES += vnet/dhcp/dhcp.api
 
 ########################################
 # DHCP proxy
diff --git a/src/vnet/dhcp/dhcp.api b/src/vnet/dhcp/dhcp.api
new file mode 100644
index 0000000..c228cd0
--- /dev/null
+++ b/src/vnet/dhcp/dhcp.api
@@ -0,0 +1,166 @@
+/*
+ * Copyright (c) 2015-2016 Cisco and/or its affiliates.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/** \brief DHCP Proxy config add / del request
+    @param client_index - opaque cookie to identify the sender
+    @param context - sender context, to match reply w/ request
+    @param vrf_id - vrf id
+    @param if_ipv6 - ipv6 if non-zero, else ipv4
+    @param is_add - add the config if non-zero, else delete
+    @param insert_circuit_id - option82 suboption 1 fib number
+    @param dhcp_server[] - server address
+    @param dhcp_src_address[] - <fix this, need details>
+*/
+define dhcp_proxy_config
+{
+  u32 client_index;
+  u32 context;
+  u32 vrf_id;
+  u8 is_ipv6;
+  u8 is_add;
+  u8 insert_circuit_id;
+  u8 dhcp_server[16];
+  u8 dhcp_src_address[16];
+};
+
+/** \brief DHCP Proxy config response
+    @param context - sender context, to match reply w/ request
+    @param retval - return code for the request
+*/
+define dhcp_proxy_config_reply
+{
+  u32 context;
+  i32 retval;
+};
+
+/** \brief DHCP Proxy config 2 add / del request
+    @param client_index - opaque cookie to identify the sender
+    @param context - sender context, to match reply w/ request
+    @param rx_vrf_id - receive vrf id
+    @param server_vrf_id - server vrf id
+    @param if_ipv6 - ipv6 if non-zero, else ipv4
+    @param is_add - add the config if non-zero, else delete
+    @param insert_circuit_id - option82 suboption 1 fib number
+    @param dhcp_server[] - server address
+    @param dhcp_src_address[] - <fix this, need details>
+*/
+define dhcp_proxy_config_2
+{
+  u32 client_index;
+  u32 context;
+  u32 rx_vrf_id;
+  u32 server_vrf_id;
+  u8 is_ipv6;
+  u8 is_add;
+  u8 insert_circuit_id;
+  u8 dhcp_server[16];
+  u8 dhcp_src_address[16];
+};
+
+/** \brief DHCP Proxy config 2 add / del response
+    @param context - sender context, to match reply w/ request
+    @param retval - return code for request
+*/
+define dhcp_proxy_config_2_reply
+{
+  u32 context;
+  i32 retval;
+};
+
+/** \brief DHCP Proxy set / unset vss request
+    @param client_index - opaque cookie to identify the sender
+    @param context - sender context, to match reply w/ request
+    @param tbl_id - table id
+    @param oui - first part of vpn id
+    @param fib_id - second part of vpn id
+    @param is_ipv6 - ip6 if non-zero, else ip4
+    @param is_add - set vss if non-zero, else delete
+*/
+define dhcp_proxy_set_vss
+{
+  u32 client_index;
+  u32 context;
+  u32 tbl_id;
+  u32 oui;
+  u32 fib_id;
+  u8 is_ipv6;
+  u8 is_add;
+};
+
+/** \brief DHCP proxy set / unset vss response
+    @param context - sender context, to match reply w/ request
+    @param retval - return code for the request
+*/
+define dhcp_proxy_set_vss_reply
+{
+  u32 context;
+  i32 retval;
+};
+
+/** \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
+    @param sw_if_index - index of the interface for DHCP client
+    @param hostname - hostname
+    @param is_add - add the config if non-zero, else delete
+    @param want_dhcp_event - DHCP event sent to the sender
+           via dhcp_compl_event API message if non-zero
+    @param pid - sender's pid
+*/
+define dhcp_client_config
+{
+  u32 client_index;
+  u32 context;
+  u32 sw_if_index;
+  u8 hostname[64];
+  u8 is_add;
+  u8 want_dhcp_event;
+  u32 pid;
+};
+
+/** \brief DHCP Client config response
+    @param context - sender context, to match reply w/ request
+    @param retval - return code for the request
+*/
+define dhcp_client_config_reply
+{
+  u32 context;
+  i32 retval;
+};
+
+/** \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 is_ipv6 - if non-zero the address is ipv6, else ipv4
+    @param host_address - Host IP address
+    @param router_address - Router IP address
+    @param host_mac - Host MAC address
+*/
+define dhcp_compl_event
+{
+  u32 client_index;
+  u32 pid;
+  u8 hostname[64];
+  u8 is_ipv6;
+  u8 host_address[16];
+  u8 router_address[16];
+  u8 host_mac[6];
+};
+
+/*
+ * Local Variables:
+ * eval: (c-set-style "gnu")
+ * End:
+ */
\ No newline at end of file
diff --git a/src/vnet/dhcp/dhcp_api.c b/src/vnet/dhcp/dhcp_api.c
new file mode 100644
index 0000000..88b32b2
--- /dev/null
+++ b/src/vnet/dhcp/dhcp_api.c
@@ -0,0 +1,253 @@
+/*
+ *------------------------------------------------------------------
+ * dhcp_api.c - dhcp api
+ *
+ * Copyright (c) 2016 Cisco and/or its affiliates.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *------------------------------------------------------------------
+ */
+
+#include <vnet/vnet.h>
+#include <vlibmemory/api.h>
+
+#include <vnet/interface.h>
+#include <vnet/api_errno.h>
+#include <vnet/dhcp/proxy.h>
+#include <vnet/dhcp/client.h>
+#include <vnet/dhcpv6/proxy.h>
+
+#include <vnet/vnet_msg_enum.h>
+
+#define vl_typedefs		/* define message structures */
+#include <vnet/vnet_all_api_h.h>
+#undef vl_typedefs
+
+#define vl_endianfun		/* define message structures */
+#include <vnet/vnet_all_api_h.h>
+#undef vl_endianfun
+
+/* instantiate all the print functions we know about */
+#define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__)
+#define vl_printfun
+#include <vnet/vnet_all_api_h.h>
+#undef vl_printfun
+
+#include <vlibapi/api_helper_macros.h>
+
+#define foreach_vpe_api_msg                       \
+_(DHCP_PROXY_CONFIG,dhcp_proxy_config)            \
+_(DHCP_PROXY_CONFIG_2,dhcp_proxy_config_2)        \
+_(DHCP_PROXY_SET_VSS,dhcp_proxy_set_vss)          \
+_(DHCP_CLIENT_CONFIG, dhcp_client_config)
+
+static void
+dhcpv4_proxy_config (vl_api_dhcp_proxy_config_t * mp)
+{
+  vl_api_dhcp_proxy_config_reply_t *rmp;
+  int rv;
+
+  rv = dhcp_proxy_set_server ((ip4_address_t *) (&mp->dhcp_server),
+			      (ip4_address_t *) (&mp->dhcp_src_address),
+			      (u32) ntohl (mp->vrf_id),
+			      (int) mp->insert_circuit_id,
+			      (int) (mp->is_add == 0));
+
+  REPLY_MACRO (VL_API_DHCP_PROXY_CONFIG_REPLY);
+}
+
+
+static void
+dhcpv6_proxy_config (vl_api_dhcp_proxy_config_t * mp)
+{
+  vl_api_dhcp_proxy_config_reply_t *rmp;
+  int rv = -1;
+
+  rv = dhcpv6_proxy_set_server ((ip6_address_t *) (&mp->dhcp_server),
+				(ip6_address_t *) (&mp->dhcp_src_address),
+				(u32) ntohl (mp->vrf_id),
+				(int) mp->insert_circuit_id,
+				(int) (mp->is_add == 0));
+
+  REPLY_MACRO (VL_API_DHCP_PROXY_CONFIG_REPLY);
+}
+
+static void
+dhcpv4_proxy_config_2 (vl_api_dhcp_proxy_config_2_t * mp)
+{
+  vl_api_dhcp_proxy_config_reply_t *rmp;
+  int rv;
+
+  rv = dhcp_proxy_set_server_2 ((ip4_address_t *) (&mp->dhcp_server),
+				(ip4_address_t *) (&mp->dhcp_src_address),
+				(u32) ntohl (mp->rx_vrf_id),
+				(u32) ntohl (mp->server_vrf_id),
+				(int) mp->insert_circuit_id,
+				(int) (mp->is_add == 0));
+
+  REPLY_MACRO (VL_API_DHCP_PROXY_CONFIG_2_REPLY);
+}
+
+
+static void
+dhcpv6_proxy_config_2 (vl_api_dhcp_proxy_config_2_t * mp)
+{
+  vl_api_dhcp_proxy_config_reply_t *rmp;
+  int rv = -1;
+
+  rv = dhcpv6_proxy_set_server_2 ((ip6_address_t *) (&mp->dhcp_server),
+				  (ip6_address_t *) (&mp->dhcp_src_address),
+				  (u32) ntohl (mp->rx_vrf_id),
+				  (u32) ntohl (mp->server_vrf_id),
+				  (int) mp->insert_circuit_id,
+				  (int) (mp->is_add == 0));
+
+  REPLY_MACRO (VL_API_DHCP_PROXY_CONFIG_2_REPLY);
+}
+
+
+static void
+vl_api_dhcp_proxy_set_vss_t_handler (vl_api_dhcp_proxy_set_vss_t * mp)
+{
+  vl_api_dhcp_proxy_set_vss_reply_t *rmp;
+  int rv;
+  if (!mp->is_ipv6)
+    rv = dhcp_proxy_set_option82_vss (ntohl (mp->tbl_id),
+				      ntohl (mp->oui),
+				      ntohl (mp->fib_id),
+				      (int) mp->is_add == 0);
+  else
+    rv = dhcpv6_proxy_set_vss (ntohl (mp->tbl_id),
+			       ntohl (mp->oui),
+			       ntohl (mp->fib_id), (int) mp->is_add == 0);
+
+  REPLY_MACRO (VL_API_DHCP_PROXY_SET_VSS_REPLY);
+}
+
+
+static void vl_api_dhcp_proxy_config_t_handler
+  (vl_api_dhcp_proxy_config_t * mp)
+{
+  if (mp->is_ipv6 == 0)
+    dhcpv4_proxy_config (mp);
+  else
+    dhcpv6_proxy_config (mp);
+}
+
+void
+dhcp_compl_event_callback (u32 client_index, u32 pid, u8 * hostname,
+			   u8 is_ipv6, u8 * host_address, u8 * router_address,
+			   u8 * host_mac)
+{
+  unix_shared_memory_queue_t *q;
+  vl_api_dhcp_compl_event_t *mp;
+
+  q = vl_api_client_index_to_input_queue (client_index);
+  if (!q)
+    return;
+
+  mp = vl_msg_api_alloc (sizeof (*mp));
+  mp->client_index = client_index;
+  mp->pid = pid;
+  mp->is_ipv6 = is_ipv6;
+  clib_memcpy (&mp->hostname, hostname, vec_len (hostname));
+  mp->hostname[vec_len (hostname) + 1] = '\n';
+  clib_memcpy (&mp->host_address[0], host_address, 16);
+  clib_memcpy (&mp->router_address[0], router_address, 16);
+
+  if (NULL != host_mac)
+    clib_memcpy (&mp->host_mac[0], host_mac, 6);
+
+  mp->_vl_msg_id = ntohs (VL_API_DHCP_COMPL_EVENT);
+
+  vl_msg_api_send_shmem (q, (u8 *) & mp);
+}
+
+static void vl_api_dhcp_proxy_config_2_t_handler
+  (vl_api_dhcp_proxy_config_2_t * mp)
+{
+  if (mp->is_ipv6 == 0)
+    dhcpv4_proxy_config_2 (mp);
+  else
+    dhcpv6_proxy_config_2 (mp);
+}
+
+static void vl_api_dhcp_client_config_t_handler
+  (vl_api_dhcp_client_config_t * mp)
+{
+  vlib_main_t *vm = vlib_get_main ();
+  vl_api_dhcp_client_config_reply_t *rmp;
+  int rv = 0;
+
+  VALIDATE_SW_IF_INDEX (mp);
+
+  rv = dhcp_client_config (vm, ntohl (mp->sw_if_index),
+			   mp->hostname, mp->is_add, mp->client_index,
+			   mp->want_dhcp_event ? dhcp_compl_event_callback :
+			   NULL, mp->pid);
+
+  BAD_SW_IF_INDEX_LABEL;
+
+  REPLY_MACRO (VL_API_DHCP_CLIENT_CONFIG_REPLY);
+}
+
+/*
+ * dhcp_api_hookup
+ * Add vpe's API message handlers to the table.
+ * vlib has alread mapped shared memory and
+ * added the client registration handlers.
+ * See .../vlib-api/vlibmemory/memclnt_vlib.c:memclnt_process()
+ */
+#define vl_msg_name_crc_list
+#include <vnet/vnet_all_api_h.h>
+#undef vl_msg_name_crc_list
+
+static void
+setup_message_id_table (api_main_t * am)
+{
+#define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id);
+  foreach_vl_msg_name_crc_dhcp;
+#undef _
+}
+
+static clib_error_t *
+dhcp_api_hookup (vlib_main_t * vm)
+{
+  api_main_t *am = &api_main;
+
+#define _(N,n)                                                  \
+    vl_msg_api_set_handlers(VL_API_##N, #n,                     \
+                           vl_api_##n##_t_handler,              \
+                           vl_noop_handler,                     \
+                           vl_api_##n##_t_endian,               \
+                           vl_api_##n##_t_print,                \
+                           sizeof(vl_api_##n##_t), 1);
+  foreach_vpe_api_msg;
+#undef _
+
+  /*
+   * Set up the (msg_name, crc, message-id) table
+   */
+  setup_message_id_table (am);
+
+  return 0;
+}
+
+VLIB_API_INIT_FUNCTION (dhcp_api_hookup);
+
+/*
+ * fd.io coding-style-patch-verification: ON
+ *
+ * Local Variables:
+ * eval: (c-set-style "gnu")
+ * End:
+ */
diff --git a/src/vnet/vnet_all_api_h.h b/src/vnet/vnet_all_api_h.h
index d76eee5..4ba3a0e 100644
--- a/src/vnet/vnet_all_api_h.h
+++ b/src/vnet/vnet_all_api_h.h
@@ -54,6 +54,7 @@
 #include <vnet/sr/sr.api.h>
 #include <vnet/classify/classify.api.h>
 #include <vnet/flow/flow.api.h>
+#include <vnet/dhcp/dhcp.api.h>
 
 /*
  * fd.io coding-style-patch-verification: ON
diff --git a/src/vpp/api/api.c b/src/vpp/api/api.c
index 9f6f260..6317f55 100644
--- a/src/vpp/api/api.c
+++ b/src/vpp/api/api.c
@@ -52,12 +52,9 @@
 #include <vnet/ip/ip.h>
 #include <vnet/ip/ip6.h>
 #include <vnet/ip/ip6_neighbor.h>
-#include <vnet/dhcp/proxy.h>
-#include <vnet/dhcp/client.h>
 #if WITH_LIBSSL > 0
 #include <vnet/sr/sr.h>
 #endif
-#include <vnet/dhcpv6/proxy.h>
 #include <vlib/vlib.h>
 #include <vlib/unix/unix.h>
 #include <vlibapi/api.h>
@@ -124,10 +121,6 @@
 _(PROXY_ARP_INTFC_ENABLE_DISABLE, proxy_arp_intfc_enable_disable)       \
 _(VNET_GET_SUMMARY_STATS, vnet_get_summary_stats)			\
 _(RESET_FIB, reset_fib)							\
-_(DHCP_PROXY_CONFIG,dhcp_proxy_config)					\
-_(DHCP_PROXY_CONFIG_2,dhcp_proxy_config_2)				\
-_(DHCP_PROXY_SET_VSS,dhcp_proxy_set_vss)                                \
-_(DHCP_CLIENT_CONFIG, dhcp_client_config)				\
 _(CREATE_LOOPBACK, create_loopback)					\
 _(CONTROL_PING, control_ping)                                           \
 _(CLI_REQUEST, cli_request)                                             \
@@ -1064,157 +1057,6 @@
   REPLY_MACRO (VL_API_RESET_FIB_REPLY);
 }
 
-
-static void
-dhcpv4_proxy_config (vl_api_dhcp_proxy_config_t * mp)
-{
-  vl_api_dhcp_proxy_config_reply_t *rmp;
-  int rv;
-
-  rv = dhcp_proxy_set_server ((ip4_address_t *) (&mp->dhcp_server),
-			      (ip4_address_t *) (&mp->dhcp_src_address),
-			      (u32) ntohl (mp->vrf_id),
-			      (int) mp->insert_circuit_id,
-			      (int) (mp->is_add == 0));
-
-  REPLY_MACRO (VL_API_DHCP_PROXY_CONFIG_REPLY);
-}
-
-
-static void
-dhcpv6_proxy_config (vl_api_dhcp_proxy_config_t * mp)
-{
-  vl_api_dhcp_proxy_config_reply_t *rmp;
-  int rv = -1;
-
-  rv = dhcpv6_proxy_set_server ((ip6_address_t *) (&mp->dhcp_server),
-				(ip6_address_t *) (&mp->dhcp_src_address),
-				(u32) ntohl (mp->vrf_id),
-				(int) mp->insert_circuit_id,
-				(int) (mp->is_add == 0));
-
-  REPLY_MACRO (VL_API_DHCP_PROXY_CONFIG_REPLY);
-}
-
-static void
-dhcpv4_proxy_config_2 (vl_api_dhcp_proxy_config_2_t * mp)
-{
-  vl_api_dhcp_proxy_config_reply_t *rmp;
-  int rv;
-
-  rv = dhcp_proxy_set_server_2 ((ip4_address_t *) (&mp->dhcp_server),
-				(ip4_address_t *) (&mp->dhcp_src_address),
-				(u32) ntohl (mp->rx_vrf_id),
-				(u32) ntohl (mp->server_vrf_id),
-				(int) mp->insert_circuit_id,
-				(int) (mp->is_add == 0));
-
-  REPLY_MACRO (VL_API_DHCP_PROXY_CONFIG_2_REPLY);
-}
-
-
-static void
-dhcpv6_proxy_config_2 (vl_api_dhcp_proxy_config_2_t * mp)
-{
-  vl_api_dhcp_proxy_config_reply_t *rmp;
-  int rv = -1;
-
-  rv = dhcpv6_proxy_set_server_2 ((ip6_address_t *) (&mp->dhcp_server),
-				  (ip6_address_t *) (&mp->dhcp_src_address),
-				  (u32) ntohl (mp->rx_vrf_id),
-				  (u32) ntohl (mp->server_vrf_id),
-				  (int) mp->insert_circuit_id,
-				  (int) (mp->is_add == 0));
-
-  REPLY_MACRO (VL_API_DHCP_PROXY_CONFIG_2_REPLY);
-}
-
-
-static void
-vl_api_dhcp_proxy_set_vss_t_handler (vl_api_dhcp_proxy_set_vss_t * mp)
-{
-  vl_api_dhcp_proxy_set_vss_reply_t *rmp;
-  int rv;
-  if (!mp->is_ipv6)
-    rv = dhcp_proxy_set_option82_vss (ntohl (mp->tbl_id),
-				      ntohl (mp->oui),
-				      ntohl (mp->fib_id),
-				      (int) mp->is_add == 0);
-  else
-    rv = dhcpv6_proxy_set_vss (ntohl (mp->tbl_id),
-			       ntohl (mp->oui),
-			       ntohl (mp->fib_id), (int) mp->is_add == 0);
-
-  REPLY_MACRO (VL_API_DHCP_PROXY_SET_VSS_REPLY);
-}
-
-
-static void vl_api_dhcp_proxy_config_t_handler
-  (vl_api_dhcp_proxy_config_t * mp)
-{
-  if (mp->is_ipv6 == 0)
-    dhcpv4_proxy_config (mp);
-  else
-    dhcpv6_proxy_config (mp);
-}
-
-static void vl_api_dhcp_proxy_config_2_t_handler
-  (vl_api_dhcp_proxy_config_2_t * mp)
-{
-  if (mp->is_ipv6 == 0)
-    dhcpv4_proxy_config_2 (mp);
-  else
-    dhcpv6_proxy_config_2 (mp);
-}
-
-void
-dhcp_compl_event_callback (u32 client_index, u32 pid, u8 * hostname,
-			   u8 is_ipv6, u8 * host_address, u8 * router_address,
-			   u8 * host_mac)
-{
-  unix_shared_memory_queue_t *q;
-  vl_api_dhcp_compl_event_t *mp;
-
-  q = vl_api_client_index_to_input_queue (client_index);
-  if (!q)
-    return;
-
-  mp = vl_msg_api_alloc (sizeof (*mp));
-  mp->client_index = client_index;
-  mp->pid = pid;
-  mp->is_ipv6 = is_ipv6;
-  clib_memcpy (&mp->hostname, hostname, vec_len (hostname));
-  mp->hostname[vec_len (hostname) + 1] = '\n';
-  clib_memcpy (&mp->host_address[0], host_address, 16);
-  clib_memcpy (&mp->router_address[0], router_address, 16);
-
-  if (NULL != host_mac)
-    clib_memcpy (&mp->host_mac[0], host_mac, 6);
-
-  mp->_vl_msg_id = ntohs (VL_API_DHCP_COMPL_EVENT);
-
-  vl_msg_api_send_shmem (q, (u8 *) & mp);
-}
-
-static void vl_api_dhcp_client_config_t_handler
-  (vl_api_dhcp_client_config_t * mp)
-{
-  vlib_main_t *vm = vlib_get_main ();
-  vl_api_dhcp_client_config_reply_t *rmp;
-  int rv = 0;
-
-  VALIDATE_SW_IF_INDEX (mp);
-
-  rv = dhcp_client_config (vm, ntohl (mp->sw_if_index),
-			   mp->hostname, mp->is_add, mp->client_index,
-			   mp->want_dhcp_event ? dhcp_compl_event_callback :
-			   NULL, mp->pid);
-
-  BAD_SW_IF_INDEX_LABEL;
-
-  REPLY_MACRO (VL_API_DHCP_CLIENT_CONFIG_REPLY);
-}
-
 static void
 vl_api_create_loopback_t_handler (vl_api_create_loopback_t * mp)
 {
diff --git a/src/vpp/api/vpe.api b/src/vpp/api/vpe.api
index a00033c..3a35a54 100644
--- a/src/vpp/api/vpe.api
+++ b/src/vpp/api/vpe.api
@@ -43,6 +43,7 @@
  * DPDK APIs: see ... /src/vnet/devices/dpdk/{dpdk.api, dpdk_api.c}
  * CLASSIFY APIs: see ... /src/vnet/classify/{classify.api, classify_api.c}
  * FLOW APIs: see ... /src/vnet/flow/{flow.api, flow_api.c}
+ * DHCP APIs: see ... /src/vnet/dhcp/{dhcpk.api, dhcp_api.c}
  */
 
 /** \brief Create a new subinterface with the given vlan id
@@ -398,68 +399,6 @@
   i32 retval;
 };
 
-/** \brief DHCP Proxy config add / del request
-    @param client_index - opaque cookie to identify the sender
-    @param context - sender context, to match reply w/ request
-    @param vrf_id - vrf id
-    @param if_ipv6 - ipv6 if non-zero, else ipv4
-    @param is_add - add the config if non-zero, else delete
-    @param insert_circuit_id - option82 suboption 1 fib number
-    @param dhcp_server[] - server address
-    @param dhcp_src_address[] - <fix this, need details>
-*/
-define dhcp_proxy_config
-{
-  u32 client_index;
-  u32 context;
-  u32 vrf_id;
-  u8 is_ipv6;
-  u8 is_add;
-  u8 insert_circuit_id;
-  u8 dhcp_server[16];
-  u8 dhcp_src_address[16];
-};
-
-/** \brief DHCP Proxy config response
-    @param context - sender context, to match reply w/ request
-    @param retval - return code for the request
-*/
-define dhcp_proxy_config_reply
-{
-  u32 context;
-  i32 retval;
-};
-
-/** \brief DHCP Proxy set / unset vss request
-    @param client_index - opaque cookie to identify the sender
-    @param context - sender context, to match reply w/ request
-    @param tbl_id - table id
-    @param oui - first part of vpn id
-    @param fib_id - second part of vpn id
-    @param is_ipv6 - ip6 if non-zero, else ip4
-    @param is_add - set vss if non-zero, else delete
-*/
-define dhcp_proxy_set_vss
-{
-  u32 client_index;
-  u32 context;
-  u32 tbl_id;
-  u32 oui;
-  u32 fib_id;
-  u8 is_ipv6;
-  u8 is_add;
-};
-
-/** \brief DHCP proxy set / unset vss response
-    @param context - sender context, to match reply w/ request
-    @param retval - return code for the request
-*/
-define dhcp_proxy_set_vss_reply
-{
-  u32 context;
-  i32 retval;
-};
-
 /** \brief Create loopback interface request
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request
@@ -834,40 +773,6 @@
   u32 next_index;
 };
 
-/** \brief DHCP Proxy config 2 add / del request
-    @param client_index - opaque cookie to identify the sender
-    @param context - sender context, to match reply w/ request
-    @param rx_vrf_id - receive vrf id
-    @param server_vrf_id - server vrf id
-    @param if_ipv6 - ipv6 if non-zero, else ipv4
-    @param is_add - add the config if non-zero, else delete
-    @param insert_circuit_id - option82 suboption 1 fib number
-    @param dhcp_server[] - server address
-    @param dhcp_src_address[] - <fix this, need details>
-*/
-define dhcp_proxy_config_2
-{
-  u32 client_index;
-  u32 context;
-  u32 rx_vrf_id;
-  u32 server_vrf_id;
-  u8 is_ipv6;
-  u8 is_add;
-  u8 insert_circuit_id;
-  u8 dhcp_server[16];
-  u8 dhcp_src_address[16];
-};
-
-/** \brief DHCP Proxy config 2 add / del response
-    @param context - sender context, to match reply w/ request
-    @param retval - return code for request
-*/
-define dhcp_proxy_config_2_reply
-{
-  u32 context;
-  i32 retval;
-};
-
 /** \brief L2 interface ethernet flow point filtering enable/disable request
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request
@@ -1083,37 +988,6 @@
   u8 mac_ip;
 };
     
-/** \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
-    @param sw_if_index - index of the interface for DHCP client
-    @param hostname - hostname
-    @param is_add - add the config if non-zero, else delete
-    @param want_dhcp_event - DHCP event sent to the sender
-           via dhcp_compl_event API message if non-zero
-    @param pid - sender's pid
-*/
-define dhcp_client_config
-{
-  u32 client_index;
-  u32 context;
-  u32 sw_if_index;
-  u8 hostname[64];
-  u8 is_add;
-  u8 want_dhcp_event;
-  u32 pid;
-};
-
-/** \brief DHCP Client config response
-    @param context - sender context, to match reply w/ request
-    @param retval - return code for the request
-*/
-define dhcp_client_config_reply
-{
-  u32 context;
-  i32 retval;
-};
-
 /** \brief Set/unset input ACL interface
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request
@@ -1146,25 +1020,6 @@
   i32 retval;
 };
 
-/** \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 is_ipv6 - if non-zero the address is ipv6, else ipv4
-    @param host_address - Host IP address
-    @param router_address - Router IP address
-    @param host_mac - Host MAC address
-*/
-define dhcp_compl_event
-{
-  u32 client_index;
-  u32 pid;
-  u8 hostname[64];
-  u8 is_ipv6;
-  u8 host_address[16];
-  u8 router_address[16];
-  u8 host_mac[6];
-};
-
 /** \brief cop: enable/disable junk filtration features on an interface
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request
