def parse(self, buffer):
        log.debug("parsing a %d byte packet", len(buffer))
        (opcode,) = struct.unpack("!H", buffer[:2])
        log.debug("opcode is %d", opcode)
        packet = self.__create(opcode)
        packet.buffer = buffer
        return packet.decode()
This method is used to parse an existing datagram into its
dataset/ETHPy150Open msoulier/tftpy/tftpy/TftpPacketFactory.py/TftpPacketFactory.parse