• Home
  • Raw
  • Download

Lines Matching refs:iph

327 	struct iphdr *iph;  in netpoll_send_udp()  local
331 ip_len = eth_len = udp_len + sizeof(*iph); in netpoll_send_udp()
355 skb_push(skb, sizeof(*iph)); in netpoll_send_udp()
357 iph = ip_hdr(skb); in netpoll_send_udp()
360 put_unaligned(0x45, (unsigned char *)iph); in netpoll_send_udp()
361 iph->tos = 0; in netpoll_send_udp()
362 put_unaligned(htons(ip_len), &(iph->tot_len)); in netpoll_send_udp()
363 iph->id = 0; in netpoll_send_udp()
364 iph->frag_off = 0; in netpoll_send_udp()
365 iph->ttl = 64; in netpoll_send_udp()
366 iph->protocol = IPPROTO_UDP; in netpoll_send_udp()
367 iph->check = 0; in netpoll_send_udp()
368 put_unaligned(htonl(np->local_ip), &(iph->saddr)); in netpoll_send_udp()
369 put_unaligned(htonl(np->remote_ip), &(iph->daddr)); in netpoll_send_udp()
370 iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); in netpoll_send_udp()
479 struct iphdr *iph; in __netpoll_rx() local
504 iph = (struct iphdr *)skb->data; in __netpoll_rx()
507 if (iph->ihl < 5 || iph->version != 4) in __netpoll_rx()
509 if (!pskb_may_pull(skb, iph->ihl*4)) in __netpoll_rx()
511 if (ip_fast_csum((u8 *)iph, iph->ihl) != 0) in __netpoll_rx()
514 len = ntohs(iph->tot_len); in __netpoll_rx()
515 if (skb->len < len || len < iph->ihl*4) in __netpoll_rx()
525 if (iph->protocol != IPPROTO_UDP) in __netpoll_rx()
528 len -= iph->ihl*4; in __netpoll_rx()
529 uh = (struct udphdr *)(((char *)iph) + iph->ihl*4); in __netpoll_rx()
534 if (checksum_udp(skb, uh, ulen, iph->saddr, iph->daddr)) in __netpoll_rx()
536 if (np->local_ip && np->local_ip != ntohl(iph->daddr)) in __netpoll_rx()
538 if (np->remote_ip && np->remote_ip != ntohl(iph->saddr)) in __netpoll_rx()