Date: Mon, 11 Apr 2016 22:31:52 +0200 From: Kristof Provost <kp@FreeBSD.org> To: Marie Helene Kvello-Aune <marieheleneka@gmail.com> Cc: freebsd-net@freebsd.org Subject: Re: libifconfig: Initial code available, looking for feedback Message-ID: <C6D42B75-5C78-45F1-8AFD-3CD8D2BF2E1D@FreeBSD.org> In-Reply-To: <CALXRTbfxxf%2BbUev8sBoJEOfR41ZsLnB35i%2B4G_2Bp=j-eVVJQQ@mail.gmail.com> References: <CALXRTbfxxf%2BbUev8sBoJEOfR41ZsLnB35i%2B4G_2Bp=j-eVVJQQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> On 09 Apr 2016, at 15:59, Marie Helene Kvello-Aune = <marieheleneka@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. >=20 Awesome. This is important work. I can=E2=80=99t be the only one who=E2=80= =99s 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=E2=80=99d 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=E2=80=99ve 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 !=3D NULL) free(foo); can be safely written as free(foo); Regards, Kristof=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C6D42B75-5C78-45F1-8AFD-3CD8D2BF2E1D>