From owner-freebsd-net@freebsd.org Sun May 6 00:42:08 2018 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB4DFFC1104; Sun, 6 May 2018 00:42:07 +0000 (UTC) (envelope-from jinmei.tatuya@gmail.com) Received: from mail-lf0-f49.google.com (mail-lf0-f49.google.com [209.85.215.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 67F0C738FF; Sun, 6 May 2018 00:42:07 +0000 (UTC) (envelope-from jinmei.tatuya@gmail.com) Received: by mail-lf0-f49.google.com with SMTP id j193-v6so35793881lfg.6; Sat, 05 May 2018 17:42:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rJYe38PTlfc2Py3GboEFdHpV2NryoPnqFK2htxyXhv0=; b=pIBC0TxgvJjzUrFNnlLmSJ++J1/kThcxjjob1y9SITdnDixdD5X++FS1mTGioyDEnc Ukye7IhLECFOkU/1ndyzTy6aDDy22i2+CirLSqdYPJq4Mimjcx4KqkuDYyNHvzuAB/EZ N9TMkIIKFTeAY1zDbWJNPI0SAyqQ9QsTuW4H/2QvJvcqX2K0E9vLsJfHxonR94EgYeLE l08wt8aBejnJS3OuA80YyiqU3v0gKirpWyi2ZWiHF+8/+nsyNX+PGTJf11mfYaFTIZqL JkTACC8cwWgwz4FlA8xUlHFV4AEZxuIRHs5giytuaFbxFloTFRsXuTm4WjVhPpXY5/eV MAng== X-Gm-Message-State: ALQs6tCd+xqh2uFjFd7n4DFZ5ENOyYaqHbGQywydDu49nkbrTyA3sxCE /0dTyuAMzdo7Rd05VE2DQAesy0C8hRU1qgSfIYjxV4DS X-Google-Smtp-Source: AB8JxZqy+gPs4E3aMTXefPgalNjwvNFFSNKi6MR9zc5TiYAhIjgPGhVsfQzzy9Srm8GAkegwECwG3r5OIj+b4e6ShA4= X-Received: by 2002:a2e:3c04:: with SMTP id j4-v6mr21146960lja.149.1525567319744; Sat, 05 May 2018 17:41:59 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: =?UTF-8?B?56We5piO6YGU5ZOJ?= Date: Sun, 06 May 2018 00:41:49 +0000 Message-ID: Subject: Re: netstat(1) -s -f is broken To: bu7cher@yandex.ru Cc: dieterbsd@gmail.com, FreeBSD Net , freebsd-hackers@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 May 2018 00:42:08 -0000 At Fri, 4 May 2018 13:19:57 +0300, "Andrey V. Elsukov" wrote: > > Doesn't work with -p either. > > netstat -I lo0 -s -p udp > > :udp: no per-interface stats routine > > > > It would be very useful if this actually worked. > Only IPv6 and ICMPv6 have per-interface statistics counters. Other > protocols don't have such support. That's how I remember why per-interface statistics was originally provided only for IPv6, but RFC4293 extended the concept to IPv4 (interestingly RFC4293 also seems to effectively deprecate per-interface ICMPv6 statistics). So it would make sense to make '-I -s -f inet' now works. The UDP case is totally different - as far as I remember there has never been per-interface UDP statistics defined in the form of RFC MIBs, so it's actually reasonable to emit an error against '-I -s -p udp'. -- JINMEI, Tatuya