#define net_ConnectUDP(a, b, c, d ) __net_ConnectUDP(VLC_OBJECT(a), b, c, d)
VLC_EXPORT( int, __net_ConnectUDP, ( vlc_object_t *p_this, const char *psz_host, int i_port, int hlim ) );
-int net_ListenUDP1 (vlc_object_t *obj, const char *host, int port);
+VLC_EXPORT( int, net_ListenUDP1, (vlc_object_t *obj, const char *host, int port) );
#define net_OpenUDP(a, b, c, d, e ) __net_OpenUDP(VLC_OBJECT(a), b, c, d, e)
VLC_EXPORT( int, __net_OpenUDP, ( vlc_object_t *p_this, const char *psz_bind, int i_bind, const char *psz_server, int i_server ) );
void (*config_ChainDestroy_inner) (config_chain_t *);
char * (*config_ChainCreate_inner) (char **, config_chain_t **, char *);
int (*utf8_open_inner) (const char *filename, int flags, mode_t mode);
+ int (*net_ListenUDP1_inner) (vlc_object_t *obj, const char *host, int port);
};
# if defined (__PLUGIN__)
# define aout_FiltersCreatePipeline (p_symbols)->aout_FiltersCreatePipeline_inner
# define config_ChainDestroy (p_symbols)->config_ChainDestroy_inner
# define config_ChainCreate (p_symbols)->config_ChainCreate_inner
# define utf8_open (p_symbols)->utf8_open_inner
+# define net_ListenUDP1 (p_symbols)->net_ListenUDP1_inner
# elif defined (HAVE_DYNAMIC_PLUGINS) && !defined (__BUILTIN__)
/******************************************************************
* STORE_SYMBOLS: store VLC APIs into p_symbols for plugin access.
((p_symbols)->config_ChainDestroy_inner) = config_ChainDestroy; \
((p_symbols)->config_ChainCreate_inner) = config_ChainCreate; \
((p_symbols)->utf8_open_inner) = utf8_open; \
+ ((p_symbols)->net_ListenUDP1_inner) = net_ListenUDP1; \
(p_symbols)->net_ConvertIPv4_deprecated = NULL; \
(p_symbols)->__sout_CfgParse_deprecated = NULL; \
(p_symbols)->sout_CfgCreate_deprecated = NULL; \
return VLC_EGENERIC;
}
- p_sys->i_handle_udp = net_OpenUDP( p_access, p_sys->sz_bind_addr,
- 7000, "", 0 );
+ p_sys->i_handle_udp = net_ListenUDP1( p_access, p_sys->sz_bind_addr,
+ 7000 );
if( p_sys->i_handle_udp < 0 )
{
msg_Err( p_access, "failed to open a connection (udp)" );
}
if( b_master )
- i_socket = net_OpenUDP( p_intf, NULL, NETSYNC_PORT, NULL, 0 );
+ i_socket = net_ListenUDP1( p_intf, NULL, NETSYNC_PORT );
else
i_socket = net_ConnectUDP( p_intf, psz_master, NETSYNC_PORT, 0 );
}
var_Get( p_stream, SOUT_CFG_PREFIX "port", &val );
- p_sys->i_fd = net_OpenUDP( p_stream, NULL, val.i_int, NULL, 0 );
+ p_sys->i_fd = net_ListenUDP1( p_stream, NULL, val.i_int );
if ( p_sys->i_fd < 0 )
{
free( p_sys );
if( p_sap->b_control == VLC_TRUE )
{
- p_address->i_rfd = net_OpenUDP( p_sap, psz_addr, SAP_PORT, "", 0 );
+ p_address->i_rfd = net_ListenUDP1( p_sap, psz_addr, SAP_PORT );
if( p_address->i_rfd != -1 )
net_StopSend( p_address->i_rfd );
p_address->i_buff = 0;