| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
voip_calls.h
Go to the documentation of this file.
1
22
23#ifndef __VOIP_CALLS_H__
24#define __VOIP_CALLS_H__
25
26#include <glib.h>
27
28#include <stdio.h>
29
30#include "epan/address.h"
31#include "epan/packet.h"
32#include "epan/guid-utils.h"
33#include "epan/tap.h"
34#include "epan/tap-voip.h"
35#include "epan/sequence_analysis.h"
36
41
42#ifdef __cplusplus
43 extern "C" {
44#endif /* __cplusplus */
45
46/****************************************************************************/
48 extern const char *voip_call_state_name[8];
49
50
54 typedef enum _voip_protocol {
55 VOIP_SIP,
56 VOIP_ISUP,
57 VOIP_H323,
58 VOIP_MGCP,
59 VOIP_AC_ISDN,
60 VOIP_AC_CAS,
61 MEDIA_T38,
62 TEL_H248,
63 TEL_SCCP,
64 TEL_BSSMAP,
65 TEL_RANAP,
66 VOIP_UNISTIM,
67 VOIP_SKINNY,
68 VOIP_IAX2,
69 VOIP_COMMON
70} voip_protocol;
71
72
76 typedef enum _hash_indexes {
77 SIP_HASH = 0
78} hash_indexes;
79
80
82 extern const char *voip_protocol_name[];
83
84
88 typedef enum _flow_show_options
89{
90 FLOW_ALL,
91 FLOW_ONLY_INVITES
92} flow_show_options;
93
95
99 typedef enum _sip_call_state {
100 SIP_INVITE_SENT,
101 SIP_200_REC,
102 SIP_CANCEL_SENT
103} sip_call_state;
104
105
109 typedef struct _sip_calls_info {
110 char *call_identifier;
111 uint32_t invite_cseq;
112 sip_call_state sip_state;
113} sip_calls_info_t;
114
115
119 typedef struct _isup_calls_info {
120 uint16_t cic;
121 uint32_t opc;
122 uint32_t dpc;
123 uint8_t ni;
124} isup_calls_info_t;
125
126
130 typedef struct _h245_address {
131 address h245_address;
132 uint16_t h245_port;
133} h245_address_t;
134
135
139 typedef struct _h323_calls_info {
140 e_guid_t *guid;
141 GList *h245_list;
142 address h225SetupAddr;
143 bool is_h245;
144 bool is_faststart_Setup;
145 bool is_faststart_Proc;
146 bool is_h245Tunneling;
147 int32_t q931_crv;
148 int32_t q931_crv2;
149 unsigned requestSeqNum;
150} h323_calls_info_t;
151
152
156 typedef struct _mgcp_calls_info {
157 char *endpointId;
158 bool fromEndpoint;
159} mgcp_calls_info_t;
160
161
165 typedef struct _actrace_isdn_calls_info {
166 int32_t crv;
167 int trunk;
168} actrace_isdn_calls_info_t;
169
170
174 typedef struct _actrace_cas_calls_info {
175 int32_t bchannel;
176 int trunk;
177} actrace_cas_calls_info_t;
178
179
183 typedef struct _skinny_calls_info {
184 uint32_t callId;
185} skinny_calls_info_t;
186
187
191 typedef struct _voip_calls_info {
192 voip_call_state call_state;
193 voip_call_active_state call_active_state;
194 char *call_id;
195 char *from_identity;
196 char *to_identity;
197 void *prot_info;
198 void (*free_prot_info)(void *);
199 address initial_speaker;
200 uint32_t npackets;
201 voip_protocol protocol;
202 char *protocol_name;
203 char *call_comment;
204 uint16_t call_num;
205 frame_data *start_fd;
206 nstime_t start_rel_ts;
207 frame_data *stop_fd;
208 nstime_t stop_rel_ts;
209} voip_calls_info_t;
210
211
218 typedef struct _voip_calls_tapinfo {
219 tap_reset_cb tap_reset;
220 tap_packet_cb tap_packet;
221 tap_draw_cb tap_draw;
222 void *tap_data;
223 int ncalls;
224 GQueue *callsinfos;
225 GHashTable *callsinfo_hashtable[1];
226 int npackets;
227 voip_calls_info_t *filter_calls_fwd;
228 int start_packets;
229 int completed_calls;
230 int rejected_calls;
231 seq_analysis_info_t *graph_analysis;
232 epan_t *session;
233 int nrtpstreams;
234 GList *rtpstream_list;
235 uint32_t rtp_evt_frame_num;
236 uint8_t rtp_evt;
237 bool rtp_evt_end;
238 char *sdp_summary;
239 uint32_t sdp_frame_num;
240 uint32_t mtp3_opc;
241 uint32_t mtp3_dpc;
242 uint8_t mtp3_ni;
243 uint32_t mtp3_frame_num;
244 struct _h245_labels *h245_labels;
245 uint8_t q931_cause_value;
246 int32_t q931_crv;
247 uint32_t q931_frame_num;
248 uint32_t h225_frame_num;
249 uint16_t h225_call_num;
250 int h225_cstype;
251 bool h225_is_faststart;
252 uint32_t sip_frame_num;
253 uint32_t actrace_frame_num;
254 int32_t actrace_trunk;
255 int32_t actrace_direction;
256 flow_show_options fs_option;
257 uint32_t redraw;
258 bool apply_display_filter;
259} voip_calls_tapinfo_t;
260
261#if 0
262#define VOIP_CALLS_DEBUG(...) { \
263 char *VOIP_CALLS_DEBUG_MSG = ws_strdup_printf(__VA_ARGS__); \
264 ws_warning("voip_calls: %s:%d %s", G_STRFUNC, __LINE__, VOIP_CALLS_DEBUG_MSG); \
265 g_free(VOIP_CALLS_DEBUG_MSG); \
266}
267#else
268#define VOIP_CALLS_DEBUG(...)
269#endif
270
271/****************************************************************************/
272/* INTERFACE */
273
284 void voip_calls_init_all_taps(voip_calls_tapinfo_t *tap_id_base);
285
293 void voip_calls_remove_all_tap_listeners(voip_calls_tapinfo_t *tap_id_base);
294
300 void voip_calls_reset_all_taps(voip_calls_tapinfo_t *tapinfo);
301
308 void
309 voip_calls_set_apply_display_filter(voip_calls_tapinfo_t *tapinfo, bool apply);
310
315 void
316 voip_calls_free_callsinfo(voip_calls_info_t *callsinfo);
317
318#ifdef __cplusplus
319}
320#endif /* __cplusplus */
321
322#endif /* __VOIP_CALLS_H__ */
address.h
address
struct _address address
Holds a network or link-layer address of any supported type.
tap-voip.h
voip_call_active_state
enum _voip_call_active_state voip_call_active_state
Indicates whether a VoIP call is currently considered active or inactive.
voip_call_state
enum _voip_call_state voip_call_state
Signaling state of a VoIP call session.
epan_t
struct epan_session epan_t
Represents a dissection session state.
Definition epan.h:323
frame_data
DIAG_OFF_PEDANTIC struct _frame_data frame_data
Frame data structure.
guid-utils.h
e_guid_t
struct _e_guid_t e_guid_t
Represents a GUID/UUID value; may be larger than GUID_LEN so must not be used to directly overlay pac...
packet.h
sequence_analysis.h
seq_analysis_info_t
struct _seq_analysis_info seq_analysis_info_t
_actrace_cas_calls_info
Protocol-specific call metadata for ACTrace CAS calls.
Definition voip_calls.h:174
_actrace_cas_calls_info::bchannel
int32_t bchannel
Definition voip_calls.h:175
_actrace_cas_calls_info::trunk
int trunk
Definition voip_calls.h:176
_actrace_isdn_calls_info
Protocol-specific call metadata for ACTrace ISDN calls.
Definition voip_calls.h:165
_actrace_isdn_calls_info::crv
int32_t crv
Definition voip_calls.h:166
_actrace_isdn_calls_info::trunk
int trunk
Definition voip_calls.h:167
_h245_address
H.245 control channel address and port tuple.
Definition voip_calls.h:130
_h245_address::h245_address
address h245_address
Definition voip_calls.h:131
_h245_address::h245_port
uint16_t h245_port
Definition voip_calls.h:132
_h245_labels
Definition voip_calls.c:160
_h323_calls_info
Protocol-specific call metadata for H.323 calls.
Definition voip_calls.h:139
_h323_calls_info::h225SetupAddr
address h225SetupAddr
Definition voip_calls.h:142
_h323_calls_info::h245_list
GList * h245_list
Definition voip_calls.h:141
_h323_calls_info::q931_crv2
int32_t q931_crv2
Definition voip_calls.h:148
_h323_calls_info::is_h245Tunneling
bool is_h245Tunneling
Definition voip_calls.h:146
_h323_calls_info::is_h245
bool is_h245
Definition voip_calls.h:143
_h323_calls_info::guid
e_guid_t * guid
Definition voip_calls.h:140
_h323_calls_info::is_faststart_Setup
bool is_faststart_Setup
Definition voip_calls.h:144
_h323_calls_info::q931_crv
int32_t q931_crv
Definition voip_calls.h:147
_h323_calls_info::requestSeqNum
unsigned requestSeqNum
Definition voip_calls.h:149
_h323_calls_info::is_faststart_Proc
bool is_faststart_Proc
Definition voip_calls.h:145
_isup_calls_info
Protocol-specific call metadata for ISUP calls.
Definition voip_calls.h:119
_isup_calls_info::opc
uint32_t opc
Definition voip_calls.h:121
_isup_calls_info::ni
uint8_t ni
Definition voip_calls.h:123
_isup_calls_info::cic
uint16_t cic
Definition voip_calls.h:120
_isup_calls_info::dpc
uint32_t dpc
Definition voip_calls.h:122
_mgcp_calls_info
Protocol-specific call metadata for MGCP calls.
Definition voip_calls.h:156
_mgcp_calls_info::fromEndpoint
bool fromEndpoint
Definition voip_calls.h:158
_mgcp_calls_info::endpointId
char * endpointId
Definition voip_calls.h:157
_sip_calls_info
Protocol-specific call metadata for SIP calls.
Definition voip_calls.h:109
_sip_calls_info::call_identifier
char * call_identifier
Definition voip_calls.h:110
_sip_calls_info::invite_cseq
uint32_t invite_cseq
Definition voip_calls.h:111
_sip_calls_info::sip_state
sip_call_state sip_state
Definition voip_calls.h:112
_skinny_calls_info
Protocol-specific call metadata for Cisco Skinny (SCCP) calls.
Definition voip_calls.h:183
_skinny_calls_info::callId
uint32_t callId
Definition voip_calls.h:184
_voip_calls_info
Unified record describing a single detected VoIP call across all supported protocols.
Definition voip_calls.h:191
_voip_calls_info::start_fd
frame_data * start_fd
Definition voip_calls.h:205
_voip_calls_info::npackets
uint32_t npackets
Definition voip_calls.h:200
_voip_calls_info::prot_info
void * prot_info
Definition voip_calls.h:197
_voip_calls_info::free_prot_info
void(* free_prot_info)(void *)
Definition voip_calls.h:198
_voip_calls_info::call_num
uint16_t call_num
Definition voip_calls.h:204
_voip_calls_info::from_identity
char * from_identity
Definition voip_calls.h:195
_voip_calls_info::stop_fd
frame_data * stop_fd
Definition voip_calls.h:207
_voip_calls_info::start_rel_ts
nstime_t start_rel_ts
Definition voip_calls.h:206
_voip_calls_info::protocol_name
char * protocol_name
Definition voip_calls.h:202
_voip_calls_info::call_state
voip_call_state call_state
Definition voip_calls.h:192
_voip_calls_info::initial_speaker
address initial_speaker
Definition voip_calls.h:199
_voip_calls_info::call_id
char * call_id
Definition voip_calls.h:194
_voip_calls_info::call_comment
char * call_comment
Definition voip_calls.h:203
_voip_calls_info::protocol
voip_protocol protocol
Definition voip_calls.h:201
_voip_calls_info::to_identity
char * to_identity
Definition voip_calls.h:196
_voip_calls_info::stop_rel_ts
nstime_t stop_rel_ts
Definition voip_calls.h:208
_voip_calls_info::call_active_state
voip_call_active_state call_active_state
Definition voip_calls.h:193
_voip_calls_tapinfo
Aggregated tap state for the VoIP calls analysis, covering all detected calls and streams.
Definition voip_calls.h:218
_voip_calls_tapinfo::rtp_evt_frame_num
uint32_t rtp_evt_frame_num
Definition voip_calls.h:235
_voip_calls_tapinfo::h245_labels
struct _h245_labels * h245_labels
Definition voip_calls.h:244
_voip_calls_tapinfo::filter_calls_fwd
voip_calls_info_t * filter_calls_fwd
Definition voip_calls.h:227
_voip_calls_tapinfo::apply_display_filter
bool apply_display_filter
Definition voip_calls.h:258
_voip_calls_tapinfo::tap_reset
tap_reset_cb tap_reset
Definition voip_calls.h:219
_voip_calls_tapinfo::mtp3_opc
uint32_t mtp3_opc
Definition voip_calls.h:240
_voip_calls_tapinfo::rejected_calls
int rejected_calls
Definition voip_calls.h:230
_voip_calls_tapinfo::q931_crv
int32_t q931_crv
Definition voip_calls.h:246
_voip_calls_tapinfo::tap_draw
tap_draw_cb tap_draw
Definition voip_calls.h:221
_voip_calls_tapinfo::h225_is_faststart
bool h225_is_faststart
Definition voip_calls.h:251
_voip_calls_tapinfo::rtp_evt
uint8_t rtp_evt
Definition voip_calls.h:236
_voip_calls_tapinfo::rtpstream_list
GList * rtpstream_list
Definition voip_calls.h:234
_voip_calls_tapinfo::sip_frame_num
uint32_t sip_frame_num
Definition voip_calls.h:252
_voip_calls_tapinfo::fs_option
flow_show_options fs_option
Definition voip_calls.h:256
_voip_calls_tapinfo::mtp3_ni
uint8_t mtp3_ni
Definition voip_calls.h:242
_voip_calls_tapinfo::actrace_direction
int32_t actrace_direction
Definition voip_calls.h:255
_voip_calls_tapinfo::session
epan_t * session
Definition voip_calls.h:232
_voip_calls_tapinfo::actrace_frame_num
uint32_t actrace_frame_num
Definition voip_calls.h:253
_voip_calls_tapinfo::callsinfos
GQueue * callsinfos
Definition voip_calls.h:224
_voip_calls_tapinfo::npackets
int npackets
Definition voip_calls.h:226
_voip_calls_tapinfo::sdp_frame_num
uint32_t sdp_frame_num
Definition voip_calls.h:239
_voip_calls_tapinfo::q931_frame_num
uint32_t q931_frame_num
Definition voip_calls.h:247
_voip_calls_tapinfo::sdp_summary
char * sdp_summary
Definition voip_calls.h:238
_voip_calls_tapinfo::q931_cause_value
uint8_t q931_cause_value
Definition voip_calls.h:245
_voip_calls_tapinfo::mtp3_dpc
uint32_t mtp3_dpc
Definition voip_calls.h:241
_voip_calls_tapinfo::completed_calls
int completed_calls
Definition voip_calls.h:229
_voip_calls_tapinfo::mtp3_frame_num
uint32_t mtp3_frame_num
Definition voip_calls.h:243
_voip_calls_tapinfo::h225_frame_num
uint32_t h225_frame_num
Definition voip_calls.h:248
_voip_calls_tapinfo::h225_cstype
int h225_cstype
Definition voip_calls.h:250
_voip_calls_tapinfo::nrtpstreams
int nrtpstreams
Definition voip_calls.h:233
_voip_calls_tapinfo::callsinfo_hashtable
GHashTable * callsinfo_hashtable[1]
Definition voip_calls.h:225
_voip_calls_tapinfo::ncalls
int ncalls
Definition voip_calls.h:223
_voip_calls_tapinfo::redraw
uint32_t redraw
Definition voip_calls.h:257
_voip_calls_tapinfo::actrace_trunk
int32_t actrace_trunk
Definition voip_calls.h:254
_voip_calls_tapinfo::rtp_evt_end
bool rtp_evt_end
Definition voip_calls.h:237
_voip_calls_tapinfo::graph_analysis
seq_analysis_info_t * graph_analysis
Definition voip_calls.h:231
_voip_calls_tapinfo::h225_call_num
uint16_t h225_call_num
Definition voip_calls.h:249
_voip_calls_tapinfo::tap_data
void * tap_data
Definition voip_calls.h:222
_voip_calls_tapinfo::tap_packet
tap_packet_cb tap_packet
Definition voip_calls.h:220
_voip_calls_tapinfo::start_packets
int start_packets
Definition voip_calls.h:228
nstime_t
Definition nstime.h:26
tap.h
voip_calls_init_all_taps
void voip_calls_init_all_taps(voip_calls_tapinfo_t *tap_id_base)
Registers the voip_calls tap listeners (if not already done).
Definition voip_calls.c:186
_sip_call_state
_sip_call_state
Tracks the signalling state of an in-progress SIP call.
Definition voip_calls.h:99
SIP_INVITE_SENT
@ SIP_INVITE_SENT
Definition voip_calls.h:100
SIP_200_REC
@ SIP_200_REC
Definition voip_calls.h:101
SIP_CANCEL_SENT
@ SIP_CANCEL_SENT
Definition voip_calls.h:102
_flow_show_options
_flow_show_options
Controls which calls are shown in the VoIP flow graph.
Definition voip_calls.h:89
FLOW_ALL
@ FLOW_ALL
Definition voip_calls.h:90
FLOW_ONLY_INVITES
@ FLOW_ONLY_INVITES
Definition voip_calls.h:91
sip_call_state
enum _sip_call_state sip_call_state
Tracks the signalling state of an in-progress SIP call.
isup_calls_info_t
struct _isup_calls_info isup_calls_info_t
Protocol-specific call metadata for ISUP calls.
voip_calls_set_apply_display_filter
void voip_calls_set_apply_display_filter(voip_calls_tapinfo_t *tapinfo, bool apply)
Sets whether to apply display filter for VoIP calls.
Definition voip_calls.c:313
voip_protocol
enum _voip_protocol voip_protocol
Identifies the signalling protocol of a captured VoIP call.
actrace_cas_calls_info_t
struct _actrace_cas_calls_info actrace_cas_calls_info_t
Protocol-specific call metadata for ACTrace CAS calls.
voip_calls_free_callsinfo
void voip_calls_free_callsinfo(voip_calls_info_t *callsinfo)
Frees one callsinfo.
Definition voip_calls.c:328
flow_show_options
enum _flow_show_options flow_show_options
Controls which calls are shown in the VoIP flow graph.
_hash_indexes
_hash_indexes
Indices into the per-protocol hash table array in _voip_calls_tapinfo.
Definition voip_calls.h:76
SIP_HASH
@ SIP_HASH
Definition voip_calls.h:77
actrace_isdn_calls_info_t
struct _actrace_isdn_calls_info actrace_isdn_calls_info_t
Protocol-specific call metadata for ACTrace ISDN calls.
h323_calls_info_t
struct _h323_calls_info h323_calls_info_t
Protocol-specific call metadata for H.323 calls.
sip_calls_info_t
struct _sip_calls_info sip_calls_info_t
Protocol-specific call metadata for SIP calls.
_voip_protocol
_voip_protocol
Identifies the signalling protocol of a captured VoIP call.
Definition voip_calls.h:54
VOIP_AC_ISDN
@ VOIP_AC_ISDN
Definition voip_calls.h:59
VOIP_SIP
@ VOIP_SIP
Definition voip_calls.h:55
MEDIA_T38
@ MEDIA_T38
Definition voip_calls.h:61
VOIP_SKINNY
@ VOIP_SKINNY
Definition voip_calls.h:67
VOIP_H323
@ VOIP_H323
Definition voip_calls.h:57
TEL_BSSMAP
@ TEL_BSSMAP
Definition voip_calls.h:64
TEL_RANAP
@ TEL_RANAP
Definition voip_calls.h:65
VOIP_MGCP
@ VOIP_MGCP
Definition voip_calls.h:58
VOIP_IAX2
@ VOIP_IAX2
Definition voip_calls.h:68
VOIP_AC_CAS
@ VOIP_AC_CAS
Definition voip_calls.h:60
TEL_H248
@ TEL_H248
Definition voip_calls.h:62
VOIP_ISUP
@ VOIP_ISUP
Definition voip_calls.h:56
VOIP_UNISTIM
@ VOIP_UNISTIM
Definition voip_calls.h:66
VOIP_COMMON
@ VOIP_COMMON
Definition voip_calls.h:69
TEL_SCCP
@ TEL_SCCP
Definition voip_calls.h:63
voip_calls_tapinfo_t
struct _voip_calls_tapinfo voip_calls_tapinfo_t
Aggregated tap state for the VoIP calls analysis, covering all detected calls and streams.
voip_calls_remove_all_tap_listeners
void voip_calls_remove_all_tap_listeners(voip_calls_tapinfo_t *tap_id_base)
Removes the voip_calls tap listener (if not already done).
Definition voip_calls.c:232
skinny_calls_info_t
struct _skinny_calls_info skinny_calls_info_t
Protocol-specific call metadata for Cisco Skinny (SCCP) calls.
mgcp_calls_info_t
struct _mgcp_calls_info mgcp_calls_info_t
Protocol-specific call metadata for MGCP calls.
voip_calls_reset_all_taps
void voip_calls_reset_all_taps(voip_calls_tapinfo_t *tapinfo)
Cleans up memory of voip calls tap.
Definition voip_calls.c:262
voip_calls_info_t
struct _voip_calls_info voip_calls_info_t
Unified record describing a single detected VoIP call across all supported protocols.
hash_indexes
enum _hash_indexes hash_indexes
Indices into the per-protocol hash table array in _voip_calls_tapinfo.
h245_address_t
struct _h245_address h245_address_t
H.245 control channel address and port tuple.