epan/dissectors/pidl/samr/samr.cnf cnf_dissect_lsa_BinaryString => lsarpc_dissect_str...
[wireshark-sm.git] / epan / dissectors / packet-tcap.h
blobc006a6fc167f96f3dd8d893654660d3023ed03f8
1 /* Do not modify this file. Changes will be overwritten. */
2 /* Generated automatically by the ASN.1 to Wireshark dissector compiler */
3 /* packet-tcap.h */
4 /* asn2wrs.py -b -q -L -p tcap -c ./tcap.cnf -s ./packet-tcap-template -D . -O ../.. tcap.asn UnidialoguePDUs.asn DialoguePDUs.asn */
6 /* packet-tcap.h
8 * Copyright 2004, Tim Endean <endeant@hotmail.com>
10 * Wireshark - Network traffic analyzer
11 * By Gerald Combs <gerald@wireshark.org>
12 * Copyright 1998 Gerald Combs
14 * SPDX-License-Identifier: GPL-2.0-or-later
18 #ifndef PACKET_tcap_H
19 #define PACKET_tcap_H
21 #include "ws_symbol_export.h"
23 /* TCAP component type */
24 #define TCAP_COMP_INVOKE 0xa1
25 #define TCAP_COMP_RRL 0xa2
26 #define TCAP_COMP_RE 0xa3
27 #define TCAP_COMP_REJECT 0xa4
28 #define TCAP_COMP_RRN 0xa7
31 #define ANSI_TC_INVOKE_L 0xe9
32 #define ANSI_TC_RRL 0xea
33 #define ANSI_TC_RE 0xeb
34 #define ANSI_TC_REJECT 0xec
35 #define ANSI_TC_INVOKE_N 0xed
36 #define ANSI_TC_RRN 0xee
39 #define TCAP_SEQ_TAG 0x30
40 #define TCAP_SET_TAG 0x31
42 #define TCAP_INVOKE_ID_TAG 0x02
43 #define TCAP_LINKED_ID_TAG 0x80
45 #define TCAP_EOC_LEN 2
47 #define TCAP_CONSTRUCTOR(TCtag) (TCtag & 0x20)
49 #define TC_BEGIN 1
50 #define TC_CONT 2
51 #define TC_END 3
52 #define TC_ABORT 4
53 #define TC_ANSI_ABORT 5
54 #define TC_ANSI_ALL 6
56 struct tcap_private_t {
57 bool acv; /* Is the Application Context Version present */
58 const void * oid;
59 uint32_t session_id;
60 void * context;
61 char *TransactionID_str;
62 uint32_t src_tid;
63 uint32_t dst_tid;
66 /** @file
67 * lists and hash tables used in wireshark's tcap dissector
68 * for calculation of delays in tcap-calls
71 #define LENGTH_OID 23
72 struct tcaphash_context_t {
73 struct tcaphash_context_key_t * key;
74 uint32_t session_id;
75 uint32_t first_frame;
76 uint32_t last_frame;
77 nstime_t begin_time; /**< time of arrival of TC_BEGIN */
78 nstime_t end_time; /**< time of closing message */
79 bool responded; /**< true, if request has been responded */
80 bool closed;
81 bool upper_dissector;
82 bool oid_present;
83 char oid[LENGTH_OID+1];
84 bool subdissector_present;
85 dissector_handle_t subdissector_handle;
86 void (* callback) (tvbuff_t *,packet_info *, proto_tree *, struct tcaphash_context_t *);
87 struct tcaphash_begincall_t * begincall;
88 struct tcaphash_contcall_t * contcall;
89 struct tcaphash_endcall_t * endcall;
90 struct tcaphash_ansicall_t * ansicall;
93 struct tcaphash_begincall_t {
94 struct tcaphash_begin_info_key_t * beginkey;
95 struct tcaphash_context_t * context;
96 bool father;
97 struct tcaphash_begincall_t * next_begincall;
98 struct tcaphash_begincall_t * previous_begincall;
101 struct tcaphash_contcall_t {
102 struct tcaphash_cont_info_key_t * contkey;
103 struct tcaphash_context_t * context;
104 bool father;
105 struct tcaphash_contcall_t * next_contcall;
106 struct tcaphash_contcall_t * previous_contcall;
109 struct tcaphash_endcall_t {
110 struct tcaphash_end_info_key_t * endkey;
111 struct tcaphash_context_t * context;
112 bool father;
113 struct tcaphash_endcall_t * next_endcall;
114 struct tcaphash_endcall_t * previous_endcall;
117 struct tcaphash_ansicall_t {
118 struct tcaphash_ansi_info_key_t * ansikey;
119 struct tcaphash_context_t * context;
120 bool father;
121 struct tcaphash_ansicall_t * next_ansicall;
122 struct tcaphash_ansicall_t * previous_ansicall;
125 /** The Key for the hash table is the TCAP origine transaction identifier
126 of the TC_BEGIN containing the InitialDP */
128 struct tcaphash_context_key_t {
129 uint32_t session_id;
132 struct tcaphash_begin_info_key_t {
133 uint32_t hashKey;
134 uint32_t tid;
135 uint32_t pc_hash;
138 struct tcaphash_cont_info_key_t {
139 uint32_t hashKey;
140 uint32_t src_tid;
141 uint32_t dst_tid;
142 uint32_t opc_hash;
143 uint32_t dpc_hash;
146 struct tcaphash_end_info_key_t {
147 uint32_t hashKey;
148 uint32_t tid;
149 uint32_t opc_hash;
150 uint32_t dpc_hash;
153 struct tcaphash_ansi_info_key_t {
154 uint32_t hashKey;
155 uint32_t tid;
156 uint32_t opc_hash;
157 uint32_t dpc_hash;
161 /** List of infos to store for the analyse */
162 struct tcapsrt_info_t {
163 uint32_t tcap_session_id;
164 uint32_t src_tid;
165 uint32_t dst_tid;
166 uint8_t ope;
170 * Initialize the Message Info used by the main dissector
171 * Data are linked to a TCAP transaction
173 struct tcapsrt_info_t * tcapsrt_razinfo(void);
175 void tcapsrt_close(struct tcaphash_context_t * p_tcaphash_context,
176 packet_info * pinfo _U_);
179 * Service Response Time analyze
180 * Called just after dissector call
181 * Associate a TCAP context to a tcap session and display session related infomations
182 * like the first frame, the last, the session duration,
183 * and a uniq session identifier for the filtering
185 * For ETSI tcap, the TCAP context can be reached through three keys
186 * - a key (BEGIN) identifying the session according to the tcap source identifier
187 * - a key (CONT) identifying the established session (src_id and dst_id)
188 * - a key (END) identifying the session according to the tcap destination identifier
190 * For ANSI tcap, the TCAP context is reached through a uniq key
191 * - a key (ANSI) identifying the session according to the tcap identifier
193 struct tcaphash_context_t * tcapsrt_call_matching(tvbuff_t *tvb,
194 packet_info * pinfo _U_,
195 proto_tree *tree,
196 struct tcapsrt_info_t * p_tcap_info);
198 WS_DLL_PUBLIC bool gtcap_StatSRT;
200 extern int tcap_standard;
202 extern const value_string tcap_component_type_str[];
203 void proto_reg_handoff_tcap(void);
204 void proto_register_tcap(void);
206 extern dissector_handle_t get_itu_tcap_subdissector(uint32_t ssn);
207 dissector_handle_t get_ansi_tcap_subdissector(uint32_t ssn);
209 extern void add_ansi_tcap_subdissector(uint32_t ssn, dissector_handle_t dissector);
210 WS_DLL_PUBLIC void add_itu_tcap_subdissector(uint32_t ssn, dissector_handle_t dissector);
212 extern void delete_ansi_tcap_subdissector(uint32_t ssn, dissector_handle_t dissector);
213 WS_DLL_PUBLIC void delete_itu_tcap_subdissector(uint32_t ssn, dissector_handle_t dissector);
215 extern void call_tcap_dissector(dissector_handle_t, tvbuff_t*, packet_info*, proto_tree*);
217 extern const value_string tcap_UniDialoguePDU_vals[];
218 extern const value_string tcap_DialoguePDU_vals[];
219 int dissect_tcap_UniDialoguePDU(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
220 int dissect_tcap_DialoguePDU(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
222 #endif /* PACKET_tcap_H */