diff options
author | Zhang Chen <zhangchen.fnst@cn.fujitsu.com> | 2016-03-17 16:16:26 +0800 |
---|---|---|
committer | Jason Wang <jasowang@redhat.com> | 2016-03-30 08:57:28 +0800 |
commit | d46f75b2e95b664cd7ec9007daca933131b1de46 (patch) | |
tree | ca27a041f940bc300d17c1093356df5031fbf304 /qemu-options.hx | |
parent | ba8940dd8691f16c0180241dab0d1c0da35a71e3 (diff) | |
download | qemu-d46f75b2e95b664cd7ec9007daca933131b1de46.zip qemu-d46f75b2e95b664cd7ec9007daca933131b1de46.tar.gz qemu-d46f75b2e95b664cd7ec9007daca933131b1de46.tar.bz2 |
net/filter-mirror: implement filter-redirector
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
usage:
-netdev user,id=hn0
-chardev socket,id=s0,host=ip_primary,port=X,server,nowait
-chardev socket,id=s1,host=ip_primary,port=Y,server,nowait
-filter-redirector,id=r0,netdev=hn0,queue=tx/rx/all,indev=s0,outdev=s1
Signed-off-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'qemu-options.hx')
-rw-r--r-- | qemu-options.hx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/qemu-options.hx b/qemu-options.hx index 65e0391..a770086 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -3846,6 +3846,15 @@ queue @var{all|rx|tx} is an option that can be applied to any netfilter. filter-mirror on netdev @var{netdevid},mirror net packet to chardev @var{chardevid} +@item -object filter-redirector,id=@var{id},netdev=@var{netdevid},indev=@var{chardevid}, +outdev=@var{chardevid}[,queue=@var{all|rx|tx}] + +filter-redirector on netdev @var{netdevid},redirect filter's net packet to chardev +@var{chardevid},and redirect indev's packet to filter. +Create a filter-redirector we need to differ outdev id from indev id, id can not +be the same. we can just use indev or outdev, but at least one of indev or outdev +need to be specified. + @item -object filter-dump,id=@var{id},netdev=@var{dev},file=@var{filename}][,maxlen=@var{len}] Dump the network traffic on netdev @var{dev} to the file specified by |