public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Mark Geisert <mark@maxrnd.com>
To: cygwin@cygwin.com
Subject: getent services enumeration glitch
Date: Tue, 18 Aug 2015 09:41:00 -0000	[thread overview]
Message-ID: <loom.20150818T113145-139@post.gmane.org> (raw)

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

             reply	other threads:[~2015-08-18  9:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-18  9:41 Mark Geisert [this message]
2015-08-18 11:24 ` Corinna Vinschen
2015-08-18 17:27   ` Mark Geisert
2015-08-18 18:18     ` Corinna Vinschen
2015-08-18 18:43   ` Warren Young
2015-08-18 19:01     ` Corinna Vinschen
2015-08-18 21:49   ` Buchbinder, Barry (NIH/NIAID) [E]
2015-08-18 23:43     ` Mark Geisert
2015-08-19  7:46       ` [SILVERY GOLDSTAR] " Corinna Vinschen
2015-08-19 12:23         ` Andrew Schulman
2015-08-19 16:27           ` Corinna Vinschen
2015-08-19 16:50           ` Andrey Repin
2015-08-20 13:23             ` Andrew Schulman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20150818T113145-139@post.gmane.org \
    --to=mark@maxrnd.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).