Lines Matching refs:udph
162 struct udphdr *udph; in fils_dhcp_handler() local
254 sizeof(*iph) + sizeof(*udph) + (end - pos) + 2); in fils_dhcp_handler()
264 iph->ip_len = htons(sizeof(*iph) + sizeof(*udph) + (end - pos)); in fils_dhcp_handler()
270 udph = wpabuf_put(resp, sizeof(*udph)); in fils_dhcp_handler()
271 udph->uh_sport = htons(DHCP_SERVER_PORT); in fils_dhcp_handler()
272 udph->uh_dport = htons(DHCP_CLIENT_PORT); in fils_dhcp_handler()
273 udph->uh_ulen = htons(sizeof(*udph) + (end - pos)); in fils_dhcp_handler()
274 udph->uh_sum = htons(0x0000); /* TODO: calculate checksum */ in fils_dhcp_handler()
483 const struct udphdr *udph; in fils_process_hlp_udp() local
486 if (len < sizeof(*iph) + sizeof(*udph)) in fils_process_hlp_udp()
489 udph = (const struct udphdr *) (iph + 1); in fils_process_hlp_udp()
490 sport = ntohs(udph->uh_sport); in fils_process_hlp_udp()
491 dport = ntohs(udph->uh_dport); in fils_process_hlp_udp()
492 ulen = ntohs(udph->uh_ulen); in fils_process_hlp_udp()
495 sport, dport, ulen, ntohs(udph->uh_sum)); in fils_process_hlp_udp()
497 if (ulen < sizeof(*udph) || ulen > len - sizeof(*iph)) in fils_process_hlp_udp()
501 return fils_process_hlp_dhcp(hapd, sta, (const u8 *) (udph + 1), in fils_process_hlp_udp()
502 ulen - sizeof(*udph)); in fils_process_hlp_udp()