From owner-freebsd-questions Sat Jul 6 04:56:00 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id EAA21513 for questions-outgoing; Sat, 6 Jul 1996 04:56:00 -0700 (PDT) Received: from palmer.demon.co.uk (palmer.demon.co.uk [158.152.50.150]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id EAA21502 for ; Sat, 6 Jul 1996 04:55:55 -0700 (PDT) Received: from palmer.demon.co.uk (localhost [127.0.0.1]) by palmer.demon.co.uk (sendmail/PALMER-2) with ESMTP id MAA21553; Sat, 6 Jul 1996 12:46:03 +0100 (BST) To: "Brian J. McGovern" cc: questions@FreeBSD.ORG From: "Gary Palmer" Subject: Re: Interface info... In-reply-to: Your message of "Thu, 04 Jul 1996 00:36:17 EDT." <199607040436.AAA13070@spoon.beta.com> Date: Sat, 06 Jul 1996 12:46:02 +0100 Message-ID: <21551.836653562@palmer.demon.co.uk> Sender: owner-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk "Brian J. McGovern" wrote in message ID <199607040436.AAA13070@spoon.beta.com>: > Are there any prebuilt functions for looking at the packet info of an > Ethernet interface (a la netstat)? Just curious, as i can look at the > filesystem(s) with fsstat. Thanks. Define ``looking at the packet info'' please. You can ``sniff'' the ethernet with tcpdump, and `netstat -ib' gives packet & byte counters on a per-interface basis. `netstat -a -finet' gives all open sockets on the system (including `server' sockets which are listening for incoming connections). If you are looking for an association socket <-> process, look at `netstat -A' and then you can match the PCB address with that reported by `fstat'. (e.g. from my machine) : root@palmer:/> netstat -A Active Internet connections PCB Proto Recv-Q Send-Q Local Address Foreign Address (state) f0877000 tcp 0 0 localhost.ppp localhost.xinupage ESTABLISHED f0883800 tcp 0 0 localhost.xinupage localhost.ppp ESTABLISHED root@palmer:/> fstat | grep f0883800 gary telnet 14908 3* internet stream tcp f0883800 root@palmer:/> That is about all the information that is ``readily'' available on ethernet type interfaces and the `packet information'. If you use `trafshow' from ports, you can get some sort of display of active traffic on your local ethernet segment, but I haven't actually used this myself. Gary -- Gary Palmer FreeBSD Core Team Member FreeBSD: Turning PC's into workstations. See http://www.FreeBSD.ORG/ for info