def decode(self):
        # We know the first 2 bytes are the opcode. The second two are the
        # block number.
        (self.blocknumber,) = struct.unpack("!H", self.buffer[2:4])
        log.debug("decoding DAT packet, block number %d", self.blocknumber)
        log.debug("should be %d bytes in the packet total", len(self.buffer))
        # Everything else is data.
        self.data = self.buffer[4:]
        log.debug("found %d bytes of data", len(self.data))
        return self
MO Interceptor management
dataset/ETHPy150Open msoulier/tftpy/tftpy/TftpPacketTypes.py/TftpPacketDAT.decode--crossover with--dataset/ETHPy150Open jookies/jasmin/jasmin/protocols/cli/jcli.py/JCliProtocol.do_mointerceptor