- fprintf(stderr, "\nUsage: %s [options] <CAN interface>+\n", prg);
- fprintf(stderr, " (use CTRL-C to terminate %s)\n\n", prg);
- fprintf(stderr, "Options: -t <type> (timestamp: (a)bsolute/(d)elta/(z)ero/(A)bsolute w date)\n");
- fprintf(stderr, " -c (increment color mode level)\n");
- fprintf(stderr, " -i (binary output - may exceed 80 chars/line)\n");
- fprintf(stderr, " -a (enable additional ASCII output)\n");
- fprintf(stderr, " -s <level> (silent mode - 1: animation 2: completely silent)\n");
- fprintf(stderr, " -b <can> (bridge mode - send received frames to <can>)\n");
- fprintf(stderr, " -B <can> (bridge mode - like '-b' with disabled loopback)\n");
- fprintf(stderr, " -l (log CAN-frames into file)\n");
- fprintf(stderr, " -L (use log file format on stdout)\n");
- fprintf(stderr, "\n");
- fprintf(stderr, "Up to %d CAN interfaces with optional filter sets can be specified\n", MAXSOCK);
- fprintf(stderr, "on the commandline in the form: <ifname>[,filter]*\n");
- fprintf(stderr, "\nUp to %d comma separated filters can be specified for each given CAN interface:\n", MAXFILTER);
- fprintf(stderr, " <can_id>:<can_mask> (matches when <received_can_id> & mask == can_id & mask)\n");
- fprintf(stderr, " <can_id>~<can_mask> (matches when <received_can_id> & mask != can_id & mask)\n");
- fprintf(stderr, " #<error_mask> (set error frame filter, see include/linux/can/error.h)\n");
- fprintf(stderr, "\nUse interface name '%s' to receive from all CAN interfaces.\n", ANYDEV);
- fprintf(stderr, "CAN IDs, masks and data content are given and expected in hexadecimal values.\n");
- fprintf(stderr, "\nExamples:\n");
- fprintf(stderr, "%s -c -c -ta can0,123:7FF,400:700,#000000FF can2,400~7F0 can3 can8\n", prg);
- fprintf(stderr, "%s -l any,0~0,#FFFFFFFF (log only error frames but no(!) data frames)\n", prg);
- fprintf(stderr, "%s vcan2,92345678:9FFFFFFF (match only for extended CAN ID 12345678)\n", prg);
- fprintf(stderr, "\n");
+ fprintf(stderr, "\nUsage: %s [options] <CAN interface>+\n", prg);
+ fprintf(stderr, " (use CTRL-C to terminate %s)\n\n", prg);
+ fprintf(stderr, "Options: -t <type> (timestamp: (a)bsolute/(d)elta/(z)ero/(A)bsolute w date)\n");
+ fprintf(stderr, " -H (use hardware timestamping)\n");
+ fprintf(stderr, " -c (increment color mode level)\n");
+ fprintf(stderr, " -i (binary output - may exceed 80 chars/line)\n");
+ fprintf(stderr, " -a (enable additional ASCII output)\n");
+ fprintf(stderr, " -S (swap byte order in printed CAN data[] - marked with '%c' )\n", SWAP_DELIMITER);
+ fprintf(stderr, " -s <level> (silent mode - %d: off (default) %d: animation %d: silent)\n", SILENT_OFF, SILENT_ANI, SILENT_ON);
+ fprintf(stderr, " -b <can> (bridge mode - send received frames to <can>)\n");
+ fprintf(stderr, " -B <can> (bridge mode - like '-b' with disabled loopback)\n");
+ fprintf(stderr, " -u <usecs> (delay bridge forwarding by <usecs> microseconds)\n");
+ fprintf(stderr, " -l (log CAN-frames into file. Sets '-s %d' by default)\n", SILENT_ON);
+ fprintf(stderr, " -L (use log file format on stdout)\n");
+ fprintf(stderr, " -n <count> (terminate after receiption of <count> CAN frames)\n");
+ fprintf(stderr, " -r <size> (set socket receive buffer to <size>)\n");
+ fprintf(stderr, " -d (monitor dropped CAN frames)\n");
+ fprintf(stderr, " -e (dump CAN error frames in human-readable format)\n");
+ fprintf(stderr, " -x (print extra message infos, rx/tx brs esi)\n");
+ fprintf(stderr, " -T <msecs> (terminate after <msecs> without any reception)\n");
+ fprintf(stderr, "\n");
+ fprintf(stderr, "Up to %d CAN interfaces with optional filter sets can be specified\n", MAXSOCK);
+ fprintf(stderr, "on the commandline in the form: <ifname>[,filter]*\n");
+ fprintf(stderr, "\nComma separated filters can be specified for each given CAN interface:\n");
+ fprintf(stderr, " <can_id>:<can_mask> (matches when <received_can_id> & mask == can_id & mask)\n");
+ fprintf(stderr, " <can_id>~<can_mask> (matches when <received_can_id> & mask != can_id & mask)\n");
+ fprintf(stderr, " #<error_mask> (set error frame filter, see include/linux/can/error.h)\n");
+ fprintf(stderr, " [j|J] (join the given CAN filters - logical AND semantic)\n");
+ fprintf(stderr, "\nCAN IDs, masks and data content are given and expected in hexadecimal values.\n");
+ fprintf(stderr, "When can_id and can_mask are both 8 digits, they are assumed to be 29 bit EFF.\n");
+ fprintf(stderr, "Without any given filter all data frames are received ('0:0' default filter).\n");
+ fprintf(stderr, "\nUse interface name '%s' to receive from all CAN interfaces.\n", ANYDEV);
+ fprintf(stderr, "\nExamples:\n");
+ fprintf(stderr, "%s -c -c -ta can0,123:7FF,400:700,#000000FF can2,400~7F0 can3 can8\n", prg);
+ fprintf(stderr, "%s -l any,0~0,#FFFFFFFF (log only error frames but no(!) data frames)\n", prg);
+ fprintf(stderr, "%s -l any,0:0,#FFFFFFFF (log error frames and also all data frames)\n", prg);
+ fprintf(stderr, "%s vcan2,92345678:DFFFFFFF (match only for extended CAN ID 12345678)\n", prg);
+ fprintf(stderr, "%s vcan2,123:7FF (matches CAN ID 123 - including EFF and RTR frames)\n", prg);
+ fprintf(stderr, "%s vcan2,123:C00007FF (matches CAN ID 123 - only SFF and non-RTR frames)\n", prg);
+ fprintf(stderr, "\n");