Filter-redirector is a netfilter plugin. It gives qemu the ability to redirect net packet. redirector can redirect filter's net packet to outdev. and redirect indev's packet to filter.
filter + | | redirector | +--------------+ | | | | | | | | | indev +-----------+ +----------> outdev | | | | | | | | | +--------------+ | | v filter v3: -Address Jason's comments. v2: - Address Jason's comments. - Add filter-traffic.h to reuse parts of the codes - Add unit test case v1: initial patch. Zhang Chen (3): net/filter-mirror: Change filter_mirror_send interface net/filter-mirror:Add filter-redirector func tests/test-filter-redirector: Add unit test for filter-redirector net/filter-mirror.c | 221 ++++++++++++++++++++++++++++++++++++++++- qemu-options.hx | 8 ++ tests/.gitignore | 1 + tests/Makefile | 2 + tests/test-filter-redirector.c | 214 +++++++++++++++++++++++++++++++++++++++ vl.c | 3 +- 6 files changed, 443 insertions(+), 6 deletions(-) create mode 100644 tests/test-filter-redirector.c -- 1.9.1