| Wireshark 4.7.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
22 wtap_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
66 typedef 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;
75} blf_date_t;
76
77/* BLF File Header */
78 typedef 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;
99} blf_fileheader_t;
100
101/* BLF Block Header */
102 typedef 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;
108} blf_blockheader_t;
109
110 typedef struct blf_logcontainerheader {
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;
116} blf_logcontainerheader_t;
117
118 typedef struct blf_logobjectheader {
119 uint32_t flags;
120 uint16_t client_index;
121 uint16_t object_version;
122 uint64_t object_timestamp;
123} blf_logobjectheader_t;
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
129 typedef 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;
136} blf_logobjectheader2_t;
137
138 typedef struct blf_logobjectheader3 {
139 uint32_t flags;
140 uint16_t static_size;
141 uint16_t object_version;
142 uint64_t object_timestamp;
143} blf_logobjectheader3_t;
144
145
146#define BLF_DIR_RX 0
147#define BLF_DIR_TX 1
148#define BLF_DIR_TX_RQ 2
149
150 typedef struct blf_ethernetframeheader {
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;
160} blf_ethernetframeheader_t;
161
162 typedef struct blf_ethernetframeheader_ex {
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;
173} blf_ethernetframeheader_ex_t;
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
180 typedef 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;
188} blf_ethernet_rxerror_t;
189
190 typedef 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;
199} blf_wlanframeheader_t;
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*/
210 typedef struct blf_canmessage {
211 uint16_t channel;
212 uint8_t flags;
213 uint8_t dlc;
214 uint32_t id;
215} blf_canmessage_t;
216
217
218/* see https://bitbucket.org/tobylorenz/vector_blf/src/master/src/Vector/BLF/CanMessage2.h */
219
220 typedef struct blf_canmessage2_trailer {
221 uint32_t frameLength_in_ns;
222 uint8_t bitCount;
223 uint8_t reserved1;
224 uint16_t reserved2;
225} blf_canmessage2_trailer_t;
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
235 typedef 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 */
248} blf_canfdmessage_t;
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 0x020000
266
267 typedef 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;
283} blf_canfdmessage64_t;
284
285
286/* see https://bitbucket.org/tobylorenz/vector_blf/src/master/src/Vector/BLF/CanErrorFrame.h */
287
288 typedef struct blf_canerror {
289 uint16_t channel;
290 uint16_t length;
291} blf_canerror_t;
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
311 typedef 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;
323} blf_canerrorext_t;
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
332 typedef 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;
351} blf_canfderror64_t;
352
353
354/* CAN-XL */
355
356#define BLF_CANXLCHANNELFRAME_FLAG_REMOTE_FRAME 0x10
357#define BLF_CANXLCHANNELFRAME_FLAG_SRR 0x200
358#define BLF_CANXLCHANNELFRAME_FLAG_FDF 0x1000
359#define BLF_CANXLCHANNELFRAME_FLAG_BRS 0x2000
360#define BLF_CANXLCHANNELFRAME_FLAG_ESI 0x4000
361#define BLF_CANXLCHANNELFRAME_FLAG_XLF 0x400000
362#define BLF_CANXLCHANNELFRAME_FLAG_RRS 0x800000
363#define BLF_CANXLCHANNELFRAME_FLAG_SEC 0x1000000
364
365 typedef struct blf_canxlchannelframe {
366 uint8_t channel;
367 uint8_t tx_count;
368 uint8_t dir;
369 uint8_t res1;
370 uint32_t frameLength_in_ns;
371
372 uint16_t bitCount;
373 uint16_t res2;
374 uint32_t frameIdentifier;
375
376 uint8_t serviceDataUnitType;
377 uint8_t res3;
378 uint16_t dlc;
379 uint16_t dataLength;
380 uint16_t stuffBitCount;
381
382 uint16_t prefaceCRC;
383 uint8_t virtualControllerAreaNetChannelID;
384 uint8_t res4;
385 uint32_t acceptanceField;
386
387 uint8_t stuffCount;
388 uint8_t res5;
389 uint16_t res6;
390 uint32_t crc;
391
392 uint32_t timeOffsetBrsNs;
393 uint32_t timeOffsetCrcDelNs;
394
395 uint32_t flags;
396 uint32_t reserved;
397
398 uint64_t arbitrationDataBitTimingConfig;
399 uint64_t arbitrationDataHwChannelSettings;
400 uint64_t fdPhaseBitTimingConfig;
401 uint64_t fdPhaseHwChannelSettings;
402 uint64_t xlPhaseBitTimingConfig;
403 uint64_t xlPhaseHwChannelSettings;
404} blf_canxlchannelframe_t;
405
406/* see https://bitbucket.org/tobylorenz/vector_blf/src/master/src/Vector/BLF/FlexRayData.h */
407
408#define BLF_FLEXRAYDATA_FRAME 0x01
409#define BLF_FLEXRAYDATA_CHANNEL_B 0x80
410
411 typedef struct blf_flexraydata {
412 uint16_t channel;
413 uint8_t mux;
414 uint8_t len;
415 uint16_t messageId;
416 uint16_t crc;
417 uint8_t dir;
418 uint8_t reservedFlexRayData1;
419 uint16_t reservedFlexRayData2;
420} blf_flexraydata_t;
421
422
423/* see https://bitbucket.org/tobylorenz/vector_blf/src/master/src/Vector/BLF/FlexRayV6Message.h */
424
425#define BLF_FLEXRAYMESSAGE_DIR_RX 0x01
426#define BLF_FLEXRAYMESSAGE_DIR_TX 0x02
427#define BLF_FLEXRAYMESSAGE_DIR_TX_REQ 0x04
428
429#define BLF_FLEXRAYMESSAGE_STATE_PPI 0x01
430#define BLF_FLEXRAYMESSAGE_STATE_SFI 0x02
431#define BLF_FLEXRAYMESSAGE_STATE_RES_BIT2 0x04
432#define BLF_FLEXRAYMESSAGE_STATE_NFI 0x08
433#define BLF_FLEXRAYMESSAGE_STATE_STFI 0x10
434#define BLF_FLEXRAYMESSAGE_STATE_FORMAT 0xe0
435
436#define BLF_FLEXRAYMESSAGE_HEADER_BIT_NM 0x01
437#define BLF_FLEXRAYMESSAGE_HEADER_BIT_SYNC 0x02
438#define BLF_FLEXRAYMESSAGE_HEADER_BIT_RES 0x04
439
440#define BLF_DLT_FLEXRAY_STFI 0x08
441#define BLF_DLT_FLEXRAY_SFI 0x10
442#define BLF_DLT_FLEXRAY_NFI 0x20
443#define BLF_DLT_FLEXRAY_PPI 0x40
444
445 typedef struct blf_flexraymessage {
446 uint16_t channel;
447 uint8_t dir; /* Flags: 0 RX, 1 TX, 2 TX Req, 3 internal, 4 internal*/
448 uint8_t lowTime;
449 uint32_t fpgaTick;
450 uint32_t fpgaTickOverflow;
451 uint32_t clientIndexFlexRayV6Message;
452 uint32_t clusterTime;
453 uint16_t frameId;
454 uint16_t headerCrc;
455 uint16_t frameState;
456 uint8_t length;
457 uint8_t cycle;
458 uint8_t headerBitMask;
459 uint8_t reservedFlexRayV6Message1;
460 uint16_t reservedFlexRayV6Message2;
461} blf_flexraymessage_t;
462
463
464/* see https://bitbucket.org/tobylorenz/vector_blf/src/master/src/Vector/BLF/FlexRayVFrReceiveMsg.h */
465
466#define BLF_FLEXRAYRCVMSG_DIR_RX 0x01
467#define BLF_FLEXRAYRCVMSG_DIR_TX 0x02
468#define BLF_FLEXRAYRCVMSG_DIR_TX_REQ 0x04
469
470#define BLF_FLEXRAYRCVMSG_CHANNELMASK_RES 0x00
471#define BLF_FLEXRAYRCVMSG_CHANNELMASK_A 0x01
472#define BLF_FLEXRAYRCVMSG_CHANNELMASK_B 0x02
473#define BLF_FLEXRAYRCVMSG_CHANNELMASK_AB 0x03
474
475#define BLF_FLEXRAYRCVMSG_FRAME_FLAG_NULL_FRAME 0x00000001
476#define BLF_FLEXRAYRCVMSG_FRAME_FLAG_VALID_DATA 0x00000002
477#define BLF_FLEXRAYRCVMSG_FRAME_FLAG_SYNC 0x00000004
478#define BLF_FLEXRAYRCVMSG_FRAME_FLAG_STARTUP 0x00000008
479#define BLF_FLEXRAYRCVMSG_FRAME_FLAG_PAYLOAD_PREAM 0x00000010
480#define BLF_FLEXRAYRCVMSG_FRAME_FLAG_RES_20 0x00000020
481#define BLF_FLEXRAYRCVMSG_FRAME_FLAG_ERROR 0x00000040
482#define BLF_FLEXRAYRCVMSG_FRAME_FLAG_RES_80 0x00000080
483
484 typedef struct blf_flexrayrcvmessage {
485 uint16_t channel;
486 uint16_t version;
487 uint16_t channelMask; /* 0 res, 1 A, 2 B, 3 A+B */
488 uint16_t dir; /* 0 RX, 1 TX, 2 TX Req, 3 internal, 4 internal*/ /* high byte reserved! */
489 uint32_t clientIndex;
490 uint32_t clusterNo;
491 uint16_t frameId;
492 uint16_t headerCrc1;
493 uint16_t headerCrc2;
494 uint16_t payloadLength;
495 uint16_t payloadLengthValid;
496 uint16_t cycle; /* high byte reserved! */
497 uint32_t tag;
498 uint32_t data;
499 uint32_t frameFlags;
500 uint32_t appParameter;
501 /* if ext, skip 40 bytes */
502 /* payload bytes */
503 /* uint16_t res3 */
504 /* uint32_t res4 */
505} blf_flexrayrcvmessage_t;
506
507
508/* see https://bitbucket.org/tobylorenz/vector_blf/src/master/src/Vector/BLF/FlexRayVFrReceiveMsgEx.h */
509
510/* defines see above BLF_FLEXRAYRCVMSG_* */
511
512 typedef struct blf_flexrayrcvmessageex {
513 uint16_t channel;
514 uint16_t version;
515 uint16_t channelMask; /* 0 res, 1 A, 2 B, 3 A+B */
516 uint16_t dir; /* 0 RX, 1 TX, 2 TX Req, 3 internal, 4 internal*/
517 uint32_t clientIndex;
518 uint32_t clusterNo;
519 uint16_t frameId;
520 uint16_t headerCrc1;
521 uint16_t headerCrc2;
522 uint16_t payloadLength;
523 uint16_t payloadLengthValid;
524 uint16_t cycle;
525 uint32_t tag;
526 uint32_t data;
527 uint32_t frameFlags;
528 uint32_t appParameter;
529 uint32_t frameCRC;
530 uint32_t frameLengthInNs;
531 uint16_t frameId1;
532 uint16_t pduOffset;
533 uint16_t blfLogMask;
534 uint16_t res1;
535 uint32_t res2;
536 uint32_t res3;
537 uint32_t res4;
538 uint32_t res5;
539 uint32_t res6;
540 uint32_t res7;
541 /* payload bytes */
542} blf_flexrayrcvmessageex_t;
543
544
545/* see https://bitbucket.org/tobylorenz/vector_blf/src/master/src/Vector/BLF/LinMessage.h */
546
547 typedef struct blf_linmessage {
548 uint16_t channel;
549 uint8_t id;
550 uint8_t dlc;
551 uint8_t data[8];
552 uint8_t fsmId;
553 uint8_t fsmState;
554 uint8_t headerTime;
555 uint8_t fullTime;
556 uint16_t crc;
557 uint8_t dir; /* 0 RX, 1 TX Receipt, 2 TX Req */
558 uint8_t res1;
559/* This field is optional and skipping does not hurt us.
560 uint32_t res2;
561*/
562} blf_linmessage_t;
563
564 typedef struct blf_linrcverror {
565 uint16_t channel;
566 uint8_t id;
567 uint8_t dlc;
568 uint8_t fsmId;
569 uint8_t fsmState;
570 uint8_t headerTime;
571 uint8_t fullTime;
572 uint8_t stateReason;
573 uint8_t offendingByte;
574 uint8_t shortError;
575 uint8_t timeoutDuringDlcDetection;
576} blf_linrcverror_t;
577
578 typedef struct blf_linsenderror {
579 uint16_t channel;
580 uint8_t id;
581 uint8_t dlc;
582 uint8_t fsmId;
583 uint8_t fsmState;
584 uint8_t headerTime;
585 uint8_t fullTime;
586} blf_linsenderror_t;
587
588 typedef struct blf_linwakeupevent {
589 uint16_t channel;
590 uint8_t signal;
591 uint8_t external;
592} blf_linwakeupevent_t;
593
594 typedef struct blf_linbusevent {
595 uint64_t sof;
596 uint32_t eventBaudrate;
597 uint16_t channel;
598 uint8_t res1[2];
599} blf_linbusevent_t;
600
601 typedef struct blf_linsynchfieldevent {
602 blf_linbusevent_t linBusEvent;
603 uint64_t synchBreakLength;
604 uint64_t synchDelLength;
605} blf_linsynchfieldevent_t;
606
607 typedef struct blf_linmessagedescriptor {
608 blf_linsynchfieldevent_t linSynchFieldEvent;
609 uint16_t supplierId; /* LIN 2.0 or higher */
610 uint16_t messageId; /* LIN 2.0: message identifier, LIN 2.1: position index as specified in LDF */
611 uint8_t configuredNodeAddress; /* LIN 2.0 or higher */
612 uint8_t id;
613 uint8_t dlc;
614 uint8_t checksumModel;
615} blf_linmessagedescriptor_t;
616
617 typedef struct blf_lindatabytetimestampevent {
618 blf_linmessagedescriptor_t linMessageDescriptor;
619 uint64_t databyteTimestamps[9]; /* Byte 0: Timestamp of last header byte, Bytes 1-9: Timestamps of data bytes 1-8 */
620} blf_lindatabytetimestampevent_t;
621
622 typedef struct blf_linmessage2 {
623 blf_lindatabytetimestampevent_t linDataByteTimestampEvent;
624 uint8_t data[8];
625 uint16_t crc;
626 uint8_t dir; /* 0 RX, 1 TX Receipt, 2 TX Req */
627 uint8_t simulated; /* 0 Real frame, 1 Simulated frame */
628 uint8_t isEtf; /* 0 Not event triggered frame, 1 Event triggered frame */
629 uint8_t eftAssocIndex;
630 uint8_t eftAssocEftId;
631 uint8_t fsmId; /* Obsolete */
632 uint8_t fsmState; /* Obsolete */
633 uint8_t res1[3];
634/* These fields are optional and skipping does not hurt us.
635 uint32_t respBaudrate;
636 double exactHeaderBaudrate;
637 uint32_t earlyStopBitOffset;
638 uint32_t earlyStopBitOffsetResponse;
639*/
640} blf_linmessage2_t;
641
642 typedef struct blf_lincrcerror2 {
643 blf_lindatabytetimestampevent_t linDataByteTimestampEvent;
644 uint8_t data[8];
645 uint16_t crc;
646 uint8_t dir; /* 0 RX, 1 TX Receipt, 2 TX Req */
647 uint8_t fsmId; /* Obsolete */
648 uint8_t fsmState; /* Obsolete */
649 uint8_t simulated; /* 0 Real frame, 1 Simulated frame */
650 uint8_t res1[2];
651/* These fields are optional and skipping does not hurt us.
652 uint32_t respBaudrate;
653 uint8_t res2[4];
654 double exactHeaderBaudrate;
655 uint32_t earlyStopBitOffset;
656 uint32_t earlyStopBitOffsetResponse;
657*/
658} blf_lincrcerror2_t;
659
660 typedef struct blf_linrcverror2 {
661 blf_lindatabytetimestampevent_t linDataByteTimestampEvent;
662 uint8_t data[8];
663 uint8_t fsmId; /* Obsolete */
664 uint8_t fsmState; /* Obsolete */
665 uint8_t stateReason;
666 uint8_t offendingByte;
667 uint8_t shortError;
668 uint8_t timeoutDuringDlcDetection;
669 uint8_t isEtf;
670 uint8_t hasDataBytes;
671/* These fields are optional and skipping does not hurt us.
672 uint32_t respBaudrate;
673 uint8_t res[4];
674 double exactHeaderBaudrate;
675 uint32_t earlyStopBitOffset;
676 uint32_t earlyStopBitOffsetResponse;
677*/
678} blf_linrcverror2_t;
679
680 typedef struct blf_linsenderror2 {
681 blf_linmessagedescriptor_t linMessageDescriptor;
682 uint64_t eoh;
683 uint8_t isEtf;
684 uint8_t fsmId; /* Obsolete */
685 uint8_t fsmState; /* Obsolete */
686 uint8_t res1;
687/* These fields are optional and skipping does not hurt us.
688 uint8_t res2[4];
689 double exactHeaderBaudrate;
690 uint32_t earlyStopBitOffset;
691*/
692} blf_linsenderror2_t;
693
694 typedef struct blf_linwakeupevent2 {
695 blf_linbusevent_t linBusEvent;
696 uint8_t lengthInfo; /* Wake-up length: 0 = OK; 1 = Too short; 2 = Too long. */
697 uint8_t signal;
698 uint8_t external;
699 uint8_t res;
700} blf_linwakeupevent2_t;
701
702 typedef struct blf_linsleepmodeevent {
703 uint16_t channel;
704 uint8_t reason;
705 uint8_t flags;
706} blf_linsleepmodeevent_t;
707
708#define BLF_LIN_WU_SLEEP_REASON_START_STATE 0 /* Initial state of the interface */
709#define BLF_LIN_SLEEP_REASON_GO_TO_SLEEP_FRAME 1
710#define BLF_LIN_SLEEP_REASON_BUS_IDLE_TIMEOUT 2
711#define BLF_LIN_SLEEP_REASON_SILENT_SLEEPMODE_CMD 3 /* Command to shorten bus idle timeout */
712#define BLF_LIN_WU_REASON_EXTERNAL_WAKEUP_SIG 9
713#define BLF_LIN_WU_REASON_INTERNAL_WAKEUP_SIG 10
714#define BLF_LIN_WU_REASON_BUS_TRAFFIC 11
715#define BLF_LIN_NO_SLEEP_REASON_BUS_TRAFFIC 18 /* LIN hardware does not go into Sleep mode in spite of request to do so */
716
717
718/* see https://bitbucket.org/tobylorenz/vector_blf/src/master/src/Vector/BLF/AppText.h */
719
720 typedef struct blf_apptext {
721 uint32_t source;
722 uint32_t reservedAppText1;
723 uint32_t textLength;
724 uint32_t reservedAppText2;
725} blf_apptext_t;
726
727#define BLF_APPTEXT_COMMENT 0x00000000
728#define BLF_APPTEXT_CHANNEL 0x00000001
729#define BLF_APPTEXT_METADATA 0x00000002
730#define BLF_APPTEXT_ATTACHMENT 0x00000003
731#define BLF_APPTEXT_TRACELINE 0x00000004
732#define BLF_APPTEXT_CONT 0x000000FE
733#define BLF_APPTEXT_FAILED 0x000000FF
734
735#define BLF_APPTEXT_XML_GENERAL 0x01
736#define BLF_APPTEXT_XML_CHANNELS 0x02
737#define BLF_APPTEXT_XML_IDENTITY 0x03
738
739#define BLF_APPTEXT_TAG_DISS_ETHSTATUS "blf-ethernetstatus-obj"
740#define BLF_APPTEXT_TAG_DISS_ETHPHYSTATUS "blf-ethernetphystate-obj"
741#define BLF_APPTEXT_TAG_DISS_DEFAULT "data-text-lines"
742#define BLF_APPTEXT_COL_PROT_TEXT "BLF App text"
743#define BLF_APPTEXT_COL_INFO_TEXT "Metadata"
744#define BLF_APPTEXT_COL_INFO_TEXT_GENERAL "Metadata: General"
745#define BLF_APPTEXT_COL_INFO_TEXT_CHANNELS "Metadata: Channels"
746#define BLF_APPTEXT_COL_INFO_TEXT_IDENTITY "Metadata: Identity"
747
748#define BLF_BUSTYPE_CAN 1
749#define BLF_BUSTYPE_LIN 5
750#define BLF_BUSTYPE_MOST 6
751#define BLF_BUSTYPE_FLEXRAY 7
752#define BLF_BUSTYPE_J1708 9
753#define BLF_BUSTYPE_ETHERNET 11
754#define BLF_BUSTYPE_WLAN 13
755#define BLF_BUSTYPE_AFDX 14
756
757/* see https://bitbucket.org/tobylorenz/vector_blf/src/master/src/Vector/BLF/EthernetStatus.h */
758 typedef struct blf_ethernet_status {
759 uint16_t channel;
760 uint16_t flags;
761 uint8_t linkStatus;
762 uint8_t ethernetPhy;
763 uint8_t duplex;
764 uint8_t mdi;
765 uint8_t connector;
766 uint8_t clockMode;
767 uint8_t pairs;
768 uint8_t hardwareChannel;
769 uint32_t bitrate;
770/* Starting from version 1
771 uint64_t linkUpDuration; // In nanoseconds
772*/
773} blf_ethernet_status_t;
774
775#define BLF_ETH_STATUS_LINKSTATUS 0x0001
776#define BLF_ETH_STATUS_BITRATE 0x0002
777#define BLF_ETH_STATUS_ETHERNETPHY 0x0004
778#define BLF_ETH_STATUS_DUPLEX 0x0008
779#define BLF_ETH_STATUS_MDITYPE 0x0010
780#define BLF_ETH_STATUS_CONNECTOR 0x0020
781#define BLF_ETH_STATUS_CLOCKMODE 0x0040
782#define BLF_ETH_STATUS_BRPAIR 0x0080
783#define BLF_ETH_STATUS_HARDWARECHANNEL 0x0100
784#define BLF_ETH_STATUS_LINKUPDURATION 0x0200
785
786 typedef struct blf_ethernet_phystate {
787 uint16_t channel;
788 uint16_t flags;
789 uint8_t phyState;
790 uint8_t phyEvent;
791 uint8_t hardwareChannel;
792 uint8_t res1;
793} blf_ethernet_phystate_t;
794
795#define BLF_PHY_STATE_PHYSTATE 0x0001
796#define BLF_PHY_STATE_PHYEVENT 0x0002
797#define BLF_PHY_STATE_HARDWARECHANNEL 0x0004
798
799
800/* see https://bitbucket.org/tobylorenz/vector_blf/src/master/src/Vector/BLF/ObjectHeaderBase.h */
801
802#define BLF_OBJTYPE_UNKNOWN 0
803#define BLF_OBJTYPE_CAN_MESSAGE 1
804#define BLF_OBJTYPE_CAN_ERROR 2
805#define BLF_OBJTYPE_CAN_OVERLOAD 3
806#define BLF_OBJTYPE_CAN_STATISTIC 4
807#define BLF_OBJTYPE_APP_TRIGGER 5
808#define BLF_OBJTYPE_ENV_INTEGER 6
809#define BLF_OBJTYPE_ENV_DOUBLE 7
810#define BLF_OBJTYPE_ENV_STRING 8
811#define BLF_OBJTYPE_ENV_DATA 9
812#define BLF_OBJTYPE_LOG_CONTAINER 10
813#define BLF_OBJTYPE_LIN_MESSAGE 11
814#define BLF_OBJTYPE_LIN_CRC_ERROR 12
815#define BLF_OBJTYPE_LIN_DLC_INFO 13
816#define BLF_OBJTYPE_LIN_RCV_ERROR 14
817#define BLF_OBJTYPE_LIN_SND_ERROR 15
818#define BLF_OBJTYPE_LIN_SLV_TIMEOUT 16
819#define BLF_OBJTYPE_LIN_SCHED_MODCH 17
820#define BLF_OBJTYPE_LIN_SYN_ERROR 18
821#define BLF_OBJTYPE_LIN_BAUDRATE 19
822#define BLF_OBJTYPE_LIN_SLEEP 20
823#define BLF_OBJTYPE_LIN_WAKEUP 21
824#define BLF_OBJTYPE_MOST_SPY 22
825#define BLF_OBJTYPE_MOST_CTRL 23
826#define BLF_OBJTYPE_MOST_LIGHTLOCK 24
827#define BLF_OBJTYPE_MOST_STATISTIC 25
828
829#define BLF_OBJTYPE_FLEXRAY_DATA 29
830#define BLF_OBJTYPE_FLEXRAY_SYNC 30
831#define BLF_OBJTYPE_CAN_DRIVER_ERROR 31
832#define BLF_OBJTYPE_MOST_PKT 32
833#define BLF_OBJTYPE_MOST_PKT2 33
834#define BLF_OBJTYPE_MOST_HWMODE 34
835#define BLF_OBJTYPE_MOST_REG 35
836#define BLF_OBJTYPE_MOST_GENREG 36
837#define BLF_OBJTYPE_MOST_NETSTATE 37
838#define BLF_OBJTYPE_MOST_DATALOST 38
839#define BLF_OBJTYPE_MOST_TRIGGER 39
840#define BLF_OBJTYPE_FLEXRAY_CYCLE 40
841#define BLF_OBJTYPE_FLEXRAY_MESSAGE 41
842#define BLF_OBJTYPE_LIN_CHECKSUM_INFO 42
843#define BLF_OBJTYPE_LIN_SPIKE_EVENT 43
844#define BLF_OBJTYPE_CAN_DRIVER_SYNC 44
845#define BLF_OBJTYPE_FLEXRAY_STATUS 45
846#define BLF_OBJTYPE_GPS_EVENT 46
847#define BLF_OBJTYPE_FLEXRAY_ERROR 47
848#define BLF_OBJTYPE_FLEXRAY_STATUS2 48
849#define BLF_OBJTYPE_FLEXRAY_STARTCYCLE 49
850#define BLF_OBJTYPE_FLEXRAY_RCVMESSAGE 50
851#define BLF_OBJTYPE_REALTIMECLOCK 51
852
853#define BLF_OBJTYPE_LIN_STATISTIC 54
854#define BLF_OBJTYPE_J1708_MESSAGE 55
855#define BLF_OBJTYPE_J1708_VIRTUAL_MSG 56
856#define BLF_OBJTYPE_LIN_MESSAGE2 57
857#define BLF_OBJTYPE_LIN_SND_ERROR2 58
858#define BLF_OBJTYPE_LIN_SYN_ERROR2 59
859#define BLF_OBJTYPE_LIN_CRC_ERROR2 60
860#define BLF_OBJTYPE_LIN_RCV_ERROR2 61
861#define BLF_OBJTYPE_LIN_WAKEUP2 62
862#define BLF_OBJTYPE_LIN_SPIKE_EVENT2 63
863#define BLF_OBJTYPE_LIN_LONG_DOM_SIG 64
864#define BLF_OBJTYPE_APP_TEXT 65
865#define BLF_OBJTYPE_FLEXRAY_RCVMESSAGE_EX 66
866#define BLF_OBJTYPE_MOST_STATISTICEX 67
867#define BLF_OBJTYPE_MOST_TXLIGHT 68
868#define BLF_OBJTYPE_MOST_ALLOCTAB 69
869#define BLF_OBJTYPE_MOST_STRESS 70
870#define BLF_OBJTYPE_ETHERNET_FRAME 71
871#define BLF_OBJTYPE_SYS_VARIABLE 72
872#define BLF_OBJTYPE_CAN_ERROR_EXT 73
873#define BLF_OBJTYPE_CAN_DRIVER_ERROR_EXT 74
874#define BLF_OBJTYPE_LIN_LONG_DOM_SIG2 75
875#define BLF_OBJTYPE_MOST_150_MESSAGE 76
876#define BLF_OBJTYPE_MOST_150_PKT 77
877#define BLF_OBJTYPE_MOST_ETHERNET_PKT 78
878#define BLF_OBJTYPE_MOST_150_MESSAGE_FRAGMENT 79
879#define BLF_OBJTYPE_MOST_150_PKT_FRAGMENT 80
880#define BLF_OBJTYPE_MOST_ETHERNET_PKT_FRAGMENT 81
881#define BLF_OBJTYPE_MOST_SYSTEM_EVENT 82
882#define BLF_OBJTYPE_MOST_150_ALLOCTAB 83
883#define BLF_OBJTYPE_MOST_50_MESSAGE 84
884#define BLF_OBJTYPE_MOST_50_PKT 85
885#define BLF_OBJTYPE_CAN_MESSAGE2 86
886#define BLF_OBJTYPE_LIN_UNEXPECTED_WAKEUP 87
887#define BLF_OBJTYPE_LIN_SHORT_OR_SLOW_RESPONSE 88
888#define BLF_OBJTYPE_LIN_DISTURBANCE_EVENT 89
889#define BLF_OBJTYPE_SERIAL_EVENT 90
890#define BLF_OBJTYPE_OVERRUN_ERROR 91
891#define BLF_OBJTYPE_EVENT_COMMENT 92
892#define BLF_OBJTYPE_WLAN_FRAME 93
893#define BLF_OBJTYPE_WLAN_STATISTIC 94
894#define BLF_OBJTYPE_MOST_ECL 95
895#define BLF_OBJTYPE_GLOBAL_MARKER 96
896#define BLF_OBJTYPE_AFDX_FRAME 97
897#define BLF_OBJTYPE_AFDX_STATISTIC 98
898#define BLF_OBJTYPE_KLINE_STATUSEVENT 99
899#define BLF_OBJTYPE_CAN_FD_MESSAGE 100
900#define BLF_OBJTYPE_CAN_FD_MESSAGE_64 101
901#define BLF_OBJTYPE_ETHERNET_RX_ERROR 102
902#define BLF_OBJTYPE_ETHERNET_STATUS 103
903#define BLF_OBJTYPE_CAN_FD_ERROR_64 104
904
905#define BLF_OBJTYPE_AFDX_STATUS 106
906#define BLF_OBJTYPE_AFDX_BUS_STATISTIC 107
907
908#define BLF_OBJTYPE_AFDX_ERROR_EVENT 109
909#define BLF_OBJTYPE_A429_ERROR 110
910#define BLF_OBJTYPE_A429_STATUS 111
911#define BLF_OBJTYPE_A429_BUS_STATISTIC 112
912#define BLF_OBJTYPE_A429_MESSAGE 113
913#define BLF_OBJTYPE_ETHERNET_STATISTIC 114
914#define BLF_OBJTYPE_RESERVED5 115
915#define BLF_OBJTYPE_RESERVED6 116
916#define BLF_OBJTYPE_RESERVED7 117
917#define BLF_OBJTYPE_TEST_STRUCTURE 118
918#define BLF_OBJTYPE_DIAG_REQUEST_INTERPRETATION 119
919#define BLF_OBJTYPE_ETHERNET_FRAME_EX 120
920#define BLF_OBJTYPE_ETHERNET_FRAME_FORWARDED 121
921#define BLF_OBJTYPE_ETHERNET_ERROR_EX 122
922#define BLF_OBJTYPE_ETHERNET_ERROR_FORWARDED 123
923#define BLF_OBJTYPE_FUNCTION_BUS 124
924#define BLF_OBJTYPE_DATA_LOST_BEGIN 125
925#define BLF_OBJTYPE_DATA_LOST_END 126
926#define BLF_OBJTYPE_WATER_MARK_EVENT 127
927#define BLF_OBJTYPE_TRIGGER_CONDITION 128
928#define BLF_OBJTYPE_CAN_SETTING_CHANGED 129
929#define BLF_OBJTYPE_DISTRIBUTED_OBJECT_MEMBER 130
930#define BLF_OBJTYPE_ATTRIBUTE_EVENT 131
931#define BLF_OBJTYPE_DISTRIBUTED_OBJECT_CHANGE 132
932#define BLF_OBJTYPE_ETHERNET_PHY_STATE 133
933#define BLF_OBJTYPE_MACSEC_STATUS 134
934
935#define BLF_OBJTYPE_10BASET1S_STATUS 136
936#define BLF_OBJTYPE_10BASET1S_STATISTIC 137
937#define BLF_OBJTYPE_TUNNEL_PROTO_DECODER_EVENT 138
938#define BLF_OBJTYPE_CAN_XL_CHANNEL_FRAME 139
939#define BLF_OBJTYPE_CAN_XL_CHANNEL_ERRORFRAME 140
940
941
942#endif
943
944/*
945 * Editor modelines - https://www.wireshark.org/tools/modelines.html
946 *
947 * Local variables:
948 * c-basic-offset: 4
949 * tab-width: 8
950 * indent-tabs-mode: nil
951 * End:
952 *
953 * vi: set shiftwidth=4 tabstop=8 expandtab:
954 * :indentSize=4:tabSize=8:noTabs=true:
955 */
blf_apptext
Definition blf.h:720
blf_blockheader
Definition blf.h:102
blf_canerror
Definition blf.h:288
blf_canerrorext
Definition blf.h:311
blf_canfderror64
Definition blf.h:332
blf_canfdmessage64
Definition blf.h:267
blf_canfdmessage
Definition blf.h:235
blf_canmessage2_trailer
Definition blf.h:220
blf_canmessage
Definition blf.h:210
blf_canxlchannelframe
Definition blf.h:365
blf_date
Definition blf.h:66
blf_ethernet_phystate
Definition blf.h:786
blf_ethernet_rxerror
Definition blf.h:180
blf_ethernet_status
Definition blf.h:758
blf_ethernetframeheader_ex
Definition blf.h:162
blf_ethernetframeheader
Definition blf.h:150
blf_fileheader
Definition blf.h:78
blf_flexraydata
Definition blf.h:411
blf_flexraymessage
Definition blf.h:445
blf_flexrayrcvmessage
Definition blf.h:484
blf_flexrayrcvmessageex
Definition blf.h:512
blf_linbusevent
Definition blf.h:594
blf_lincrcerror2
Definition blf.h:642
blf_lindatabytetimestampevent
Definition blf.h:617
blf_linmessage2
Definition blf.h:622
blf_linmessage
Definition blf.h:547
blf_linmessagedescriptor
Definition blf.h:607
blf_linrcverror2
Definition blf.h:660
blf_linrcverror
Definition blf.h:564
blf_linsenderror2
Definition blf.h:680
blf_linsenderror
Definition blf.h:578
blf_linsleepmodeevent
Definition blf.h:702
blf_linsynchfieldevent
Definition blf.h:601
blf_linwakeupevent2
Definition blf.h:694
blf_linwakeupevent
Definition blf.h:588
blf_logcontainerheader
Definition blf.h:110
blf_logobjectheader2
Definition blf.h:129
blf_logobjectheader3
Definition blf.h:138
blf_logobjectheader
Definition blf.h:118
blf_wlanframeheader
Definition blf.h:190
wtap
Definition wtap_module.h:58
wtap.h
wtap_open_return_val
wtap_open_return_val
For registering file types that we can open.
Definition wtap.h:1750