Home | History | Annotate | Download | only in src

Lines Matching defs:dhcp

30  * dhcp.c
35 * the DHCP server for use in a Lua pxeboot script
46 * flags flags DHCP Flags field
56 * getoptions() returns a table of the DHCP Options field of the BOOTP
57 * message returned by the DHCP server for use in a Lua pxeboot script.
64 * raw binary number that was returned by the DHCP server and must be decoded
85 t = dhcp.gettable()
93 #include "dhcp.h"
131 dhcp_t* dhcp = 0;
134 /* Append the DHCP info */
141 dhcp = (dhcp_t*)dhcpdata;
146 uint8_t* ptr = (uint8_t*)&dhcp->options;
258 dhcp_t* dhcp = 0;
262 /* Append the DHCP info */
269 dhcp = (dhcp_t*)dhcpdata;
275 lua_pushinteger(L, dhcp->op);
279 lua_pushinteger(L, dhcp->htype);
283 lua_pushinteger(L, dhcp->hlen);
287 lua_pushinteger(L, dhcp->hops);
291 lua_pushinteger(L, ntohl(dhcp->xid));
295 lua_pushinteger(L, ntohs(dhcp->secs));
299 lua_pushinteger(L, ntohs(dhcp->flags));
302 sprintf(dhcp_arg, "%u.%u.%u.%u", dhcp->ciaddr[0], dhcp->ciaddr[1], dhcp->ciaddr[2], dhcp->ciaddr[3]);
307 sprintf(dhcp_arg, "%u.%u.%u.%u", dhcp->yiaddr[0], dhcp->yiaddr[1], dhcp->yiaddr[2], dhcp->yiaddr[3]);
312 sprintf(dhcp_arg, "%u.%u.%u.%u", dhcp->siaddr[0], dhcp->siaddr[1], dhcp->siaddr[2], dhcp->siaddr[3]);
317 sprintf(dhcp_arg, "%u.%u.%u.%u", dhcp->giaddr[0], dhcp->giaddr[1], dhcp->giaddr[2], dhcp->giaddr[3]);
323 dhcp->chaddr[0], dhcp->chaddr[1], dhcp->chaddr[2],
324 dhcp->chaddr[3], dhcp->chaddr[4], dhcp->chaddr[5]);
329 snprintf(dhcp_arg, STR_BUF_SIZE, "%s", dhcp->sname);
335 snprintf(dhcp_arg, STR_BUF_SIZE, "%s", dhcp->file);
341 sprintf(dhcp_arg, "%u.%u.%u.%u", dhcp->cookie[0], dhcp->cookie[1], dhcp->cookie[2], dhcp->cookie[3]);