Lines Matching refs:ip6

100 #include <netinet/ip6.h>
1185 struct ip6_hdr *ip6 = NULL;
1189 if (m->m_len >= sizeof(*ip6))
1190 ip6 = mtod(m, struct ip6_hdr *);
1193 ip6 = &ip6buf;
1200 bcopy(&ip6->ip6_src, &sin6->sin6_addr, sizeof(ip6->ip6_src));
1201 if (IN6_IS_SCOPE_LINKLOCAL(&ip6->ip6_src)) {
1203 sin6->sin6_scope_id = ntohs(ip6->ip6_src.s6_addr16[1]);
1211 bcopy(&ip6->ip6_dst, &sin6->sin6_addr, sizeof(ip6->ip6_dst));
1212 if (IN6_IS_SCOPE_LINKLOCAL(&ip6->ip6_dst)) {
1214 sin6->sin6_scope_id = ntohs(ip6->ip6_dst.s6_addr16[1]);
2428 struct ip6_hdr *ip6;
2471 ip6 = mtod(m, struct ip6_hdr *);
2472 ovbcopy((caddr_t)ip6, (caddr_t)oip6, sizeof(struct ip6_hdr));
2482 ip6_ecn_ingress(ip6_ipsec_ecn, &ip6->ip6_flow, &oip6->ip6_flow);
2484 ip6->ip6_plen = htons(plen);
2486 /* ip6->ip6_plen will be updated in ip6_output() */
2488 ip6->ip6_nxt = IPPROTO_IPV6;
2490 &ip6->ip6_src, sizeof(ip6->ip6_src));
2492 &ip6->ip6_dst, sizeof(ip6->ip6_dst));
2493 ip6->ip6_hlim = IPV6_DEFHLIM;
2505 struct ip6_hdr *ip6, *ip6i;
2526 ip6 = mtod(m, struct ip6_hdr *);
2527 hlim = ip6->ip6_hlim;
2556 bcopy(ip6, ip6i, sizeof(struct ip6_hdr));
2591 struct ip6_hdr *ip6;
2621 MH_ALIGN(n, sizeof(*ip6));
2622 n->m_len = sizeof(*ip6);
2630 ip6 = mtod(m, __typeof__(ip6));
2634 ip6->ip6_plen = htons(plen);
2636 /* ip6->ip6_plen will be updated in ip6_output() */
2638 ip6->ip6_nxt = IPPROTO_IPV6;
2640 &ip6->ip6_src, sizeof(ip6->ip6_src));
2642 &ip6->ip6_dst, sizeof(ip6->ip6_dst));
2643 ip6->ip6_hlim = IPV6_DEFHLIM;
2893 ipsec6_logpacketstr(ip6, spi)
2894 struct ip6_hdr *ip6;
2905 ip6_sprintf(&ip6->ip6_src));
2909 ip6_sprintf(&ip6->ip6_dst));
3283 struct ip6_hdr *ip6;
3318 ip6 = mtod(state->m, struct ip6_hdr *);
3327 bcopy(&ip6->ip6_src, &sin6->sin6_addr,
3328 sizeof(ip6->ip6_src));
3329 if (IN6_IS_SCOPE_LINKLOCAL(&ip6->ip6_src)) {
3332 sin6->sin6_scope_id = ntohs(ip6->ip6_src.s6_addr16[1]);
3340 bcopy(&ip6->ip6_dst, &sin6->sin6_addr,
3341 sizeof(ip6->ip6_dst));
3342 if (IN6_IS_SCOPE_LINKLOCAL(&ip6->ip6_dst)) {
3345 sin6->sin6_scope_id = ntohs(ip6->ip6_dst.s6_addr16[1]);
3431 ip6 = mtod(state->m, struct ip6_hdr *);
3432 ip6->ip6_plen = htons(plen);
3460 struct ip6_hdr *ip6;
3504 ip6 = mtod(state->m, struct ip6_hdr *);
3510 bcopy(&ip6->ip6_src, &sin6->sin6_addr,
3511 sizeof(ip6->ip6_src));
3512 if (IN6_IS_SCOPE_LINKLOCAL(&ip6->ip6_src)) {
3515 sin6->sin6_scope_id = ntohs(ip6->ip6_src.s6_addr16[1]);
3523 bcopy(&ip6->ip6_dst, &sin6->sin6_addr,
3524 sizeof(ip6->ip6_dst));
3525 if (IN6_IS_SCOPE_LINKLOCAL(&ip6->ip6_dst)) {
3528 sin6->sin6_scope_id = ntohs(ip6->ip6_dst.s6_addr16[1]);
3585 ip6 = mtod(state->m, struct ip6_hdr *);
3737 !IN6_ARE_ADDR_EQUAL(&dst6->sin6_addr, &ip6->ip6_dst))) {
3746 dst6->sin6_addr = ip6->ip6_dst;
3790 ip6 = mtod(state->m, struct ip6_hdr *);
3794 error = esp6_output(state->m, &ip6->ip6_nxt, state->m->m_next, sav);
3801 error = ah6_output(state->m, &ip6->ip6_nxt, state->m->m_next, sav);
3826 ip6 = mtod(state->m, struct ip6_hdr *);
3827 ip6->ip6_plen = htons(plen);
3895 struct ip6_hdr *ip6;
3900 ip6 = mtod(m, struct ip6_hdr *);
3917 bcopy((caddr_t)ip6, mtod(m, caddr_t), hlen);