From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33511) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agT5S-0000lw-PO for qemu-devel@nongnu.org; Thu, 17 Mar 2016 04:15:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1agT5P-0004Ek-EE for qemu-devel@nongnu.org; Thu, 17 Mar 2016 04:15:18 -0400 Received: from [59.151.112.132] (port=50039 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agT5P-0004Do-1x for qemu-devel@nongnu.org; Thu, 17 Mar 2016 04:15:15 -0400 From: Zhang Chen Date: Thu, 17 Mar 2016 16:16:25 +0800 Message-ID: <1458202587-21890-1-git-send-email-zhangchen.fnst@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH V7 0/2] Introduce filter-redirector List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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