| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
voip_calls.h
Go to the documentation of this file.
1
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
42#ifdef __cplusplus
43 extern "C" {
44#endif /* __cplusplus */
45
46/****************************************************************************/
47 extern const char *voip_call_state_name[8];
48
49 typedef enum _voip_protocol {
50 VOIP_SIP,
51 VOIP_ISUP,
52 VOIP_H323,
53 VOIP_MGCP,
54 VOIP_AC_ISDN,
55 VOIP_AC_CAS,
56 MEDIA_T38,
57 TEL_H248,
58 TEL_SCCP,
59 TEL_BSSMAP,
60 TEL_RANAP,
61 VOIP_UNISTIM,
62 VOIP_SKINNY,
63 VOIP_IAX2,
64 VOIP_COMMON
65} voip_protocol;
66
67 typedef enum _hash_indexes {
68 SIP_HASH=0
69} hash_indexes;
70
71 extern const char *voip_protocol_name[];
72
73 typedef enum _flow_show_options
74{
75 FLOW_ALL,
76 FLOW_ONLY_INVITES
77} flow_show_options;
78
81 typedef enum _sip_call_state {
82 SIP_INVITE_SENT,
83 SIP_200_REC,
84 SIP_CANCEL_SENT
85} sip_call_state;
86
87 typedef struct _sip_calls_info {
88 char *call_identifier;
89 uint32_t invite_cseq;
90 sip_call_state sip_state;
91} sip_calls_info_t;
92
94 typedef struct _isup_calls_info {
95 uint16_t cic;
96 uint32_t opc, dpc;
97 uint8_t ni;
98} isup_calls_info_t;
99
100/* defines specific H245 data */
101 typedef struct _h245_address {
102 address h245_address;
103 uint16_t h245_port;
104} h245_address_t;
105
107 typedef struct _h323_calls_info {
108 e_guid_t *guid; /* Call ID to identify a H225 */
109 GList* h245_list;
110 address h225SetupAddr;
111 bool is_h245;
112 bool is_faststart_Setup;
113 bool is_faststart_Proc;
114 bool is_h245Tunneling;
115 int32_t q931_crv;
116 int32_t q931_crv2;
117 unsigned requestSeqNum;
118} h323_calls_info_t;
119
121 typedef struct _mgcp_calls_info {
122 char *endpointId;
123 bool fromEndpoint;
124} mgcp_calls_info_t;
125
127 typedef struct _actrace_isdn_calls_info {
128 int32_t crv;
129 int trunk;
130} actrace_isdn_calls_info_t;
131
133 typedef struct _actrace_cas_calls_info {
134 int32_t bchannel;
135 int trunk;
136} actrace_cas_calls_info_t;
137
139 typedef struct _skinny_calls_info {
140 uint32_t callId;
141} skinny_calls_info_t;
142
144 typedef struct _voip_calls_info {
145 voip_call_state call_state;
146 voip_call_active_state call_active_state;
147 char *call_id;
148 char *from_identity;
149 char *to_identity;
150 void * prot_info;
151 void (*free_prot_info)(void *);
152 address initial_speaker;
153 uint32_t npackets;
154 voip_protocol protocol;
155 char *protocol_name;
156 char *call_comment;
157 uint16_t call_num;
159 frame_data *start_fd;
160 nstime_t start_rel_ts;
161 frame_data *stop_fd;
162 nstime_t stop_rel_ts;
163} voip_calls_info_t;
164
167/* struct holding all information of the tap */
168/*
169 * XXX Most of these are private to voip_calls.c. We might want to
170 * make them private.
171 */
172 struct _h245_labels;
173 typedef struct _voip_calls_tapinfo {
174 tap_reset_cb tap_reset;
175 tap_packet_cb tap_packet;
176 tap_draw_cb tap_draw;
177 void *tap_data;
178 int ncalls;
179 GQueue* callsinfos;
180 GHashTable* callsinfo_hashtable[1];
181 int npackets;
182 voip_calls_info_t *filter_calls_fwd;
183 int start_packets;
184 int completed_calls;
185 int rejected_calls;
186 seq_analysis_info_t *graph_analysis;
187 epan_t *session;
188 int nrtpstreams;
189 GList* rtpstream_list;
190 uint32_t rtp_evt_frame_num;
191 uint8_t rtp_evt;
192 bool rtp_evt_end;
193 char *sdp_summary;
194 uint32_t sdp_frame_num;
195 uint32_t mtp3_opc;
196 uint32_t mtp3_dpc;
197 uint8_t mtp3_ni;
198 uint32_t mtp3_frame_num;
199 struct _h245_labels *h245_labels;
200 uint8_t q931_cause_value;
201 int32_t q931_crv;
202 uint32_t q931_frame_num;
203 uint32_t h225_frame_num;
204 uint16_t h225_call_num;
205 int h225_cstype; /* XXX actually an enum */
206 bool h225_is_faststart;
207 uint32_t sip_frame_num;
208 uint32_t actrace_frame_num;
209 int32_t actrace_trunk;
210 int32_t actrace_direction;
211 flow_show_options fs_option;
212 uint32_t redraw;
213 bool apply_display_filter;
214} voip_calls_tapinfo_t;
215
216#if 0
217#define VOIP_CALLS_DEBUG(...) { \
218 char *VOIP_CALLS_DEBUG_MSG = ws_strdup_printf(__VA_ARGS__); \
219 ws_warning("voip_calls: %s:%d %s", G_STRFUNC, __LINE__, VOIP_CALLS_DEBUG_MSG); \
220 g_free(VOIP_CALLS_DEBUG_MSG); \
221}
222#else
223#define VOIP_CALLS_DEBUG(...)
224#endif
225
226/****************************************************************************/
227/* INTERFACE */
228
236 void voip_calls_init_all_taps(voip_calls_tapinfo_t *tap_id_base);
237
242 void voip_calls_remove_all_tap_listeners(voip_calls_tapinfo_t *tap_id_base);
243
247 void voip_calls_reset_all_taps(voip_calls_tapinfo_t *tapinfo);
248
249 void
250voip_calls_set_apply_display_filter(voip_calls_tapinfo_t *tapinfo, bool apply);
251
255 void
256 voip_calls_free_callsinfo(voip_calls_info_t *callsinfo);
257
258#ifdef __cplusplus
259}
260#endif /* __cplusplus */
261
262#endif /* __VOIP_CALLS_H__ */
address.h
tap-voip.h
guid-utils.h
packet.h
sequence_analysis.h
_actrace_cas_calls_info
Definition voip_calls.h:133
_actrace_isdn_calls_info
Definition voip_calls.h:127
_address
Definition address.h:58
_e_guid_t
Definition guid-utils.h:23
_h245_address
Definition voip_calls.h:101
_h245_labels
Definition voip_calls.c:160
_h323_calls_info
Definition voip_calls.h:107
_h323_calls_info::h225SetupAddr
address h225SetupAddr
Definition voip_calls.h:110
_h323_calls_info::h245_list
GList * h245_list
Definition voip_calls.h:109
_h323_calls_info::is_faststart_Setup
bool is_faststart_Setup
Definition voip_calls.h:112
_h323_calls_info::is_faststart_Proc
bool is_faststart_Proc
Definition voip_calls.h:113
_isup_calls_info
Definition voip_calls.h:94
_mgcp_calls_info
Definition voip_calls.h:121
_mgcp_calls_info::fromEndpoint
bool fromEndpoint
Definition voip_calls.h:123
_seq_analysis_info
Definition sequence_analysis.h:69
_sip_calls_info
Definition voip_calls.h:87
_skinny_calls_info
Definition voip_calls.h:139
_voip_calls_info
Definition voip_calls.h:144
_voip_calls_info::start_fd
frame_data * start_fd
Definition voip_calls.h:159
_voip_calls_tapinfo
Definition voip_calls.h:173
_voip_calls_tapinfo::h245_labels
struct _h245_labels * h245_labels
Definition voip_calls.h:199
_voip_calls_tapinfo::filter_calls_fwd
voip_calls_info_t * filter_calls_fwd
Definition voip_calls.h:182
_voip_calls_tapinfo::tap_reset
tap_reset_cb tap_reset
Definition voip_calls.h:174
_voip_calls_tapinfo::tap_draw
tap_draw_cb tap_draw
Definition voip_calls.h:176
_voip_calls_tapinfo::rtpstream_list
GList * rtpstream_list
Definition voip_calls.h:189
_voip_calls_tapinfo::session
epan_t * session
Definition voip_calls.h:187
_voip_calls_tapinfo::callsinfos
GQueue * callsinfos
Definition voip_calls.h:179
_voip_calls_tapinfo::npackets
int npackets
Definition voip_calls.h:181
_voip_calls_tapinfo::nrtpstreams
int nrtpstreams
Definition voip_calls.h:188
_voip_calls_tapinfo::callsinfo_hashtable
GHashTable * callsinfo_hashtable[1]
Definition voip_calls.h:180
_voip_calls_tapinfo::ncalls
int ncalls
Definition voip_calls.h:178
_voip_calls_tapinfo::tap_data
void * tap_data
Definition voip_calls.h:177
_voip_calls_tapinfo::tap_packet
tap_packet_cb tap_packet
Definition voip_calls.h:175
epan_session
Definition epan.c:502
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)
Definition voip_calls.c:186
_sip_call_state
_sip_call_state
Definition voip_calls.h:81
sip_call_state
enum _sip_call_state sip_call_state
isup_calls_info_t
struct _isup_calls_info isup_calls_info_t
actrace_cas_calls_info_t
struct _actrace_cas_calls_info actrace_cas_calls_info_t
voip_calls_free_callsinfo
void voip_calls_free_callsinfo(voip_calls_info_t *callsinfo)
Definition voip_calls.c:328
actrace_isdn_calls_info_t
struct _actrace_isdn_calls_info actrace_isdn_calls_info_t
h323_calls_info_t
struct _h323_calls_info h323_calls_info_t
voip_calls_remove_all_tap_listeners
void voip_calls_remove_all_tap_listeners(voip_calls_tapinfo_t *tap_id_base)
Definition voip_calls.c:232
skinny_calls_info_t
struct _skinny_calls_info skinny_calls_info_t
voip_calls_reset_all_taps
void voip_calls_reset_all_taps(voip_calls_tapinfo_t *tapinfo)
Definition voip_calls.c:262
voip_calls_info_t
struct _voip_calls_info voip_calls_info_t