Wireshark  2.9.0-477-g68ec514b
The Wireshark network protocol analyzer
packet-tcap-template.h
Go to the documentation of this file.
1 /* packet-tcap.h
2  *
3  * Copyright 2004, Tim Endean <endeant@hotmail.com>
4  *
5  * Wireshark - Network traffic analyzer
6  * By Gerald Combs <gerald@wireshark.org>
7  * Copyright 1998 Gerald Combs
8  *
9  * SPDX-License-Identifier: GPL-2.0-or-later
10  */
11 
12 
13 #ifndef PACKET_tcap_H
14 #define PACKET_tcap_H
15 
16 #include "ws_symbol_export.h"
17 
18 /* TCAP component type */
19 #define TCAP_COMP_INVOKE 0xa1
20 #define TCAP_COMP_RRL 0xa2
21 #define TCAP_COMP_RE 0xa3
22 #define TCAP_COMP_REJECT 0xa4
23 #define TCAP_COMP_RRN 0xa7
24 
25 
26 #define ANSI_TC_INVOKE_L 0xe9
27 #define ANSI_TC_RRL 0xea
28 #define ANSI_TC_RE 0xeb
29 #define ANSI_TC_REJECT 0xec
30 #define ANSI_TC_INVOKE_N 0xed
31 #define ANSI_TC_RRN 0xee
32 
33 
34 #define TCAP_SEQ_TAG 0x30
35 #define TCAP_SET_TAG 0x31
36 
37 #define TCAP_INVOKE_ID_TAG 0x02
38 #define TCAP_LINKED_ID_TAG 0x80
39 
40 #define TCAP_EOC_LEN 2
41 
42 #define TCAP_CONSTRUCTOR(TCtag) (TCtag & 0x20)
43 
44 #define TC_BEGIN 1
45 #define TC_CONT 2
46 #define TC_END 3
47 #define TC_ABORT 4
48 #define TC_ANSI_ABORT 5
49 #define TC_ANSI_ALL 6
50 
52  gboolean acv; /* Is the Application Context Version present */
53  const void * oid;
54  guint32 session_id;
55  void * context;
56  gchar *TransactionID_str;
57  guint32 src_tid;
58  guint32 dst_tid;
59 };
60 
66 #define LENGTH_OID 23
68  struct tcaphash_context_key_t * key;
69  guint32 session_id;
70  guint32 first_frame;
71  guint32 last_frame;
74  gboolean responded;
75  gboolean closed;
76  gboolean upper_dissector;
77  gboolean oid_present;
78  gchar oid[LENGTH_OID+1];
79  gboolean subdissector_present;
80  dissector_handle_t subdissector_handle;
81  void (* callback) (tvbuff_t *,packet_info *, proto_tree *, struct tcaphash_context_t *);
82  struct tcaphash_begincall_t * begincall;
83  struct tcaphash_contcall_t * contcall;
84  struct tcaphash_endcall_t * endcall;
85  struct tcaphash_ansicall_t * ansicall;
86 };
87 
89  struct tcaphash_begin_info_key_t * beginkey;
90  struct tcaphash_context_t * context;
91  gboolean father;
92  struct tcaphash_begincall_t * next_begincall;
93  struct tcaphash_begincall_t * previous_begincall;
94 };
95 
97  struct tcaphash_cont_info_key_t * contkey;
98  struct tcaphash_context_t * context;
99  gboolean father;
100  struct tcaphash_contcall_t * next_contcall;
101  struct tcaphash_contcall_t * previous_contcall;
102 };
103 
105  struct tcaphash_end_info_key_t * endkey;
106  struct tcaphash_context_t * context;
107  gboolean father;
108  struct tcaphash_endcall_t * next_endcall;
109  struct tcaphash_endcall_t * previous_endcall;
110 };
111 
113  struct tcaphash_ansi_info_key_t * ansikey;
114  struct tcaphash_context_t * context;
115  gboolean father;
116  struct tcaphash_ansicall_t * next_ansicall;
117  struct tcaphash_ansicall_t * previous_ansicall;
118 };
119 
124  guint32 session_id;
125 };
126 
128  guint32 hashKey;
129  guint32 tid;
130  guint32 pc_hash;
131 };
132 
134  guint32 hashKey;
135  guint32 src_tid;
136  guint32 dst_tid;
137  guint32 opc_hash;
138  guint32 dpc_hash;
139 };
140 
142  guint32 hashKey;
143  guint32 tid;
144  guint32 opc_hash;
145  guint32 dpc_hash;
146 };
147 
149  guint32 hashKey;
150  guint32 tid;
151  guint32 opc_hash;
152  guint32 dpc_hash;
153 };
154 
155 
158  guint32 tcap_session_id;
159  guint32 src_tid;
160  guint32 dst_tid;
161  guint8 ope;
162 };
163 
168 void tcapsrt_init_routine(void);
169 
174 struct tcapsrt_info_t * tcapsrt_razinfo(void);
175 
176 void tcapsrt_close(struct tcaphash_context_t * p_tcaphash_context,
177  packet_info * pinfo _U_);
178 
195  packet_info * pinfo _U_,
196  proto_tree *tree,
197  struct tcapsrt_info_t * p_tcap_info);
198 
199 WS_DLL_PUBLIC gboolean gtcap_StatSRT;
200 
201 extern gint tcap_standard;
202 
203 extern const value_string tcap_component_type_str[];
204 void proto_reg_handoff_tcap(void);
205 void proto_register_tcap(void);
206 
207 extern dissector_handle_t get_itu_tcap_subdissector(guint32 ssn);
208 dissector_handle_t get_ansi_tcap_subdissector(guint32 ssn);
209 
210 extern void add_ansi_tcap_subdissector(guint32 ssn, dissector_handle_t dissector);
211 WS_DLL_PUBLIC void add_itu_tcap_subdissector(guint32 ssn, dissector_handle_t dissector);
212 
213 extern void delete_ansi_tcap_subdissector(guint32 ssn, dissector_handle_t dissector);
214 WS_DLL_PUBLIC void delete_itu_tcap_subdissector(guint32 ssn, dissector_handle_t dissector);
215 
216 extern void call_tcap_dissector(dissector_handle_t, tvbuff_t*, packet_info*, proto_tree*);
217 
218 #include "packet-tcap-exp.h"
219 
220 #endif /* PACKET_tcap_H */
Definition: packet-tcap-template.h:148
void tcapsrt_init_routine(void)
Definition: packet_info.h:44
Definition: packet-tcap-template.h:123
Definition: tvbuff-int.h:35
Definition: packet.c:659
Definition: nstime.h:27
Definition: packet-tcap-template.h:104
Definition: packet-tcap-template.h:112
gboolean responded
Definition: packet-tcap-template.h:74
Definition: packet-tcap-template.h:88
struct tcapsrt_info_t * tcapsrt_razinfo(void)
Definition: packet-tcap-template.c:1655
Definition: packet-tcap-template.h:67
Definition: packet-tcap-template.h:127
Definition: value_string.h:24
Definition: packet-tcap-template.h:157
nstime_t begin_time
Definition: packet-tcap-template.h:72
Definition: proto.h:759
Definition: packet-tcap-template.h:51
Definition: packet-tcap-template.h:141
Definition: packet-tcap-template.h:133
Definition: packet-tcap-template.h:96
struct tcaphash_context_t * tcapsrt_call_matching(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, struct tcapsrt_info_t *p_tcap_info)
nstime_t end_time
Definition: packet-tcap-template.h:73