Skip to contentSkip to conversation

SocketCAN version numbering

DISCUSSION Heinz-Jürgen Oertel 3 participants 3 messages Apr 27, 2012 CAN network drivers

lore
Share & tools
lore
#0 lore raw

Hello,

What is the suggested way to get the SocketCAN version number?
On my two systems, according to Documentation/networking/can.txt, I always get

 $ cat /proc/net/can/version
 rev 20090105 abi 8

on different systems.
But one has support for error counters the other not with the same interface board

Regards
Heinz

#1 lore raw

Hello Heinz,

Quoted 8 lines · Heinz-Jürgen Oertel

Hello,

What is the suggested way to get the SocketCAN version number?
On my two systems, according to Documentation/networking/can.txt, I always get

 $ cat /proc/net/can/version
 rev 20090105 abi 8

This is for the CAN protocol implementation but I'm not sure if it's well maintained...

Quoted 2 lines

on different systems.
But one has support for error counters the other not with the same interface board

... and for CAN drives we do not maintain extra version number. Usually, the kernel version is used to understand if a feature exists or is supported. For the bus error counter and such features, capability flags would be a nice to have, though Anyway, what would you like to use the berr_counters for? If they are not available, a netlink request will return an error.

Wolfgang.

#2 lore raw
In reply to Heinz-Jürgen Oertel
Quoted 8 lines · Heinz-Jürgen Oertel

What is the suggested way to get the SocketCAN version number?
On my two systems, according to Documentation/networking/can.txt, I always get

  $ cat /proc/net/can/version
  rev 20090105 abi 8

on different systems.
But one has support for error counters the other not with the same interface board

Hello Heinz,

the version number is intended for the network layer stuff located in linux/net/can and not for the CAN drivers.

Generally the version number is obsolete as it is part of the Kernel and therefore e.g. the ABI for applications has to be stable and backwards compatible.

Btw. i think when adding support for CAN FD we should indicate that with a new version number and ABI version 9.

When there are new functionalities that are implemented in a specific Kernel version, you may use the uname() function to retrieve the Kernel version.

http://www.kernel.org/doc/man-pages/online/pages/man2/uname.2.html

Or check if a new function is known or not.

Regards,
Oliver