Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Dec 2017 21:45:24 -0500
From:      Farhan Khan <khanzf@gmail.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: where ifconfig's socket binds to the interface?
Message-ID:  <CAFd4kYAf8PJKnTNcHRfaeZKLp%2Bm%2BB6OgSYFg-3jd9mq3Gg3mAQ@mail.gmail.com>
In-Reply-To: <CADdTf%2BgAj2_j%2Bk_Ri%2B6ECg2WN8YKfQiiJa%2BfjBJwp23PMZPWZQ@mail.gmail.com>
References:  <CAFd4kYB-gZFJHJbpnZ1kLXgQuuWvtOY-XEJMK6eXiifENobdnA@mail.gmail.com> <CADdTf%2BgAj2_j%2Bk_Ri%2B6ECg2WN8YKfQiiJa%2BfjBJwp23PMZPWZQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
I reviewed this about 6 months ago and had forgotten it took place there as
an ioctl(2) argument. Thank you for reminding me!

--
Farhan Khan
PGP Fingerprint: B28D 2726 E2BC A97E 3854 5ABE 9A9F 00BC D525 16EE

On Sun, Dec 3, 2017 at 7:59 PM, Matt Joras <matt.joras@gmail.com> wrote:

> On Sun, Dec 3, 2017 at 4:43 PM, Farhan Khan <khanzf@gmail.com> wrote:
> > Hi all,
> >
> > Does anyone know where in ifconfig(8)'s source it opens a socket and
> > connects that to the specified interface? I see the socket(2) call in
> > /usr/src/sbin/ifconfig/ifconfig.c. The while-loop at 767 seems to
> iterate
> > through each command. But I can't seem to locate where it connects that
> > socket(2) to the provided interface.
> >
> > Any ideas?
> > Thanks!
> >
> > --
> > Farhan Khan
> > PGP Fingerprint: B28D 2726 E2BC A97E 3854 5ABE 9A9F 00BC D525 16EE
> There is no notion of "connecting" to an interface with the socket
> opened by ifconfig(8). The socket in question is used as the parameter
> to the various ioctl(2) calls. See e.g. the setifmtu function for an
> example usage.
>
> Matt Joras
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFd4kYAf8PJKnTNcHRfaeZKLp%2Bm%2BB6OgSYFg-3jd9mq3Gg3mAQ>