Remove some GTK+-only code.
[metze/wireshark/wip.git] / ui / tap-rlc-graph.h
1 /* tap-rlc-stream.h
2  * LTE RLC stream statistics
3  *
4  * Wireshark - Network traffic analyzer
5  * By Gerald Combs <gerald@wireshark.org>
6  * Copyright 1998 Gerald Combs
7  *
8  * SPDX-License-Identifier: GPL-2.0-or-later*/
9
10 #ifndef __TAP_RLC_GRAPH_H__
11 #define __TAP_RLC_GRAPH_H__
12
13 #ifdef __cplusplus
14 extern "C" {
15 #endif /* __cplusplus */
16
17 #include <epan/epan.h>
18 #include <epan/packet.h>
19 #include <cfile.h>
20 #include <epan/dissectors/packet-rlc-lte.h>
21
22 struct rlc_segment {
23     struct rlc_segment *next;
24     guint32         num;            /* framenum */
25     guint32         rel_secs;
26     guint32         rel_usecs;
27
28     gboolean        isControlPDU;
29     guint16         SN;
30     guint16         isResegmented;
31     guint16         ACKNo;
32     #define MAX_NACKs 128
33     guint16         noOfNACKs;
34     guint16         NACKs[MAX_NACKs];
35     guint16         pduLength;
36
37     guint16         ueid;
38     guint16         channelType;
39     guint16         channelId;
40     guint8          rlcMode;
41     guint8          direction;
42 };
43
44 /* A collection of channels that may be found in one frame.  Used when working out
45    which channel(s) are present in a frame. */
46 typedef struct _th_t {
47     int num_hdrs;
48     #define MAX_SUPPORTED_CHANNELS 8
49     rlc_lte_tap_info *rlchdrs[MAX_SUPPORTED_CHANNELS];
50 } th_t;
51
52 struct rlc_graph {
53     /* List of segments to show */
54     struct rlc_segment *segments;
55     struct rlc_segment *last_segment;
56
57     /* These are filled in with the channel/direction this graph is showing */
58     gboolean        channelSet;
59     guint16         ueid;
60     guint16         channelType;
61     guint16         channelId;
62     guint8          rlcMode;
63     guint8          direction;
64 };
65
66 gboolean rlc_graph_segment_list_get(capture_file *cf, struct rlc_graph *tg, gboolean stream_known,
67                                     char **err_string);
68 void rlc_graph_segment_list_free(struct rlc_graph * );
69
70
71
72 gboolean compare_rlc_headers(guint16 ueid1, guint16 channelType1, guint16 channelId1, guint8 rlcMode1, guint8 direction1,
73                             guint16 ueid2, guint16 channelType2, guint16 channelId2, guint8 rlcMode2, guint8 direction2,
74                             gboolean isControlFrame);
75 rlc_lte_tap_info *select_rlc_lte_session(capture_file *cf, struct rlc_segment *hdrs,
76                                          gchar **err_msg);
77
78
79 #ifdef __cplusplus
80 }
81 #endif /* __cplusplus */
82
83
84 #endif