> On 09 Apr 2016, at 15:59, Marie Helene Kvello-Aune <mariehelen...@gmail.com> > wrote: > I've just pushed an initial version of libifconfig to the github > repository[2]. I would appreciate feedback, in particular on the API design > and usage, and especially on how it communicates error state to the > application. > Awesome. This is important work. I can’t be the only one who’s tired of writing ioctl() calls to set an IP address.
Is it still your intention to re-implement/refactor/re-whatever ifconfig to use this library? It seems like it’d be both a good test-case and a good way to ensure the library stays up to date, and grows new capabilities as features are added to the network stack. > Expect the API to break frequently/often for the time being, as it is still > in very early stages of development. I’ve had a quick look at the library so far, and have a few remarks. It might be better to have an explicit (opaque to the library user) handle to contain both the error state (libifconfig_errstate) and the open sockets (sdkeys). This would go a long way in making the library thread-safe (because users can now rely on their error state not getting clobbered by another thread). Bikeshedding: - libifconfig_ seems quite long for a prefix. Perhaps libifc_ or lifc_ ? - if (foo != NULL) free(foo); can be safely written as free(foo); Regards, Kristof _______________________________________________ freebsd-net@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"