def post_dissect(self, data):
        """dissect the IPv6 package compressed into this IPHC packet.

        The packet payload needs to be decompressed and depending on the
        arguments, several conversions should be done.
        """

        # uncompress payload
        packet = IPv6()
        packet.version = IPHC_DEFAULT_VERSION
        packet.tc, packet.fl = self._getTrafficClassAndFlowLabel()
        if not self.nh:
            packet.nh = self._nhField
        # HLIM: Hop Limit
        if self.hlim == 0:
            packet.hlim = self._hopLimit
        elif self.hlim == 0x1:
            packet.hlim = 1
        elif self.hlim == 0x2:
            packet.hlim = 64
        else:
            packet.hlim = 255
        # TODO: Payload length can be inferred from lower layers from either the  # noqa: E501
        # 6LoWPAN Fragmentation header or the IEEE802.15.4 header

        packet.src = self.decompressSourceAddr(packet)
        packet.dst = self.decompressDestinyAddr(packet)

        if self.nh == 1:
            # The Next Header field is compressed and the next header is
            # encoded using LOWPAN_NHC

            packet.nh = 0x11  # UDP
            udp = UDP()
            if self.header_compression and \
               self.header_compression & 0x4 == 0x0:
                udp.chksum = self.udpChecksum

            s, d = nhc_port(self)
            if s == 16:
                udp.sport = self.udpSourcePort
            elif s == 8:
                udp.sport = 0xF000 + s
            elif s == 4:
                udp.sport = 0xF0B0 + s
            if d == 16:
                udp.dport = self.udpDestinyPort
            elif d == 8:
                udp.dport = 0xF000 + d
            elif d == 4:
                udp.dport = 0xF0B0 + d

            packet.payload = udp / data
            data = raw(packet)
        # else self.nh == 0 not necessary
        elif self._nhField & 0xE0 == 0xE0:  # IPv6 Extension Header Decompression  # noqa: E501
            warning('Unimplemented: IPv6 Extension Header decompression')  # noqa: E501
            packet.payload = conf.raw_layer(data)
            data = raw(packet)
        else:
            packet.payload = conf.raw_layer(data)
            data = raw(packet)

        return Packet.post_dissect(self, data)
def post_dissect ( self , data ) : packet = IPv6 ( ) packet . version = IPHC_DEFAULT_VERSION packet . tc , packet . fl = self . _getTrafficClassAndFlowLabel ( ) if not self . nh : packet . nh = self . _nhField if self . hlim == 0 : packet . hlim = self . _hopLimit elif self . hlim == 0x1 : packet . hlim = 1 elif self . hlim == 0x2 : packet . hlim = 64 else : packet . hlim = 255 packet . src = self . decompressSourceAddr ( packet ) packet . dst = self . decompressDestinyAddr ( packet ) if self . nh == 1 : packet . nh = 0x11 udp = UDP ( ) if self . header_compression and self . header_compression & 0x4 == 0x0 : udp . chksum = self . udpChecksum s , d = nhc_port ( self ) if s == 16 : udp . sport = self . udpSourcePort elif s == 8 : udp . sport = 0xF000 + s elif s == 4 : udp . sport = 0xF0B0 + s if d == 16 : udp . dport = self . udpDestinyPort elif d == 8 : udp . dport = 0xF000 + d elif d == 4 : udp . dport = 0xF0B0 + d packet . payload = udp / data data = raw ( packet ) elif self . _nhField & 0xE0 == 0xE0 : warning ( 'Unimplemented: IPv6 Extension Header decompression' ) packet . payload = conf . raw_layer ( data ) data = raw ( packet ) else : packet . payload = conf . raw_layer ( data ) data = raw ( packet ) return Packet . post_dissect ( self , data )
dissect the IPv6 package compressed into this IPHC packet.

        The packet payload needs to be decompressed and depending on the
        arguments, several conversions should be done.