]> rtime.felk.cvut.cz Git - sojka/can-utils.git/blobdiff - lib.h
candump: add option -e to dump error messages in human readable format
[sojka/can-utils.git] / lib.h
diff --git a/lib.h b/lib.h
index cae3d8aaaf0328e6d13673693f6bec44a9d41b8a..88ecfefa56cb34a60bba87377a2f7e6abbfaa453 100644 (file)
--- a/lib.h
+++ b/lib.h
@@ -127,6 +127,7 @@ void sprint_canframe(char *buf , struct can_frame *cf, int sep);
 #define CANLIB_VIEW_ASCII      0x1
 #define CANLIB_VIEW_BINARY     0x2
 #define CANLIB_VIEW_SWAP       0x4
+#define CANLIB_VIEW_ERROR      0x8
 
 #define SWAP_DELIMITER '`'
 
@@ -146,3 +147,9 @@ void sprint_long_canframe(char *buf , struct can_frame *cf, int view);
  * fprint_long_canframe(stderr, &frame, NULL, 0); // no eol to STDERR
  *
  */
+
+void snprintf_can_error_frame(char *buf, int len, struct can_frame *cf,
+                             char *sep);
+/*
+ * Creates a CAN error frame output in user readable format.
+ */