]> git.sesse.net Git - vlc/blobdiff - include/vlc_network.h
block_mmap_Alloc: commoditize block allocation from mmap
[vlc] / include / vlc_network.h
index 68f1696668e430402bce9b02e0f77679000fa8db..d03a9243d4f74cc63b3acffe6e1d96ce874daa93 100644 (file)
@@ -76,16 +76,11 @@ int net_SetupSocket (int fd);
 #define net_Connect(a, b, c, d, e) __net_Connect(VLC_OBJECT(a), b, c, d, e)
 VLC_EXPORT( int, __net_Connect, (vlc_object_t *p_this, const char *psz_host, int i_port, int socktype, int protocol) );
 
-VLC_EXPORT( int *, net_Listen, (vlc_object_t *p_this, const char *psz_host, int i_port, int family, int socktype, int protocol) );
+VLC_EXPORT( int *, net_Listen, (vlc_object_t *p_this, const char *psz_host, int i_port, int protocol) );
 
-#define net_ListenTCP(a, b, c) __net_ListenTCP(VLC_OBJECT(a), b, c)
+#define net_ListenTCP(a, b, c) net_Listen(VLC_OBJECT(a), b, c, IPPROTO_TCP)
 #define net_ConnectTCP(a, b, c) __net_ConnectTCP(VLC_OBJECT(a), b, c)
 
-static inline int *__net_ListenTCP (vlc_object_t *obj, const char *host, int port)
-{
-    return net_Listen (obj, host, port, AF_UNSPEC, SOCK_STREAM, IPPROTO_TCP);
-}
-
 static inline int __net_ConnectTCP (vlc_object_t *obj, const char *host, int port)
 {
     return __net_Connect (obj, host, port, SOCK_STREAM, IPPROTO_TCP);
@@ -128,9 +123,6 @@ struct virtual_socket_t
 #define net_Read(a,b,c,d,e,f) __net_Read(VLC_OBJECT(a),b,c,d,e,f)
 VLC_EXPORT( ssize_t, __net_Read, ( vlc_object_t *p_this, int fd, const v_socket_t *, uint8_t *p_data, size_t i_data, vlc_bool_t b_retry ) );
 
-#define net_Select(a,b,c,d,e) __net_Select(VLC_OBJECT(a),b,c,d,e)
-VLC_EXPORT( ssize_t, __net_Select, ( vlc_object_t *p_this, const int *pi_fd, int i_fd, uint8_t *p_data, size_t i_data ) );
-
 #define net_Write(a,b,c,d,e) __net_Write(VLC_OBJECT(a),b,c,d,e)
 VLC_EXPORT( ssize_t, __net_Write, ( vlc_object_t *p_this, int fd, const v_socket_t *, const uint8_t *p_data, size_t i_data ) );
 
@@ -145,14 +137,14 @@ VLC_EXPORT( ssize_t, __net_vaPrintf, ( vlc_object_t *p_this, int fd, const v_soc
 
 #ifndef HAVE_INET_PTON
 /* only in core, so no need for C++ extern "C" */
-VLC_EXPORT (int, inet_pton, (int af, const char *src, void *dst) );
+    VLC_EXPORT (int, inet_pton, (int af, const char *src, void *dst) );
 #endif
 
 #ifndef HAVE_INET_NTOP
 #ifdef WIN32
 /* only in core, so no need for C++ extern "C" */
-VLC_EXPORT (const char *, inet_ntop, (int af, const void *src,
-                                      char *dst, socklen_t cnt) );
+    VLC_EXPORT (const char *, inet_ntop, (int af, const void *src,
+                                          char *dst, socklen_t cnt) );
 #endif
 #endif
 
@@ -174,7 +166,7 @@ struct pollfd
     int revents;
 };
 
-int poll (struct pollfd *fds, unsigned nfds, int timeout);
+  VLC_EXPORT (int, poll, (struct pollfd *fds, unsigned nfds, int timeout));
 #endif
 
 #ifdef WIN32