Commit Graph

82 Commits (5938ac70cb46673fd8ca47d217db3e4b1ddea31a)

Author SHA1 Message Date
Nikita Edward Baruzdin 5938ac70cb Update CAN netlink header
Signed-off-by: Nikita Edward Baruzdin <nebaruzdin@gmail.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2014-07-22 16:22:06 +02:00
Marc Kleine-Budde 0c91940da1 GNUmakefile: include LICENSE file in tarball
Reported-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2014-03-24 10:33:34 +01:00
Marc Kleine-Budde 4608afb987 configure: back to trunk
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2014-03-24 10:33:34 +01:00
Marc Kleine-Budde 51f1610160 v0.0.10
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2014-03-19 10:14:24 +01:00
Marc Kleine-Budde c2f7f8e9b2 autogen-oldtools.sh: remove
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2014-03-19 10:14:24 +01:00
Robert Schwebel c503a5bc60 configure.ac: add hints from autoupdate
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2014-03-19 10:13:55 +01:00
Alexander Shiyan 0c4609f54f libsocketcan: Remove excess gotos.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2014-02-07 10:47:59 +01:00
Alexander Shiyan 24500fcaca libsocketcan: Fix return value for get{set}_link() function
This patch makes return value negative when open_nl_sock() function
fail and removes excess labels.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2014-02-06 11:45:55 +01:00
Alexander Shiyan 9a28d69183 Optimize can_do_restart() function
This patch optimizes can_do_restart() function by reusing some part
of code from existing set_link() function.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2014-01-31 11:12:20 +01:00
Alexander Shiyan d9469850ac Use "%u" printf-format specifier for unsigned variable
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2014-01-31 11:12:14 +01:00
Yegor Yefremov 9db8e13d5e README: typos and beautification
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2014-01-16 17:51:26 +01:00
Jan Engelhardt 8ec77c4e7e build: fix bracket imbalance
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2013-01-06 18:31:46 +01:00
Jan Engelhardt 9a889d52d0 build: avoid expansion of commented macros
'#' does not ignore the line at the m4 level, "dnl" does.

Signed-off-by: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2013-01-06 18:31:45 +01:00
Wolfram Sang d5deaf6296 libsocketcan: add LICENSE file
Took LGPL v2.1+ from the FSF website which is stated in libsocketcan.c.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2012-11-28 13:11:14 +01:00
Alexander Stein 94094cc4ee Use strcmp instead of sizeof on char* string
This bug was detected by the clang warning:
libsocketcan.c:384:16: warning: argument to 'sizeof' in 'strncmp' call
is the same expression as the source; did you mean to provide an
explicit length? [-Wsizeof-pointer-memaccess]
sizeof(name)) != 0)
~~~~~~~^~~~~~

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2012-11-28 13:11:04 +01:00
Marc Kleine-Budde 58f117aa51 configure.ac: back to trunk
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2012-11-06 22:04:43 +01:00
Marc Kleine-Budde e1a224bf1c v0.0.9
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2012-11-06 22:03:10 +01:00
Marc Kleine-Budde 10a2051adb configure.ac: enable AM_SILENT_RULES
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2012-11-06 21:58:25 +01:00
Andrew Beard 5ba2310d85 Modified do_get_nl_link to potentially process multiple netlink dump replies.
Prior to this commit, do_get_nl_link assumed there would only be a single
reply for a dump request. On my system with multiple can interfaces, this
would cause only half of them to be listed in the dump reply. This change
checks for NLMSG_DONE dump terminator and stops receiving messages once
received.

Signed-off-by: Andrew Beard <abeard@ovro.caltech.edu>
[mkl: fix indention, move variable init out of loop]
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2012-08-07 09:40:50 +02:00
Marc Kleine-Budde 5b990a4771 configure: fix tests/GNUmakefile.in not found regression
This patch fixes the following problem:

configure.ac:108: required file `tests/GNUmakefile.in' not found

which has been introduced in commit:
42a3b65198 tests: remove test example

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2011-12-16 14:06:08 +01: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
Marc Kleine-Budde 42a3b65198 tests: remove test example
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2011-10-18 13:26:48 +02:00
Marc Kleine-Budde d99010f50b libsocketcan: remove trailing whitespace
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2010-10-25 13:36:49 +02:00
Marc Kleine-Budde 9f1be156e4 configure: disable debug by default, turn off maintainer mode
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2010-10-25 13:28:31 +02:00
Luotao Fu 36328666b6 switch back to trunk 2010-02-14 20:19:04 +01:00
Luotao Fu 33f96f936c v0.0.8
Signed-off-by: Luotao Fu <luotao@alea.(none)>
2010-02-14 20:18:49 +01: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 1b50d5545d change libtool library versioning
Signed-off-by: Luotao Fu <luotao@alea.(none)>
2010-02-14 18:18:09 +01:00
Luotao Fu 298e6efc3e add get error counter call
Signed-off-by: Luotao Fu <luotao@alea.(none)>
2010-02-14 18:12:01 +01:00
Luotao Fu 118358336e fix header install
Signed-off-by: Luotao Fu <luotao@alea.(none)>
2010-02-14 17:25:33 +01:00
Luotao Fu fbb55a487f v0.0.7
Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
2009-12-15 12:46:42 +01:00
Luotao Fu 7422435b03 fix distinstall of can_netlink.h
Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
2009-12-15 12:30:09 +01:00
Luotao Fu c9f7a3d715 switch back to trunk
Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
2009-12-15 10:31:39 +01:00
Luotao Fu 94e9370022 v0.0.6
Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
2009-12-15 10:25:57 +01:00
Luotao Fu 3f2a397589 add dist doc files
Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
2009-12-15 10:16:01 +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 917c6fb069 fix typo
Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
2009-12-11 14:30: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
Luotao Fu 7ee625b6f3 switch version back to trunk
Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
2009-12-04 15:07:30 +01:00
Luotao Fu f38c3b6d92 v0.0.5
Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
2009-12-04 15:05:37 +01:00
Luotao Fu d6747aad3c update libtool revision
Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
2009-12-04 15:03:53 +01:00
Luotao Fu 8373c1f17b switch version back to trunk
Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
2009-12-01 10:42:23 +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 73a4999c24 v0.0.4
Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
2009-11-27 16:45:05 +01:00
Luotao Fu 96b6e75947 lindent, remove debug print
Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
2009-11-27 16:28:36 +01:00
Luotao Fu bedbd3788f update libtool version
Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
2009-11-27 14:35:05 +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
Luotao Fu 1751269c33 remove internal netif_up/down callbacks and export them
We don't do if_up/down internally any longer, since it is depreacated. Instead
we add now can_start/stop callbacks and let the user do the job themselves in
threir applications.

Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
2009-11-26 16:16:09 +01:00