Lines Matching defs:icp

222 	register struct icmp *icp;
310 icp = mtod(m, struct icmp *);
312 icp->icmp_type = type;
314 icp->icmp_gwaddr.s_addr = dest;
316 icp->icmp_void = 0;
322 icp->icmp_pptr = code;
326 icp->icmp_nextmtu = htons(mtu);
329 icp->icmp_code = code;
335 m_copydata(n, 0, icmplen, (caddr_t)&icp->icmp_ip);
336 nip = &icp->icmp_ip;
375 struct icmp *icp;
409 icp = mtod(m, struct icmp *);
421 switch (icp->icmp_type) {
432 printf("icmp_input, type %d code %d\n", icp->icmp_type,
433 icp->icmp_code);
439 if (icp->icmp_type > ICMP_MAXTYPE)
453 ICMPSTAT_INC(icps_inhist[icp->icmp_type]);
454 code = icp->icmp_code;
455 switch (icp->icmp_type) {
516 if (icmplen < ICMP_ADVLENMIN || icmplen < ICMP_ADVLEN(icp) ||
517 icp->icmp_ip.ip_hl < (sizeof(struct ip) >> 2)) {
522 if (IN_MULTICAST(ntohl(icp->icmp_ip.ip_dst.s_addr)))
526 printf("deliver to protocol %d\n", icp->icmp_ip.ip_p);
528 icmpsrc.sin_addr = icp->icmp_ip.ip_dst;
533 ctlfunc = inetsw[ip_protox[icp->icmp_ip.ip_p]].pr_ctlinput;
536 (void *)&icp->icmp_ip);
549 icp->icmp_type = ICMP_ECHOREPLY;
567 icp->icmp_type = ICMP_TSTAMPREPLY;
568 icp->icmp_rtime = iptime();
569 icp->icmp_ttime = icp->icmp_rtime; /* bogus, do later! */
602 icp->icmp_type = ICMP_MASKREPLY;
604 icp->icmp_mask = ia->ia_sockmask.sin_addr.s_addr;
606 icp->icmp_mask = V_icmpmaskfake;
616 ICMPSTAT_INC(icps_outhist[icp->icmp_type]);
625 dst = ntohl(icp->icmp_ip.ip_dst.s_addr);
626 gw = ntohl(icp->icmp_gwaddr.s_addr);
644 if (icmplen < ICMP_ADVLENMIN || icmplen < ICMP_ADVLEN(icp) ||
645 icp->icmp_ip.ip_hl < (sizeof(struct ip) >> 2)) {
657 icmpdst.sin_addr = icp->icmp_gwaddr;
661 strcpy(buf, inet_ntoa(icp->icmp_ip.ip_dst));
664 buf, inet_ntoa(icp->icmp_gwaddr));
667 icmpsrc.sin_addr = icp->icmp_ip.ip_dst;
896 register 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);