From patchwork Mon Apr 25 11:00:43 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [04/18] qemu-char: export socket_set_nodelay(). Date: Mon, 25 Apr 2011 01:00:43 -0000 From: OHMURA Kei X-Patchwork-Id: 92735 Message-Id: <1303729257-9034-5-git-send-email-ohmura.kei@lab.ntt.co.jp> To: qemu-devel@nongnu.org, kvm@vger.kernel.org Cc: kwolf@redhat.com, aliguori@us.ibm.com, mtosatti@redhat.com, ohmura.kei@lab.ntt.co.jp, ananth@in.ibm.com, mst@redhat.com, dlaor@redhat.com, vatsa@linux.vnet.ibm.com, Yoshiaki Tamura , blauwirbel@gmail.com, quintela@redhat.com, tamura.yoshiaki@gmail.com, avi@redhat.com, pbonzini@redhat.com, psuriset@linux.vnet.ibm.com, stefanha@linux.vnet.ibm.com From: Yoshiaki Tamura Signed-off-by: Yoshiaki Tamura Signed-off-by: OHMURA Kei --- qemu-char.c | 2 +- qemu_socket.h | 1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 03858d4..fef33b0 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2115,7 +2115,7 @@ static void tcp_chr_telnet_init(int fd) send(fd, (char *)buf, 3, 0); } -static void socket_set_nodelay(int fd) +void socket_set_nodelay(int fd) { int val = 1; setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (char *)&val, sizeof(val)); diff --git a/qemu_socket.h b/qemu_socket.h index 180e4db..a05e1e5 100644 --- a/qemu_socket.h +++ b/qemu_socket.h @@ -36,6 +36,7 @@ int inet_aton(const char *cp, struct in_addr *ia); int qemu_socket(int domain, int type, int protocol); int qemu_accept(int s, struct sockaddr *addr, socklen_t *addrlen); void socket_set_nonblock(int fd); +void socket_set_nodelay(int fd); int send_all(int fd, const void *buf, int len1); /* New, ipv6-ready socket helper functions, see qemu-sockets.c */