<div dir="ltr">Hey Devs!<div><br></div><div>We are looking for a way to expose the contents of the layer-3/IP headers to our lua script. Based on <a href="https://redmine.openinfosecfoundation.org/projects/suricata/wiki/Lua_scripting">this documentation</a>, It seems that we can only get granular HTTP headers. Are there buffers available specific to the IP and TCP headers? For example, to get all the HTTP header info, we'd need an init function like so:</div><div><pre style="font-family:Consolas,Menlo,'Liberation Mono',Courier,monospace;margin:1em 1em 1em 1.6em;padding:8px;border:1px solid rgb(226,226,226);border-radius:3px;width:auto;color:rgb(51,51,51);font-size:12px;background-color:rgb(250,250,250)">function init (args)
local needs = {}
needs["payload"] = tostring(true)
return needs
end</pre></div><div>So, would we build something like:</div><div><pre style="font-family:Consolas,Menlo,'Liberation Mono',Courier,monospace;margin:1em 1em 1em 1.6em;padding:8px;border:1px solid rgb(226,226,226);border-radius:3px;width:auto;color:rgb(51,51,51);font-size:12px;background-color:rgb(250,250,250)">function init (args)
local needs = {}
needs["protocol"] = "ip"
return needs
end</pre></div><div>OrĀ </div><div><pre style="font-family:Consolas,Menlo,'Liberation Mono',Courier,monospace;margin:1em 1em 1em 1.6em;padding:8px;border:1px solid rgb(226,226,226);border-radius:3px;width:auto;color:rgb(51,51,51);font-size:12px;background-color:rgb(250,250,250)">function init (args)
local needs = {}
needs["ip.something"] = tostring(true)
return needs
end</pre></div><div>In other words, is there a more comprehensive list of the buffers available that includes ALL of those currently available in Suricata 3.0.1?</div><div><br></div><div>-Nasir</div><div><br></div></div>