linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Wolfgang Grandegger <wg@grandegger.com>,
	Stephane Grosjean <s.grosjean@peak-system.com>,
	"linux-can@vger.kernel.org" <linux-can@vger.kernel.org>
Subject: Re: Is there any way of getting the CAN interfaces list, from any C program?
Date: Thu, 25 Apr 2013 11:20:10 +0200	[thread overview]
Message-ID: <5178F54A.1040407@pengutronix.de> (raw)
In-Reply-To: <20130425091547.GE448@vandijck-laurijssen.be>

[-- Attachment #1: Type: text/plain, Size: 2006 bytes --]

On 04/25/2013 11:15 AM, Kurt Van Dijck wrote:
> On Thu, Apr 25, 2013 at 09:35:35AM +0200, Marc Kleine-Budde wrote:
>> On 04/25/2013 09:07 AM, Marc Kleine-Budde wrote:
>>> On 04/25/2013 08:41 AM, Wolfgang Grandegger wrote:
>>>> Hi Kurt,
>>>>
>>>> On 04/24/2013 04:49 PM, Kurt Van Dijck wrote:
>>>>> Hi Stephane,
>>>>>
>>>>> I have written this some time ago, not using it actually.
>>>>> I tried a modular approach, don't know if its usefull.
>>>>>
>>>>> PS: I used attachments.
>>>>
>>>> ~/enumif$ ./enumif
>>>> 1: lo	{loopback} <LOOPBACK,UP,LOWER_UP> UNKNOWN
>>>> 2: eth0	{ether} <BROADCAST,MULTICAST> DOWN
>>>> 3: eth1	{ether} <BROADCAST,MULTICAST,UP,LOWER_UP> UNKNOWN
>>>> 4: eth3	{ether} <NO-CARRIER,BROADCAST,MULTICAST,UP> DOWN
>>>> 5: can0	{can} <NOARP,UP,LOWER_UP,ECHO> UNKNOWN
>>>> 6: can1	{can} <NOARP,ECHO> DOWN
>>>> 7: can2	{can} <NOARP,ECHO> DOWN
>>>> 8: can3	{can} <NOARP,ECHO> DOWN
>>>> 9: pan0	{ether} <BROADCAST,MULTICAST> DOWN
>>>>
>>>> Cool! We know that "ip link" does list all network interfaces but the
>>>> code doing the job is not really strength-forward. I think this would be
>>>> a nice enhancement of the can-utils.
>>>
>>> Good idea, Stephane, can you license the code under a permissive license
>>> like LGPL or BSD?
>>
>> Errr...sorry. It's Kurt, who posted that code.
> 
>> Kurt, can you give the code a nice license? :)
> What is needed for LGPL or BSD?
> Is there a short overview available?

If the code is LGPL we can include it in the libsocketcan. You are
allowed to link the library against your closed source application
(without to license under GPL). Any changes you make to the library have
to be made available as source code.

IANAL,
Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

  reply	other threads:[~2013-04-25  9:20 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-13 19:35 [RFC PATCH v2] can: sja1000: use common prefix for all sja1000 defines Oliver Hartkopp
2013-04-16 10:40 ` Marc Kleine-Budde
2013-04-24  9:06   ` Is there any way of getting the CAN interfaces list, from any C program? Stephane Grosjean
2013-04-24 14:49     ` Kurt Van Dijck
2013-04-25  6:41       ` Wolfgang Grandegger
2013-04-25  7:07         ` Marc Kleine-Budde
2013-04-25  7:35           ` Marc Kleine-Budde
2013-04-25  9:15             ` Kurt Van Dijck
2013-04-25  9:20               ` Marc Kleine-Budde [this message]
2013-04-25  7:24         ` Kurt Van Dijck
2013-04-25  7:43           ` Wolfgang Grandegger
2013-04-25  9:14             ` Kurt Van Dijck
2013-04-25  9:23               ` Marc Kleine-Budde
2013-04-25  9:42                 ` Kurt Van Dijck
2013-04-25 21:08                   ` Kurt Van Dijck
2013-04-24 21:02     ` François
2013-04-24 21:27       ` Marc Kleine-Budde
2013-04-25  8:04       ` Kurt Van Dijck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5178F54A.1040407@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=linux-can@vger.kernel.org \
    --cc=s.grosjean@peak-system.com \
    --cc=wg@grandegger.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).