This is the mail archive of the
cygwin
mailing list for the Cygwin project.
getent services enumeration glitch
- From: Mark Geisert <mark at maxrnd dot com>
- To: cygwin at cygwin dot com
- Date: Tue, 18 Aug 2015 09:40:54 +0000 (UTC)
- Subject: getent services enumeration glitch
- Authentication-results: sourceware.org; auth=none
There is a glitch when getent enumerates all services; it shows an incorrect
port number. Providing a service name on invocation shows the correct port
number. Examples:
$ getent services man
man 9535/tcp
$ getent services | grep man
man 16165/tcp
It looks like when all services are enumerated there is an extra or missing
byte swap call to htons() or ntohs(). This can be observed by comparing the
hex values of the two port numbers shown above, giving 0x253F and 0x3F25.
..mark
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple