def ipv6_reassembly(frame):
    """Make data for IPv6 reassembly."""
    if 'IPv6' in frame:
        ipv6 = frame['IPv6'].info
        if 'frag' not in ipv6:      # dismiss not fragmented frame
            return False, None
        data = dict(
            bufid=(
                ipv6.src,                                       # source IP address
                ipv6.dst,                                       # destination IP address
                ipv6.label,                                     # label
                ipv6.ipv6_frag.next.name,                       # next header field in IPv6 Fragment Header
            ),
            num=frame.info.number,                              # original packet range number
            fo=ipv6.ipv6_frag.offset,                           # fragment offset
            ihl=ipv6.hdr_len,                                   # header length, only headers before IPv6-Frag
            mf=ipv6.ipv6_frag.mf,                               # more fragment flag
            tl=ipv6.hdr_len + ipv6.raw_len,                     # total length, header includes
            header=bytearray(ipv6.fragment.header),             # raw bytearray type header before IPv6-Frag
            payload=bytearray(ipv6.fragment.payload or b''),    # raw bytearray type payload after IPv6-Frag
        )
        return True, data
    return False, None
Make data for IPv6 reassembly.