Hi Edward,
> How hard would it be to teach QNetworkInterface how to detect
> CAN-iness in the interfaces it's clearly able to enumerate ?
I'm currently trying to find this out. What I know so far, is that
you can compare "something" to
#define ARPHRD_CAN 280
to find out the interface is of type SocketCAN. As there are more of
these definitions in /usr/include/linux/if_arp.h, a generic way to get
the "type" of an interface could be added to QNetworkInterface.
Maybe someone with more Linux programming knowlegde has a hint -
libenumif surely knows it, but looks like a sledgehammer for my small
problem.
Cheers,
Andre
Am 11.08.2016 um 15:47 schrieb Edward Welbourne:
André Hartmann
[Re-sent as I think something went wrong the first time,
the mail did not appear in the archive.]
I haven't seen it before, at least.
In this thread, Kurt Van Dijck proposed his network interface
enumeration library [2], licensed under LGPL V3, which perfectly allows
to query all SocketCAN devices. QNetworkInterface::allInterfaces() lists
them too, but there is for now no way to find out which of them are
SocketCAN interfaces.
[2] https://github.com/kurt-vd/enumif
How hard would it be to teach QNetworkInterface how to detect CAN-iness
in the interfaces it's clearly able to enumerate ?
Eddy.
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development