Subject: Re: [PATCH] Virtual ethernet tunnel (v.2)

From: Patrick McHardy <[email-masked]>
Date: Mon, 11 Jun 2007 13:42:57 +0200

Ben Greear wrote:
> Pavel Emelianov wrote:
> 
>>> I would also like some way to identify veth from other device types,
>>> preferably
>>> something like a value in sysfs.   However, that should not hold up
>>>     
>>
>>
>> We can do this with ethtool. It can get and print the driver name of
>> the device.
>>   
> 
> I think I'd like something in sysfs that we could query for any
> interface.  Possible return
> strings could be:
> VLAN
> VETH
> ETH
> PPP
> BRIDGE
> AP /* wifi access point interface */
> STA /* wifi station */
> ....
> 
> I will cook up a patch for consideration after veth goes in.

The rtnl_link API gives you the name of the driver (IFLA_INFO_KIND).