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: List-Subscribe: List-Archive: List-Post: List-Help: , 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 Subject: getent services enumeration glitch Date: Tue, 18 Aug 2015 09:40:54 +0000 (UTC) Lines: 15 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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