code: def _read_hip_para(self, length, *, version):
          
          counter = 0         # length of read parameters
          optkind = list()    # parameter type list
          options = dict()    # dict of parameter data
  
          while counter < length:
              # break when eol triggered
              kind = self._read_binary(2)
              if not kind:
                  break
  
              # get parameter type & C-bit
              code = int(kind, base=2)
              cbit = True if int(kind[15], base=2) else False
  
              # get parameter length
              clen = self._read_unpack(2)
              plen = 11 + clen - (clen + 3) % 8
  
              # extract parameter
              dscp = _HIP_PARA.get(code, 'Unassigned')
              # if 0 <= code <= 1023 or 61440 <= code <= 65535:
              #     desc = f'{dscp} (IETF Review)'
              # elif 1024 <= code <= 32767 or 49152 <= code <= 61439:
              #     desc = f'{dscp} (Specification Required)'
              # elif 32768 <= code <= 49151:
              #     desc = f'{dscp} (Reserved for Private Use)'
              # else:
              #     raise ProtocolError(f'HIPv{version}: [Parano {code}] invalid parameter')
              data = _HIP_PROC(dscp)(self, code, cbit, clen, desc=dscp, length=plen, version=version)
  
              # record parameter data
              counter += plen
              if dscp in optkind:
                  if isinstance(options[dscp], tuple):
                      options[dscp] += (Info(data),)
                  else:
                      options[dscp] = (Info(options[dscp]), Info(data))
              else:
                  optkind.append(dscp)
                  options[dscp] = data
  
          # check threshold
          if counter != length:
              raise ProtocolError(f'HIPv{version}: invalid format')
  
          return tuple(optkind), options
docs: Read HIP parameters.
  
          Positional arguments:
              * length -- int, length of parameters
  
          Keyword arguments:
              * version -- int, HIP version
  
          Returns:
              * dict -- extracted HIP parameters