From owner-freebsd-questions Wed Jan 30 9:41:19 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5]) by hub.freebsd.org (Postfix) with ESMTP id DF20637B402 for ; Wed, 30 Jan 2002 09:41:15 -0800 (PST) Received: from hades.hell.gr (patr530-a024.otenet.gr [212.205.215.24]) by mailsrv.otenet.gr (8.12.2/8.12.2) with ESMTP id g0UHf67q012257; Wed, 30 Jan 2002 19:41:07 +0200 (EET) Received: (from charon@localhost) by hades.hell.gr (8.11.6/8.11.6) id g0UHcK772327; Wed, 30 Jan 2002 19:38:20 +0200 (EET) (envelope-from keramida@freebsd.org) Date: Wed, 30 Jan 2002 19:38:20 +0200 From: Giorgos Keramidas To: sa kumar Cc: freebsd-questions@freebsd.org Subject: Re: How do I read if_data Message-ID: <20020130173820.GA72059@hades.hell.gr> References: <20020129235205.85924.qmail@web21309.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020129235205.85924.qmail@web21309.mail.yahoo.com> User-Agent: Mutt/1.3.25i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 2002-01-29 15:52:05, sa kumar wrote: > Can someone please tell me how to read if_data of a > specific layer 2 interface from the kernel. > > I have looked on the net and in TCP/IP illustrated, > but to no avail. From userland, you don't "read if_data". You call the proper ioctl()'s to fetch the data for you. If you mean from a kernel driver, then you probably want to start at src/sys/net/if_var.h and look at the definition of ifnethead: TAILQ_HEAD(ifnethead, ifnet); /* we use TAILQs ... */ -- Giorgos Keramidas . . . . . . . . . keramida@{ceid.upatras.gr,freebsd.org} FreeBSD Documentation Project . . . http://www.freebsd.org/docproj/ FreeBSD: The power to serve . . . . http://www.freebsd.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message