Lines Matching defs:icp

198 	struct icmp *icp;
330 icp = mtod(m, struct icmp *);
332 icp->icmp_type = type;
334 icp->icmp_gwaddr.s_addr = dest;
336 icp->icmp_void = 0;
342 icp->icmp_pptr = code;
346 icp->icmp_nextmtu = htons(mtu);
349 icp->icmp_code = code;
355 m_copydata(n, 0, icmplen, (caddr_t)&icp->icmp_ip);
356 nip = &icp->icmp_ip;
395 struct icmp *icp;
436 icp = mtod(m, struct icmp *);
446 printf("icmp_input, type %d code %d\n", icp->icmp_type,
447 icp->icmp_code);
453 if (icp->icmp_type > ICMP_MAXTYPE)
467 ICMPSTAT_INC(icps_inhist[icp->icmp_type]);
468 code = icp->icmp_code;
469 switch (icp->icmp_type) {
526 if (icmplen < ICMP_ADVLENMIN || icmplen < ICMP_ADVLEN(icp) ||
527 icp->icmp_ip.ip_hl < (sizeof(struct ip) >> 2)) {
532 if (IN_MULTICAST(ntohl(icp->icmp_ip.ip_dst.s_addr)))
536 printf("deliver to protocol %d\n", icp->icmp_ip.ip_p);
538 icmpsrc.sin_addr = icp->icmp_ip.ip_dst;
543 i = sizeof(struct ip) + min(icmplen, ICMP_ADVLENPREF(icp));
552 icp = (struct icmp *)(ip + 1);
561 ctlfunc = inetsw[ip_protox[icp->icmp_ip.ip_p]].pr_ctlinput;
564 (void *)&icp->icmp_ip);
579 icp->icmp_type = ICMP_ECHOREPLY;
596 icp->icmp_type = ICMP_TSTAMPREPLY;
597 icp->icmp_rtime = iptime();
598 icp->icmp_ttime = icp->icmp_rtime; /* bogus, do later! */
626 icp->icmp_type = ICMP_MASKREPLY;
628 icp->icmp_mask = ia->ia_sockmask.sin_addr.s_addr;
630 icp->icmp_mask = V_icmpmaskfake;
639 ICMPSTAT_INC(icps_outhist[icp->icmp_type]);
649 dst = ntohl(icp->icmp_ip.ip_dst.s_addr);
650 gw = ntohl(icp->icmp_gwaddr.s_addr);
668 if (icmplen < ICMP_ADVLENMIN || icmplen < ICMP_ADVLEN(icp) ||
669 icp->icmp_ip.ip_hl < (sizeof(struct ip) >> 2)) {
681 icmpdst.sin_addr = icp->icmp_gwaddr;
688 inet_ntoa_r(icp->icmp_ip.ip_dst, dstbuf),
689 inet_ntoa_r(icp->icmp_gwaddr, gwbuf));
692 icmpsrc.sin_addr = icp->icmp_ip.ip_dst;
926 struct icmp *icp;
931 icp = mtod(m, struct icmp *);
932 icp->icmp_cksum = 0;
933 icp->icmp_cksum = in_cksum(m, ntohs(ip->ip_len) - hlen);