Lines Matching refs:ip6
84 #include <netinet/ip6.h>
120 struct ip6_hdr *ip6;
152 if (mbuf_len(m) < sizeof(*ip6)) {
153 m = m_pullup(m, sizeof(*ip6));
157 ip6 = mtod(m, struct ip6_hdr *);
158 itos = (ntohl(ip6->ip6_flow) >> 20) & 0xff;
180 ip6 = mtod(m, struct ip6_hdr *);
181 ip6->ip6_flow = 0;
182 ip6->ip6_vfc &= ~IPV6_VERSION_MASK;
183 ip6->ip6_vfc |= IPV6_VERSION;
184 ip6->ip6_plen = htons((u_short)m->m_pkthdr.len);
185 ip6->ip6_nxt = proto;
186 ip6->ip6_hlim = ip6_gif_hlim;
187 ip6->ip6_src = sin6_src->sin6_addr;
190 ip6->ip6_dst = sin6_dst->sin6_addr;
197 ip6->ip6_flow &= ~htonl(0xff << 20);
198 ip6->ip6_flow |= htonl((u_int32_t)otos << 20);
255 struct ip6_hdr *ip6;
259 ip6 = mtod(m, struct ip6_hdr *);
269 otos = ip6->ip6_flow;
297 if (mbuf_len(m) < sizeof(*ip6)) {
298 m = m_pullup(m, sizeof(*ip6));
302 ip6 = mtod(m, struct ip6_hdr *);
304 ip6_ecn_egress(ECN_ALLOWED, &otos, &ip6->ip6_flow);
306 ip6_ecn_egress(ECN_NOCARE, &otos, &ip6->ip6_flow);
328 const struct ip6_hdr *ip6,
342 if (!IN6_ARE_ADDR_EQUAL(&src->sin6_addr, &ip6->ip6_dst) ||
343 !IN6_ARE_ADDR_EQUAL(&dst->sin6_addr, &ip6->ip6_src))
356 sin6.sin6_addr = ip6->ip6_src;
392 struct ip6_hdr ip6;
399 mbuf_copydata((struct mbuf *)(size_t)m, 0, sizeof(ip6), &ip6);
402 return gif_validate6(&ip6, sc, ifp);