Wireshark  4.3.0
The Wireshark network protocol analyzer
candump_priv.h
Go to the documentation of this file.
1 
12 #ifndef CANDUMP_PRIV_H__
13 #define CANDUMP_PRIV_H__
14 
15 #include <gmodule.h>
16 #include <wiretap/wtap.h>
17 #include <wiretap/socketcan.h>
18 #include <epan/dissectors/packet-socketcan.h>
19 
20 //#define CANDUMP_DEBUG
21 
22 typedef struct {
23  uint8_t length;
24  uint8_t data[CANFD_MAX_DLEN];
25 } msg_data_t;
26 
27 typedef struct {
28  nstime_t ts;
29  uint32_t id;
30  bool is_fd;
31  uint8_t flags;
32  msg_data_t data;
33 } msg_t;
34 
35 typedef struct {
36  int64_t v0;
37  int64_t v1;
38 } token_t;
39 
40 typedef struct {
41  wtap *tmp_file;
42  char *tmp_filename;
44 
45 typedef struct {
46  bool is_msg_valid;
47  msg_t msg;
48 
49  FILE_T fh;
50  uint64_t file_bytes_read;
51 
52  int err;
53  char *err_info;
54  char *parse_error;
55 
56  token_t token;
58 
59 bool
60 run_candump_parser(candump_state_t *state, int *err, char **err_info);
61 
62 #ifdef CANDUMP_DEBUG
63 #include <stdio.h>
64 #define candump_debug_printf(...) printf(__VA_ARGS__)
65 #else
66 #define candump_debug_printf(...) (void)0
67 #endif
68 
69 #endif /* CANDUMP_PRIV_H__ */
Definition: candump_priv.h:40
Definition: candump_priv.h:45
Definition: busmaster_priv.h:81
Definition: busmaster_priv.h:86
Definition: nstime.h:26
Definition: busmaster_priv.h:93
Definition: file_wrappers.c:168
Definition: wtap-int.h:37