Lines Matching defs:icmp6

29  *	$KAME: icmp6.c,v 1.211 2001/04/04 05:56:20 itojun Exp $
64 __FBSDID("$FreeBSD: releng/11.0/sys/netinet6/icmp6.c 299829 2016-05-15 03:22:13Z markj $");
100 #include <netinet/icmp6.h>
260 struct icmp6_hdr *icmp6;
295 * - the Parameter Problem Message that can be allowed an icmp6 error
339 * informational) we must not send icmp6 error.
379 icmp6 = (struct icmp6_hdr *)(nip6 + 1);
380 icmp6->icmp6_type = type;
381 icmp6->icmp6_code = code;
382 icmp6->icmp6_pptr = htonl((u_int32_t)param);
414 struct icmp6_hdr *icmp6, *nicmp6;
429 * Locate icmp6 structure in mbuf, and check
459 icmp6 = (struct icmp6_hdr *)((caddr_t)ip6 + off);
461 IP6_EXTHDR_GET(icmp6, struct icmp6_hdr *, m, off, sizeof(*icmp6));
462 if (icmp6 == NULL) {
467 code = icmp6->icmp6_code;
472 icmp6->icmp6_type, sum,
478 ICMP6STAT_INC(icp6s_inhist[icmp6->icmp6_type]);
480 if (icmp6->icmp6_type < ICMP6_INFOMSG_MASK)
483 switch (icmp6->icmp6_type) {
584 bcopy(icmp6, nicmp6, sizeof(struct icmp6_hdr));
708 bcopy(icmp6, nicmp6, sizeof(struct icmp6_hdr));
902 icmp6->icmp6_type, ip6_sprintf(ip6bufs, &ip6->ip6_src),
905 if (icmp6->icmp6_type < ICMP6_ECHO_REQUEST) {
943 struct icmp6_hdr *icmp6;
955 icmp6 = (struct icmp6_hdr *)(mtod(m, caddr_t) + off);
957 IP6_EXTHDR_GET(icmp6, struct icmp6_hdr *, m, off,
958 sizeof(*icmp6) + sizeof(struct ip6_hdr));
959 if (icmp6 == NULL) {
964 eip6 = (struct ip6_hdr *)(icmp6 + 1);
974 int icmp6type = icmp6->icmp6_type;
1101 icmp6 = (struct icmp6_hdr *)(mtod(m, caddr_t) + off);
1103 IP6_EXTHDR_GET(icmp6, struct icmp6_hdr *, m, off,
1104 sizeof(*icmp6) + sizeof(struct ip6_hdr));
1105 if (icmp6 == NULL) {
1119 eip6 = (struct ip6_hdr *)(icmp6 + 1);
1142 ip6cp.ip6c_icmp6 = icmp6;
1143 ip6cp.ip6c_ip6 = (struct ip6_hdr *)(icmp6 + 1);
1150 notifymtu = ntohl(icmp6->icmp6_mtu);
1174 struct icmp6_hdr *icmp6 = ip6cp->ip6c_icmp6;
1176 u_int mtu = ntohl(icmp6->icmp6_mtu);
1964 struct icmp6_hdr *icmp6;
1969 icmp6 = (struct icmp6_hdr *)((caddr_t)ip6 + off);
1971 IP6_EXTHDR_GET(icmp6, struct icmp6_hdr *, m, off, sizeof(*icmp6));
1972 if (icmp6 == NULL) {
2004 if (ICMP6_FILTER_WILLBLOCK(icmp6->icmp6_type,
2114 * OFF points to the icmp6 header, counted from the top of the mbuf.
2121 struct icmp6_hdr *icmp6;
2168 icmp6 = (struct icmp6_hdr *)(ip6 + 1);
2169 type = icmp6->icmp6_type; /* keep type for statistics */
2170 code = icmp6->icmp6_code; /* ditto. */
2234 icmp6->icmp6_cksum = 0;
2235 icmp6->icmp6_cksum = in6_cksum(m, IPPROTO_ICMPV6,
2305 /* XXX if we are router, we don't update route by icmp6 redirect */
2345 /* ip6->ip6_src must be equal to gw for icmp6->icmp6_reddst */
2414 "(if %d, icmp6 packet %d): %s\n",
2500 /* if we are not router, we don't send icmp6 redirect */
2658 * compute the maximum size for icmp6 redirect header option.
2846 * Returns 0 if it is okay to send the icmp6 packet.
2847 * Returns 1 if the router SHOULD NOT send this icmp6 packet due to rate