From owner-freebsd-net@freebsd.org Fri Mar 4 18:16:55 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2FFAA09354 for ; Fri, 4 Mar 2016 18:16:55 +0000 (UTC) (envelope-from bogorodskiy@gmail.com) Received: from mail-lb0-x242.google.com (mail-lb0-x242.google.com [IPv6:2a00:1450:4010:c04::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 502129E6 for ; Fri, 4 Mar 2016 18:16:55 +0000 (UTC) (envelope-from bogorodskiy@gmail.com) Received: by mail-lb0-x242.google.com with SMTP id vk4so5658972lbb.1 for ; Fri, 04 Mar 2016 10:16:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:sender:date:from:to:cc:subject:references:mime-version :content-disposition:in-reply-to:user-agent; bh=4jdFzX+3xgvG0YbCZ16rhZx9LzaaoabFYU0aHBMFsxk=; b=IBQFLWgC+bXEA4O2d6DBppHFbBMPyNYhRzyQOY9JUsyt4XFBuJ3jaHcRnZOAr9YcdI eVCzfX05dBDsMzQLmgdl+ahtBlNzg4CkqFOBZ9T8WS6Ly3koseyuhGPgY+Imwdunipk4 hFuMdcjAcEm78pHGECe0F1jeDuO/jIx5d/uxXT3zb08sf6YILTTFxAVeD+PC+5W6RhbS HqgGjFrhdgCWDoRHVWDYWzPZITdcVC3tbGrqnr6UJsZAzi1HeWScJoMqTflAk3QnnwOW ttMfJKTT02SIs92njYXdICABXjYAwkpoaXWGEpCZJcH3vyHmT/+070Ac4Siw4ECsx8cy tmbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:sender:date:from:to:cc:subject :references:mime-version:content-disposition:in-reply-to:user-agent; bh=4jdFzX+3xgvG0YbCZ16rhZx9LzaaoabFYU0aHBMFsxk=; b=Gx7zrmdAraUhXe6qYXi+5O4nW8j8PHpDiqT055SInIogbRSXnCNf+E0SvShjcoYwbU B8NiV+mAo02bBzd6F86P5n03GUmnGAZjufGGEMtYmkJ0R34AagE7NSs9Q38mU21K+5Md /EaH5EIQnLx9g5ytsR+GsyUrVnEKTg0uHLsiMAASQlPLQpd1tcZpMHKvDxkZ2/n9Om6V IlErAKE4FqtszmzzeSHdALqoH14QTLnOUkBzdg8jvI+gU5vXkQR3xDPkW7vKsMJDgQvP 5YIPiYnCwQYXOt+zHjzFQsFqpiAxccna9eIDENXMVqitoZotakGK2upRWBYJm1fpwCPK R0Zg== X-Gm-Message-State: AD7BkJLaed/0OJsOSM6Z+dC3loBKYEF6oVD3pJOuOCRgogk1JC7cKp1nui9DEzfJBYBqVg== X-Received: by 10.25.153.12 with SMTP id b12mr3647705lfe.117.1457115412581; Fri, 04 Mar 2016 10:16:52 -0800 (PST) Received: from kloomba.lvv.mirantis.netpoz.mirantis.netsjc.mirantis.netsnv.mirantis.netinfra.mirantis.netdevops.mirantis.netmosi.mirantis.netbud.mirantis.netscc.mirantis.netvm.mirantis.netssl.mirantis.netmsk.mirantis.netsrt.mirantis.netkha.mirantis.netmnv.mirantis.net ([217.65.211.164]) by smtp.gmail.com with ESMTPSA id h134sm784345lfh.3.2016.03.04.10.16.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Mar 2016 10:16:51 -0800 (PST) Message-ID: <56d9d113.8c21190a.dfb98.397d@mx.google.com> X-Google-Original-Message-ID: <20160304181642.GA10040@kloomba.lvv.mirantis.netpoz.mirantis.netsjc.mirantis.netsnv.mirantis.netinfra.mirantis.netdevops.mirant Sender: Roman Bogorodskiy Date: Fri, 4 Mar 2016 21:16:44 +0300 From: Roman Bogorodskiy To: Marie Helene Kvello-Aune Cc: freebsd-net@freebsd.org Subject: Re: libifconfig: A C API for ifconfig References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Q68bSM7Ycu6FN28Q" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Mar 2016 18:16:55 -0000 --Q68bSM7Ycu6FN28Q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Marie Helene Kvello-Aune wrote: > Hey! >=20 > 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. >=20 > 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 spa= wn > 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 --Q68bSM7Ycu6FN28Q Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJW2dEKAAoJEMltX/4IwiJq3osH/iq16jxrVT1rcfoBxwD9aopw XRwrErtH5lpxOEAUkhmlmc7rljhpATsehunDP4m34sYTe3C0bqHKUhAJnaFWaSUQ +MqqYBySeokgpeC4xm4queFa6/Knw0mXzsUcKKATrOhR7uEvnEs6yZOXPmwwG3iu g371hUD2sVwT9gwTOb5AKLixk51BbbG3CAEQoODDQyNL8tFmW13SsM38yIHWFrjN Tlz0iE3z8eqQ8wOFRiRUBxtbLuifv7U3anUoJMSdMiBA+BOuJ5qnB0Z2PHvhFEMq aGQjNzZQTT2kgz6JILxxakAYgbifQETal7UXh6FFesCBb+Bxd1KjwAkWCJVmV1M= =kdkR -----END PGP SIGNATURE----- --Q68bSM7Ycu6FN28Q--