emmericp / MoonGen

MoonGen is a fully scriptable high-speed packet generator built on DPDK and LuaJIT. It can saturate a 10 Gbit/s connection with 64 byte packets on a single CPU core while executing user-provided Lua scripts for each packet. Multi-core support allows for even higher rates. It also features precise and accurate timestamping and rate control.
MIT License
1.04k stars 234 forks source link

How does Lua call C function? #237

Closed qwe131829 closed 5 years ago

qwe131829 commented 5 years ago

The source code of DPDK is written in C. So how to use Lua to call C function or C file in MounGen? I look forward to receiving your reply !

emmericp commented 5 years ago

http://luajit.org/ext_ffi.html