From owner-freebsd-questions Mon Aug 28 17:27:58 1995 Return-Path: questions-owner Received: (from majordom@localhost) by freefall.FreeBSD.org (8.6.11/8.6.6) id RAA02537 for questions-outgoing; Mon, 28 Aug 1995 17:27:58 -0700 Received: from bubba.tribe.com ([205.184.207.7]) by freefall.FreeBSD.org (8.6.11/8.6.6) with ESMTP id RAA02527 for ; Mon, 28 Aug 1995 17:27:55 -0700 Received: (from archie@localhost) by bubba.tribe.com (8.6.11/8.6.9) id RAA29720 for questions@freebsd.org; Mon, 28 Aug 1995 17:27:19 -0700 From: Archie Cobbs Message-Id: <199508290027.RAA29720@bubba.tribe.com> Subject: getservbyport() bug To: questions@freebsd.org Date: Mon, 28 Aug 1995 17:27:19 -0700 (PDT) X-Mailer: ELM [version 2.4 PL24] Content-Type: text Content-Length: 556 Sender: questions-owner@freebsd.org Precedence: bulk Why does getservbyport() return NULL in the following program? #include #include #include 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