Lines Matching defs:udphdr
136 static int udp4_input_checksum(struct mbuf *, const struct udphdr *, int, int);
220 udp_input_checksum(int af, struct mbuf *m, const struct udphdr *uh,
247 udp4_input_checksum(struct mbuf *m, const struct udphdr *uh,
315 struct udphdr *uh;
328 M_REGION_GET(uh, struct udphdr *, m, iphlen, sizeof(struct udphdr));
338 if (ACCESSIBLE_POINTER(uh, struct udphdr) == 0) {
339 m = m_copyup(m, iphlen + sizeof(struct udphdr), 0);
345 uh = (struct udphdr *)(mtod(m, char *) + iphlen);
347 KASSERT(ACCESSIBLE_POINTER(uh, struct udphdr));
359 if (len < sizeof(struct udphdr)) {
394 M_REGION_GET(uh, struct udphdr *, m, iphlen, sizeof(struct udphdr));
484 struct mbuf **mp, int off /* offset of udphdr */)
493 off += sizeof(struct udphdr); /* now, offset of payload */
656 struct udphdr *uh;
677 uh = (struct udphdr *)((char *)ip + (ip->ip_hl << 2));
821 ui->ui_ulen = htons((u_int16_t)len + sizeof(struct udphdr));
835 sizeof(struct udphdr) + IPPROTO_UDP));
837 m->m_pkthdr.csum_data = offsetof(struct udphdr, uh_sum);
1246 const size_t skip = sizeof(struct udphdr);
1253 struct udphdr *udphdr;
1290 udphdr = (struct udphdr *)((char *)data - skip);
1291 sport = udphdr->uh_sport;
1292 dport = udphdr->uh_dport;
1310 iphdrlen = off - sizeof(struct udphdr);