Statistics
| Branch: | Revision:

root / slirp / udp.c @ feature-archipelago

History | View | Annotate | Download (9.7 kB)

# Date Author Comment
aad1239a 10/02/2013 08:20 pm Sebastian Ottlik

slirp: call socket_set_fast_reuse instead of setting SO_REUSEADDR

SO_REUSEADDR should be avoided on Windows but is desired on other operating
systems. So instead of setting it we call socket_set_fast_reuse that will result
in the appropriate behaviour on all operating systems....

9957fc7f 03/22/2013 02:14 pm Stefan Weil

MinGW: Replace setsockopt by qemu_setsocketopt

Instead of adding missing type casts which are needed by MinGW for the
4th argument, the patch uses qemu_setsockopt which was invented for this
purpose.

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

4d5b97da 10/05/2012 04:10 pm Amos Kong

cleanup useless return sentence

This patch cleans up return sentences in the end of void functions.

Reported-by: Paolo Bonzini <>
Signed-off-by: Amos Kong <>
Signed-off-by: Stefan Hajnoczi <>

a68adc22 03/13/2012 03:05 pm Jan Kiszka

slirp: Cleanup resources on instance removal

Close & free sockets when shutting down a slirp instance, also release
all buffers.

CC: Michael S. Tsirkin <>
Signed-off-by: Jan Kiszka <>

12b513d8 07/23/2011 06:19 pm Jan Kiszka

slirp: Fix restricted mode

This aligns the code to what the documentation claims: Allow everything
but requests that would have to be routed outside of the virtual LAN.

So we need to drop the unneeded IP-level filter, allow TFTP requests,
and add the missing protocol-level filter to ICMP....

5a82362a 07/23/2011 06:19 pm Jan Kiszka

slirp: Strictly associate DHCP/BOOTP and TFTP with virtual host

Instead of accepting every DHCP/BOOTP and TFTP packet, only invoke the
built-in servers if the target is the virtual host.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

3acccfc6 07/23/2011 06:19 pm Jan Kiszka

slirp: Replace m_freem with m_free

Remove this pointless wrapping.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

b6dce92e 07/25/2010 05:59 pm Stefan Weil

slirp: Replace u_int8_t, u_int16_t, u_int32_t, u_int64_t by standard int types

There is no need to have a second set of integral types.
Replace them by the standard types from stdint.h.

Signed-off-by: Stefan Weil <>
Signed-off-by: Aurelien Jarno <>

40ff6d7e 12/03/2009 07:45 pm Kevin Wolf

Don't leak file descriptors

We're leaking file descriptors to child processes. Set FD_CLOEXEC on file
descriptors that don't need to be passed to children to stop this misbehaviour.

Signed-off-by: Kevin Wolf <>
Signed-off-by: Anthony Liguori <>

97df1ee5 07/27/2009 10:09 pm Ed Swierk

slirp: Remove UDP protocol emulation (talk, cuseeme)

The UDP emulation code for talk has been commented out since the
beginning of time, and unless someone who runs CU-SeeMe on qemu with
user-mode networking can vouch that the special magic (a) is necessary...

460fec67 06/29/2009 04:52 pm Jan Kiszka

slirp: Factor out internal state structure

The essence of this patch is to stuff (almost) all global variables of
the slirp stack into the structure Slirp. In this step, we still keep
the structure as global variable, directly accessible by the whole
stack. Changes to the external interface of slirp will be applied in...

0d62c4cf 06/29/2009 04:52 pm Jan Kiszka

slirp: Drop dead code

After all its years inside the qemu tree, there is no point in keeping
the dead code paths of slirp. This patch is a first round of removing
usually commented out code parts. More cleanups need to follow (and
maybe finally a proper reindention)....

0fe6a7f2 06/29/2009 04:52 pm Jan Kiszka

slirp: Drop statistic code

As agreed on the mailing list, there is no interest in keeping the
usually disabled slirp statistics in the tree. So this patch removes
them.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

a13a4126 06/29/2009 04:52 pm Jan Kiszka

slirp: Rework internal configuration

The user mode IP stack is currently only minimally configurable /wrt to
its virtual IP addresses. This is unfortunate if some guest has a fixed
idea of which IP addresses to use.

Therefore this patch prepares the stack for fully configurable IP...

3c6a0580 06/29/2009 04:52 pm Jan Kiszka

slirp: Bind support for host forwarding rules

Extend the hostfwd rule format so that the user can specify on which
host interface qemu should listen for incoming connections. If omitted,
binding will takes place against all interfaces.

Signed-off-by: Jan Kiszka <>...

f932b6ce 06/29/2009 04:52 pm Jan Kiszka

slirp: Prepare for persistent socket state flags

This prepares for adding flags to socket.so_state that must not be
removed during the lifetime of a socket.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

6dd5ffb6 06/29/2009 04:52 pm Jan Kiszka

