Home | History | Annotate | Download | only in netinet6

Lines Matching refs:ip6

90 #include <netinet/ip6.h>
141 ip6_handle_rthdr(struct ip6_rthdr *rh, struct ip6_hdr *ip6)
188 * IP6 output. The packet in mbuf chain m contains a skeletal IP6
209 struct ip6_hdr *ip6, *mhip6;
319 * separate IP6 header from the payload.
332 ip6 = mtod(m, struct ip6_hdr *);
336 plen = m->m_pkthdr.len - sizeof(*ip6);
350 ip6 = mtod(m, struct ip6_hdr *);
356 ip6->ip6_plen = 0;
358 ip6->ip6_plen = htons(plen);
371 u_char *nexthdrp = &ip6->ip6_nxt;
387 *mtod(exthdrs.ip6e_dest2, u_char *) = ip6->ip6_nxt;
388 ip6->ip6_nxt = IPPROTO_DSTOPTS;
420 finaldst = ip6->ip6_dst;
431 error = ip6_handle_rthdr(rh, ip6);
439 if (IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_src) &&
445 if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_src)) {
473 if ((ip6->ip6_flow & htonl(0xfc << 20)) == 0)
475 if ((ip6->ip6_flow & htonl(0x03 << 20)) == 0)
478 ip6->ip6_flow |= htonl((opt->ip6po_tclass & mask) << 20);
483 ip6->ip6_hlim = opt->ip6po_hlim & 0xff;
484 else if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) {
486 ip6->ip6_hlim = im6o->im6o_multicast_hlim;
488 ip6->ip6_hlim = ip6_defmcasthlim;
509 ip6 = mtod(m, struct ip6_hdr *);
511 sockaddr_in6_init(&dst_sa, &ip6->ip6_dst, 0, 0, 0);
514 if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) {
577 src0 = ip6->ip6_src;
580 sockaddr_in6_init(&src_sa, &ip6->ip6_src, 0, 0, 0);
584 dst0 = ip6->ip6_dst;
588 sockaddr_in6_init(&dst_sa, &ip6->ip6_dst, 0, 0, 0);
618 !IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst))
626 if (!IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst))
645 ingroup = in6_multi_group(&ip6->ip6_dst, ifp);
668 if (ip6_mforward(ip6, ifp, m) != 0) {
682 if (ip6->ip6_hlim == 0 || (ifp->if_flags & IFF_LOOPBACK) ||
683 IN6_IS_ADDR_MC_INTFACELOCAL(&ip6->ip6_dst)) {
735 else if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst) &&
746 in6_clearscope(&ip6->ip6_src);
747 in6_clearscope(&ip6->ip6_dst);
756 if (ip6->ip6_nxt == IPPROTO_HOPOPTS) {
767 ip6 = mtod(m, struct ip6_hdr *);
778 ip6 = mtod(m, struct ip6_hdr *);
844 ip6 = mtod(m, struct ip6_hdr *);
846 ia6 = in6_ifawithifp(ifp, &ip6->ip6_src);
889 } else if (ip6->ip6_plen == 0) {
932 nextproto = ip6->ip6_nxt;
933 ip6->ip6_nxt = IPPROTO_FRAGMENT;
967 *mhip6 = *ip6;
1017 ip6 = mtod(m, struct ip6_hdr *);
1019 ia6 = in6_ifawithifp(ifp, &ip6->ip6_src);
1297 * IP6 socket option processing.
2033 * Set up IP6 options in pcb for insertion in output packets or
2430 * Set the IP6 multicast options in response to user setsockopt().
2493 * Set the IP6 hoplimit for outgoing multicast packets.
2530 * Group must be a valid IP6 multicast address.
2589 * Group must be a valid IP6 multicast address.
2693 * Return the IP6 multicast options in response to user getsockopt().
2738 * Discard the IP6 multicast options.
3230 * Routine called from ip6_output() to loop back a copy of an IP6 multicast
3240 struct ip6_hdr *ip6;
3259 if (copym->m_len < sizeof(*ip6)) {
3265 ip6 = mtod(copym, struct ip6_hdr *);
3270 in6_clearscope(&ip6->ip6_src);
3271 in6_clearscope(&ip6->ip6_dst);
3283 struct ip6_hdr *ip6;
3285 ip6 = mtod(m, struct ip6_hdr *);
3286 if (m->m_len > sizeof(*ip6)) {
3293 m_align(mh, sizeof(*ip6));
3294 m->m_len -= sizeof(*ip6);
3295 m->m_data += sizeof(*ip6);
3297 mh->m_len = sizeof(*ip6);
3298 memcpy(mtod(mh, void *), (void *)ip6, sizeof(*ip6));