Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Sep 1997 14:30:50 +0930
From:      Mike Smith <mike@smith.net.au>
To:        Ollivier Robert <roberto@keltia.freenix.fr>
Cc:        hackers@FreeBSD.ORG, freebsd-bugs@FreeBSD.ORG
Subject:   Re: Memory leak in getservbyXXX? 
Message-ID:  <199709130500.OAA00675@word.smith.net.au>
In-Reply-To: Your message of "Fri, 12 Sep 1997 23:37:28 %2B0200." <19970912233728.62622@keltia.freenix.fr> 

index | next in thread | previous in thread | raw e-mail

> 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




home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199709130500.OAA00675>