qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH V7 0/2] Introduce filter-redirector
@ 2016-03-17  8:16 Zhang Chen
  2016-03-17  8:16 ` [Qemu-devel] [PATCH V7 1/2] net/filter-mirror: implement filter-redirector Zhang Chen
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Zhang Chen @ 2016-03-17  8:16 UTC (permalink / raw)
  To: qemu devel, Jason Wang
  Cc: Li Zhijian, Gui jianfeng, eddie.dong, zhanghailiang,
	Dr. David Alan Gilbert, Zhang Chen, Yang Hongyang

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


v7:
 Address lizhijian's comment.
 - move the handler reset to filter_redirector_cleanup()

v6:
 Address Jason's comments.
 - fix code style and some note

v5:
 Address Jason's comments.
 - add event to handle connection close
 - fix some comments

v4:
 Address Jason's comments.
 - remove redirector's incoming queue
 - just pass packet come from in_dev to filter's next
 - rework redirector_chr_read, most code is stolen from net_socket_send
 - fix comments error
 - add some comments

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 (2):
  net/filter-mirror: implement filter-redirector
  tests/test-filter-redirector: Add unit test for filter-redirector

 net/filter-mirror.c            | 244 +++++++++++++++++++++++++++++++++++++++++
 qemu-options.hx                |   9 ++
 tests/.gitignore               |   1 +
 tests/Makefile                 |   2 +
 tests/test-filter-redirector.c | 221 +++++++++++++++++++++++++++++++++++++
 vl.c                           |   3 +-
 6 files changed, 479 insertions(+), 1 deletion(-)
 create mode 100644 tests/test-filter-redirector.c

-- 
1.9.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-03-17  8:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-17  8:16 [Qemu-devel] [PATCH V7 0/2] Introduce filter-redirector Zhang Chen
2016-03-17  8:16 ` [Qemu-devel] [PATCH V7 1/2] net/filter-mirror: implement filter-redirector Zhang Chen
2016-03-17  8:16 ` [Qemu-devel] [PATCH V7 2/2] tests/test-filter-redirector: Add unit test for filter-redirector Zhang Chen
2016-03-17  8:58 ` [Qemu-devel] [PATCH V7 0/2] Introduce filter-redirector Jason Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).