Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Aug 2016 15:28:57 -0500
From:      Eric van Gyzen <vangyzen@FreeBSD.org>
To:        Kristof Provost <kp@FreeBSD.org>, John Baldwin <jhb@freebsd.org>, Marie Helene Kvello-Aune <marieheleneka@gmail.com>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r304815 - in head: lib lib/libifc share/examples/libifc share/mk
Message-ID:  <1dc03c53-145c-ef13-61d3-2533951280a2@FreeBSD.org>
In-Reply-To: <1A050E0F-4B9F-420A-97C6-C203B92A5F3F@FreeBSD.org>
References:  <201608251940.u7PJePv3023083@repo.freebsd.org> <23395083.lPEyYQ7ZbW@ralph.baldwin.cx> <1A050E0F-4B9F-420A-97C6-C203B92A5F3F@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 08/25/2016 15:20, Kristof Provost wrote:
> On 25 Aug 2016, at 22:14, John Baldwin wrote:
>> On Thursday, August 25, 2016 07:40:25 PM Kristof Provost wrote:
>>> Author: kp
>>> Date: Thu Aug 25 19:40:25 2016
>>> New Revision: 304815
>>> URL: https://svnweb.freebsd.org/changeset/base/304815
>>>
>>> Log:
>>>   Add libifc, a library implementing core functionality that exists
>>> in ifconfig(8) today.
>>>
>>>   libifc (pronounced lib-ifconfig) aims to be a light abstraction
>>> layer between
>>>   programs and the kernel APIs for managing the network configuration.
>>>   This should hopefully make programs easier to maintain, and reduce
>>> code
>>>   duplication.
>>>
>>>   Work will begin on making ifconfig(8) use this library in the near
>>> future.
>>>
>>>   This code is still evolving. The interface should not be considered
>>> stable until
>>>   it is announced as such.
>>
>> I hate even writing this mail, and it looks like the topic wasn't really
>> discussed in the review, but I think libifconfig is probably the "better"
>> name if the goal is to move most of ifconfig into it.  Certainly if a
>> developer is looking for a library that provides a programmatic interface
>> to the same operations a user does via ifconfig, libifconfig is the name
>> they will look for first.
>>
>> One thing I did see in the review is that the APIs use 'ifc_*' and
>> that was
>> the reason given for renaming the library.  If you really want those
>> to be
>> in sync, I actually think the longer 'ifconfig_*' prefix isn't that
>> terrible.
>> We have other libraries that use similar length names and namespace
>> prefixes
>> already (libarchive, libdevctl, libdevinfo, libpthread).
>>
>> Hmm, it seems you are 'libifc_*'.  Most of our libraries do not include
>> 'lib' in the namespace prefix (see above examples that all use the
>> name of
>> the library without 'lib' as the prefix).  If nothing else I'd suggest
>> dropping 'lib' to be consistent with most other libraries in the tree.
> 
> This is the right time to bring this sort of thing up. One of the reasons
> I pushed to get this in the tree in this very early state was to provoke
> exactly this sort of response. Right now the work is still in an early
> state
> and changing this sort of thing is still possible.
> 
> The name was in fact discussed privately, and we figured libifconfig was
> a bit
> on the long side.
> 
> I certainly take your point about libifc_. Does anyone else have any
> views regarding
> the naming (or other subjects)?

I'm on the same page as John about the naming:  The library should be
libifconfig, and the functions should begin with "ifconfig_".

Thanks for this contribution, Marie.  I've wanted it many times in the past.

Eric



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1dc03c53-145c-ef13-61d3-2533951280a2>