Lines Matching refs:msg
24 static void *init_dhcp_msg(dhcp_msg *msg, int type, void *hwaddr, uint32_t xid) in init_dhcp_msg() argument
28 memset(msg, 0, sizeof(dhcp_msg)); in init_dhcp_msg()
30 msg->op = OP_BOOTREQUEST; in init_dhcp_msg()
31 msg->htype = HTYPE_ETHER; in init_dhcp_msg()
32 msg->hlen = 6; in init_dhcp_msg()
33 msg->hops = 0; in init_dhcp_msg()
35 msg->flags = htons(FLAGS_BROADCAST); in init_dhcp_msg()
37 msg->xid = xid; in init_dhcp_msg()
39 memcpy(msg->chaddr, hwaddr, 6); in init_dhcp_msg()
41 x = msg->options; in init_dhcp_msg()
55 int init_dhcp_discover_msg(dhcp_msg *msg, void *hwaddr, uint32_t xid) in init_dhcp_discover_msg() argument
59 x = init_dhcp_msg(msg, DHCPDISCOVER, hwaddr, xid); in init_dhcp_discover_msg()
70 return DHCP_MSG_FIXED_SIZE + (x - msg->options); in init_dhcp_discover_msg()
73 int init_dhcp_request_msg(dhcp_msg *msg, void *hwaddr, uint32_t xid, in init_dhcp_request_msg() argument
78 x = init_dhcp_msg(msg, DHCPREQUEST, hwaddr, xid); in init_dhcp_request_msg()
99 return DHCP_MSG_FIXED_SIZE + (x - msg->options); in init_dhcp_request_msg()