Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Apr 2007 15:23:14 -0400
From:      Lowell Gilbert <freebsd-questions-local@be-well.ilk.org>
To:        bsenthil <bsenthil@adventnet.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: get/set ifconfig details
Message-ID:  <44r6qsqbj1.fsf@be-well.ilk.org>
In-Reply-To: <461B66F9.1060309@adventnet.com> (bsenthil@adventnet.com's message of "Tue\, 10 Apr 2007 15\:59\:13 %2B0530")
References:  <461B66F9.1060309@adventnet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
bsenthil <bsenthil@adventnet.com> writes:

> Is there any 'C' method API to get/ set ip address of the interface card.
> Is there any 'C' method API to get ifconfig details of the interface card.
> Is there any 'C' method API to set ifconfig details of the interface card.
>
> I try to get through "sysctl()" ... Is there any c sample code to get
> ifconfig details ....

How about the source code for ifconfig?  [/usr/src/sbin/ifconfig]
It's not simple, because it does a lot of things, but it is the best
example of "ifconfig" type information.

Note that it deals with an IP interface abstraction, not with an
interface card directly.  There can be more (or less) than one address
on an interface.  You need to understand a little better what you are
actually after.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44r6qsqbj1.fsf>