Lines Matching refs:udph
170 struct udphdr udph; member
660 if (bytes < (int) (sizeof(packet.iph) + sizeof(packet.udph))) { in read_raw()
673 || packet.udph.dest != htons(DHCPC_CLIENT_PORT) in read_raw()
674 || ntohs(packet.udph.len) != (uint16_t)(bytes - sizeof(packet.iph))) { in read_raw()
689 packet.iph.tot_len = packet.udph.len; in read_raw()
690 if (packet.udph.check != 0 && dhcp_checksum(&packet, bytes) != 0) { in read_raw()
694 memcpy(&state->pdhcp, &packet.dhcp, bytes - (sizeof(packet.iph) + sizeof(packet.udph))); in read_raw()
699 return bytes - sizeof(packet.iph) - sizeof(packet.udph); in read_raw()
749 packet.udph.source = htons(DHCPC_CLIENT_PORT); in send_raw()
750 packet.udph.dest = htons(DHCPC_SERVER_PORT); in send_raw()
751 packet.udph.len = htons(sizeof(dhcp_raw_t) - sizeof(struct iphdr) - padding); in send_raw()
752 packet.iph.tot_len = packet.udph.len; in send_raw()
753 packet.udph.check = dhcp_checksum(&packet, sizeof(dhcp_raw_t) - padding); in send_raw()