• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/src/router/iputils/

Lines Matching refs:icp

96 static void pr_icmph(__u8 type, __u8 code, __u32 info, struct icmphdr *icp);
628 struct icmphdr *icp;
632 icp = (struct icmphdr *)outpack;
633 icp->type = ICMP_ECHO;
634 icp->code = 0;
635 icp->checksum = 0;
636 icp->un.echo.sequence = htons(ntransmitted+1);
637 icp->un.echo.id = ident; /* ID */
648 memcpy(icp+1, &tmp_tv, fake_fucked_egcs);
650 memset(icp+1, 0, sizeof(struct timeval));
657 icp->checksum = in_cksum((u_short *)icp, cc, 0);
665 memcpy(icp+1, &tmp_tv, fake_fucked_egcs);
666 icp->checksum = in_cksum((u_short *)(icp+1), fake_fucked_egcs, ~icp->checksum);
695 struct icmphdr *icp;
712 icp = (struct icmphdr *)(buf + hlen);
713 csfailed = in_cksum((u_short *)icp, cc, 0);
715 if (icp->type == ICMP_ECHOREPLY) {
716 if (icp->un.echo.id != ident)
718 if (gather_statistics((__u8*)(icp+1), cc,
719 ntohs(icp->un.echo.sequence),
727 switch (icp->type) {
737 struct iphdr * iph = (struct iphdr *)(&icp[1]);
747 error_pkt = (icp->type != ICMP_REDIRECT &&
748 icp->type != ICMP_SOURCE_QUENCH);
778 pr_icmph(icp->type, icp->code, ntohl(icp->un.gateway), icp);
799 pr_icmph(icp->type, icp->code, ntohl(icp->un.gateway), icp);
850 void pr_icmph(__u8 type, __u8 code, __u32 info, struct icmphdr *icp)
883 if (icp && (options & F_VERBOSE))
884 pr_iph((struct iphdr*)(icp + 1));
888 if (icp && (options & F_VERBOSE))
889 pr_iph((struct iphdr*)(icp + 1));
909 if (icp)
910 printf("(New nexthop: %s)\n", pr_addr(icp->un.gateway));
911 if (icp && (options & F_VERBOSE))
912 pr_iph((struct iphdr*)(icp + 1));
929 if (icp && (options & F_VERBOSE))
930 pr_iph((struct iphdr*)(icp + 1));
933 printf("Parameter problem: pointer = %u\n", icp ? (ntohl(icp->un.gateway)>>24) : info);
934 if (icp && (options & F_VERBOSE))
935 pr_iph((struct iphdr*)(icp + 1));