Home | History | Annotate | Download | only in qemu
      1 /* headers to use the BSD sockets */
      2 #ifndef QEMU__SOCKET_H
      3 #define QEMU__SOCKET_H
      4 
      5 #include "sockets.h"
      6 #define  socket_error()  errno
      7 #define  closesocket     socket_close
      8 
      9 /* New, ipv6-ready socket helper functions, see qemu-sockets.c */
     10 int inet_listen(const char *str, char *ostr, int olen,
     11                 SocketType socktype, int port_offset);
     12 int inet_connect(const char *str, SocketType socktype);
     13 
     14 int unix_listen(const char *path, char *ostr, int olen);
     15 int unix_connect(const char *path);
     16 
     17 /* Old, ipv4 only bits.  Don't use for new code. */
     18 int parse_host_port(SockAddress*  saddr, const char *str);
     19 int parse_host_src_port(SockAddress*  haddr, SockAddress*  saddr,
     20                         const char *str);
     21 
     22 #endif /* QEMU__SOCKET_H */
     23