From owner-freebsd-net Thu Mar 1 8: 0:14 2001 Delivered-To: freebsd-net@freebsd.org Received: from tao.org.uk (unknown [194.128.198.234]) by hub.freebsd.org (Postfix) with ESMTP id 9763D37B718 for ; Thu, 1 Mar 2001 08:00:11 -0800 (PST) (envelope-from joe@tao.org.uk) Received: by tao.org.uk (Postfix, from userid 100) id E891D313F; Thu, 1 Mar 2001 16:00:08 +0000 (GMT) Date: Thu, 1 Mar 2001 16:00:08 +0000 From: Josef Karthauser To: net@freebsd.org Subject: Stat counters for interfaces. Message-ID: <20010301160008.E726@tao.org.uk> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="ILuaRSyQpoVaJ1HG" Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org --ILuaRSyQpoVaJ1HG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline A few months ago I added a struct if_data to struct ifaddr for keeping stats on a per interface address basis. Not all protocols current use this though, and not all values are meaningful. What I'd like to do is preload the members that aren't being used with -1, and then detect this in 'netstat -in' and print '-' instead of '0'. Does this make sense, or is it a hack :) ? The members of this structure carrying statistics are currently u_long, and so maybe I should use ULONG_MAX instead? Any opinions? Joe --ILuaRSyQpoVaJ1HG Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (FreeBSD) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjqecgcACgkQXVIcjOaxUBYslQCgzLnDabxeiTjxbyQhRs0sIVOa 6n4AoMjyRVP5xJ5/AYosti8N/RBd6aHP =0RE5 -----END PGP SIGNATURE----- --ILuaRSyQpoVaJ1HG-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message