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  guint8 length;
24  guint8 data[CANFD_MAX_DLEN];
25 } msg_data_t;
26 
27 typedef struct {
28  nstime_t ts;
29  guint32 id;
30  gboolean is_fd;
31  guint8 flags;
32  msg_data_t data;
33 } msg_t;
34 
35 typedef struct {
36  gint64 v0;
37  gint64 v1;
38 } token_t;
39 
40 typedef struct {
41  wtap *tmp_file;
42  char *tmp_filename;
44 
45 typedef struct {
46  gboolean is_msg_valid;
47  msg_t msg;
48 
49  FILE_T fh;
50  guint64 file_bytes_read;
51 
52  int err;
53  gchar *err_info;
54  gchar *parse_error;
55 
56  token_t token;
58 
59 gboolean
60 run_candump_parser(candump_state_t *state, int *err, gchar **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:36