
346 Chapter 4—DHCPv6
1493 dh6 = (struct dhcp6 *)rbuf;
1494
1495 dprintf(LOG_DEBUG, FNAME, "receive %s from %s on %s",
1496 dhcp6msgstr(dh6->dh6_msgtype),
1497 addr2str((struct sockaddr *)&from), ifp->ifname);
1498
1499 /* get options */
1500 dhcp6_init_options(&optinfo);
1501 p = (struct dhcp6opt *)(dh6 + 1);
1502 ep = (struct dhcp6opt *)((char *)dh6 + len);
1503 if (dhcp6_get_options(p, ep, &optinfo) < 0) {
1504 dprintf(LOG_INFO, FNAME, "failed to parse options");
1505 return;
1506 }
dhcp6c.c
1488–1506 After the minimum length validation, the dhcp6_get_options() function parses
the DHCPv6 options from the message and converts them into local data structures. ...