Lines Matching refs:udp
371 struct udphdr udp; member
405 struct udphdr *udp; in make_udp_packet() local
409 udp = &udpp->udp; in make_udp_packet()
429 udp->uh_sport = htons(DHCP_CLIENT_PORT); in make_udp_packet()
430 udp->uh_dport = htons(DHCP_SERVER_PORT); in make_udp_packet()
431 udp->uh_ulen = htons(sizeof(*udp) + length); in make_udp_packet()
432 ip->ip_len = udp->uh_ulen; in make_udp_packet()
433 udp->uh_sum = checksum(udpp, sizeof(*udpp)); in make_udp_packet()
439 ip->ip_len = htons(sizeof(*ip) + sizeof(*udp) + length); in make_udp_packet()
443 return sizeof(*ip) + sizeof(*udp) + length; in make_udp_packet()
447 get_udp_data(const uint8_t **data, const uint8_t *udp) in get_udp_data() argument
451 memcpy(&packet, udp, sizeof(packet)); in get_udp_data()
452 *data = udp + offsetof(struct udp_dhcp_packet, dhcp); in get_udp_data()
455 sizeof(packet.udp); in get_udp_data()
487 udpsum = packet.udp.uh_sum; in valid_udp_packet()
488 packet.udp.uh_sum = 0; in valid_udp_packet()
492 packet.ip.ip_len = packet.udp.uh_ulen; in valid_udp_packet()