From owner-freebsd-hackers Fri Sep 12 22:03:05 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id WAA04208 for hackers-outgoing; Fri, 12 Sep 1997 22:03:05 -0700 (PDT) Received: from word.smith.net.au (ppp20.portal.net.au [202.12.71.120]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id WAA04179; Fri, 12 Sep 1997 22:02:53 -0700 (PDT) Received: from word.smith.net.au (localhost.smith.net.au [127.0.0.1]) by word.smith.net.au (8.8.7/8.8.5) with ESMTP id OAA00675; Sat, 13 Sep 1997 14:30:52 +0930 (CST) Message-Id: <199709130500.OAA00675@word.smith.net.au> X-Mailer: exmh version 2.0zeta 7/24/97 To: Ollivier Robert cc: hackers@FreeBSD.ORG, freebsd-bugs@FreeBSD.ORG Subject: Re: Memory leak in getservbyXXX? In-reply-to: Your message of "Fri, 12 Sep 1997 23:37:28 +0200." <19970912233728.62622@keltia.freenix.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 13 Sep 1997 14:30:50 +0930 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > According to Mike Smith: > > ie. it exits immediately. I tried various assortments of parameters > > (eg. network and native order on the port, NULL, "tcp", "udp", etc for > > the protocol). 8( > > getservbyport(3) expects the port to be in network order and using > > if (getservbyport (htons(23), NULL) == NULL) { This contradicts the documentation, which claims that the (port) argument is an int. It should be htonl(). See my other posting on this. mike