delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/08/18/05:41:28

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:to:from:subject:date:message-id:mime-version
:content-type:content-transfer-encoding; q=dns; s=default; b=nzG
ID1DPblvcwRuL1z4urQyfst01IBJ/vTkHaIMO6rmNpiK1/BmZydUHNBeBy2jpkx3
dIezIeJaVuutzb/H0A47PBGymortsSpTBEQAQN7HGHiIPT6AaBVqk+z+0gdfa1qJ
aGX7AC2GeY1PlSDOjIWOcaaoFvD9ETCEF3koBRqY=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:to:from:subject:date:message-id:mime-version
:content-type:content-transfer-encoding; s=default; bh=IHOr7edFU
P10bJykfK3tb1ZXlCs=; b=lcQdGgDbKTcyCm3Yhc+ceYKdW4tR4mZHXZsC/4Gip
hSnes2TQfQREXJRmOZuAd/WUXKm2N151VkUNz8Klf41tdJ6XwO3Zd/9Smgat7yH2
PTbAAv2tV4r81wEkci5eo83RRW8dWRRx852GTzdxkW2eyj4qfrWXB/WNLubknWP+
vU=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2
X-HELO: plane.gmane.org
To: cygwin AT cygwin DOT com
From: Mark Geisert <mark AT maxrnd DOT com>
Subject: getent services enumeration glitch
Date: Tue, 18 Aug 2015 09:40:54 +0000 (UTC)
Lines: 15
Message-ID: <loom.20150818T113145-139@post.gmane.org>
Mime-Version: 1.0
User-Agent: Loom/3.14 (http://gmane.org/)
X-IsSubscribed: yes

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019