[Development] Adding 3rdpary libraries to QtSerialBus
Thiago Macieira
thiago.macieira at intel.com
Thu Aug 11 18:23:14 CEST 2016
On quinta-feira, 11 de agosto de 2016 16:18:22 PDT André Hartmann wrote:
> 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.
I have a preliminary patch that detects the interface type in
QNetworkInterface.
Just pushed at https://codereview.qt-project.org/167772.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Development
mailing list