Exemplo n.º 1
0
static void dhcp_options_process(unsigned char *popt, struct bootp *bp)
{
	unsigned char *end = popt + sizeof(*bp) + OPT_SIZE;
	int oplen;
	unsigned char option;

	while (popt < end && *popt != 0xff) {
		oplen = *(popt + 1);
		option = *popt;

		dhcp_options_handle(option, popt + 2, oplen, bp);

		popt += oplen + 2;	/* Process next option */
	}
}
Exemplo n.º 2
0
static void dhcp_options_process(unsigned char *popt, struct bootp *bp)
{
	unsigned char *end = popt + sizeof(*bp) + OPT_SIZE;
	int oplen;
	unsigned char option;
	int i;

	while (popt < end && *popt != 0xff) {
		oplen = *(popt + 1);
		option = *popt;

		i = dhcp_options_handle(option, popt + 2, oplen, bp);
		if (i == ARRAY_SIZE(dhcp_options))
			debug("*** Unhandled DHCP Option in OFFER/ACK: %d\n", option);

		popt += oplen + 2;	/* Process next option */
	}
}