Lines Matching defs:icp

230 	struct icmp *icp;
314 icp = mtod(m, struct icmp *);
318 icp->icmp_type = type;
320 icp->icmp_gwaddr.s_addr = dest;
322 icp->icmp_void = 0;
328 icp->icmp_pptr = code;
332 icp->icmp_nextmtu = htons(destmtu);
335 icp->icmp_code = code;
336 m_copydata(n, 0, icmplen, (void *)&icp->icmp_ip);
396 struct icmp *icp;
435 icp = mtod(m, struct icmp *);
449 printf("icmp_input(type:%d, code:%d)\n", icp->icmp_type,
450 icp->icmp_code);
452 if (icp->icmp_type > ICMP_MAXTYPE)
454 ICMP_STATINC(ICMP_STAT_INHIST + icp->icmp_type);
455 code = icp->icmp_code;
456 switch (icp->icmp_type) {
521 if (icmplen < ICMP_ADVLENMIN || icmplen < ICMP_ADVLEN(icp) ||
522 icp->icmp_ip.ip_hl < (sizeof(struct ip) >> 2)) {
526 if (IN_MULTICAST(icp->icmp_ip.ip_dst.s_addr))
530 printf("deliver to protocol %d\n", icp->icmp_ip.ip_p);
532 icmpsrc.sin_addr = icp->icmp_ip.ip_dst;
533 ctlfunc = inetsw[ip_protox[icp->icmp_ip.ip_p]].pr_ctlinput;
536 &icp->icmp_ip);
549 icp->icmp_type = ICMP_ECHOREPLY;
562 icp->icmp_type = ICMP_TSTAMPREPLY;
563 icp->icmp_rtime = iptime();
564 icp->icmp_ttime = icp->icmp_rtime; /* bogus, do later! */
587 icp->icmp_type = ICMP_MASKREPLY;
588 icp->icmp_mask = ia->ia_sockmask.sin_addr.s_addr;
599 icps[ICMP_STAT_OUTHIST + icp->icmp_type]++;
610 if (icmplen < ICMP_ADVLENMIN || icmplen < ICMP_ADVLEN(icp) ||
611 icp->icmp_ip.ip_hl < (sizeof(struct ip) >> 2)) {
623 icmpdst.sin_addr = icp->icmp_gwaddr;
627 inet_ntoa(icp->icmp_ip.ip_dst),
628 inet_ntoa(icp->icmp_gwaddr));
631 icmpsrc.sin_addr = icp->icmp_ip.ip_dst;
642 icp->icmp_ip.ip_dst.s_addr, i);
896 struct icmp *icp;
901 icp = mtod(m, struct icmp *);
902 icp->icmp_cksum = 0;
903 icp->icmp_cksum = in_cksum(m, ntohs(ip->ip_len) - hlen);
1093 icmp_mtudisc(struct icmp *icp, struct in_addr faddr)
1098 u_long mtu = ntohs(icp->icmp_nextmtu); /* Why a long? IPv6 */
1130 mtu = ntohs(icp->icmp_ip.ip_len);
1133 mtu -= (icp->icmp_ip.ip_hl << 2);