Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
busmaster_priv.h
Go to the documentation of this file.
1
12#ifndef BUSMASTER_PRIV_H__
13#define BUSMASTER_PRIV_H__
14
15#include <gmodule.h>
16#include <wiretap/wtap.h>
17#include <wiretap/socketcan.h>
18
19typedef enum {
20 LOG_ENTRY_ERROR = -1,
21 LOG_ENTRY_NONE = 0,
22 LOG_ENTRY_EMPTY,
23 LOG_ENTRY_HEADER,
24 LOG_ENTRY_FOOTER,
25 LOG_ENTRY_FOOTER_AND_HEADER,
26 LOG_ENTRY_MSG,
27 LOG_ENTRY_EOF,
28} log_entry_type_t;
29
30typedef enum {
31 PROTOCOL_UNKNOWN = 0,
32 PROTOCOL_CAN,
33 PROTOCOL_LIN,
34 PROTOCOL_J1939,
35} protocol_type_t;
36
37typedef enum {
38 DATA_MODE_UNKNOWN = 0,
39 DATA_MODE_HEX,
40 DATA_MODE_DEC,
41} data_mode_t;
42
43typedef enum {
44 TIME_MODE_UNKNOWN = 0,
45 TIME_MODE_ABSOLUTE,
46 TIME_MODE_SYSTEM,
47 TIME_MODE_RELATIVE,
48} time_mode_t;
49
50typedef struct {
51 unsigned year;
52 unsigned month;
53 unsigned day;
55
56typedef struct {
57 unsigned hours;
58 unsigned minutes;
59 unsigned seconds;
60 unsigned micros;
62
63typedef struct {
64 msg_date_t d;
65 msg_time_t t;
67
68typedef struct {
69 msg_time_t timestamp;
70 wtap_can_msg_type_t type;
71 uint32_t id;
73} msg_t;
74
75typedef struct {
76 int64_t v0;
77 int64_t v1;
78 int64_t v2;
79 int64_t v3;
80} token_t;
81
82typedef struct {
83 int64_t file_start_offset;
84 int64_t file_end_offset;
85 protocol_type_t protocol;
86 data_mode_t data_mode;
87 time_mode_t time_mode;
88 msg_date_time_t start;
90
91typedef struct {
92 FILE_T fh;
93 int64_t file_bytes_read;
94
95 char *parse_error;
96 int err;
97 char *err_info;
98
99 token_t token;
100
101 log_entry_type_t entry_type;
102 busmaster_priv_t header;
103 msg_t msg;
105
106bool
107run_busmaster_parser(busmaster_state_t *state,
108 int *err, char **err_info);
109
110#endif /* BUSMASTER_PRIV_H__ */
Definition busmaster_priv.h:82
Definition busmaster_priv.h:91
Definition busmaster_priv.h:50
Definition busmaster_priv.h:63
Definition busmaster_priv.h:68
Definition busmaster_priv.h:56
Definition busmaster_priv.h:75
Definition socketcan.h:31
Definition file_wrappers.c:215