svn commit: r304815 - in head: lib lib/libifc share/examples/libifc share/mk
Eric van Gyzen
vangyzen at FreeBSD.org
Thu Aug 25 20:28:58 UTC 2016
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
More information about the svn-src-head
mailing list