예제 #1
0
파일: dhcp.c 프로젝트: jiangxilong/barebox
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 */
	}
}
예제 #2
0
파일: dhcp.c 프로젝트: AubrCool/barebox
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 */
	}
}