Guy Harris <ghar...@sonic.net> wrote:
    > In the longer term, the compilation process should probably be split
    > into:

yes.

    >   a phase that compiles a filter into a target-independent *and*
    > link-layer-independent *and* snapshot-length-independent intermediate
    > representation, optionally doing whatever optimization can be done with
    > that;

The "AST" phase (rustc) or "RTL" (I think gcc used to this term, but I dunno
if it still does).

    >   a phase that compiles that intermediate representation into
    > optionally-optimized code for a particular link layer, snapshot length,
    > and target.

Yes.

    > That would be used, for example, when reading a pcapng file with a
    > full-pcapng-support API; the filter for the handle for that file would
    > be set to the generated intermediate representation from the first
    > phase and, for each new link-layer/snapshot length pair in the file,
    > would generate the appropriate code for the filter, caching the
    > results.

A good plan.

_______________________________________________
tcpdump-workers mailing list -- tcpdump-workers@lists.tcpdump.org
To unsubscribe send an email to tcpdump-workers-le...@lists.tcpdump.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to