Home | History | Annotate | Download | only in netinet

Lines Matching defs:icp

257 	struct icmp *icp;
347 icp = (struct icmp *)(nip + 1);
353 icp->icmp_type = type;
355 icp->icmp_gwaddr.s_addr = dest;
357 icp->icmp_void = 0;
363 icp->icmp_pptr = code;
367 icp->icmp_nextmtu = htons(destmtu);
369 icp->icmp_code = code;
370 m_copydata(n, 0, datalen, (void *)&icp->icmp_ip);
410 struct icmp *icp;
444 icp = mtod(m, struct icmp *);
453 if (icp->icmp_type > ICMP_MAXTYPE)
455 ICMP_STATINC(ICMP_STAT_INHIST + icp->icmp_type);
456 code = icp->icmp_code;
458 switch (icp->icmp_type) {
522 if (icmplen < ICMP_ADVLENMIN || icmplen < ICMP_ADVLEN(icp) ||
523 icp->icmp_ip.ip_hl < (sizeof(struct ip) >> 2)) {
527 if (m->m_len < hlen + ICMP_ADVLEN(icp)) {
528 m = m_pullup(m, hlen + ICMP_ADVLEN(icp));
533 icp = (struct icmp *)(mtod(m, uint8_t *) + hlen);
535 if (IN_MULTICAST(icp->icmp_ip.ip_dst.s_addr))
538 icmpsrc.sin_addr = icp->icmp_ip.ip_dst;
539 ctlfunc = inetsw[ip_protox[icp->icmp_ip.ip_p]].pr_ctlinput;
542 &icp->icmp_ip);
555 icp->icmp_type = ICMP_ECHOREPLY;
568 icp->icmp_type = ICMP_TSTAMPREPLY;
569 icp->icmp_rtime = iptime();
570 icp->icmp_ttime = icp->icmp_rtime; /* bogus, do later! */
603 icp->icmp_type = ICMP_MASKREPLY;
604 icp->icmp_mask = ia->ia_sockmask.sin_addr.s_addr;
616 icps[ICMP_STAT_OUTHIST + icp->icmp_type]++;
628 if (icmplen < ICMP_ADVLENMIN || icmplen < ICMP_ADVLEN(icp) ||
629 icp->icmp_ip.ip_hl < (sizeof(struct ip) >> 2)) {
641 icmpdst.sin_addr = icp->icmp_gwaddr;
642 icmpsrc.sin_addr = icp->icmp_ip.ip_dst;
655 IN_PRINT(buf, &icp->icmp_ip.ip_dst), i);
945 struct icmp *icp;
950 icp = mtod(m, struct icmp *);
951 icp->icmp_cksum = 0;
952 icp->icmp_cksum = in_cksum(m, ntohs(ip->ip_len) - hlen);
1143 icmp_mtudisc(struct icmp *icp, struct in_addr faddr)
1148 u_long mtu = ntohs(icp->icmp_nextmtu); /* Why a long? IPv6 */
1182 mtu = ntohs(icp->icmp_ip.ip_len);
1185 mtu -= (icp->icmp_ip.ip_hl << 2);