Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Mar 2013 10:53:42 -0500
From:      George Neville-Neil <gnn@neville-neil.com>
To:        h bagade <bagadeh@gmail.com>
Cc:        freebsd-net@freebsd.org
Subject:   Re: how to get mac address info in kernel code?
Message-ID:  <8EB66934-D33C-425E-A076-66E31B618DCA@neville-neil.com>
In-Reply-To: <CAARSjE3h87y00_JeurzPzmkDaU5C58v=iLB-etwJ0RdtLh5f%2Bg@mail.gmail.com>
References:  <CAARSjE3h87y00_JeurzPzmkDaU5C58v=iLB-etwJ0RdtLh5f%2Bg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Mar 5, 2013, at 08:54 , h bagade <bagadeh@gmail.com> wrote:

> Hi all,
>=20
> I need to get interface MAC address within the kernel code and I =
couldn't
> use "getifaddrs" because it's user-mode. How can I have the MAC =
address
> information within kernel code?
>=20
> Any hints or comments are really appreciated.

If you have access to the struct ifnet you can look at the if_addr =
member, which is
a struct ifaddr, defined in if_var.h .

Best,
George







Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8EB66934-D33C-425E-A076-66E31B618DCA>