pflua
pflua copied to clipboard
Packet filtering in Lua
Encapsulations other than ethernet (what libpcap calls "EN10MB") are unimplemented in the pflang compiler. The ability to support other encapsulations would be nice. The marginal work to add the first...
We should document the pflang compiler. In the meantime here's some raw material, that was part of a status mail. the architecture goes like this: parse -> lower -> optimize...
The generated assembly is not ideal. For example, for a loop reading packets from a pcap-format savefile and matching them against "tcp port 5555", we have the function: ``` return...
Performance can vary by around a factor of two on externally-identical runs of the same tools with the same options. What are the detailed reasons, and how can this be...
Expected behavior: the behavior of tcpdump and pflua should match. The fix: change the pflua parser. Details: % tcpdump -d "len < 2 \* -5" (000) ld #pktlen (001) jge...
``` % ./env tools/pipe-lua-libpcap-match -O0 tests/data/wingolog.pcap '1 * 1 >= 1' 1 luajit: /home/me/igalia/pflua/src/pf/bpf.lua:65: attempt to compare string with number stack traceback: ~/igalia/pflua/src/pf/bpf.lua:65: in function 'runtime_u32' ~/igalia/pflua/src/pf/bpf.lua:98: in function 'is_power_of_2'...
Sometimes we find optimizer bugs that have a precise test case we can run. It would be good to be able to drop input and expected output files into a...
``` % ./pflua-pipelines-match ../tests/data/wingolog.pcap "10 / 5 > 0" 1 luajit: ../src/pf/bpf.lua:256: division by non-constant value is unsupported stack traceback: [C]: in function 'assert' ../src/pf/bpf.lua:256: in function 'alu' ../src/pf/bpf.lua:327: in...
https://github.com/Igalia/pflua/issues/83 Pflua: multiplications used to use floats, leading to different results with large operands when compared to the correct integer multiplications. Do not merge this yet; the regression test depends...