Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Unsubscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com From: "Philippe Noel" To: "Cygwin-List" Subject: Problems with /etc/services & getservbyname() function Date: Tue, 10 Aug 1999 11:24:51 -0400 Message-ID: <000901bee344$7d66e850$400010ac@philippe.socoint.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2377.0 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Importance: Normal Hi all, I'm currently trying to use the function "getservbyname" and I have problems with. I do not find any hints on the mailing-list archive nor in the FAQ, but I saw the function is supported by Cygwin. The getservbyname() function returns a servent structure for the line from /etc/services that matches the service name using protocol proto. I installed the file /etc/services like it is on my Linux system. Actually, this functions always returns me a NULL pointer. Does anybody uses this function in his source code without having problems? Is there anything special about /etc/services? Here is an example of what I am doing: ---- /etc/services content -------------------------------- socorfs 3379/tcp ----------------------------------------------------------- ---- Source code ------------------------------------------ struct servent *serv = getservbyname( "socorfs", "tcp" ); if( serv == NULL ) return 0; ----------------------------------------------------------- And the function getservbyname() always return NULL... Additionnal informations. Here is how I mount my Cygwin root directory: Device Directory Type Flags D:\Cygwin-root / native text!=binary P H I L I P P E N O E L Socomar International (1995) inc. -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com