epcap_compile (epcap_compile v1.0.4) View Source
Link to this section Summary
Link to this section Types
Specs
compile_options() ::
[{optimize, true | false} |
{netmask, non_neg_integer()} |
{dlt, integer()} |
{snaplen, integer()} |
{limit, integer()}].
Link to this section Functions
Specs
compile(Filter :: iodata()) -> {ok, [binary()]} | {error, string()}.
Compile a PCAP filter to a BPF program
Filter is a string in pcap-filter(7) format.
compile/1 defaults to:
* optimization enabled
* an unspecified netmask (filters specifying the broadcast will return an error)
* datalinktype set to ethernet (DLT_EN10MB)
* a packet length of 65535 bytes
* a limit of 8192 bytes for filters. Filters larger than this limit will return{error, enomem}. A limit less than 0 disables the length check.
Specs
compile(Filter :: iodata(), compile_options()) -> {ok, [binary()]} | {error, string()}.
Compile a PCAP filter to a BPF program
Filter is a string in pcap-filter(7) format.
See pcap_compile(3PCAP) for documentation about each option.