Lines Matching refs:x
26 uint8_t *x; in init_dhcp_msg() local
41 x = msg->options; in init_dhcp_msg()
43 *x++ = OPT_COOKIE1; in init_dhcp_msg()
44 *x++ = OPT_COOKIE2; in init_dhcp_msg()
45 *x++ = OPT_COOKIE3; in init_dhcp_msg()
46 *x++ = OPT_COOKIE4; in init_dhcp_msg()
48 *x++ = OPT_MESSAGE_TYPE; in init_dhcp_msg()
49 *x++ = 1; in init_dhcp_msg()
50 *x++ = type; in init_dhcp_msg()
52 return x; in init_dhcp_msg()
57 uint8_t *x; in init_dhcp_discover_msg() local
59 x = init_dhcp_msg(msg, DHCPDISCOVER, hwaddr, xid); in init_dhcp_discover_msg()
61 *x++ = OPT_PARAMETER_LIST; in init_dhcp_discover_msg()
62 *x++ = 4; in init_dhcp_discover_msg()
63 *x++ = OPT_SUBNET_MASK; in init_dhcp_discover_msg()
64 *x++ = OPT_GATEWAY; in init_dhcp_discover_msg()
65 *x++ = OPT_DNS; in init_dhcp_discover_msg()
66 *x++ = OPT_BROADCAST_ADDR; in init_dhcp_discover_msg()
68 *x++ = OPT_END; in init_dhcp_discover_msg()
70 return DHCP_MSG_FIXED_SIZE + (x - msg->options); in init_dhcp_discover_msg()
76 uint8_t *x; in init_dhcp_request_msg() local
78 x = init_dhcp_msg(msg, DHCPREQUEST, hwaddr, xid); in init_dhcp_request_msg()
80 *x++ = OPT_PARAMETER_LIST; in init_dhcp_request_msg()
81 *x++ = 4; in init_dhcp_request_msg()
82 *x++ = OPT_SUBNET_MASK; in init_dhcp_request_msg()
83 *x++ = OPT_GATEWAY; in init_dhcp_request_msg()
84 *x++ = OPT_DNS; in init_dhcp_request_msg()
85 *x++ = OPT_BROADCAST_ADDR; in init_dhcp_request_msg()
87 *x++ = OPT_REQUESTED_IP; in init_dhcp_request_msg()
88 *x++ = 4; in init_dhcp_request_msg()
89 memcpy(x, &ipaddr, 4); in init_dhcp_request_msg()
90 x += 4; in init_dhcp_request_msg()
92 *x++ = OPT_SERVER_ID; in init_dhcp_request_msg()
93 *x++ = 4; in init_dhcp_request_msg()
94 memcpy(x, &serveraddr, 4); in init_dhcp_request_msg()
95 x += 4; in init_dhcp_request_msg()
97 *x++ = OPT_END; in init_dhcp_request_msg()
99 return DHCP_MSG_FIXED_SIZE + (x - msg->options); in init_dhcp_request_msg()