Skip to content

Packet parsing

Ghost User requested to merge introsp-struct into master

This branch brings three loosely related changes:

  • Provides a magic data structure that acts mostli like an ordinary struct (with less convenient access), but knows what fields are inside and it is possible to iterate them. This'll allow for serializing it or inserting it to lua with less work. Yes, this bit is a little magical.
  • Parses the packets into a structure and handles them outside of the callback, to get closer to the future batch processing through the whole pipeline.
  • Processes the packets in batches (with minimised calls to the kernel, using recvmmsg to get multiple packets at once and nfq_set_verdict_batch to allow multiple at once inside).

Merge request reports