Wolfgang Grandegger wrote:
> Stuart Longland wrote:
>> Ideally a meaningful description would be helpful (e.g.
>> "vcan0 - Virtual CAN Device" or "slcan0 - Lawicel CAN232 on
>> /dev/ttyUSB0") but I'm not sure that information is exposed anywhere,
>> just the device name itself ("vcan0" or "slcan0" in this example) would
>> suffice.
Such details e.g. for the LAWICAL USB could be also exposed by the USB
subssystem. But in the case you use the CAN232 with /dev/ttyS0 you need
something special ...
Regards,
Oliver
>>
>> Is it possible to generate such a list, and how would I go about it?
>
> The ifconfig or ip utilities list the network devices e.g.:
>
> # ip -d -s link
>
> I think the simplest way to get the list is to use the ioctl request
> "SIOCGIFCONF". Other ioctl request may then help to find out the
> protocol and device name used to isolate CAN devices. More details of a
> CAN device can be queried via netlink interface.
>
> Wolfgang.
_______________________________________________
Socketcan-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-users