Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MJS4C-0003Gh-9P for qemu-devel@nongnu.org; Wed, 24 Jun 2009 08:59:08 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MJS47-0003Dz-KH for qemu-devel@nongnu.org; Wed, 24 Jun 2009 08:59:07 -0400 Received: from [199.232.76.173] (port=35380 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MJS47-0003Dq-Do for qemu-devel@nongnu.org; Wed, 24 Jun 2009 08:59:03 -0400 Received: from lizzard.sbs.de ([194.138.37.39]:21940) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MJS46-0000Dw-MK for qemu-devel@nongnu.org; Wed, 24 Jun 2009 08:59:03 -0400 Resent-To: Anthony Liguori Resent-Message-Id: <4A42207D.4090400@siemens.com> From: Jan Kiszka Date: Wed, 24 Jun 2009 14:42:29 +0200 Message-ID: <20090624124229.29402.81925.stgit@mchn012c.ww002.siemens.net> In-Reply-To: <20090624124227.29402.750.stgit@mchn012c.ww002.siemens.net> References: <20090624124227.29402.750.stgit@mchn012c.ww002.siemens.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH 14/41] slirp: Mark sockets of incoming TCP connections List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Mark McLoughlin , qemu-devel@nongnu.org Required for pretty-printing. Signed-off-by: Jan Kiszka --- slirp/socket.h | 1 + slirp/tcp_subr.c | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/slirp/socket.h b/slirp/socket.h index 979b191..d241a48 100644 --- a/slirp/socket.h +++ b/slirp/socket.h @@ -73,6 +73,7 @@ struct socket { #define SS_PERSISTENT_MASK 0xf000 /* Unremovable state bits */ #define SS_HOSTFWD 0x1000 /* Socket describes host->guest forwarding */ +#define SS_INCOMING 0x2000 /* Connection was initiated by a host on the internet */ extern struct socket tcb; diff --git a/slirp/tcp_subr.c b/slirp/tcp_subr.c index 6fa4223..219f1dd 100644 --- a/slirp/tcp_subr.c +++ b/slirp/tcp_subr.c @@ -483,6 +483,7 @@ tcp_connect(struct socket *inso) /* if it's not FACCEPTONCE, it's already NOFDREF */ } so->s = s; + so->so_state |= SS_INCOMING; so->so_iptos = tcp_tos(so); tp = sototcpcb(so);