1 /* packet-gmr1_common.h
3 * Headers for GMR-1 dissection in wireshark (common stuff).
4 * Copyright (c) 2011 Sylvain Munaut <tnt@246tNt.com>
7 * [1] ETSI TS 101 376-4-8 V1.3.1 - GMR-1 04.008
8 * [2] ETSI TS 101 376-4-8 V2.2.1 - GMPRS-1 04.008
9 * [3] ETSI TS 101 376-4-8 V3.1.1 - GMR-1 3G 44.008
10 * [4] ETSI TS 100 940 V7.21.0 - GSM 04.08
11 * [5] ETSI TS 101 376-4-12 V3.2.1 - GMR-1 3G 44.060
12 * [6] ETSI TS 101 376-5-6 V1.3.1 - GMR-1 05.008
14 * Wireshark - Network traffic analyzer
15 * By Gerald Combs <gerald@wireshark.org>
16 * Copyright 1998 Gerald Combs
18 * SPDX-License-Identifier: GPL-2.0-or-later
21 #ifndef __PACKET_GMR1_COMMON_H__
22 #define __PACKET_GMR1_COMMON_H__
24 #include "packet-gsm_a_common.h"
27 /* Protocol descriptor (see [1] 11.2 & [4] 10.2) */
37 #define GMR1_PD_EXT_MSK 0x0f
38 #define GMR1_PD_EXT_VAL 0x0e
40 extern const value_string gmr1_pd_vals
[];
41 extern const value_string gmr1_pd_short_vals
[];
45 enum gmr1_ie_common_idx
{
46 GMR1_IE_COM_CM2
, /* [1] 11.5.1.6 */
47 GMR1_IE_COM_SPARE_NIBBLE
, /* [1] 11.5.1.8 */
48 NUM_GMR1_IE_COMMON
/* Terminator */
51 extern int hf_gmr1_skip_ind
;
52 extern int hf_gmr1_l3_pd
;
53 extern int hf_gmr1_elem_id
;
54 extern int hf_gmr1_len
;
57 /* Message & IEs parsing */
59 typedef void (*gmr1_msg_func_t
)(tvbuff_t
*tvb
, proto_tree
*tree
, packet_info
*pinfo
, int offset
, int len
);
61 #define GMR1_IE_FUNC(fn_name) \
63 fn_name (tvbuff_t *tvb _U_, proto_tree *tree _U_, packet_info *pinfo _U_, uint32_t offset _U_, unsigned len _U_, char *add_string _U_, int string_len _U_)
65 #define GMR1_MSG_FUNC(fn_name) \
67 fn_name (tvbuff_t *tvb _U_, proto_tree *tree _U_, packet_info *pinfo _U_, int offset, int len)
69 #define GMR1_MSG_FUNC_BEGIN \
74 curr_offset = offset; \
78 #define GMR1_MSG_FUNC_END
82 gmr1_get_msg_params(gmr1_pd_e pd
, uint8_t oct
, const char **msg_str
,
83 int *ett_tree
, int *hf_idx
, gmr1_msg_func_t
*msg_func_p
);
86 #endif /* __PACKET_GMR1_COMMON_H__ */