Lines Matching defs:ip6
84 #include <netinet/ip6.h>
111 struct ip6_hdr *ip6;
145 if (mbuf_len(m) < sizeof (*ip6)) {
146 m = m_pullup(m, sizeof (*ip6));
150 ip6 = mtod(m, struct ip6_hdr *);
151 itos = (ntohl(ip6->ip6_flow) >> 20) & 0xff;
173 ip6 = mtod(m, struct ip6_hdr *);
174 ip6->ip6_flow = 0;
175 ip6->ip6_vfc &= ~IPV6_VERSION_MASK;
176 ip6->ip6_vfc |= IPV6_VERSION;
177 ip6->ip6_plen = htons((u_short)m->m_pkthdr.len);
178 ip6->ip6_nxt = proto;
179 ip6->ip6_hlim = ip6_gif_hlim;
180 ip6->ip6_src = sin6_src->sin6_addr;
183 ip6->ip6_dst = sin6_dst->sin6_addr;
190 ip6->ip6_flow &= ~htonl(0xff << 20);
191 ip6->ip6_flow |= htonl((u_int32_t)otos << 20);
245 struct ip6_hdr *ip6;
249 ip6 = mtod(m, struct ip6_hdr *);
259 otos = ip6->ip6_flow;
287 if (mbuf_len(m) < sizeof (*ip6)) {
288 m = m_pullup(m, sizeof (*ip6));
292 ip6 = mtod(m, struct ip6_hdr *);
294 ip6_ecn_egress(ECN_ALLOWED, &otos, &ip6->ip6_flow);
296 ip6_ecn_egress(ECN_NOCARE, &otos, &ip6->ip6_flow);
319 const struct ip6_hdr *ip6,
333 if (!IN6_ARE_ADDR_EQUAL(&src->sin6_addr, &ip6->ip6_dst) ||
334 !IN6_ARE_ADDR_EQUAL(&dst->sin6_addr, &ip6->ip6_src))
347 sin6.sin6_addr = ip6->ip6_src;
383 struct ip6_hdr ip6;
392 mbuf_copydata((struct mbuf *)(size_t)m, 0, sizeof (ip6), &ip6);
395 return (gif_validate6(&ip6, sc, ifp));