static int running = 1;
static int clearscreen = 1;
-static int notch = 0;
+static int notch;
+static int filter_id_only;
static long timeout = TIMEOUT;
static long hold = HOLD;
static long loop = LOOP;
-static unsigned char binary = 0;
-static unsigned char binary_gap = 0;
-static unsigned char color = 0;
+static unsigned char binary;
+static unsigned char binary_gap;
+static unsigned char color;
void rx_setup (int fd, int id);
void rx_delete (int fd, int id);
long currcms = 0;
long lastcms = 0;
unsigned char quiet = 0;
-
int opt, ret;
struct timeval timeo, start_tv, tv;
struct sockaddr_can addr;
for (i=0; i < 2048 ;i++) /* default: check all CAN-IDs */
do_set(i, ENABLE);
- while ((opt = getopt(argc, argv, "m:v:r:t:h:l:qbBc")) != -1) {
+ while ((opt = getopt(argc, argv, "m:v:r:t:h:l:qbBcf")) != -1) {
switch (opt) {
case 'm':
sscanf(optarg, "%x", &mask);
color = 1;
break;
+ case 'f':
+ filter_id_only = 1;
+ break;
+
case '?':
break;
txmsg.msg_head.nframes = 1;
U64_DATA(&txmsg.frame) = (__u64) 0xFFFFFFFFFFFFFFFFULL;
+ if (filter_id_only)
+ txmsg.msg_head.flags |= RX_FILTER_ID;
+
if (write(fd, &txmsg, sizeof(txmsg)) < 0)
perror("write");
};