Statistics
| Branch: | Revision:

root / net @ 1c12e1f5

Name Size
Makefile.objs 451 Bytes
checksum.c 2.2 kB
checksum.h 1.1 kB
clients.h 2.1 kB
dump.c 4.7 kB
hub.c 7.8 kB
hub.h 710 Bytes
queue.c 7.3 kB
queue.h 2.2 kB
slirp.c 21.3 kB
slirp.h 1.7 kB
socket.c 21 kB
tap-aix.c 1.7 kB
tap-bsd.c 3.9 kB
tap-haiku.c 1.7 kB
tap-linux.c 5.6 kB
tap-linux.h 1.8 kB
tap-solaris.c 6.2 kB
tap-win32.c 21.3 kB
tap.c 18.1 kB
tap.h 2.3 kB
util.c 1.9 kB
util.h 1.3 kB
vde.c 3.5 kB

Latest revisions

# Date Author Comment
f0e3ac70 11/01/2012 12:00 pm Lei Li

net: use "socket" model name for UDP sockets

Fix the problem that can not delete the udp socket.
It's caused by passing "udp" model to net_socket_udp_init,
but we do not have "udp" model in our model list.
Pass the right model "socket" to init function.
...

aee0bf7d 10/30/2012 09:18 pm Michael S. Tsirkin

tap-win32: stubs to fix win32 build

Add missing stubs to win32 to fix link failure.

Signed-off-by: Michael S. Tsirkin <>
Reported-by: Paolo Bonzini <>
Signed-off-by: Blue Swirl <>

08778b39 10/19/2012 11:39 am Stefan Weil

net/tap-win32: Fix compiler warning caused by missing include statement

The include file for net_init_tap was missing:

net/tap-win32.c:703:
warning: no previous prototype for ‘net_init_tap’

Signed-off-by: Stefan Weil <>
Signed-off-by: Stefan Hajnoczi <>

a245fc18 10/08/2012 02:59 pm Paolo Bonzini

net: consolidate NetClientState header files into one

This patch doesn't seem much useful alone, I must admit. However,
it makes sense as part of the upcoming directory reorganization,
where I want to have include/net/tap.h as the net<->hw interface
for tap. Then having both net/tap.h and include/net/tap.h does...

73062dfe 09/23/2012 09:37 am Stefan Weil

net/socket: Fix compiler warning (regression for MinGW)

Commit 213fd5087e2e4e2da10ad266df0ba950cf7618bf removed a type cast
which is needed for MinGW:

net/socket.c:136: warning:
pointer targets in passing argument 2 of ‘sendto’ differ in signedness
/usr/lib/gcc/amd64-mingw32msvc/4.4.4/../../../../amd64-mingw32msvc/include/winsock2.h:1313: note:...

61518a74 09/14/2012 10:40 am Stefan Hajnoczi

net: broadcast hub packets if at least one port can receive

In commit 60c07d933c66c4b30a83b7ccbc8a0cb3df1b2d0e ("net: fix
qemu_can_send_packet logic") the "VLAN" broadcast behavior was changed
to queue packets if any net client cannot receive. It turns out that...

863f678f 09/14/2012 10:40 am Stefan Hajnoczi

net: asynchronous send/receive infrastructure for net/socket.c

The net/socket.c net client is not truly asynchronous. This patch
borrows the qemu_set_fd_handler2() code from net/tap.c as the basis for
proper asynchronous send/receive.

Only read packets from the socket when the peer is able to receive....

213fd508 09/14/2012 10:40 am Stefan Hajnoczi

net: EAGAIN handling for net/socket.c UDP

Implement asynchronous send for UDP (or other SOCK_DGRAM) sockets. If
send fails with EAGAIN we wait for the socket to become writable again.

Signed-off-by: Stefan Hajnoczi <>

45a7f54a 09/14/2012 10:40 am Stefan Hajnoczi

net: EAGAIN handling for net/socket.c TCP

Replace spinning send_all() with a proper non-blocking send. When the
socket write buffer limit is reached, we should stop trying to send and
wait for the socket to become writable again.

Non-blocking TCP sockets can return in two different ways when the write...

06b5f36d 09/14/2012 10:40 am Stefan Hajnoczi

net: do not report queued packets as sent

Net send functions have a return value where 0 means the packet has not
been sent and will be queued. A non-zero value means the packet was
sent or an error caused the packet to be dropped.

This patch fixes two instances where packets are queued but we return...

View revisions

Also available in: Atom