This repo contains Lua scripts for the traffic generator and parser: https://awesomeopensource.com/project/emmericp/MoonGen
Some examples are provided with plenty of in-line comments to aid in learning Lua and libmoon. Production scripts are also provided.
ethType.lua - This scripts sends every possible etherType value from 0x0000 to 0xFFFF.
latency.lua - RFC2544 latency test - Specify packet sizes to test, test duration and transmit rate. WORK IN PROGRESS throughput.lua - RFC2544 throughput test - Specify the packet sizes to test, the test duration and transmit rate. WORK IN PROGRESS