slirp: Factorizing and cleaning solookup()
commita5fd24aa6d0f26aeb9f15b24daa2d68427631c40
authorGuillaume Subiron <maethor@subiron.org>
Sat, 19 Dec 2015 21:25:00 +0000 (19 22:25 +0100)
committerJason Wang <jasowang@redhat.com>
Thu, 4 Feb 2016 05:22:06 +0000 (4 13:22 +0800)
tree83dcbdd530a4e23f3408bbc8ba60b54d78fa48dd
parent5379229a2708df3a1506113315214c3ce5325859
slirp: Factorizing and cleaning solookup()

solookup() was only compatible with TCP. Having the socket list in
argument, it is now compatible with UDP too.

Some optimization code is factorized inside the function (the function
look at the last returned result before browsing the complete socket
list).

This prepares for IPv6 support.

Signed-off-by: Guillaume Subiron <maethor@subiron.org>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
slirp/socket.c
slirp/socket.h
slirp/tcp_input.c
slirp/udp.c