
150 Chapter 2—IPv6 Multicasting
1111 return NULL;
1112 }
1113 (*mh)->m_next = md;
1114 md->m_next = NULL;
1115
1116 (*mh)->m_pkthdr.rcvif = NULL;
1117 (*mh)->m_pkthdr.len = sizeof(struct ip6_hdr) + len;
1118 (*mh)->m_len = sizeof(struct ip6_hdr);
1119 MH_ALIGN(*mh, sizeof(struct ip6_hdr));
1120
1121 /* fill in the ip6 header */
1122 ip6 = mtod(*mh, struct ip6_hdr *);
1123 bzero(ip6, sizeof(*ip6));
1124 ip6->ip6_flow = 0;
1125 ip6->ip6_vfc &= ˜IPV6_VERSION_MASK;
1126 ip6->ip6_vfc |= IPV6_VERSION;
1127 /* ip6_plen will be set later */
1128 ip6->ip6_nxt = IPPROTO_ICMPV6;
1129 /* ip6_hlim will be set by im6o.im6o_multicast_hlim */
1130 /* ip6_src/dst will be set