diff options
author | Mike Ryan <mikeryan@isi.edu> | 2010-12-01 11:16:47 -0800 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2010-12-09 12:45:50 +0200 |
commit | 3a75e74c76cef8daa7944159b016c4ee7c56e568 (patch) | |
tree | 9b3b7f9f45c49a3d29d6bfb3b0d553b525942191 /net.c | |
parent | 138b38b61bf92d4e9588acf934e532499c94e185 (diff) |
net/sock: option to specify local address
Add an option to specify the host IP to send multicast packets from,
when using a multicast socket for networking. The option takes an IP
address and sets the IP_MULTICAST_IF socket option, which causes the
packets to use that IP's interface as an egress.
This is useful if the host machine has several interfaces with several
virtual networks across disparate interfaces.
Signed-off-by: Mike Ryan <mikeryan@ISI.EDU>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'net.c')
-rw-r--r-- | net.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1050,6 +1050,10 @@ static const struct { .name = "mcast", .type = QEMU_OPT_STRING, .help = "UDP multicast address and port number", + }, { + .name = "localaddr", + .type = QEMU_OPT_STRING, + .help = "source address for multicast packets", }, { /* end of list */ } }, |