@@ -14,7 +14,7 @@
#include "qemu-common.h"
#include "block.h"
#include "qemu-queue.h"
-#include "qemu_socket.h"
+#include "qemu-socket.h"
typedef struct AioHandler AioHandler;
@@ -37,7 +37,7 @@
#define MAX_PACKET_LENGTH 4096
-#include "qemu_socket.h"
+#include "qemu-socket.h"
#include "kvm.h"
@@ -38,7 +38,7 @@
#include "sysbus.h"
#include "net.h"
#include "qemu-timer.h"
-#include "qemu_socket.h"
+#include "qemu-socket.h"
#include "sun4m.h"
#include "pcnet.h"
@@ -39,7 +39,7 @@
#include "net.h"
#include "loader.h"
#include "qemu-timer.h"
-#include "qemu_socket.h"
+#include "qemu-socket.h"
#include "pcnet.h"
@@ -13,7 +13,7 @@
#include "virtio.h"
#include "pc.h"
-#include "qemu_socket.h"
+#include "qemu-socket.h"
#include "virtio-9p.h"
#include "fsdev/qemu-fsdev.h"
#include "virtio-9p-debug.h"
@@ -14,7 +14,7 @@
*/
#include "qemu-common.h"
-#include "qemu_socket.h"
+#include "qemu-socket.h"
#include "migration.h"
#include "qemu-char.h"
#include "sysemu.h"
@@ -12,14 +12,14 @@
*/
#include "qemu-common.h"
-#include "qemu_socket.h"
+#include "qemu-socket.h"
#include "migration.h"
#include "monitor.h"
#include "qemu-char.h"
#include "sysemu.h"
#include "buffered_file.h"
#include "block.h"
-#include "qemu_socket.h"
+#include "qemu-socket.h"
//#define DEBUG_MIGRATION_FD
@@ -12,7 +12,7 @@
*/
#include "qemu-common.h"
-#include "qemu_socket.h"
+#include "qemu-socket.h"
#include "migration.h"
#include "qemu-char.h"
#include "sysemu.h"
@@ -12,7 +12,7 @@
*/
#include "qemu-common.h"
-#include "qemu_socket.h"
+#include "qemu-socket.h"
#include "migration.h"
#include "qemu-char.h"
#include "sysemu.h"
@@ -17,7 +17,7 @@
#include "buffered_file.h"
#include "sysemu.h"
#include "block.h"
-#include "qemu_socket.h"
+#include "qemu-socket.h"
#include "block-migration.h"
#include "qemu-objects.h"
@@ -29,7 +29,7 @@
#include <ctype.h>
#include <inttypes.h>
-#include "qemu_socket.h"
+#include "qemu-socket.h"
//#define DEBUG_NBD
@@ -34,7 +34,7 @@
#include "monitor.h"
#include "sysemu.h"
#include "qemu-common.h"
-#include "qemu_socket.h"
+#include "qemu-socket.h"
#include "hw/qdev.h"
static QTAILQ_HEAD(, VLANState) vlans;
@@ -31,7 +31,7 @@
#include "net.h"
#include "monitor.h"
#include "sysemu.h"
-#include "qemu_socket.h"
+#include "qemu-socket.h"
#include "slirp/libslirp.h"
static int get_str_sep(char *buf, int buf_size, const char **pp, int sep)
@@ -30,7 +30,7 @@
#include "qemu-common.h"
#include "qemu-error.h"
#include "qemu-option.h"
-#include "qemu_socket.h"
+#include "qemu-socket.h"
typedef struct NetSocketState {
VLANClientState nc;
@@ -51,7 +51,7 @@
#include "qemu-common.h"
#include "sysemu.h"
-#include "qemu_socket.h"
+#include "qemu-socket.h"
#if !defined(_POSIX_C_SOURCE) || defined(_WIN32) || defined(__sun__)
static void *oom_check(void *ptr)
@@ -96,7 +96,7 @@
#endif
#endif
-#include "qemu_socket.h"
+#include "qemu-socket.h"
#define READ_BUF_LEN 4096
new file mode 100644
@@ -0,0 +1,61 @@
+/* headers to use the BSD sockets */
+#ifndef QEMU_SOCKET_H
+#define QEMU_SOCKET_H
+
+#ifdef _WIN32
+#include <windows.h>
+#include <winsock2.h>
+#include <ws2tcpip.h>
+
+#define socket_error() WSAGetLastError()
+#undef EINTR
+#define EWOULDBLOCK WSAEWOULDBLOCK
+#define EINTR WSAEINTR
+#define EINPROGRESS WSAEINPROGRESS
+
+int inet_aton(const char *cp, struct in_addr *ia);
+
+#else
+
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <netinet/tcp.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+#include <sys/un.h>
+
+#define socket_error() errno
+#define closesocket(s) close(s)
+
+#endif /* !_WIN32 */
+
+#include "qemu-option.h"
+
+/* misc helpers */
+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);
+int send_all(int fd, const void *buf, int len1);
+
+/* New, ipv6-ready socket helper functions, see qemu-sockets.c */
+int inet_listen_opts(QemuOpts *opts, int port_offset);
+int inet_listen(const char *str, char *ostr, int olen,
+ int socktype, int port_offset);
+int inet_connect_opts(QemuOpts *opts);
+int inet_connect(const char *str, int socktype);
+int inet_dgram_opts(QemuOpts *opts);
+const char *inet_strfamily(int family);
+
+int unix_listen_opts(QemuOpts *opts);
+int unix_listen(const char *path, char *ostr, int olen);
+int unix_connect_opts(QemuOpts *opts);
+int unix_connect(const char *path);
+
+/* Old, ipv4 only bits. Don't use for new code. */
+int parse_host_port(struct sockaddr_in *saddr, const char *str);
+int parse_host_src_port(struct sockaddr_in *haddr,
+ struct sockaddr_in *saddr,
+ const char *str);
+int socket_init(void);
+
+#endif /* QEMU_SOCKET_H */
@@ -19,7 +19,7 @@
#include <errno.h>
#include <unistd.h>
-#include "qemu_socket.h"
+#include "qemu-socket.h"
#include "qemu-common.h" /* for qemu_isdigit */
#ifndef AI_ADDRCONFIG
deleted file mode 100644
@@ -1,61 +0,0 @@
-/* headers to use the BSD sockets */
-#ifndef QEMU_SOCKET_H
-#define QEMU_SOCKET_H
-
-#ifdef _WIN32
-#include <windows.h>
-#include <winsock2.h>
-#include <ws2tcpip.h>
-
-#define socket_error() WSAGetLastError()
-#undef EINTR
-#define EWOULDBLOCK WSAEWOULDBLOCK
-#define EINTR WSAEINTR
-#define EINPROGRESS WSAEINPROGRESS
-
-int inet_aton(const char *cp, struct in_addr *ia);
-
-#else
-
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <sys/un.h>
-
-#define socket_error() errno
-#define closesocket(s) close(s)
-
-#endif /* !_WIN32 */
-
-#include "qemu-option.h"
-
-/* misc helpers */
-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);
-int send_all(int fd, const void *buf, int len1);
-
-/* New, ipv6-ready socket helper functions, see qemu-sockets.c */
-int inet_listen_opts(QemuOpts *opts, int port_offset);
-int inet_listen(const char *str, char *ostr, int olen,
- int socktype, int port_offset);
-int inet_connect_opts(QemuOpts *opts);
-int inet_connect(const char *str, int socktype);
-int inet_dgram_opts(QemuOpts *opts);
-const char *inet_strfamily(int family);
-
-int unix_listen_opts(QemuOpts *opts);
-int unix_listen(const char *path, char *ostr, int olen);
-int unix_connect_opts(QemuOpts *opts);
-int unix_connect(const char *path);
-
-/* Old, ipv4 only bits. Don't use for new code. */
-int parse_host_port(struct sockaddr_in *saddr, const char *str);
-int parse_host_src_port(struct sockaddr_in *haddr,
- struct sockaddr_in *saddr,
- const char *str);
-int socket_init(void);
-
-#endif /* QEMU_SOCKET_H */
@@ -80,7 +80,7 @@
#include "blockdev.h"
#include "audio/audio.h"
#include "migration.h"
-#include "qemu_socket.h"
+#include "qemu-socket.h"
#include "qemu-queue.h"
/* point to the block driver where the snapshots are managed */
@@ -153,7 +153,7 @@ int main(int argc, char **argv)
#include "disas.h"
-#include "qemu_socket.h"
+#include "qemu-socket.h"
#include "slirp/libslirp.h"
@@ -26,7 +26,7 @@
#include "qemu-x509.h"
#include "vnc.h"
-#include "qemu_socket.h"
+#include "qemu-socket.h"
#if defined(_VNC_DEBUG) && _VNC_DEBUG >= 2
/* Very verbose, so only enabled for _VNC_DEBUG >= 2 */
@@ -26,7 +26,7 @@
#include "vnc.h"
#include "sysemu.h"
-#include "qemu_socket.h"
+#include "qemu-socket.h"
#include "qemu-timer.h"
#include "acl.h"
#include "qemu-objects.h"
Signed-off-by: Chih-Min Chao <cmchao@gmail.com> --- aio.c | 2 +- gdbstub.c | 2 +- hw/lance.c | 2 +- hw/pcnet.c | 2 +- hw/virtio-9p.c | 2 +- migration-exec.c | 2 +- migration-fd.c | 4 +- migration-tcp.c | 2 +- migration-unix.c | 2 +- migration.c | 2 +- nbd.c | 2 +- net.c | 2 +- net/slirp.c | 2 +- net/socket.c | 2 +- osdep.c | 2 +- qemu-char.c | 2 +- qemu-socket.h | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ qemu-sockets.c | 2 +- qemu_socket.h | 61 ------------------------------------------------------ savevm.c | 2 +- vl.c | 2 +- vnc-tls.c | 2 +- vnc.c | 2 +- 23 files changed, 83 insertions(+), 83 deletions(-) create mode 100644 qemu-socket.h delete mode 100644 qemu_socket.h