Lines Matching refs:icp
953 static void pr_icmph(__u8 type, __u8 code, __u32 info, struct icmphdr *icp);
1069 struct icmphdr *icp;
1073 icp = (struct icmphdr *)outpack;
1074 icp->type = ICMP_ECHO;
1075 icp->code = 0;
1076 icp->checksum = 0;
1077 icp->un.echo.sequence = htons(ntransmitted+1);
1078 icp->un.echo.id = ident; /* ID */
1089 memcpy(icp+1, &tmp_tv, fake_fucked_egcs);
1091 memset(icp+1, 0, sizeof(struct timeval));
1098 icp->checksum = in_cksum((u_short *)icp, cc, 0);
1106 memcpy(icp+1, &tmp_tv, fake_fucked_egcs);
1107 icp->checksum = in_cksum((u_short *)(icp+1), fake_fucked_egcs, ~icp->checksum);
1136 struct icmphdr *icp;
1153 icp = (struct icmphdr *)(buf + hlen);
1154 csfailed = in_cksum((u_short *)icp, cc, 0);
1156 if (icp->type == ICMP_ECHOREPLY) {
1157 if (icp->un.echo.id != ident)
1159 if (gather_statistics((__u8*)(icp+1), cc,
1160 ntohs(icp->un.echo.sequence),
1168 switch (icp->type) {
1178 struct iphdr * iph = (struct iphdr *)(&icp[1]);
1188 error_pkt = (icp->type != ICMP_REDIRECT &&
1189 icp->type != ICMP_SOURCE_QUENCH);
1219 pr_icmph(icp->type, icp->code, ntohl(icp->un.gateway), icp);
1240 pr_icmph(icp->type, icp->code, ntohl(icp->un.gateway), icp);
1291 void pr_icmph(__u8 type, __u8 code, __u32 info, struct icmphdr *icp)
1325 if (icp && (options & F_VERBOSE))
1326 pr_iph((struct iphdr*)(icp + 1));
1330 if (icp && (options & F_VERBOSE))
1331 pr_iph((struct iphdr*)(icp + 1));
1351 if (icp)
1352 printf("(New nexthop: %s)\n", pr_addr(icp->un.gateway));
1353 if (icp && (options & F_VERBOSE))
1354 pr_iph((struct iphdr*)(icp + 1));
1372 if (icp && (options & F_VERBOSE))
1373 pr_iph((struct iphdr*)(icp + 1));
1376 printf("Parameter problem: pointer = %u\n", icp ? (ntohl(icp->un.gateway)>>24) : info);
1377 if (icp && (options & F_VERBOSE))
1378 pr_iph((struct iphdr*)(icp + 1));