code: def unpack_response(file_information_class, buffer):
          
          structs = smbprotocol.query_info
          resp_structure = {
              FileInformationClass.FILE_DIRECTORY_INFORMATION:
                  structs.FileDirectoryInformation,
              FileInformationClass.FILE_NAMES_INFORMATION:
                  structs.FileNamesInformation,
              FileInformationClass.FILE_BOTH_DIRECTORY_INFORMATION:
                  structs.FileBothDirectoryInformation,
              FileInformationClass.FILE_ID_BOTH_DIRECTORY_INFORMATION:
                  structs.FileIdBothDirectoryInformation,
              FileInformationClass.FILE_FULL_DIRECTORY_INFORMATION:
                  structs.FileFullDirectoryInformation,
              FileInformationClass.FILE_ID_FULL_DIRECTORY_INFORMATION:
                  structs.FileIdFullDirectoryInformation,
          }[file_information_class]
          query_results = []
  
          current_offset = 0
          is_next = True
          while is_next:
              result = resp_structure()
              result.unpack(buffer[current_offset:])
              query_results.append(result)
              current_offset += result['next_entry_offset'].get_value()
              is_next = result['next_entry_offset'].get_value() != 0
  
          return query_results
docs: Pass in the buffer value from the response object to unpack it and
          return a list of query response structures for the request.
  
          :param buffer: The raw bytes value of the SMB2QueryDirectoryResponse
              buffer field.
          :return: List of query_info.* structures based on the
              FileInformationClass used in the initial query request.