Lines Matching refs:icmp6

29  *	$KAME: icmp6.c,v 1.211 2001/04/04 05:56:20 itojun Exp $
64 __FBSDID("$FreeBSD: stable/11/sys/netinet6/icmp6.c 368202 2020-12-01 03:07:26Z 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);
405 struct icmp6_hdr *icmp6, *nicmp6;
420 * Locate icmp6 structure in mbuf, and check
450 icmp6 = (struct icmp6_hdr *)((caddr_t)ip6 + off);
452 IP6_EXTHDR_GET(icmp6, struct icmp6_hdr *, m, off, sizeof(*icmp6));
453 if (icmp6 == NULL) {
458 code = icmp6->icmp6_code;
463 icmp6->icmp6_type, sum,
469 ICMP6STAT_INC(icp6s_inhist[icmp6->icmp6_type]);
471 if (icmp6->icmp6_type < ICMP6_INFOMSG_MASK)
474 switch (icmp6->icmp6_type) {
573 bcopy(icmp6, nicmp6, sizeof(struct icmp6_hdr));
698 bcopy(icmp6, nicmp6, sizeof(struct icmp6_hdr));
842 icmp6->icmp6_type, ip6_sprintf(ip6bufs, &ip6->ip6_src),
845 if (icmp6->icmp6_type < ICMP6_ECHO_REQUEST) {
884 struct icmp6_hdr *icmp6;
896 icmp6 = (struct icmp6_hdr *)(mtod(m, caddr_t) + off);
898 IP6_EXTHDR_GET(icmp6, struct icmp6_hdr *, m, off,
899 sizeof(*icmp6) + sizeof(struct ip6_hdr));
900 if (icmp6 == NULL) {
905 eip6 = (struct ip6_hdr *)(icmp6 + 1);
915 int icmp6type = icmp6->icmp6_type;
1042 icmp6 = (struct icmp6_hdr *)(mtod(m, caddr_t) + off);
1044 IP6_EXTHDR_GET(icmp6, struct icmp6_hdr *, m, off,
1045 sizeof(*icmp6) + sizeof(struct ip6_hdr));
1046 if (icmp6 == NULL) {
1060 eip6 = (struct ip6_hdr *)(icmp6 + 1);
1078 ip6cp.ip6c_icmp6 = icmp6;
1079 ip6cp.ip6c_ip6 = (struct ip6_hdr *)(icmp6 + 1);
1086 notifymtu = ntohl(icmp6->icmp6_mtu);
1110 struct icmp6_hdr *icmp6 = ip6cp->ip6c_icmp6;
1112 u_int mtu = ntohl(icmp6->icmp6_mtu);
1897 struct icmp6_hdr *icmp6;
1902 icmp6 = (struct icmp6_hdr *)((caddr_t)ip6 + off);
1904 IP6_EXTHDR_GET(icmp6, struct icmp6_hdr *, m, off, sizeof(*icmp6));
1905 if (icmp6 == NULL) {
1937 if (ICMP6_FILTER_WILLBLOCK(icmp6->icmp6_type,
2047 * OFF points to the icmp6 header, counted from the top of the mbuf.
2054 struct icmp6_hdr *icmp6;
2101 icmp6 = (struct icmp6_hdr *)(ip6 + 1);
2102 type = icmp6->icmp6_type; /* keep type for statistics */
2103 code = icmp6->icmp6_code; /* ditto. */
2167 icmp6->icmp6_cksum = 0;
2168 icmp6->icmp6_cksum = in6_cksum(m, IPPROTO_ICMPV6,
2238 /* XXX if we are router, we don't update route by icmp6 redirect */
2282 /* ip6->ip6_src must be equal to gw for icmp6->icmp6_reddst */
2359 "(if %d, icmp6 packet %d): %s\n",
2445 /* if we are not router, we don't send icmp6 redirect */
2603 * compute the maximum size for icmp6 redirect header option.
2791 * Returns 0 if it is okay to send the icmp6 packet.
2792 * Returns 1 if the router SHOULD NOT send this icmp6 packet due to rate