aboutsummaryrefslogtreecommitdiffstats
path: root/slirp/if.c
AgeCommit message (Collapse)AuthorFilesLines
2011-08-05slirp: Only start packet expiration for delayed onesJan Kiszka1-3/+0
The expiration timeout must only affect packets that are queued due to pending ARP resolutions. The old version broke ping e.g. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2011-08-05slirp: Read current time only once per if_start callJan Kiszka1-4/+1
No need to update the current time for each packet we send from the queue. Processing time is comparably short. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2011-08-03Delayed IP packetsFabien Chouteau1-4/+24
In the current implementation, if Slirp tries to send an IP packet to a client with an unknown hardware address, the packet is simply dropped and an ARP request is sent (if_encap in slirp/slirp.c). With this patch, Slirp will send the ARP request, re-queue the packet and try to send it later. The packet is dropped after one second if the ARP reply is not received. Signed-off-by: Fabien Chouteau <chouteau@adacore.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2009-06-29slirp: Use internal state in interfaceJan Kiszka1-1/+1
This now also exports the internal state to the slirp users in qemu, returning it from slirp_init and expecting it along with service invocations. Additionally provide an opaque value interface for the callbacks from slirp into the qemu core. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-29slirp: Factor out internal state structureJan Kiszka1-27/+23
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 the following patches. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-29slirp: Drop link_up checks from if_output and slirp_socket_can_recvJan Kiszka1-4/+1
link_up is true once slirp is initialized, so these check are really not required. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-29slirp: Drop dead codeJan Kiszka1-80/+0
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). Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-03-07Sparse fixes: NULL use, header order, ANSI prototypes, staticblueswir11-4/+2
Fix Sparse warnings: * use NULL instead of plain 0 * rearrange header include order to avoid redefining types accidentally * ANSIfy SLIRP * avoid "restrict" keyword * add static git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6736 c046a42c-6fe2-441c-8c8c-71466251a162
2008-09-30Add some missing static qualifiersblueswir11-2/+2
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5363 c046a42c-6fe2-441c-8c8c-71466251a162
2008-08-17Fix warnings that would be generated by gcc -Wstrict-prototypesblueswir11-4/+2
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5021 c046a42c-6fe2-441c-8c8c-71466251a162
2008-05-10Special-case CTL_ALIAS instead of CTL_DNS in udp loopback test.balrog1-1/+1
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
2007-10-26 Add const etc. to places forgotten from the previous commitblueswir11-2/+0
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3453 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-26 Use const and static as needed, disable unused codeblueswir11-20/+0
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3452 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-17find -type f | xargs sed -i 's/[\t ]*$//g' # Yes, again. Note the star in ↵ths1-4/+4
the regex. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3177 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-16find -type f | xargs sed -i 's/[\t ]$//g' # on most filesths1-30/+30
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3173 c046a42c-6fe2-441c-8c8c-71466251a162
2006-05-10suppressed unaligned accessesbellard1-2/+2
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1911 c046a42c-6fe2-441c-8c8c-71466251a162
2004-10-07windows fixes (Gregory Alexander)bellard1-3/+3
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1102 c046a42c-6fe2-441c-8c8c-71466251a162
2004-09-13memory leak fix (Juergen Keil)bellard1-0/+2
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1067 c046a42c-6fe2-441c-8c8c-71466251a162
2004-04-22initial user mode network supportbellard1-0/+320
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@733 c046a42c-6fe2-441c-8c8c-71466251a162