def decode(self, bbuff):
        #Ident
        self.ident = unpack(bbuff, 'ubyte')
        
        #Payload
        for data_type, name in structs[self.ident][self.direction]:
            self.data[name] = unpack(bbuff, data_type)
        
        #Extension
        if self.ident in packet_extensions.extensions:
            packet_extensions.extensions[self.ident].decode_extra(self, bbuff)
dataset/ETHPy150Open barneygale/barneymc/barneymc/protocol/packet.py/Packet.decode/original