code: def handle_lut(self, pkt):
          
          self.logger.debug("handle lut")
          if pkt.subunit & COMMAND:
              data_type = str(pkt.nbytes / 2) + 'h'
              #size = struct.calcsize(data_type)
              line = pkt.datain.read(pkt.nbytes)
              n = len(line)
              if (n < pkt.nbytes):
                  return
              try:
                  x = struct.unpack(data_type, line)
              except Exception as e:
                  self.logger.error("Error unpacking struct: %s" % (str(e)))
                  return
  
              if len(x) < 14:
                  # pad it with zeroes
                  y = []
                  for i in range(14):
                      try:
                          y.append(x[i])
                      except Exception:
                          y.append(0)
                  x = y
                  del(y)
  
              if len(x) == 14:
                  z = int(x[0])
                  # frames start from 1, we start from 0
                  self.frame = self.decode_frameno(z) - 1
  
                  if (self.frame > MAX_FRAMES):
                      self.logger.error("attempt to select non existing frame.")
                      return
  
                  # init the framebuffer
                  #self.server.controller.init_frame(self.frame)
                  try:
                      self.server.controller.get_frame(self.frame)
                  except KeyError:
                      self.server.controller.init_frame(self.frame)
                  return
  
              self.logger.error("unable to select a frame.")
              return
  
          self.logger.error("what shall I do?")
docs: This part of the protocol is used by IRAF to set the frame number.