Lines Matching refs:pfh
606 struct pingfakehdr *pfh = (struct pingfakehdr *)from; in ping_getfrag() local
613 fraglen, &pfh->wcheck, in ping_getfrag()
614 &pfh->msg->msg_iter)) in ping_getfrag()
619 if (!csum_and_copy_from_iter_full(to, fraglen, &pfh->wcheck, in ping_getfrag()
620 &pfh->msg->msg_iter)) in ping_getfrag()
629 if (pfh->family == AF_INET6) { in ping_getfrag()
630 skb->csum = pfh->wcheck; in ping_getfrag()
632 pfh->wcheck = 0; in ping_getfrag()
640 static int ping_v4_push_pending_frames(struct sock *sk, struct pingfakehdr *pfh, in ping_v4_push_pending_frames() argument
647 pfh->wcheck = csum_partial((char *)&pfh->icmph, in ping_v4_push_pending_frames()
648 sizeof(struct icmphdr), pfh->wcheck); in ping_v4_push_pending_frames()
649 pfh->icmph.checksum = csum_fold(pfh->wcheck); in ping_v4_push_pending_frames()
650 memcpy(icmp_hdr(skb), &pfh->icmph, sizeof(struct icmphdr)); in ping_v4_push_pending_frames()
708 struct pingfakehdr pfh; in ping_v4_sendmsg() local
823 pfh.icmph.type = user_icmph.type; /* already checked */ in ping_v4_sendmsg()
824 pfh.icmph.code = user_icmph.code; /* ditto */ in ping_v4_sendmsg()
825 pfh.icmph.checksum = 0; in ping_v4_sendmsg()
826 pfh.icmph.un.echo.id = inet->inet_sport; in ping_v4_sendmsg()
827 pfh.icmph.un.echo.sequence = user_icmph.un.echo.sequence; in ping_v4_sendmsg()
828 pfh.msg = msg; in ping_v4_sendmsg()
829 pfh.wcheck = 0; in ping_v4_sendmsg()
830 pfh.family = AF_INET; in ping_v4_sendmsg()
832 err = ip_append_data(sk, &fl4, ping_getfrag, &pfh, len, in ping_v4_sendmsg()
837 err = ping_v4_push_pending_frames(sk, &pfh, &fl4); in ping_v4_sendmsg()