Lines Matching refs:udp

279 	unsigned short ptype, struct iphdr *ip __unused, struct udphdr *udp __unused)  in await_arp()
380 static uint16_t udpchksum(struct iphdr *ip, struct udphdr *udp) in udpchksum() argument
390 pseudo.len = udp->len; in udpchksum()
396 checksum = add_ipchksums(12, checksum, ipchksum(udp, ntohs(udp->len))); in udpchksum()
406 struct udphdr *udp; in build_udp_hdr() local
409 udp = (struct udphdr *)((char *)buf + sizeof(struct iphdr)); in build_udp_hdr()
410 udp->src = htons(srcsock); in build_udp_hdr()
411 udp->dest = htons(destsock); in build_udp_hdr()
412 udp->len = htons(len - sizeof(struct iphdr)); in build_udp_hdr()
413 udp->chksum = 0; in build_udp_hdr()
414 if ((udp->chksum = udpchksum(ip, udp)) == 0) in build_udp_hdr()
415 udp->chksum = 0xffff; in build_udp_hdr()
434 struct iphdr *ip __unused, struct udphdr *udp __unused) in await_qdrain()
456 struct iphdr *ip, struct udphdr *udp) in await_rarp() argument
526 struct udphdr *udp) in await_bootp() argument
531 if (!udp) { in await_bootp()
541 if (udp->dest != htons(BOOTP_CLIENT)) in await_bootp()
623 struct udphdr *udp) in await_dhcp() argument
628 if (!udp) { in await_dhcp()
638 if (udp->dest != htons(BOOTP_CLIENT)) in await_dhcp()
886 struct udphdr *udp; in await_reply() local
955 udp = 0; in await_reply()
958 udp = (struct udphdr *)&nic.packet[ETH_HLEN + sizeof(struct iphdr)]; in await_reply()
961 if (ntohs(udp->len) > (ntohs(ip->len) - iplen)) in await_reply()
964 if (udp->chksum && udpchksum(ip, udp)) { in await_reply()
969 result = reply(ival, ptr, ptype, ip, udp); in await_reply()