imsg_dhcp
struct imsg_dhcp *);
struct imsg_dhcp imsg_dhcp;
if (IMSG_DATA_SIZE(imsg) != sizeof(imsg_dhcp))
memcpy(&imsg_dhcp, imsg.data, sizeof(imsg_dhcp));
iface = get_dhcp6leased_iface_by_id(imsg_dhcp.if_index);
parse_dhcp(iface, &imsg_dhcp);
parse_dhcp(struct dhcp6leased_iface *iface, struct imsg_dhcp *dhcp)
struct imsg_dhcp imsg_dhcp;
memset(&imsg_dhcp, 0, sizeof(imsg_dhcp));
if ((len = read(fd, imsg_dhcp.packet, 1500)) == -1) {
imsg_dhcp.if_index = iface->ifinfo.if_index;
imsg_dhcp.len = len;
frontend_imsg_compose_engine(IMSG_DHCP, 0, 0, &imsg_dhcp,
sizeof(imsg_dhcp));
struct imsg_dhcp *);
struct imsg_dhcp imsg_dhcp;
if (imsg_get_data(&imsg, &imsg_dhcp,
sizeof(imsg_dhcp)) == -1)
iface = get_dhcpleased_iface_by_id(imsg_dhcp.if_index);
parse_dhcp(iface, &imsg_dhcp);
parse_dhcp(struct dhcpleased_iface *iface, struct imsg_dhcp *dhcp)
struct imsg_dhcp imsg_dhcp;
memset(&imsg_dhcp, 0, sizeof(imsg_dhcp));
imsg_dhcp.if_index = iface->ifinfo.if_index;
if (hdr->bh_caplen > sizeof(imsg_dhcp.packet)) {
memcpy(&imsg_dhcp.packet, p + hdr->bh_hdrlen, hdr->bh_caplen);
imsg_dhcp.len = hdr->bh_caplen;
imsg_dhcp.csumflags = hdr->bh_csumflags;
frontend_imsg_compose_engine(IMSG_DHCP, 0, 0, &imsg_dhcp,
sizeof(imsg_dhcp));