You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
000: A = P[12:2]
001: if (A == 1501) goto 2 else goto 3
002: return 65535
003: return 0
BPF cross-compiled to Lua
return function (P, length)
local A = 0
if 14 > length then return false end
A = bit.bor(bit.lshift(P[12], 8), P[12+1])
if not (A==1501) then goto L2 end
do return true end
::L2::
do return false end
error("end of bpf")
end
Direct pflang compilation
local cast = require("ffi").cast
return function(P,length)
if length < 14 then return false end
return cast("uint16_t*", P+12)[0] == 56581
end