def extract(fin=None, fout=None, format=None,                           <EOL>auto=True, extension=True, store=True,                      <EOL>files=False, nofile=False, verbose=False,                   <EOL>engine=None, layer=None, protocol=None,                     <EOL>ip=False, ipv4=False, ipv6=False, tcp=False, strict=True,   <EOL>trace=False, trace_fout=None, trace_format=None,            <EOL>trace_byteorder=sys.byteorder, trace_nanosecond=False):     
if isinstance(layer, type) and issubclass(layer, Protocol):<EOL><INDENT>layer = layer.__layer__<EOL><DEDENT>if isinstance(protocol, type) and issubclass(protocol, Protocol):<EOL><INDENT>protocol = protocol.__index__()<EOL><DEDENT>str_check(fin or '<STR_LIT>', fout or '<STR_LIT>', format or '<STR_LIT>',<EOL>trace_fout or '<STR_LIT>', trace_format or '<STR_LIT>',<EOL>engine or '<STR_LIT>', layer or '<STR_LIT>', *(protocol or '<STR_LIT>'))<EOL>bool_check(files, nofile, verbose, auto, extension, store,<EOL>ip, ipv4, ipv6, tcp, strict, trace)<EOL>return Extractor(fin=fin, fout=fout, format=format,<EOL>store=store, files=files, nofile=nofile,<EOL>auto=auto, verbose=verbose, extension=extension,<EOL>engine=engine, layer=layer, protocol=protocol,<EOL>ip=ip, ipv4=ipv4, ipv6=ipv6, tcp=tcp, strict=strict,<EOL>trace=trace, trace_fout=trace_fout, trace_format=trace_format,<EOL>trace_byteorder=trace_byteorder, trace_nanosecond=trace_nanosecond)<EOL>
Extract a PCAP file.

    Keyword arguments:
        * fin  -- str, file name to be read; if file not exist, raise an error
        * fout -- str, file name to be written
        * format  -- str, file format of output
                        <keyword> 'plist' / 'json' / 'tree' / 'html'

        * auto -- bool, if automatically run till EOF (default is True)
                        <keyword> True / False
        * extension -- bool, if check and append extensions to output file (default is True)
                        <keyword> True / False
        * store -- bool, if store extracted packet info (default is True)
                        <keyword> True / False

        * files -- bool, if split each frame into different files (default is False)
                        <keyword> True / False
        * nofile -- bool, if no output file is to be dumped (default is False)
                        <keyword> True / False
        * verbose -- bool, if print verbose output information (default is False)
                        <keyword> True / False

        * engine -- str, extraction engine to be used
                        <keyword> 'default | pcapkit'
        * layer -- str, extract til which layer
                        <keyword> 'Link' / 'Internet' / 'Transport' / 'Application'
        * protocol -- str, extract til which protocol
                        <keyword> available protocol name

        * ip -- bool, if record data for IPv4 & IPv6 reassembly (default is False)
                        <keyword> True / False
        * ipv4 -- bool, if perform IPv4 reassembly (default is False)
                        <keyword> True / False
        * ipv6 -- bool, if perform IPv6 reassembly (default is False)
                        <keyword> True / False
        * tcp -- bool, if perform TCP reassembly (default is False)
                        <keyword> True / False
        * strict -- bool, if set strict flag for reassembly (default is True)
                        <keyword> True / False

        * trace -- bool, if trace TCP traffic flows (default is False)
                        <keyword> True / False
        * trace_fout -- str, path name for flow tracer if necessary
        * trace_format -- str, output file format of flow tracer
                        <keyword> 'plist' / 'json' / 'tree' / 'html' / 'pcap'
        * trace_byteorder -- str, output file byte order
                        <keyword> 'little' / 'big'
        * trace_nanosecond -- bool, output nanosecond-resolution file flag
                        <keyword> True / False

    Returns:
        * Extractor -- an Extractor object form `pcapkit.extractor`