From owner-freebsd-bugs Tue Aug 27 7:10:13 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C31F537B401 for ; Tue, 27 Aug 2002 07:10:06 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1F25743E88 for ; Tue, 27 Aug 2002 07:10:06 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g7REA5JU025177 for ; Tue, 27 Aug 2002 07:10:05 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g7REA5KJ025176; Tue, 27 Aug 2002 07:10:05 -0700 (PDT) Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C92E737B400 for ; Tue, 27 Aug 2002 07:05:04 -0700 (PDT) Received: from www.freebsd.org (www.FreeBSD.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8CB4D43E7B for ; Tue, 27 Aug 2002 07:05:04 -0700 (PDT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.4/8.12.4) with ESMTP id g7RE54OT070355 for ; Tue, 27 Aug 2002 07:05:04 -0700 (PDT) (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.4/8.12.4/Submit) id g7RE54eg070354; Tue, 27 Aug 2002 07:05:04 -0700 (PDT) Message-Id: <200208271405.g7RE54eg070354@www.freebsd.org> Date: Tue, 27 Aug 2002 07:05:04 -0700 (PDT) From: Mark Rekai To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: misc/42084: PicoBSD's 'netstat -i' reports negative Ipkts count. Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 42084 >Category: misc >Synopsis: PicoBSD's 'netstat -i' reports negative Ipkts count. >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Aug 27 07:10:05 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Mark Rekai >Release: PicoBSD 4.6.2 >Organization: >Environment: >Description: 'netstat -i' counters on PicoBSD's tinyware ns / netstat are displayed as signed with a %d in printf function. High counter values are displayed as negative. The incorrectly displayed data ultimately comes from an if_data struct (net/if.h). Variables decalred in this structure that are incorrectly displayed by tinyware ns / netstat are all unsigned. Easy to see the problem with looking at printfs in ns.c from tinyware ns and comparing the way the printed data is declared in the if.h header. >How-To-Repeat: Try it on a box with lots of lots of traffic. >Fix: printf with %lu instead. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message