diff options
author | Neale Ranns <neale.ranns@cisco.com> | 2018-05-16 04:12:18 -0700 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2018-06-07 03:11:10 -0400 |
commit | daff1784037376f4a5caec2f5975f9b5fc23d5a4 (patch) | |
tree | 186701f7fcd64d691de5b5d11b477a5d8b7840a2 /src/vat/api_format.c | |
parent | 0e969ac8431c80ff4bca5f6985876b1c584eefcd (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/vat/api_format.c')
-rw-r--r-- | src/vat/api_format.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/vat/api_format.c b/src/vat/api_format.c index dfb0284955e..f17802d778f 100644 --- a/src/vat/api_format.c +++ b/src/vat/api_format.c @@ -2669,10 +2669,11 @@ vl_api_dhcp_compl_event_t_handler (vl_api_dhcp_compl_event_t * mp) { errmsg ("DHCP compl event: pid %d %s hostname %s host_addr %U " "router_addr %U host_mac %U", - ntohl (mp->pid), mp->is_ipv6 ? "ipv6" : "ipv4", mp->hostname, - format_ip4_address, &mp->host_address, - format_ip4_address, &mp->router_address, - format_ethernet_address, mp->host_mac); + ntohl (mp->pid), mp->lease.is_ipv6 ? "ipv6" : "ipv4", + mp->lease.hostname, + format_ip4_address, &mp->lease.host_address, + format_ip4_address, &mp->lease.router_address, + format_ethernet_address, mp->lease.host_mac); } static void vl_api_dhcp_compl_event_t_handler_json @@ -10125,12 +10126,12 @@ api_dhcp_client_config (vat_main_t * vam) /* Construct the API message */ M (DHCP_CLIENT_CONFIG, mp); - mp->sw_if_index = htonl (sw_if_index); - clib_memcpy (mp->hostname, hostname, vec_len (hostname)); - vec_free (hostname); mp->is_add = is_add; - mp->want_dhcp_event = disable_event ? 0 : 1; - mp->pid = htonl (getpid ()); + mp->client.sw_if_index = htonl (sw_if_index); + clib_memcpy (mp->client.hostname, hostname, vec_len (hostname)); + vec_free (hostname); + mp->client.want_dhcp_event = disable_event ? 0 : 1; + mp->client.pid = htonl (getpid ()); /* send it... */ S (mp); |