mirror of
https://github.com/linux-can/can-utils.git
synced 2026-08-06 06:49:53 +02:00
isotpdump: add color support for functional addressing traffic
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
This commit is contained in:
+8
-2
@@ -372,8 +372,14 @@ int main(int argc, char **argv)
|
|||||||
rx_extaddr != frame.data[0])
|
rx_extaddr != frame.data[0])
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (color)
|
if (color) {
|
||||||
printf("%s", (frame.can_id == src) ? FGRED : FGBLUE);
|
if (frame.can_id == src)
|
||||||
|
printf("%s", FGRED);
|
||||||
|
else if (frame.can_id == dst)
|
||||||
|
printf("%s", FGBLUE);
|
||||||
|
else if (frame.can_id == bst)
|
||||||
|
printf("%s", FGGREEN);
|
||||||
|
}
|
||||||
|
|
||||||
if (timestamp) {
|
if (timestamp) {
|
||||||
ioctl(s, SIOCGSTAMP, &tv);
|
ioctl(s, SIOCGSTAMP, &tv);
|
||||||
|
|||||||
Reference in New Issue
Block a user