From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 88329 invoked by alias); 18 Aug 2015 09:41:09 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 88318 invoked by uid 89); 18 Aug 2015 09:41:08 -0000 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 Received: from plane.gmane.org (HELO plane.gmane.org) (80.91.229.3) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 18 Aug 2015 09:41:07 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZRdOB-0003B0-55 for cygwin@cygwin.com; Tue, 18 Aug 2015 11:41:03 +0200 Received: from 76-217-5-67.lightspeed.irvnca.sbcglobal.net ([76.217.5.67]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 18 Aug 2015 11:41:03 +0200 Received: from mark by 76-217-5-67.lightspeed.irvnca.sbcglobal.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 18 Aug 2015 11:41:03 +0200 To: cygwin@cygwin.com From: Mark Geisert Subject: getent services enumeration glitch Date: Tue, 18 Aug 2015 09:41:00 -0000 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 X-SW-Source: 2015-08/txt/msg00301.txt.bz2 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