Lines Matching refs:icp
103 static void pr_icmph(__u8 type, __u8 code, __u32 info, struct icmphdr *icp);
720 struct icmphdr *icp; in send_probe() local
724 icp = (struct icmphdr *)outpack; in send_probe()
725 icp->type = ICMP_ECHO; in send_probe()
726 icp->code = 0; in send_probe()
727 icp->checksum = 0; in send_probe()
728 icp->un.echo.sequence = htons(ntransmitted+1); in send_probe()
729 icp->un.echo.id = ident; /* ID */ in send_probe()
737 memcpy(icp+1, &tmp_tv, sizeof(tmp_tv)); in send_probe()
739 memset(icp+1, 0, sizeof(struct timeval)); in send_probe()
746 icp->checksum = in_cksum((u_short *)icp, cc, 0); in send_probe()
751 memcpy(icp+1, &tmp_tv, sizeof(tmp_tv)); in send_probe()
752 icp->checksum = in_cksum((u_short *)&tmp_tv, sizeof(tmp_tv), ~icp->checksum); in send_probe()
778 struct icmphdr *icp = (struct icmphdr *)_icp; in pr_echo_reply() local
779 printf(" icmp_seq=%u", ntohs(icp->un.echo.sequence)); in pr_echo_reply()
787 struct icmphdr *icp; in parse_reply() local
830 icp = (struct icmphdr *)(buf + hlen); in parse_reply()
831 csfailed = in_cksum((u_short *)icp, cc, 0); in parse_reply()
833 if (icp->type == ICMP_ECHOREPLY) { in parse_reply()
834 if (!is_ours(icp->un.echo.id)) in parse_reply()
836 if (gather_statistics((__u8*)icp, sizeof(*icp), cc, in parse_reply()
837 ntohs(icp->un.echo.sequence), in parse_reply()
846 switch (icp->type) { in parse_reply()
856 struct iphdr * iph = (struct iphdr *)(&icp[1]); in parse_reply()
866 error_pkt = (icp->type != ICMP_REDIRECT && in parse_reply()
867 icp->type != ICMP_SOURCE_QUENCH); in parse_reply()
898 pr_icmph(icp->type, icp->code, ntohl(icp->un.gateway), icp); in parse_reply()
924 pr_icmph(icp->type, icp->code, ntohl(icp->un.gateway), icp); in parse_reply()
987 void pr_icmph(__u8 type, __u8 code, __u32 info, struct icmphdr *icp) in pr_icmph() argument
1048 if (icp && (options & F_VERBOSE)) in pr_icmph()
1049 pr_iph((struct iphdr*)(icp + 1)); in pr_icmph()
1053 if (icp && (options & F_VERBOSE)) in pr_icmph()
1054 pr_iph((struct iphdr*)(icp + 1)); in pr_icmph()
1074 printf("(New nexthop: %s)\n", pr_addr(icp ? icp->un.gateway : info)); in pr_icmph()
1075 if (icp && (options & F_VERBOSE)) in pr_icmph()
1076 pr_iph((struct iphdr*)(icp + 1)); in pr_icmph()
1094 if (icp && (options & F_VERBOSE)) in pr_icmph()
1095 pr_iph((struct iphdr*)(icp + 1)); in pr_icmph()
1098 printf("Parameter problem: pointer = %u\n", icp ? (ntohl(icp->un.gateway)>>24) : info); in pr_icmph()
1099 if (icp && (options & F_VERBOSE)) in pr_icmph()
1100 pr_iph((struct iphdr*)(icp + 1)); in pr_icmph()