Lines Matching refs:udp
115 packet->udp.source = htobe16(source_port); in dhcp_packet_append_ip_headers()
116 packet->udp.dest = htobe16(destination_port); in dhcp_packet_append_ip_headers()
118 packet->udp.len = htobe16(len - DHCP_IP_SIZE); in dhcp_packet_append_ip_headers()
120 packet->ip.check = packet->udp.len; in dhcp_packet_append_ip_headers()
121 packet->udp.check = dhcp_packet_checksum((uint8_t*)&packet->ip.ttl, len - 8); in dhcp_packet_append_ip_headers()
162 if (len < hdrlen + be16toh(packet->udp.len)) in dhcp_packet_verify_headers()
165 len, hdrlen + be16toh(packet->udp.len)); in dhcp_packet_verify_headers()
167 if (be16toh(packet->udp.dest) != port) in dhcp_packet_verify_headers()
170 be16toh(packet->udp.dest), port); in dhcp_packet_verify_headers()
180 if (checksum && packet->udp.check) { in dhcp_packet_verify_headers()
181 packet->ip.check = packet->udp.len; in dhcp_packet_verify_headers()
185 be16toh(packet->udp.len) + 12)) in dhcp_packet_verify_headers()