Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
blf.h
Go to the documentation of this file.
1
11 /*
12 * The following was used as a reference for the file format:
13 * https://bitbucket.org/tobylorenz/vector_blf
14 * The repo above includes multiple examples files as well.
15 */
16
17#ifndef __W_BLF_H__
18#define __W_BLF_H__
19
20#include "wtap.h"
21
22wtap_open_return_val blf_open(wtap *wth, int *err, char **err_info);
23
24/*
25 * A BLF file is of the form:
26 *
27 * BLF File Header
28 * Sequence of BLF objects
29 *
30 * A BLF object is of the form:
31 *
32 * BLF Block Header
33 * Object header (object type dependent, may be empty)
34 * Object contents
35 *
36 * As per
37 *
38 * https://gitlab.com/wireshark/wireshark/-/issues/19896#note_1967971057
39 *
40 * the sequence may have one (or more?) metadata objects at the beginning.
41 * After those, if present, there are zero or more LOG_CONTAINER objects,
42 * containing data for all subsequent objects. An object may be split
43 * between LOG_CONTAINER objects, as per
44 *
45 * https://gitlab.com/wireshark/wireshark/-/issues/19377#note_1651998569
46 *
47 * A LOG_CONTAINER object's contents are of the form:
48 *
49 * Log container header
50 * Data for contained objects.
51 *
52 * The data in a LOG_CONTAINER object may be compressed using zlib.
53 */
54
55#define BLF_HEADER_TYPE_DEFAULT 1
56#define BLF_HEADER_TYPE_2 2
57#define BLF_HEADER_TYPE_3 3
58
59
60#define BLF_COMPRESSION_NONE 0
61#define BLF_COMPRESSION_ZLIB 2
62
63#define BLF_TIMESTAMP_RESOLUTION_10US 1
64#define BLF_TIMESTAMP_RESOLUTION_1NS 2
65
66typedef struct blf_date {
67 uint16_t year;
68 uint16_t month;
69 uint16_t dayofweek;
70 uint16_t day;
71 uint16_t hour;
72 uint16_t mins;
73 uint16_t sec;
74 uint16_t ms;
76
77/* BLF File Header */
78typedef struct blf_fileheader {
79 uint8_t magic[4]; /* magic number - "LOGG" */
80 uint32_t header_length; /* length of the file header */
81
82 uint32_t api_version; /* decimal encoded */
83
84 uint8_t application;
85 uint8_t compression_level;
86 uint8_t application_major;
87 uint8_t application_minor;
88
89 uint64_t len_compressed; /* size of the file before uncompressing */
90 uint64_t len_uncompressed;
91
92 uint32_t obj_count; /* number of objects in the file */
93 uint32_t application_build;
94
95 blf_date_t start_date;
96 blf_date_t end_date;
97
98 uint32_t restore_point_offset;
100
101/* BLF Block Header */
102typedef struct blf_blockheader {
103 uint8_t magic[4]; /* magic number = "LOBJ" */
104 uint16_t header_length; /* length of header starting with magic */
105 uint16_t header_type; /* header format ? */
106 uint32_t object_length; /* complete length including header */
107 uint32_t object_type;
109
111 uint16_t compression_method; /* 0 uncompressed, 2 zlib */
112 uint16_t res1;
113 uint32_t res2;
114 uint32_t uncompressed_size;
115 uint32_t res4;
117
118typedef struct blf_logobjectheader {
119 uint32_t flags;
120 uint16_t client_index;
121 uint16_t object_version;
122 uint64_t object_timestamp;
124
125#define BLF_TS_STATUS_ORIG_TS_VALID 0x01
126#define BLF_TS_STATUS_SW_TS 0x02
127#define BLF_TS_STATUS_PROTO_SPECIFIC 0x10
128
129typedef struct blf_logobjectheader2 {
130 uint32_t flags;
131 uint8_t timestamp_status;
132 uint8_t res1;
133 uint16_t object_version;
134 uint64_t object_timestamp;
135 uint64_t original_timestamp;
137
138typedef struct blf_logobjectheader3 {
139 uint32_t flags;
140 uint16_t static_size;
141 uint16_t object_version;
142 uint64_t object_timestamp;
144
145
146#define BLF_DIR_RX 0
147#define BLF_DIR_TX 1
148#define BLF_DIR_TX_RQ 2
149
151 uint8_t src_addr[6];
152 uint16_t channel;
153 uint8_t dst_addr[6];
154 uint16_t direction;
155 uint16_t ethtype;
156 uint16_t tpid;
157 uint16_t tci;
158 uint16_t payloadlength;
159 uint64_t res;
161
163 uint16_t struct_length;
164 uint16_t flags;
165 uint16_t channel;
166 uint16_t hw_channel;
167 uint64_t frame_duration;
168 uint32_t frame_checksum;
169 uint16_t direction;
170 uint16_t frame_length;
171 uint32_t frame_handle;
172 uint32_t error;
174
175#define BLF_ETHERNET_EX_RES 0x0001
176#define BLF_ETHERNET_EX_HARDWARECHANNEL 0x0002
177#define BLF_ETHERNET_EX_FRAMEDURATION 0x0004
178#define BLF_ETHERNET_EX_FRAMEHANDLE 0x0008
179
180typedef struct blf_ethernet_rxerror {
181 uint16_t struct_length;
182 uint16_t channel;
183 uint16_t direction;
184 uint16_t hw_channel;
185 uint32_t frame_checksum;
186 uint16_t frame_length; /* Number of valid raw Ethernet data bytes */
187 uint32_t error;
189
190typedef struct blf_wlanframeheader {
191 uint16_t channel;
192 uint16_t flags;
193 uint8_t direction;
194 uint8_t radio_channel;
195 uint16_t signal_strength;
196 uint16_t signal_quality;
197 uint16_t frame_length;
198 uint32_t res;
200
201/* see https://bitbucket.org/tobylorenz/vector_blf/src/master/src/Vector/BLF/CanMessage.h */
202
203/* shared for CAN message and CAN message2 and CANFD message */
204#define BLF_CANMESSAGE_FLAG_TX 0x01
205#define BLF_CANMESSAGE_FLAG_NERR 0x20
206#define BLF_CANMESSAGE_FLAG_WU 0x40
207#define BLF_CANMESSAGE_FLAG_RTR 0x80
208
209/* shared for CAN message and CAN message2*/
210typedef struct blf_canmessage {
211 uint16_t channel;
212 uint8_t flags;
213 uint8_t dlc;
214 uint32_t id;
216
217
218/* see https://bitbucket.org/tobylorenz/vector_blf/src/master/src/Vector/BLF/CanMessage2.h */
219
221 uint32_t frameLength_in_ns;
222 uint8_t bitCount;
223 uint8_t reserved1;
224 uint16_t reserved2;
226
227
228/* see https://bitbucket.org/tobylorenz/vector_blf/src/master/src/Vector/BLF/CanFdMessage.h */
229
230/* EDL 0: CAN, 1: CAN-FD*/
231#define BLF_CANFDMESSAGE_CANFDFLAG_EDL 0x01
232#define BLF_CANFDMESSAGE_CANFDFLAG_BRS 0x02
233#define BLF_CANFDMESSAGE_CANFDFLAG_ESI 0x04
234
235typedef struct blf_canfdmessage {
236 uint16_t channel;
237 uint8_t flags;
238 uint8_t dlc;
239 uint32_t id;
240 uint32_t frameLength_in_ns;
241 uint8_t arbitration_bit_count;
242 uint8_t canfdflags;
243 uint8_t validDataBytes;
244 uint8_t reservedCanFdMessage1;
245 uint32_t reservedCanFdMessage2;
246 /* DATA */
247 /* uint32_t reservedCanFdMessage3 */
249
250
251/* see https://bitbucket.org/tobylorenz/vector_blf/src/master/src/Vector/BLF/CanFdMessage64.h */
252
253#define BLF_CANFDMESSAGE64_FLAG_NERR 0x000004
254#define BLF_CANFDMESSAGE64_FLAG_HIGH_VOLT_WAKE_UP 0x000008
255#define BLF_CANFDMESSAGE64_FLAG_REMOTE_FRAME 0x000010
256#define BLF_CANFDMESSAGE64_FLAG_TX_ACK 0x000040
257#define BLF_CANFDMESSAGE64_FLAG_TX_REQ 0x000080
258#define BLF_CANFDMESSAGE64_FLAG_SRR 0x000200
259#define BLF_CANFDMESSAGE64_FLAG_R0 0x000400
260#define BLF_CANFDMESSAGE64_FLAG_R1 0x000800
261/* EDL 0: CAN, 1: CAN-FD*/
262#define BLF_CANFDMESSAGE64_FLAG_EDL 0x001000
263#define BLF_CANFDMESSAGE64_FLAG_BRS 0x002000
264#define BLF_CANFDMESSAGE64_FLAG_ESI 0x004000
265#define BLF_CANFDMESSAGE64_FLAG_BURST 0x200000
266
267typedef struct blf_canfdmessage64 {
268 uint8_t channel;
269 uint8_t dlc;
270 uint8_t validDataBytes;
271 uint8_t txCount;
272 uint32_t id;
273 uint32_t frameLength_in_ns;
274 uint32_t flags;
275 uint32_t btrCfgArb;
276 uint32_t btrCfgData;
277 uint32_t timeOffsetBrsNs;
278 uint32_t timeOffsetCrcDelNs;
279 uint16_t bitCount;
280 uint8_t dir;
281 uint8_t extDataOffset;
282 uint32_t crc;
284
285
286/* see https://bitbucket.org/tobylorenz/vector_blf/src/master/src/Vector/BLF/CanErrorFrame.h */
287
288typedef struct blf_canerror {
289 uint16_t channel;
290 uint16_t length;
292
293
294/* see https://bitbucket.org/tobylorenz/vector_blf/src/master/src/Vector/BLF/CanErrorFrameExt.h */
295
296#define BLF_CANERROREXT_FLAG_SJA 0x01
297#define BLF_CANERROREXT_FLAG_CANCORE 0x02
298#define BLF_CANERROREXT_EXTECC_TX 0x1000
299#define BLF_CANERROREXT_EXTECC_NOT_ACK 0x2000
300#define BLF_CANERROREXT_ECC_MEANING_BIT_ERROR 0x0
301#define BLF_CANERROREXT_ECC_MEANING_FORM_ERROR 0x1
302#define BLF_CANERROREXT_ECC_MEANING_STUFF_ERROR 0x2
303#define BLF_CANERROREXT_ECC_MEANING_OTHER_ERROR 0x3
304#define BLF_CANERROREXT_ECC_MEANING_CRC_ERROR 0x4
305#define BLF_CANERROREXT_ECC_MEANING_ACKDEL_ERROR 0x5
306#define BLF_CANERROREXT_ECC_MEANING_OTHER_ERROR2 0x6
307#define BLF_CANERROREXT_ECC_MEANING_NACK_ERROR 0x7
308#define BLF_CANERROREXT_ECC_MEANING_OVERLOAD 0x8
309#define BLF_CANERROREXT_ECC_FDF_BIT_ERROR 0x9
310
311typedef struct blf_canerrorext {
312 uint16_t channel;
313 uint16_t length;
314 uint32_t flags;
315 uint8_t ecc;
316 uint8_t position;
317 uint8_t dlc;
318 uint8_t reserved1;
319 uint32_t frameLength_in_ns;
320 uint32_t id;
321 uint16_t errorCodeExt;
322 uint16_t reserved2;
324
325
326/* see https://bitbucket.org/tobylorenz/vector_blf/src/master/src/Vector/BLF/CanFdErrorFrame64.h */
327
328#define BLF_CANERROR64_FLAG_FDF 0x01
329#define BLF_CANERROR65_FLAG_BRS 0x02
330#define BLF_CANERROR65_FLAG_ESI 0x04
331
332typedef struct blf_canfderror64 {
333 uint8_t channel;
334 uint8_t dlc;
335 uint8_t validDataBytes;
336 uint8_t ecc;
337 uint16_t flags;
338 uint16_t errorCodeExt;
339 uint16_t extFlags;
340 uint8_t extDataOffset;
341 uint8_t reserved1;
342 uint32_t id;
343 uint32_t frameLength_in_ns;
344 uint32_t btrCfgArb;
345 uint32_t btrCfgData;
346 uint32_t timeOffsetBrsNs;
347 uint32_t timeOffsetCrcDelNs;
348 uint32_t crc;
349 uint16_t errorPosition;
350 uint16_t reserved2;
352
353
354/* see https://bitbucket.org/tobylorenz/vector_blf/src/master/src/Vector/BLF/FlexRayData.h */
355
356#define BLF_FLEXRAYDATA_FRAME 0x01
357#define BLF_FLEXRAYDATA_CHANNEL_B 0x80
358
359typedef struct blf_flexraydata {
360 uint16_t channel;
361 uint8_t mux;
362 uint8_t len;
363 uint16_t messageId;
364 uint16_t crc;
365 uint8_t dir;
366 uint8_t reservedFlexRayData1;
367 uint16_t reservedFlexRayData2;
369
370
371/* see https://bitbucket.org/tobylorenz/vector_blf/src/master/src/Vector/BLF/FlexRayV6Message.h */
372
373#define BLF_FLEXRAYMESSAGE_DIR_RX 0x01
374#define BLF_FLEXRAYMESSAGE_DIR_TX 0x02
375#define BLF_FLEXRAYMESSAGE_DIR_TX_REQ 0x04
376
377#define BLF_FLEXRAYMESSAGE_STATE_PPI 0x01
378#define BLF_FLEXRAYMESSAGE_STATE_SFI 0x02
379#define BLF_FLEXRAYMESSAGE_STATE_RES_BIT2 0x04
380#define BLF_FLEXRAYMESSAGE_STATE_NFI 0x08
381#define BLF_FLEXRAYMESSAGE_STATE_STFI 0x10
382#define BLF_FLEXRAYMESSAGE_STATE_FORMAT 0xe0
383
384#define BLF_FLEXRAYMESSAGE_HEADER_BIT_NM 0x01
385#define BLF_FLEXRAYMESSAGE_HEADER_BIT_SYNC 0x02
386#define BLF_FLEXRAYMESSAGE_HEADER_BIT_RES 0x04
387
388#define BLF_DLT_FLEXRAY_STFI 0x08
389#define BLF_DLT_FLEXRAY_SFI 0x10
390#define BLF_DLT_FLEXRAY_NFI 0x20
391#define BLF_DLT_FLEXRAY_PPI 0x40
392
393typedef struct blf_flexraymessage {
394 uint16_t channel;
395 uint8_t dir; /* Flags: 0 RX, 1 TX, 2 TX Req, 3 internal, 4 internal*/
396 uint8_t lowTime;
397 uint32_t fpgaTick;
398 uint32_t fpgaTickOverflow;
399 uint32_t clientIndexFlexRayV6Message;
400 uint32_t clusterTime;
401 uint16_t frameId;
402 uint16_t headerCrc;
403 uint16_t frameState;
404 uint8_t length;
405 uint8_t cycle;
406 uint8_t headerBitMask;
407 uint8_t reservedFlexRayV6Message1;
408 uint16_t reservedFlexRayV6Message2;
410
411
412/* see https://bitbucket.org/tobylorenz/vector_blf/src/master/src/Vector/BLF/FlexRayVFrReceiveMsg.h */
413
414#define BLF_FLEXRAYRCVMSG_DIR_RX 0x01
415#define BLF_FLEXRAYRCVMSG_DIR_TX 0x02
416#define BLF_FLEXRAYRCVMSG_DIR_TX_REQ 0x04
417
418#define BLF_FLEXRAYRCVMSG_CHANNELMASK_RES 0x00
419#define BLF_FLEXRAYRCVMSG_CHANNELMASK_A 0x01
420#define BLF_FLEXRAYRCVMSG_CHANNELMASK_B 0x02
421#define BLF_FLEXRAYRCVMSG_CHANNELMASK_AB 0x03
422
423#define BLF_FLEXRAYRCVMSG_FRAME_FLAG_NULL_FRAME 0x00000001
424#define BLF_FLEXRAYRCVMSG_FRAME_FLAG_VALID_DATA 0x00000002
425#define BLF_FLEXRAYRCVMSG_FRAME_FLAG_SYNC 0x00000004
426#define BLF_FLEXRAYRCVMSG_FRAME_FLAG_STARTUP 0x00000008
427#define BLF_FLEXRAYRCVMSG_FRAME_FLAG_PAYLOAD_PREAM 0x00000010
428#define BLF_FLEXRAYRCVMSG_FRAME_FLAG_RES_20 0x00000020
429#define BLF_FLEXRAYRCVMSG_FRAME_FLAG_ERROR 0x00000040
430#define BLF_FLEXRAYRCVMSG_FRAME_FLAG_RES_80 0x00000080
431
432typedef struct blf_flexrayrcvmessage {
433 uint16_t channel;
434 uint16_t version;
435 uint16_t channelMask; /* 0 res, 1 A, 2 B, 3 A+B */
436 uint16_t dir; /* 0 RX, 1 TX, 2 TX Req, 3 internal, 4 internal*/ /* high byte reserved! */
437 uint32_t clientIndex;
438 uint32_t clusterNo;
439 uint16_t frameId;
440 uint16_t headerCrc1;
441 uint16_t headerCrc2;
442 uint16_t payloadLength;
443 uint16_t payloadLengthValid;
444 uint16_t cycle; /* high byte reserved! */
445 uint32_t tag;
446 uint32_t data;
447 uint32_t frameFlags;
448 uint32_t appParameter;
449 /* if ext, skip 40 bytes */
450 /* payload bytes */
451 /* uint16_t res3 */
452 /* uint32_t res4 */
454
455
456/* see https://bitbucket.org/tobylorenz/vector_blf/src/master/src/Vector/BLF/FlexRayVFrReceiveMsgEx.h */
457
458/* defines see above BLF_FLEXRAYRCVMSG_* */
459
461 uint16_t channel;
462 uint16_t version;
463 uint16_t channelMask; /* 0 res, 1 A, 2 B, 3 A+B */
464 uint16_t dir; /* 0 RX, 1 TX, 2 TX Req, 3 internal, 4 internal*/
465 uint32_t clientIndex;
466 uint32_t clusterNo;
467 uint16_t frameId;
468 uint16_t headerCrc1;
469 uint16_t headerCrc2;
470 uint16_t payloadLength;
471 uint16_t payloadLengthValid;
472 uint16_t cycle;
473 uint32_t tag;
474 uint32_t data;
475 uint32_t frameFlags;
476 uint32_t appParameter;
477 uint32_t frameCRC;
478 uint32_t frameLengthInNs;
479 uint16_t frameId1;
480 uint16_t pduOffset;
481 uint16_t blfLogMask;
482 uint16_t res1;
483 uint32_t res2;
484 uint32_t res3;
485 uint32_t res4;
486 uint32_t res5;
487 uint32_t res6;
488 uint32_t res7;
489 /* payload bytes */
491
492
493/* see https://bitbucket.org/tobylorenz/vector_blf/src/master/src/Vector/BLF/LinMessage.h */
494
495typedef struct blf_linmessage {
496 uint16_t channel;
497 uint8_t id;
498 uint8_t dlc;
499 uint8_t data[8];
500 uint8_t fsmId;
501 uint8_t fsmState;
502 uint8_t headerTime;
503 uint8_t fullTime;
504 uint16_t crc;
505 uint8_t dir; /* 0 RX, 1 TX Receipt, 2 TX Req */
506 uint8_t res1;
507/* This field is optional and skipping does not hurt us.
508 uint32_t res2;
509*/
511
512typedef struct blf_linrcverror {
513 uint16_t channel;
514 uint8_t id;
515 uint8_t dlc;
516 uint8_t fsmId;
517 uint8_t fsmState;
518 uint8_t headerTime;
519 uint8_t fullTime;
520 uint8_t stateReason;
521 uint8_t offendingByte;
522 uint8_t shortError;
523 uint8_t timeoutDuringDlcDetection;
525
526typedef struct blf_linsenderror {
527 uint16_t channel;
528 uint8_t id;
529 uint8_t dlc;
530 uint8_t fsmId;
531 uint8_t fsmState;
532 uint8_t headerTime;
533 uint8_t fullTime;
535
536typedef struct blf_linwakeupevent {
537 uint16_t channel;
538 uint8_t signal;
539 uint8_t external;
541
542typedef struct blf_linbusevent {
543 uint64_t sof;
544 uint32_t eventBaudrate;
545 uint16_t channel;
546 uint8_t res1[2];
548
550 blf_linbusevent_t linBusEvent;
551 uint64_t synchBreakLength;
552 uint64_t synchDelLength;
554
556 blf_linsynchfieldevent_t linSynchFieldEvent;
557 uint16_t supplierId; /* LIN 2.0 or higher */
558 uint16_t messageId; /* LIN 2.0: message identifier, LIN 2.1: position index as specified in LDF */
559 uint8_t configuredNodeAddress; /* LIN 2.0 or higher */
560 uint8_t id;
561 uint8_t dlc;
562 uint8_t checksumModel;
564
566 blf_linmessagedescriptor_t linMessageDescriptor;
567 uint64_t databyteTimestamps[9]; /* Byte 0: Timestamp of last header byte, Bytes 1-9: Timestamps of data bytes 1-8 */
569
570typedef struct blf_linmessage2 {
571 blf_lindatabytetimestampevent_t linDataByteTimestampEvent;
572 uint8_t data[8];
573 uint16_t crc;
574 uint8_t dir; /* 0 RX, 1 TX Receipt, 2 TX Req */
575 uint8_t simulated; /* 0 Real frame, 1 Simulated frame */
576 uint8_t isEtf; /* 0 Not event triggered frame, 1 Event triggered frame */
577 uint8_t eftAssocIndex;
578 uint8_t eftAssocEftId;
579 uint8_t fsmId; /* Obsolete */
580 uint8_t fsmState; /* Obsolete */
581 uint8_t res1[3];
582/* These fields are optional and skipping does not hurt us.
583 uint32_t respBaudrate;
584 double exactHeaderBaudrate;
585 uint32_t earlyStopBitOffset;
586 uint32_t earlyStopBitOffsetResponse;
587*/
589
590typedef struct blf_lincrcerror2 {
591 blf_lindatabytetimestampevent_t linDataByteTimestampEvent;
592 uint8_t data[8];
593 uint16_t crc;
594 uint8_t dir; /* 0 RX, 1 TX Receipt, 2 TX Req */
595 uint8_t fsmId; /* Obsolete */
596 uint8_t fsmState; /* Obsolete */
597 uint8_t simulated; /* 0 Real frame, 1 Simulated frame */
598 uint8_t res1[2];
599/* These fields are optional and skipping does not hurt us.
600 uint32_t respBaudrate;
601 uint8_t res2[4];
602 double exactHeaderBaudrate;
603 uint32_t earlyStopBitOffset;
604 uint32_t earlyStopBitOffsetResponse;
605*/
607
608typedef struct blf_linrcverror2 {
609 blf_lindatabytetimestampevent_t linDataByteTimestampEvent;
610 uint8_t data[8];
611 uint8_t fsmId; /* Obsolete */
612 uint8_t fsmState; /* Obsolete */
613 uint8_t stateReason;
614 uint8_t offendingByte;
615 uint8_t shortError;
616 uint8_t timeoutDuringDlcDetection;
617 uint8_t isEtf;
618 uint8_t hasDataBytes;
619/* These fields are optional and skipping does not hurt us.
620 uint32_t respBaudrate;
621 uint8_t res[4];
622 double exactHeaderBaudrate;
623 uint32_t earlyStopBitOffset;
624 uint32_t earlyStopBitOffsetResponse;
625*/
627
628typedef struct blf_linsenderror2 {
629 blf_linmessagedescriptor_t linMessageDescriptor;
630 uint64_t eoh;
631 uint8_t isEtf;
632 uint8_t fsmId; /* Obsolete */
633 uint8_t fsmState; /* Obsolete */
634 uint8_t res1;
635/* These fields are optional and skipping does not hurt us.
636 uint8_t res2[4];
637 double exactHeaderBaudrate;
638 uint32_t earlyStopBitOffset;
639*/
641
642typedef struct blf_linwakeupevent2 {
643 blf_linbusevent_t linBusEvent;
644 uint8_t lengthInfo; /* Wake-up length: 0 = OK; 1 = Too short; 2 = Too long. */
645 uint8_t signal;
646 uint8_t external;
647 uint8_t res;
649
650typedef struct blf_linsleepmodeevent {
651 uint16_t channel;
652 uint8_t reason;
653 uint8_t flags;
655
656#define BLF_LIN_WU_SLEEP_REASON_START_STATE 0 /* Initial state of the interface */
657#define BLF_LIN_SLEEP_REASON_GO_TO_SLEEP_FRAME 1
658#define BLF_LIN_SLEEP_REASON_BUS_IDLE_TIMEOUT 2
659#define BLF_LIN_SLEEP_REASON_SILENT_SLEEPMODE_CMD 3 /* Command to shorten bus idle timeout */
660#define BLF_LIN_WU_REASON_EXTERNAL_WAKEUP_SIG 9
661#define BLF_LIN_WU_REASON_INTERNAL_WAKEUP_SIG 10
662#define BLF_LIN_WU_REASON_BUS_TRAFFIC 11
663#define BLF_LIN_NO_SLEEP_REASON_BUS_TRAFFIC 18 /* LIN hardware does not go into Sleep mode in spite of request to do so */
664
665
666/* see https://bitbucket.org/tobylorenz/vector_blf/src/master/src/Vector/BLF/AppText.h */
667
668typedef struct blf_apptext {
669 uint32_t source;
670 uint32_t reservedAppText1;
671 uint32_t textLength;
672 uint32_t reservedAppText2;
674
675#define BLF_APPTEXT_COMMENT 0x00000000
676#define BLF_APPTEXT_CHANNEL 0x00000001
677#define BLF_APPTEXT_METADATA 0x00000002
678#define BLF_APPTEXT_ATTACHMENT 0x00000003
679#define BLF_APPTEXT_TRACELINE 0x00000004
680#define BLF_APPTEXT_CONT 0x000000FE
681#define BLF_APPTEXT_FAILED 0x000000FF
682
683#define BLF_APPTEXT_XML_GENERAL 0x01
684#define BLF_APPTEXT_XML_CHANNELS 0x02
685#define BLF_APPTEXT_XML_IDENTITY 0x03
686
687#define BLF_BUSTYPE_CAN 1
688#define BLF_BUSTYPE_LIN 5
689#define BLF_BUSTYPE_MOST 6
690#define BLF_BUSTYPE_FLEXRAY 7
691#define BLF_BUSTYPE_J1708 9
692#define BLF_BUSTYPE_ETHERNET 11
693#define BLF_BUSTYPE_WLAN 13
694#define BLF_BUSTYPE_AFDX 14
695
696/* see https://bitbucket.org/tobylorenz/vector_blf/src/master/src/Vector/BLF/EthernetStatus.h */
697typedef struct blf_ethernet_status {
698 uint16_t channel;
699 uint16_t flags;
700 uint8_t linkStatus;
701 uint8_t ethernetPhy;
702 uint8_t duplex;
703 uint8_t mdi;
704 uint8_t connector;
705 uint8_t clockMode;
706 uint8_t pairs;
707 uint8_t hardwareChannel;
708 uint32_t bitrate;
709/* Starting from version 1
710 uint64_t linkUpDuration; // In nanoseconds
711*/
713
714#define BLF_ETH_STATUS_LINKSTATUS 0x0001
715#define BLF_ETH_STATUS_BITRATE 0x0002
716#define BLF_ETH_STATUS_ETHERNETPHY 0x0004
717#define BLF_ETH_STATUS_DUPLEX 0x0008
718#define BLF_ETH_STATUS_MDITYPE 0x0010
719#define BLF_ETH_STATUS_CONNECTOR 0x0020
720#define BLF_ETH_STATUS_CLOCKMODE 0x0040
721#define BLF_ETH_STATUS_BRPAIR 0x0080
722#define BLF_ETH_STATUS_HARDWARECHANNEL 0x0100
723#define BLF_ETH_STATUS_LINKUPDURATION 0x0200
724
725typedef struct blf_ethernet_phystate {
726 uint16_t channel;
727 uint16_t flags;
728 uint8_t phyState;
729 uint8_t phyEvent;
730 uint8_t hardwareChannel;
731 uint8_t res1;
733
734#define BLF_PHY_STATE_PHYSTATE 0x0001
735#define BLF_PHY_STATE_PHYEVENT 0x0002
736#define BLF_PHY_STATE_HARDWARECHANNEL 0x0004
737
738
739/* see https://bitbucket.org/tobylorenz/vector_blf/src/master/src/Vector/BLF/ObjectHeaderBase.h */
740
741#define BLF_OBJTYPE_UNKNOWN 0
742#define BLF_OBJTYPE_CAN_MESSAGE 1
743#define BLF_OBJTYPE_CAN_ERROR 2
744#define BLF_OBJTYPE_CAN_OVERLOAD 3
745#define BLF_OBJTYPE_CAN_STATISTIC 4
746#define BLF_OBJTYPE_APP_TRIGGER 5
747#define BLF_OBJTYPE_ENV_INTEGER 6
748#define BLF_OBJTYPE_ENV_DOUBLE 7
749#define BLF_OBJTYPE_ENV_STRING 8
750#define BLF_OBJTYPE_ENV_DATA 9
751#define BLF_OBJTYPE_LOG_CONTAINER 10
752#define BLF_OBJTYPE_LIN_MESSAGE 11
753#define BLF_OBJTYPE_LIN_CRC_ERROR 12
754#define BLF_OBJTYPE_LIN_DLC_INFO 13
755#define BLF_OBJTYPE_LIN_RCV_ERROR 14
756#define BLF_OBJTYPE_LIN_SND_ERROR 15
757#define BLF_OBJTYPE_LIN_SLV_TIMEOUT 16
758#define BLF_OBJTYPE_LIN_SCHED_MODCH 17
759#define BLF_OBJTYPE_LIN_SYN_ERROR 18
760#define BLF_OBJTYPE_LIN_BAUDRATE 19
761#define BLF_OBJTYPE_LIN_SLEEP 20
762#define BLF_OBJTYPE_LIN_WAKEUP 21
763#define BLF_OBJTYPE_MOST_SPY 22
764#define BLF_OBJTYPE_MOST_CTRL 23
765#define BLF_OBJTYPE_MOST_LIGHTLOCK 24
766#define BLF_OBJTYPE_MOST_STATISTIC 25
767#define BLF_OBJTYPE_FLEXRAY_DATA 29
768#define BLF_OBJTYPE_FLEXRAY_SYNC 30
769#define BLF_OBJTYPE_CAN_DRIVER_ERROR 31
770#define BLF_OBJTYPE_MOST_PKT 32
771#define BLF_OBJTYPE_MOST_PKT2 33
772#define BLF_OBJTYPE_MOST_HWMODE 34
773#define BLF_OBJTYPE_MOST_REG 35
774#define BLF_OBJTYPE_MOST_GENREG 36
775#define BLF_OBJTYPE_MOST_NETSTATE 37
776#define BLF_OBJTYPE_MOST_DATALOST 38
777#define BLF_OBJTYPE_MOST_TRIGGER 39
778#define BLF_OBJTYPE_FLEXRAY_CYCLE 40
779#define BLF_OBJTYPE_FLEXRAY_MESSAGE 41
780#define BLF_OBJTYPE_LIN_CHECKSUM_INFO 42
781#define BLF_OBJTYPE_LIN_SPIKE_EVENT 43
782#define BLF_OBJTYPE_CAN_DRIVER_SYNC 44
783#define BLF_OBJTYPE_FLEXRAY_STATUS 45
784#define BLF_OBJTYPE_GPS_EVENT 46
785#define BLF_OBJTYPE_FLEXRAY_ERROR 47
786#define BLF_OBJTYPE_FLEXRAY_STATUS2 48
787#define BLF_OBJTYPE_FLEXRAY_STARTCYCLE 49
788#define BLF_OBJTYPE_FLEXRAY_RCVMESSAGE 50
789#define BLF_OBJTYPE_REALTIMECLOCK 51
790#define BLF_OBJTYPE_LIN_STATISTIC 54
791#define BLF_OBJTYPE_J1708_MESSAGE 55
792#define BLF_OBJTYPE_J1708_VIRTUAL_MSG 56
793#define BLF_OBJTYPE_LIN_MESSAGE2 57
794#define BLF_OBJTYPE_LIN_SND_ERROR2 58
795#define BLF_OBJTYPE_LIN_SYN_ERROR2 59
796#define BLF_OBJTYPE_LIN_CRC_ERROR2 60
797#define BLF_OBJTYPE_LIN_RCV_ERROR2 61
798#define BLF_OBJTYPE_LIN_WAKEUP2 62
799#define BLF_OBJTYPE_LIN_SPIKE_EVENT2 63
800#define BLF_OBJTYPE_LIN_LONG_DOM_SIG 64
801#define BLF_OBJTYPE_APP_TEXT 65
802#define BLF_OBJTYPE_FLEXRAY_RCVMESSAGE_EX 66
803#define BLF_OBJTYPE_MOST_STATISTICEX 67
804#define BLF_OBJTYPE_MOST_TXLIGHT 68
805#define BLF_OBJTYPE_MOST_ALLOCTAB 69
806#define BLF_OBJTYPE_MOST_STRESS 70
807#define BLF_OBJTYPE_ETHERNET_FRAME 71
808#define BLF_OBJTYPE_SYS_VARIABLE 72
809#define BLF_OBJTYPE_CAN_ERROR_EXT 73
810#define BLF_OBJTYPE_CAN_DRIVER_ERROR_EXT 74
811#define BLF_OBJTYPE_LIN_LONG_DOM_SIG2 75
812#define BLF_OBJTYPE_MOST_150_MESSAGE 76
813#define BLF_OBJTYPE_MOST_150_PKT 77
814#define BLF_OBJTYPE_MOST_ETHERNET_PKT 78
815#define BLF_OBJTYPE_MOST_150_MESSAGE_FRAGMENT 79
816#define BLF_OBJTYPE_MOST_150_PKT_FRAGMENT 80
817#define BLF_OBJTYPE_MOST_ETHERNET_PKT_FRAGMENT 81
818#define BLF_OBJTYPE_MOST_SYSTEM_EVENT 82
819#define BLF_OBJTYPE_MOST_150_ALLOCTAB 83
820#define BLF_OBJTYPE_MOST_50_MESSAGE 84
821#define BLF_OBJTYPE_MOST_50_PKT 85
822#define BLF_OBJTYPE_CAN_MESSAGE2 86
823#define BLF_OBJTYPE_LIN_UNEXPECTED_WAKEUP 87
824#define BLF_OBJTYPE_LIN_SHORT_OR_SLOW_RESPONSE 88
825#define BLF_OBJTYPE_LIN_DISTURBANCE_EVENT 89
826#define BLF_OBJTYPE_SERIAL_EVENT 90
827#define BLF_OBJTYPE_OVERRUN_ERROR 91
828#define BLF_OBJTYPE_EVENT_COMMENT 92
829#define BLF_OBJTYPE_WLAN_FRAME 93
830#define BLF_OBJTYPE_WLAN_STATISTIC 94
831#define BLF_OBJTYPE_MOST_ECL 95
832#define BLF_OBJTYPE_GLOBAL_MARKER 96
833#define BLF_OBJTYPE_AFDX_FRAME 97
834#define BLF_OBJTYPE_AFDX_STATISTIC 98
835#define BLF_OBJTYPE_KLINE_STATUSEVENT 99
836#define BLF_OBJTYPE_CAN_FD_MESSAGE 100
837#define BLF_OBJTYPE_CAN_FD_MESSAGE_64 101
838#define BLF_OBJTYPE_ETHERNET_RX_ERROR 102
839#define BLF_OBJTYPE_ETHERNET_STATUS 103
840#define BLF_OBJTYPE_CAN_FD_ERROR_64 104
841#define BLF_OBJTYPE_AFDX_STATUS 106
842#define BLF_OBJTYPE_AFDX_BUS_STATISTIC 107
843#define BLF_OBJTYPE_AFDX_ERROR_EVENT 109
844#define BLF_OBJTYPE_A429_ERROR 110
845#define BLF_OBJTYPE_A429_STATUS 111
846#define BLF_OBJTYPE_A429_BUS_STATISTIC 112
847#define BLF_OBJTYPE_A429_MESSAGE 113
848#define BLF_OBJTYPE_ETHERNET_STATISTIC 114
849#define BLF_OBJTYPE_RESERVED5 115
850#define BLF_OBJTYPE_RESERVED6 116
851#define BLF_OBJTYPE_RESERVED7 117
852#define BLF_OBJTYPE_TEST_STRUCTURE 118
853#define BLF_OBJTYPE_DIAG_REQUEST_INTERPRETATION 119
854#define BLF_OBJTYPE_ETHERNET_FRAME_EX 120
855#define BLF_OBJTYPE_ETHERNET_FRAME_FORWARDED 121
856#define BLF_OBJTYPE_ETHERNET_ERROR_EX 122
857#define BLF_OBJTYPE_ETHERNET_ERROR_FORWARDED 123
858#define BLF_OBJTYPE_FUNCTION_BUS 124
859#define BLF_OBJTYPE_DATA_LOST_BEGIN 125
860#define BLF_OBJTYPE_DATA_LOST_END 126
861#define BLF_OBJTYPE_WATER_MARK_EVENT 127
862#define BLF_OBJTYPE_TRIGGER_CONDITION 128
863#define BLF_OBJTYPE_CAN_SETTING_CHANGED 129
864#define BLF_OBJTYPE_DISTRIBUTED_OBJECT_MEMBER 130
865#define BLF_OBJTYPE_ATTRIBUTE_EVENT 131
866#define BLF_OBJTYPE_DISTRIBUTED_OBJECT_CHANGE 132
867#define BLF_OBJTYPE_ETHERNET_PHY_STATE 133
868
869#endif
870
871/*
872 * Editor modelines - https://www.wireshark.org/tools/modelines.html
873 *
874 * Local variables:
875 * c-basic-offset: 4
876 * tab-width: 8
877 * indent-tabs-mode: nil
878 * End:
879 *
880 * vi: set shiftwidth=4 tabstop=8 expandtab:
881 * :indentSize=4:tabSize=8:noTabs=true:
882 */
Definition blf.h:668
Definition blf.h:102
Definition blf.h:288
Definition blf.h:311
Definition blf.h:332
Definition blf.h:267
Definition blf.h:235
Definition blf.h:220
Definition blf.h:210
Definition blf.h:66
Definition blf.h:725
Definition blf.h:180
Definition blf.h:697
Definition blf.h:162
Definition blf.h:150
Definition blf.h:78
Definition blf.h:359
Definition blf.h:393
Definition blf.h:432
Definition blf.h:460
Definition blf.h:542
Definition blf.h:590
Definition blf.h:565
Definition blf.h:570
Definition blf.h:495
Definition blf.h:555
Definition blf.h:608
Definition blf.h:512
Definition blf.h:628
Definition blf.h:526
Definition blf.h:650
Definition blf.h:549
Definition blf.h:642
Definition blf.h:536
Definition blf.h:110
Definition blf.h:129
Definition blf.h:138
Definition blf.h:118
Definition blf.h:190
Definition wtap-int.h:37