def _read_ipv4_options(self, size=None):
counter = <NUM_LIT:0>         <EOL>optkind = list()    <EOL>options = dict()    <EOL>while counter < size:<EOL><INDENT>kind = self._read_unpack(<NUM_LIT:1>)<EOL>opts = IPv4_OPT.get(kind)<EOL>if opts is None:<EOL><INDENT>len_ = size - counter<EOL>counter = size<EOL>options['<STR_LIT>'] = self._read_fileng(len_)<EOL>break<EOL><DEDENT>dscp = OPT_TYPE.get(kind)<EOL>desc = dscp.name<EOL>if opts[<NUM_LIT:0>]:<EOL><INDENT>byte = self._read_unpack(<NUM_LIT:1>)<EOL>if byte:    <EOL><INDENT>data = process_opt[opts[<NUM_LIT:2>]](self, byte, kind)<EOL><DEDENT>else:       <EOL><INDENT>data = dict(<EOL>kind=kind,                          <EOL>type=self._read_opt_type(kind),     <EOL>length=<NUM_LIT:2>,                           <EOL>flag=True,                          <EOL>)<EOL><DEDENT><DEDENT>else:           <EOL><INDENT>byte = <NUM_LIT:1><EOL>data = dict(<EOL>kind=kind,                          <EOL>type=self._read_opt_type(kind),     <EOL>length=<NUM_LIT:1>,                           <EOL>)<EOL><DEDENT>counter += byte<EOL>if dscp in optkind:<EOL><INDENT>if isinstance(options[desc], tuple):<EOL><INDENT>options[desc] += (Info(data),)<EOL><DEDENT>else:<EOL><INDENT>options[desc] = (Info(options[desc]), Info(data))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>optkind.append(dscp)<EOL>options[desc] = data<EOL><DEDENT>if not kind:<EOL><INDENT>break<EOL><DEDENT><DEDENT>if counter < size:<EOL><INDENT>len_ = size - counter<EOL>self._read_binary(len_)<EOL><DEDENT>return tuple(optkind), options<EOL>
Read IPv4 option list.

        Positional arguments:
            * size -- int, buffer size

        Returns:
            * tuple -- IPv4 option list
            * dict -- extracted IPv4 option