X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmisc%2Fnetutils.c;h=4889bdbdfbdc2253d537ce644ddf9bf0a94e13e0;hb=a0c1805bd992c0ae1fa018156358d831fbaf8f93;hp=f352ff80f9335a353119383e80929cb0b959cea6;hpb=93ca3031ee75338ae1eb922b74cbfe7ee0dc66b8;p=vlc diff --git a/src/misc/netutils.c b/src/misc/netutils.c index f352ff80f9..4889bdbdfb 100644 --- a/src/misc/netutils.c +++ b/src/misc/netutils.c @@ -1,7 +1,7 @@ /***************************************************************************** * netutils.c: various network functions ***************************************************************************** - * Copyright (C) 1999, 2000 VideoLAN + * Copyright (C) 1999, 2000, 2001 VideoLAN * * Authors: Vincent Seguin * Benoit Steiner @@ -31,6 +31,7 @@ #include /* free(), realloc(), atoi() */ #include /* errno() */ #include /* bzero(), bcopy() */ +#include /* gethostname() */ #include /* BSD: struct in_addr */ #include /* BSD: struct sockaddr */ @@ -53,15 +54,15 @@ #include "intf_msg.h" -#include "netutils.h" +#ifndef SYS_BEOS /* I need help for the BeOS portage */ +#include "netutils.h" -#ifndef SYS_BEOS /* I need help for the BeOS portage */ /***************************************************************************** * input_BuildLocalAddr : fill a sockaddr_in structure for local binding *****************************************************************************/ -int input_BuildLocalAddr( struct sockaddr_in * p_socket, int i_port, - boolean_t b_broadcast ) +int network_BuildLocalAddr( struct sockaddr_in * p_socket, int i_port, + boolean_t b_broadcast ) { char psz_hostname[INPUT_MAX_SOURCE_LENGTH]; struct hostent * p_hostent; @@ -113,10 +114,10 @@ int input_BuildLocalAddr( struct sockaddr_in * p_socket, int i_port, /***************************************************************************** * input_BuildRemoteAddr : fill a sockaddr_in structure for remote host *****************************************************************************/ -int input_BuildRemoteAddr( struct sockaddr_in * p_socket, char * psz_server ) +int network_BuildRemoteAddr( struct sockaddr_in * p_socket, char * psz_server ) { struct hostent * p_hostent; -printf("BuildRemoteAddr : psz_server = %s\n",psz_server ); + /* Reset structure */ memset( p_socket, 0, sizeof( struct sockaddr_in ) ); p_socket->sin_family = AF_INET; /* family */ @@ -146,3 +147,4 @@ printf("BuildRemoteAddr : psz_server = %s\n",psz_server ); return( 0 ); } #endif +