slirp: Explicitely mark host-forwarding sockets

Mark sockets that describe host forwardings. This is required for their
(and only their) proper deletion and for pretty-printing.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

753a5f17 06/29/2009 04:52 pm Jan Kiszka

slirp: Drop redundant lines from udp_input

The socket faddr/fport is already updated a few lines below, so these
are completely redundant.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

aeed97c4 04/18/2009 10:32 am blueswir1

Use ANSI prototypes to please sparse

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7176 c046a42c-6fe2-441c-8c8c-71466251a162

2f5f8996 01/26/2009 09:37 pm aliguori

Remove the advertising clause from the slirp license

According to the FSF, the 4-clause BSD license, which slirp is covered under,
is not compatible with the GPL or LGPL1.

[1] http://www.fsf.org/licensing/licenses/index_html#GPLIncompatibleLicenses

There are three declared copyright holders in slirp that use the 4-clause...

429d0a3d 01/13/2009 09:48 pm blueswir1

Fix 64 bit issue in slirp

Signed-off-by: Gleb Natapov <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6288 c046a42c-6fe2-441c-8c8c-71466251a162

a9ba3a85 01/08/2009 09:24 pm aliguori

Add slirp_restrict option (Gleb Natapov)

Add "slirp firewall" to permit connection only to vmchannel addresses.

Signed-off-by: Gleb Natapov <>
Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6241 c046a42c-6fe2-441c-8c8c-71466251a162

be15b141 10/25/2008 02:21 pm blueswir1

Replace uses of strncpy (a GNU extension) with Qemu pstrcpy

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5531 c046a42c-6fe2-441c-8c8c-71466251a162

242acf3a 05/10/2008 04:49 am balrog

Special-case CTL_ALIAS instead of CTL_DNS in udp loopback test.

At the same time remove a bogus test (tested by Jason Wessel).
Quiet some gcc4 warnings from slirp compilation.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4402 c046a42c-6fe2-441c-8c8c-71466251a162

f3ae0704 04/28/2008 12:45 am balrog

Treat DNS a special case among special addresses in slirp (Jason Wessel).

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4267 c046a42c-6fe2-441c-8c8c-71466251a162

4a0d8278 04/26/2008 06:33 pm balrog

Fix slirp udp source address contamination (Jason Wessel)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4259 c046a42c-6fe2-441c-8c8c-71466251a162

9634d903 10/26/2007 10:01 pm blueswir1

Use const and static as needed, disable unused code

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3452 c046a42c-6fe2-441c-8c8c-71466251a162

31a60e22 10/26/2007 09:42 pm blueswir1

Make Slirp statistics gathering and output conditional to LOG_ENABLED
Add 'info slirp' command to monitor to display statistics
Disable Slirp debugging code by default

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3451 c046a42c-6fe2-441c-8c8c-71466251a162

3b46e624 09/17/2007 11:09 am ths

find -type f | xargs sed -i 's/[\t ]*$//g' # Yes, again. Note the star in the regex.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3177 c046a42c-6fe2-441c-8c8c-71466251a162

5fafdf24 09/17/2007 12:08 am ths

find -type f | xargs sed -i 's/[\t ]$//g' # on most files

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3173 c046a42c-6fe2-441c-8c8c-71466251a162

54fd9cdf 01/18/2007 12:47 am ths

Slirp UDP fix, by Jason Wessel.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2327 c046a42c-6fe2-441c-8c8c-71466251a162

c904d61f 05/03/2006 11:53 pm bellard

UDP broadcast translation error (Mark Jonckheere)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1899 c046a42c-6fe2-441c-8c8c-71466251a162

8dbca8dd 05/03/2006 10:58 pm bellard

separate alias_addr (10.0.2.2) from our_addr (Ed Swierk)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1895 c046a42c-6fe2-441c-8c8c-71466251a162

51a36cb2 07/03/2005 08:08 pm bellard

win32 compile fix

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1500 c046a42c-6fe2-441c-8c8c-71466251a162

101c5935 06/05/2005 08:11 pm bellard

64 bit fixes (initial patch by Gwenole Beauchesne)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1458 c046a42c-6fe2-441c-8c8c-71466251a162

02d2c54c 10/08/2004 02:27 am bellard

windows fixes (Gregory Alexander)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1102 c046a42c-6fe2-441c-8c8c-71466251a162

c7f74643 08/25/2004 12:57 am bellard

TFTP support (Magnus Damm)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1050 c046a42c-6fe2-441c-8c8c-71466251a162

379ff53d 07/13/2004 01:33 am bellard

win32 compile

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1016 c046a42c-6fe2-441c-8c8c-71466251a162

f0cbd3ec 04/22/2004 03:10 am bellard

initial user mode network support

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@733 c046a42c-6fe2-441c-8c8c-71466251a162