def _read_hip_para(self, length, *, version):
counter = <NUM_LIT:0>         <EOL>optkind = list()    <EOL>options = dict()    <EOL>while counter < length:<EOL><INDENT>kind = self._read_binary(<NUM_LIT:2>)<EOL>if not kind:<EOL><INDENT>break<EOL><DEDENT>code = int(kind, base=<NUM_LIT:2>)<EOL>cbit = True if int(kind[<NUM_LIT:15>], base=<NUM_LIT:2>) else False<EOL>clen = self._read_unpack(<NUM_LIT:2>)<EOL>plen = <NUM_LIT:11> + clen - (clen + <NUM_LIT:3>) % <NUM_LIT:8><EOL>dscp = _HIP_PARA.get(code, '<STR_LIT>')<EOL>data = _HIP_PROC(dscp)(self, code, cbit, clen, desc=dscp, length=plen, version=version)<EOL>counter += plen<EOL>if dscp in optkind:<EOL><INDENT>if isinstance(options[dscp], tuple):<EOL><INDENT>options[dscp] += (Info(data),)<EOL><DEDENT>else:<EOL><INDENT>options[dscp] = (Info(options[dscp]), Info(data))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>optkind.append(dscp)<EOL>options[dscp] = data<EOL><DEDENT><DEDENT>if counter != length:<EOL><INDENT>raise ProtocolError(f'<STR_LIT>')<EOL><DEDENT>return tuple(optkind), options<EOL>
Read HIP parameters.

        Positional arguments:
            * length -- int, length of parameters

        Keyword arguments:
            * version -- int, HIP version

        Returns:
            * dict -- extracted HIP parameters