Date: Sat, 05 Mar 2016 10:55:08 +0000 From: Marie Helene Kvello-Aune <marieheleneka@gmail.com> To: Roman Bogorodskiy <novel@freebsd.org> Cc: freebsd-net@freebsd.org Subject: Re: libifconfig: A C API for ifconfig Message-ID: <CALXRTbfAR0tMyytsR25MKzYORuQWoO2d%2Bc3ZBUZ_f_s=BEWvJA@mail.gmail.com> In-Reply-To: <56d9d113.8c21190a.dfb98.397d@mx.google.com> References: <CALXRTbdH__wM_g2Qmt17tobBXAjnamkTKcs28qRo0qy9_OOjUg@mail.gmail.com> <56d9d113.8c21190a.dfb98.397d@mx.google.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hey. I agree it would be useful to make libifconfig available for previous versions through ports. This is not something I'm focusing on right now, but I don't think there will be any trouble building the library outside of base. There's one potential problem I can think of right now: Kernel ABI may have changed between versions in a way that affects libifconfig, but if this is the case it should be relatively easy to deal with. I've added this concern to the list of things to consider when closer to completion. :) - Marie Helene On Fri, Mar 4, 2016 at 7:16 PM Roman Bogorodskiy <novel@freebsd.org> wrote: > Marie Helene Kvello-Aune wrote: > > > Hey! > > > > I'm currently working on a library called 'libifconfig' which will > provide > > a C API to do the actual work that /sbin/ifconfig currently does, except > > that of lib80211. What sparked this project was a wish to simplify > > maintenance of the ifconfig program by making it primarily focus on the > > user's command line interaction, and not so much on the specifics of how > > those things are done behind the scenes. > > > > One advantage to having such a library is to reduce code duplication and > > thus improve maintainability, and another is that it would make it easier > > for third party programs to query the network stack without having to > spawn > > ifconfig and parse its output. I'm sure there's more, but those were the > > ones at the top of my head when writing this e-mail. > > Hi, > > This is a great idea. It's a bit disappointing to re-implement common > stuff like getting a list of interfaces or obtaining MAC address or IP > address of the interface over and over again in third party apps. > > One question that's interesting to me though: is it planned to provide > support for this lib outside of the base? I mean, if the lib will be > added in, say, 11.x, and I want to use it from my third-party > application, will it be possible to e.g. install it from ports for 9.x or > 10.x so I don't have to support 2 version of the code, one that uses > libifconfig and one that e.g. parses ifconfig(8) output? > > Roman Bogorodskiy >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALXRTbfAR0tMyytsR25MKzYORuQWoO2d%2Bc3ZBUZ_f_s=BEWvJA>