libifconfig: A C API for ifconfig

dan_partelly dan_partelly at rdsor.ro
Sat Mar 5 11:31:02 UTC 2016


On Sat, 05 Mar 2016 10:55:08 +0000, Marie Helene Kvello-Aune
<marieheleneka at gmail.com> wrote:
> 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. :)

You should apply for a grant from FreeBSD foundation. It is my opinion
that 
they should pay money to ensure by any means necessary (including paying
for it)
that a big part of what are  today monolithic  utilities in base OS is 
factored into libraries.  

IMO, This is one of the most important projects FreeBSD could execute to
allow moving 
forward and meet the demands of the extremely dynamic computing world
which we 
already have today. 

This would solve one of the biggest issues FreeBSD has today, namely, very

poor binary code reuse (problem some tried to solve  with what is IMO a
technically 
poor and distasteful solution , namely  libxo-fication of base) 

I wish you good luck with this. It is a truly important project.




> 
> - Marie Helene
> 
> On Fri, Mar 4, 2016 at 7:16 PM Roman Bogorodskiy <novel at 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
>>
> _______________________________________________
> freebsd-net at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"


More information about the freebsd-net mailing list