Commit Graph

1257 Commits (master)

Author SHA1 Message Date
Oliver Hartkopp d81a13866b Rework of help text. 2010-02-27 16:07:58 +00:00
Oliver Hartkopp afa14f102d When sending a sequence, we need to resend the same frame when poll() returns.
Fixed that to be a valid data source e.g. for ptx cansequence.
2010-02-26 08:38:47 +00:00
Oliver Hartkopp e089e5d0ba Added commandline option '-p <timeout>' to enable polling on the writing socket.
Inspired by Marc Kleine-Budde :-)
2010-02-25 20:53:19 +00:00
Oliver Hartkopp 3a0612c14a Added funtionality to flush all GW jobs in one netlink message. 2010-02-23 19:13:17 +00:00
Oliver Hartkopp 37744ac503 Beautify the listing of registered gwjobs (cangw -L). 2010-02-22 18:57:45 +00:00
Oliver Hartkopp a48038d82b Added feature to list created gateway jobs.
Also added some fixes and removed debug printf's.
2010-02-22 09:57:12 +00:00
Oliver Hartkopp bd1ebaaf28 Added netlink error message support to be able to provide return values.
Renamed some structure elements. Updated usage text.
2010-02-21 12:34:34 +00:00
Oliver Hartkopp 0dc9fcc98e Moved kernel parsing of netlink attributes into can_can_parse_attr().
Added functionalitiy to remove formerly created CAN GW jobs.
2010-02-20 20:41:24 +00:00
Oliver Hartkopp 67b604e53b Added cangw netlink gateway configuration tool.
TODO (in both cangw and can-gw.ko) : Support removal and listing of rules.
So far the gateway jobs are only removed on can-gw.ko module unload or when
the used CAN netdevices disappear.
2010-02-19 13:33:59 +00:00
Oliver Hartkopp 9327499121 Try to ignore the usual value restrictions of sockopt SO_RCVBUF when running
as root (with CAP_NET_ADMIN) by using SO_RCVBUFFORCE if possible.
2010-01-15 19:15:08 +00:00
Oliver Hartkopp 3c019ea611 Added '-d' option to support the receive packet drop counting introduced in
http://git.kernel.org/?p=linux/kernel/git/davem/net-next-2.6.git;a=commitdiff;h=3b885787ea4112eaa80945999ea0901bf742707f

This is done by using recvmsg() instead of recvfrom() to allow the timestamp
and the dropcounter to be received within one syscall.

When the application (here 'candump') ist not fast enough to process the
incomming CAN frames the frames are dropped in the socket receive queue.
When this happens and '-d' is set, we get this info now:
DROPCOUNT: dropped 1 CAN frame on 'xxx' socket (total drops 1)
2010-01-15 18:35:37 +00:00
Oliver Hartkopp c11220e9c9 fflush the new configurable stdout output to allow proper pipe/netcat setups. 2009-11-25 18:51:31 +00:00
Oliver Hartkopp f135ce3d47 Allow to specify the name of the IP tunnel netdevice via commandline option '-n <name>' 2009-11-25 17:15:09 +00:00
Oliver Hartkopp d68d6132da Remove feature to quit the isotptun by keypress (from stdin) as it was not possible to run it from a start-script.
Added a signal handler to gracefully leave the isotptun.
2009-11-25 16:43:17 +00:00
Wolfgang Grandegger af4ef62646 can-utils: canfdtest, a full duplex test to find out-of-order messages
This patch is a pepped up version of Valdislav's canecho_gen and
canecho_dut test programs, which have prooved to be useful for
detecting out-of-order message transmisson and reception. Here
is a list of the changes and improvements:

- Both programs have been merged into on test program named
  canfdtest. Message generation can be selected via the command
  line option '-g'.
- The test loop count can be specified.
- A low and high verbosity level has been added.
- send/recv is used instead of write/read.
- The return code of send/recv is checked properly.
- Use Linux coding style.

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
2009-11-25 11:18:22 +00:00
Oliver Hartkopp 0b4d143113 Added hook to print selected logfile lines on stdout for further processing. 2009-11-06 08:07:45 +00:00
Oliver Hartkopp bbb3d7eb10 Introduce KERNELDIR variable to allow override when invoking make on commandline. 2009-09-10 08:01:00 +00:00
Oliver Hartkopp 40edca27a2 Move BCM server into can-utils as it is not test application anymore. 2009-09-10 07:39:33 +00:00
Oliver Hartkopp 0740b53016 Remove obsolete 'vcan' tool. 2009-09-10 07:34:06 +00:00
Oliver Hartkopp 64603859fb Added slcand daemon contributed by Robert Haddon <robert.haddon@verari.com> 2009-05-05 09:40:10 +00:00
Oliver Hartkopp e765683c9b Added commandline option '-r' to set the per-socket receive buffer size. 2009-04-16 08:05:42 +00:00
Oliver Hartkopp bc9fb643a3 Removed the limitation for the number of CAN filters for each interface.
Updated Copyright notice.
And finally: Yeah! I did something with malloc :-)
2009-04-06 11:15:27 +00:00
Oliver Hartkopp 3e65a4e564 Add functionality to
terminate after receiption of <count> CAN frames.
2009-04-06 08:41:17 +00:00
Oliver Hartkopp 8975dcb574 Spagetti code cleanup:
Moved conversions into separate functions can2pty() and pty2can().
Updated and enhanced some comments.
Variable name cleanups inside the separate functions.
Fix handling on wrong pty commands (was a wrong 'continue' statement).
2009-02-15 17:40:32 +00:00
Oliver Hartkopp c588f0d0b2 Allow SLCAN RTR frames without data length code field. 2009-02-04 16:51:04 +00:00
Oliver Hartkopp 6cc05e08f0 Some more implementation to make it work with a certain application. 2009-02-04 13:18:44 +00:00
Oliver Hartkopp 4cf2b0f931 Use rxbuf[] for acknowledges. 2009-02-03 20:12:34 +00:00
Oliver Hartkopp afae11f1c8 Implemented ACK/NACK replies for ASCII commands.
Added 'O'pen and 'C'lose functionality.
2009-02-03 13:59:17 +00:00
Oliver Hartkopp af858087e6 Added timestamp handling with Z0 or Z1 command. 2009-02-03 11:59:53 +00:00
Oliver Hartkopp baa90a135a Add can_id/can_mask filter handling which is defined in the slcan protocol (m/M). 2009-01-21 09:17:20 +00:00
Oliver Hartkopp c8be6085a4 Removed sanity check for received slcan ASCII data
as this is done with ASCII comparision three lines above.
2009-01-21 07:38:18 +00:00
Oliver Hartkopp 9862da595d Added a proof of concept tool 'slcanpty' which
creates a pty for applications using the slcan ASCII protocol and
converts the data to a CAN network interface (and vice versa).

