Date: Mon, 28 Aug 1995 17:27:19 -0700 (PDT) From: Archie Cobbs <archie@tribe.com> To: questions@freebsd.org Subject: getservbyport() bug Message-ID: <199508290027.RAA29720@bubba.tribe.com>
next in thread | raw e-mail | index | archive | help
Why does getservbyport() return NULL in the following program?
#include <stdio.h>
#include <stdlib.h>
#include <netdb.h>
main()
{
printf("by port -> 0x%x\n", (int) getservbyport(21, NULL));
printf("by name -> 0x%x\n", (int) getservbyname("ftp", NULL));
}
Compile this with "cc -o foo foo.c". I daresay there is a bug in there
somewhere...
-Archie
_______________________________________________________________________________
Archie L. Cobbs, archie@tribe.com * Tribe Computer Works http://www.tribe.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199508290027.RAA29720>
