Lines Matching refs:udph
173 struct udphdr udph; member
661 if (bytes < (int) (sizeof(packet.iph) + sizeof(packet.udph))) { in read_raw()
674 || packet.udph.dest != htons(DHCPC_CLIENT_PORT) in read_raw()
675 || ntohs(packet.udph.len) != (uint16_t)(bytes - sizeof(packet.iph))) { in read_raw()
687 packet.iph.tot_len = packet.udph.len; in read_raw()
688 check = packet.udph.check; in read_raw()
689 packet.udph.check = 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()