tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Lua in-kernel (lbuf library)



Lourival Vieira Neto wrote:
> I'm developing a library to handle buffers in Lua, named lbuf. It is
> been developed as part of my efforts to perform experimentation in
> kernel network stack using Lua. Initially, I intended to bind mbuf to
> allow, for example, to write protocols dissectors in Lua. For example,
> calling a Lua function to inspect network packets:
> 
> function filter(packet)
>   if packet.field == value then return DROP end
>   return PASS
> end
> 
> Thus, I started to design a Lua binding to mbuf inspired by '#pragma
> pack' and bitfields of C lang. Then, I realized that this Lua library
> could be useful to other kernel (and user-space) areas, such as device
> drivers and user-level protocols. So, I started to develop this
> binding generically as a independent library to give random access to
> bits in a buffer. It is just in the early beginning, but I want to
> share some thoughts.

I wonder if you looked at Lua support in Wireshark [1]? Unfortunately,
it's GPL and they even have a special section 'Beware the GPL' on wiki.

[1] http://wiki.wireshark.org/Lua

Alex


Home | Main Index | Thread Index | Old Index