This can be used for existing applications to run on SocketCAN.
2009-01-20 23:06:01 +00:00
Oliver Hartkopp 4369ac1c55 Consistencely allow '-?' to get a help text. 2009-01-13 09:32:45 +00:00
Oliver Hartkopp 278ba6377d disable default receive filter on the write-only bridge socket. 2009-01-06 09:04:34 +00:00
Oliver Hartkopp 6104197c6a Fix sloppy CAN_(EFF|RTR)_FLAG handling in can_filter.can_mask .
Due to a wrong safety check in af_can.c it was not possible to filter 
for SFF frames with a specific CAN identifier without getting the 
same selected CAN identifier from a received EFF frame also.

This fix has a minimum impact on the CAN filter API as the 'sloppy' 
handling is still a correct (and possibly wanted?) use-case.

Please update the can-utils (especially candump) whose filter definition 
on the commandline made assumptions to correct the user input that are 
probably unwanted now.

Thanks to Kurt van Dijck for pointing at this issue!

Signed-Off-by: Oliver Hartkopp <oliver@hartkopp.net>
2008-12-01 07:24:18 +00:00
Oliver Hartkopp 450a058072 Fixed parse_canframe() with reordering the checks for the can_id
delimiter. Before this fix the function may have found delimiters in the 
string behind the terminating zero.
2008-11-28 21:50:24 +00:00
Oliver Hartkopp e7046e7fca Added interface name to parameter list in first line. 2008-11-17 10:23:42 +00:00
Oliver Hartkopp 4e41082935 Added Id keyword propertiy on new files. 2008-11-05 14:20:52 +00:00
Oliver Hartkopp f1d4ebbbba Added ISO 15765-2 CAN transport protocol for protocol family CAN.
Including some tools and coarse documentation README.isotp
2008-11-05 11:34:23 +00:00
Oliver Hartkopp 9b717158c6 Reworked slcan_attach to give slcan setup values directly on the commandline. 2008-11-04 10:47:09 +00:00
Oliver Hartkopp 265021e323 Print non-data stuff (errors, warnings, hints) on stderr. 2008-10-29 09:41:40 +00:00
Oliver Hartkopp 1be68bcc64 Added support for swapped byte order representation. 2008-10-29 09:23:48 +00:00
Oliver Hartkopp b5bc6349a9 Start candump in silent mode, when logging into a file. 2008-10-02 13:47:43 +00:00
Oliver Hartkopp afcac3462a The number for the SLCAN line discipline can not be found in
<linux/tty.h> anyway but needs to be written as module alias

tty-ldisc-17 slcan

So we remove the annoying #error output and use the correctly defined 
'17' from Kernel 2.6.25+ as default.
2008-09-17 13:02:49 +00:00
Oliver Hartkopp 4455308aa0 Added support for comments in logfiles.
Added some sanity checks and error messages.
2008-09-09 12:56:05 +00:00
Oliver Hartkopp 6c0ca36ab2 Create an informative error message when detecting a wrong line format. 2008-07-25 06:32:20 +00:00
Oliver Hartkopp 15ce202e60 Changed comment line recognition:
Everything without a '(' at the beginning of an input line is treated as comment.
Changed buffer size to allow long comment lines & added overflow handling.
2008-07-24 19:12:19 +00:00
Oliver Hartkopp ba037dcffa Support for comment lines in the logfile:
'#' at the beginning of a line marks comment lines.
2008-07-24 13:03:18 +00:00
Oliver Hartkopp 5621884558 Added missing help test. 2008-07-10 11:01:37 +00:00
Oliver Hartkopp f33075946d Added -f option to filter only on the CAN-ID and not on the content.
This can be useful when the timestamp cyle needs to be displayed.
2008-07-10 10:59:37 +00:00