Lines Matching refs:udphdr
256 register struct udphdr *uh;
302 if (m->m_len < iphlen + sizeof(struct udphdr)) {
303 if ((m = m_pullup(m, iphlen + sizeof(struct udphdr))) == 0) {
310 uh = (struct udphdr *)(void *)((caddr_t)ip + iphlen);
330 if (len > ip->ip_len || len < sizeof(struct udphdr)) {
524 iphlen + sizeof(struct udphdr),
528 iphlen + sizeof(struct udphdr),
557 uh = (struct udphdr *)(void *)((caddr_t)ip + iphlen);
591 int payload_len = len - sizeof(struct udphdr) > 4 ? 4 : len - sizeof(struct udphdr);
592 if (m->m_len < iphlen + sizeof(struct udphdr) + payload_len) {
593 if ((m = m_pullup(m, iphlen + sizeof(struct udphdr) + payload_len)) == 0) {
605 uh = (struct udphdr *)(void *)((caddr_t)ip + iphlen);
608 if (payload_len == 1 && *(u_int8_t*)((caddr_t)uh + sizeof(struct udphdr)) == 0xFF) {
613 else if (payload_len == 4 && *(u_int32_t*)(void *)((caddr_t)uh + sizeof(struct udphdr)) != 0) {
617 esp4_input(m, iphlen + sizeof(struct udphdr));
724 m_adj(m, iphlen + sizeof(struct udphdr));
896 struct udphdr uh;
1344 (htons((u_short)len + sizeof (struct udphdr))));
1511 ui->ui_ulen = htons((u_short)len + sizeof(struct udphdr));
1518 htons((u_short)len + sizeof(struct udphdr) + IPPROTO_UDP));
1520 m->m_pkthdr.csum_data = offsetof(struct udphdr, uh_sum);