Lines Matching refs:packet
411 _cleanup_free_ DHCPPacket *packet;
428 packet = malloc0(size);
429 if (!packet)
432 r = dhcp_message_init(&packet->dhcp, BOOTREQUEST, client->xid, type,
447 packet->dhcp.secs = htobe16(secs);
461 packet->dhcp.flags = htobe16(0x8000);
470 memcpy(&packet->dhcp.chaddr, &client->mac_addr, ETH_ALEN);
492 r = dhcp_option_append(&packet->dhcp, optlen, &optoffset, 0,
508 r = dhcp_option_append(&packet->dhcp, optlen, &optoffset, 0,
531 value of this option higher, up to the size of the largest UDP packet
533 Maximum DHCP Message Size option is the total maximum packet size,
537 r = dhcp_option_append(&packet->dhcp, client->mtu, &optoffset, 0,
545 *ret = packet;
546 packet = NULL;
569 static int dhcp_client_send_raw(sd_dhcp_client *client, DHCPPacket *packet,
571 dhcp_packet_append_ip_headers(packet, INADDR_ANY, DHCP_PORT_CLIENT,
575 packet, len);
1584 log_dhcp_client(client, "Unexpected packet hlen %d", message->hlen);
1608 _cleanup_free_ DHCPPacket *packet = NULL;
1631 packet = malloc0(buflen);
1632 if (!packet)
1635 iov.iov_base = packet;
1660 r = dhcp_packet_verify_headers(packet, len, checksum);
1666 return client_handle_message(client, &packet->dhcp, len);