Commit Graph

10 Commits (813080ad197929d2f25d2678ef3e841603e686c4)

Author SHA1 Message Date
Marc Kleine-Budde b10cc9a7ec Merge branch 'master' of https://git.pengutronix.de/git/tools/libsocketcan 2018-10-05 10:58:08 +02:00
Leo Ruan 9679a3f50a Add interface to retrieve link statistics
This commit adds an interface to get the statistics (64-bits) from
CAN interface. See more information from /usr/include/linux/if_link.h
where defines the struct rtnl_link_stats64.

Compare to the rtnl_link_stats, rtnl_link_stats64 was introduced
since linux kernel 2.6. After that the rtnl_link_stats is synchronous
with struct rtnl_link_stats64 by truncating each member from 64 bits
to 32 bits. Actually, the struct rtnl_link_stats is kept for
compatibility.

Signed-off-by: Leo Ruan <tingquan.ruan@cn.bosch.com>
Signed-off-by: Mark Jonas <mark.jonas@de.bosch.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2018-08-08 12:28:57 +02:00
Kurt Van Dijck 3a2cec63a4 allow linking from c++
libsocketcan with c++ fails linking.

Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2011-10-18 13:26:48 +02:00
Kurt Van Dijck 6db5d772b4 add can_get_device_stats()
When using libsocketcan on git://git.pengutronix.de/git/tools/libsocketcan.git,
I kind of missed a method to fetch the can device statistics.
This patch adds that functionality.
I think this is the proper library to put such function.

Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2011-10-18 13:26:48 +02:00
Luotao Fu cbe29b66de add berr counter call prototype to library header
Signed-off-by: Luotao Fu <luotao@alea.(none)>
2010-02-14 18:57:03 +01:00
Luotao Fu d75a02c13d remove dependency on kernel header include
make a local copy of the can/netlink.h. This way we don't have to include a
kernel include directory to build any more.

Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
2009-12-11 16:07:12 +01:00
Luotao Fu 6f0eac7ab9 add doxygen documentation
Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
2009-12-08 15:54:53 +01:00
Wolfgang Grandegger 463ac873c7 Add can_get_bittiming_const()
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Acked-by: Luotao Fu <l.fu@pengutronix.de>
2009-12-01 10:20:41 +01:00
Luotao Fu b2306d4979 splitted up set_bitrate
we now have can_set_bitrate and can_set_bitrate_samplepoint. The second is for
convenience for the developer. We tend to let the kernel use CIA recommnended
sample point value, which can_set_bitrate simply does

Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
2009-11-27 13:27:11 +01:00
Luotao Fu 257877f315 rename library and API prefix
library is now called libsocketcan, API carry the prefix can_

Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
2009-11-27 11:53:45 +01:00