epcap_compile:将 pcap-filter(7) 表达式编译为 BPF 程序

时间:2021-05-30 20:26:54
【文件属性】:
文件名称:epcap_compile:将 pcap-filter(7) 表达式编译为 BPF 程序
文件大小:17KB
文件格式:ZIP
更新时间:2021-05-30 20:26:54
erlang libpcap bpf Erlang epcap_compile 是一个 Erlang 库,用于将 PCAP 过滤器编译为 BPF 程序(请参阅 pcap-filter(7))。 epcap_compile 使用 NIF 接口从 libpcap 包装 pcap_compile(3PCAP)。 警告 由于库直接将过滤字符串传递给 pcap_compile(3PCAP),因此 pcap_compile() 中的任何错误都可能导致 Erlang VM 崩溃。 不要使用来自不受信任来源的过滤器。 另请注意,非常大的过滤器可能会阻塞调度程序或导致堆栈溢出。 例如: epcap_compile:compile(string:copies("ip and ", 50000) ++ "ip"). 默认情况下不允许大于 8192 字节的过滤器。 请参阅 compile/2 的limit选项。 要求 libpcap 在 Ubuntu 上
【文件预览】:
epcap_compile-master
----rebar.lock(4B)
----test()
--------epcap_compile_SUITE.erl(4KB)
----rebar.config(419B)
----c_src()
--------epcap_compile.c(5KB)
--------Makefile(2KB)
--------epcap_compile.h(2KB)
----src()
--------epcap_compile.erl(4KB)
--------epcap_compile.app.src(302B)
----examples()
--------lsf.erl(2KB)
--------lsf_inet.erl(3KB)
--------bpf_ex.erl(3KB)
----.gitignore(109B)
----elvis.config(731B)
----Makefile(420B)
----README.md(6KB)

网友评论