qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 14/41] slirp: Mark sockets of incoming TCP connectio


From: Jan Kiszka
Subject: [Qemu-devel] [PATCH 14/41] slirp: Mark sockets of incoming TCP connections
Date: Wed, 24 Jun 2009 14:42:29 +0200
User-agent: StGIT/0.14.3

Required for pretty-printing.

Signed-off-by: Jan Kiszka <address@hidden>
---

 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);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]