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