Home | History | Annotate | Download | only in iputils

Lines Matching defs:icp

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