Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / epan / dissectors / packet-gmr1_common.h
bloba590e2d1696fe4d461ea8fb70b4c94ed8d1fa31f
1 /* packet-gmr1_common.h
3 * Headers for GMR-1 dissection in wireshark (common stuff).
4 * Copyright (c) 2011 Sylvain Munaut <tnt@246tNt.com>
6 * References:
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) */
28 typedef enum {
29 GMR1_PD_CC = 0x03,
30 GMR1_PD_MM = 0x05,
31 GMR1_PD_RR = 0x06,
32 GMR1_PD_GMM = 0x08,
33 GMR1_PD_SM = 0x0a,
34 GMR1_PD_DTRS = 0x1e
35 } gmr1_pd_e;
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[];
44 /* Common IEs */
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) \
62 static uint16_t \
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) \
66 static void \
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 \
70 int curr_offset; \
71 int curr_len; \
72 int consumed; \
74 curr_offset = offset; \
75 curr_len = len; \
76 consumed = 0;
78 #define GMR1_MSG_FUNC_END
81 extern void
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__ */