Copyright © 2012-2020 Michael Santos <michael.santos@gmail.com>
compile_options() = [{optimize, true | false} | {netmask, non_neg_integer()} | {dlt, integer()} | {snaplen, integer()} | {limit, integer()}]
compile/1 | Compile a PCAP filter to a BPF program. |
compile/2 | Compile a PCAP filter to a BPF program. |
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.
compile(Filter::iodata(), Options::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.Generated by EDoc