qemu-e2k/net
Marc-André Lureau fdec16e3c2 net/socket: learn to talk with a unix dgram socket
-net socket has a fd argument, and may be passed pre-opened sockets.

TCP sockets use framing.
UDP sockets have datagram boundaries.

When given a unix dgram socket, it will be able to read from it, but
will attempt to send on the dgram_dst, which is unset. The other end
will not receive the data.

Let's teach -net socket to recognize a UNIX DGRAM socket, and use the
regular send() command (without dgram_dst).

This makes running slirp out-of-process possible that
way (python pseudo-code):

a, b = socket.socketpair(socket.AF_UNIX, socket.SOCK_DGRAM)

subprocess.Popen('qemu -net socket,fd=%d -net user' % a.fileno(), shell=True)
subprocess.Popen('qemu ... -net nic -net socket,fd=%d' % b.fileno(), shell=True)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
2019-03-29 15:22:18 +08:00
..
can
announce.c qmp: Add announce-self command 2019-03-05 11:27:41 +08:00
checksum.c
clients.h
colo-compare.c net/colo-compare.c: Remove duplicated code 2019-03-05 11:27:40 +08:00
colo-compare.h
colo.c
colo.h
dump.c
eth.c
filter-buffer.c
filter-mirror.c
filter-replay.c
filter-rewriter.c
filter.c
hub.c
hub.h
l2tpv3.c
Makefile.objs build-sys: link with slirp as an external project 2019-03-07 12:46:31 +01:00
net.c vhost-net-user: add stubs for when no virtio-net device is present 2019-02-21 12:28:01 -05:00
netmap.c net: netmap: improve netmap_receive_iov() 2019-03-05 11:27:40 +08:00
queue.c
slirp.c build-sys: link with slirp as an external project 2019-03-07 12:46:31 +01:00
socket.c net/socket: learn to talk with a unix dgram socket 2019-03-29 15:22:18 +08:00
tap_int.h
tap-bsd.c
tap-linux.c
tap-linux.h
tap-solaris.c
tap-stub.c
tap-win32.c
tap.c
trace-events trace-events: Shorten file names in comments 2019-03-22 16:18:07 +00:00
util.c
util.h
vde.c
vhost-user-stub.c vhost-net-user: add stubs for when no virtio-net device is present 2019-02-21 12:28:01 -05:00
vhost-user.c vhost-user: simplify vhost_user_init/vhost_user_cleanup 2019-03-12 21:22:31 -04:00