* limitations under the License.
*/
#include <vlib/vlib.h>
-#include <vnet/dhcp/proxy.h>
+#include <vnet/dhcp/client.h>
+#include <vnet/dhcp/dhcp_proxy.h>
#include <vnet/fib/fib_table.h>
dhcp_client_main_t dhcp_client_main;
/* OK, we own the address (etc), add to the routing table(s) */
if (c->state == DHCP_REQUEST)
{
- void (*fp)(u32, u32, u8 *, u8, u8 *, u8 *, u8 *) = c->event_callback;
+ void (*fp)(u32, u32, u8 *, u8, u8, u8 *, u8 *, u8 *) = c->event_callback;
dhcp_client_acquire_address (dcm, c);
(*fp) (c->client_index, /* clinet index */
c->pid,
c->hostname,
+ c->subnet_mask_width,
0, /* is_ipv6 */
(u8 *)&c->leased_address, /* host IP address */
(u8 *)&c->router_address, /* router IP address */
o = (dhcp_option_t * )dhcp->options;
/* Send option 53, the DHCP message type */
- o->option = 53;
+ o->option = DHCP_PACKET_OPTION_MSG_TYPE;
o->length = 1;
o->data[0] = type;
o = (dhcp_option_t *) (((uword) o) + (o->length + 2));
c->sw_if_index),
&all_1s,
FIB_SOURCE_DHCP,
- FIB_ENTRY_FLAG_LOCAL,
- ADJ_INDEX_INVALID);
+ FIB_ENTRY_FLAG_LOCAL);
/*
* enable the interface to RX IPv4 packets