Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
rtp_stream.h
Go to the documentation of this file.
1
15#ifndef __RTP_STREAM_H__
16#define __RTP_STREAM_H__
17
18#include <glib.h>
19
20#include "tap-rtp-analysis.h"
21#include <stdio.h>
22
23#include "cfile.h"
24
25#include <epan/address.h>
26#include <epan/tap.h>
27
28#include "ui/rtp_stream_id.h"
29
35#ifdef __cplusplus
36extern "C" {
37#endif /* __cplusplus */
38
40typedef struct _rtpstream_info {
42
45 const char *payload_type_names[256];
48 bool is_srtp;
49 uint32_t packet_count;
51 int rtp_event;
52
55 /* Start and stop packets needed for .num and .abs_ts */
56 frame_data *start_fd;
57 frame_data *stop_fd;
61 uint16_t vlan_id;
62 bool tag_vlan_error;
63 bool tag_diffserv_error;
64
66 bool problem;
67 const char *ed137_info;
69
71typedef enum
72{
73 TAP_ANALYSE,
74 TAP_SAVE,
75 TAP_MARK
77
79
80typedef void (*rtpstream_tap_reset_cb)(rtpstream_tapinfo_t *tapinfo);
81typedef void (*rtpstream_tap_draw_cb)(rtpstream_tapinfo_t *tapinfo);
82typedef void (*tap_mark_packet_cb)(rtpstream_tapinfo_t *tapinfo, frame_data *fd);
83typedef void (*rtpstream_tap_error_cb)(GString *error_string);
84
85/* structure that holds the information about all detected streams */
88 rtpstream_tap_reset_cb tap_reset;
89 rtpstream_tap_draw_cb tap_draw;
90 tap_mark_packet_cb tap_mark_packet;
91 void *tap_data;
93 GList *strinfo_list;
94 GHashTable *strinfo_hash;
95 /* multihash means that there can be */
96 /* more values related to one hash key */
98 /* used while tapping. user shouldn't modify these */
99 tap_mode_t mode;
102 FILE *save_file;
105};
106
107#if 0
108#define RTP_STREAM_DEBUG(...) { \
109 char *RTP_STREAM_DEBUG_MSG = ws_strdup_printf(__VA_ARGS__); \
110 ws_warning("rtp_stream: %s:%d %s", G_STRFUNC, __LINE__, RTP_STREAM_DEBUG_MSG); \
111 g_free(RTP_STREAM_DEBUG_MSG); \
112}
113#else
114#define RTP_STREAM_DEBUG(...)
115#endif
116
117/****************************************************************************/
118/* INTERFACE */
119
120void show_tap_registration_error(GString *error_string);
121
126void rtpstream_scan(rtpstream_tapinfo_t *tapinfo, capture_file *cap_file, const char *fstring);
127
132bool rtpstream_save(rtpstream_tapinfo_t *tapinfo, capture_file *cap_file, rtpstream_info_t* stream, const char *filename);
133
139void rtpstream_mark(rtpstream_tapinfo_t *tapinfo, capture_file *cap_file, rtpstream_info_t* stream_fwd, rtpstream_info_t* stream_rev);
140
141/* Constant based on fix for bug 4119/5902: don't insert too many silence
142 * frames.
143 */
144#define MAX_SILENCE_FRAMES 14400000
145
146#ifdef __cplusplus
147}
148#endif /* __cplusplus */
149
150#endif /* __RTP_STREAM_H__ */
struct _rtpstream_info rtpstream_info_t
void rtpstream_scan(rtpstream_tapinfo_t *tapinfo, capture_file *cap_file, const char *fstring)
Definition rtp_stream.c:46
tap_mode_t
Definition rtp_stream.h:72
void rtpstream_mark(rtpstream_tapinfo_t *tapinfo, capture_file *cap_file, rtpstream_info_t *stream_fwd, rtpstream_info_t *stream_rev)
Definition rtp_stream.c:119
bool rtpstream_save(rtpstream_tapinfo_t *tapinfo, capture_file *cap_file, rtpstream_info_t *stream, const char *filename)
Definition rtp_stream.c:69
Definition cfile.h:67
Definition rtp_stream_id.h:33
Definition rtp_stream.h:40
const char * payload_type_names[256]
Definition rtp_stream.h:45
const char * first_payload_type_name
Definition rtp_stream.h:44
tap_rtp_stat_t rtp_stats
Definition rtp_stream.h:65
uint32_t setup_frame_number
Definition rtp_stream.h:54
uint8_t first_payload_type
Definition rtp_stream.h:43
nstime_t start_rel_time
Definition rtp_stream.h:58
bool end_stream
Definition rtp_stream.h:50
int call_num
Definition rtp_stream.h:53
nstime_t start_abs_time
Definition rtp_stream.h:60
bool problem
Definition rtp_stream.h:66
nstime_t stop_rel_time
Definition rtp_stream.h:59
char * all_payload_type_names
Definition rtp_stream.h:46
Definition rtp_stream.h:87
bool is_registered
Definition rtp_stream.h:103
GHashTable * strinfo_hash
Definition rtp_stream.h:94
bool apply_display_filter
Definition rtp_stream.h:104
rtpstream_info_t * filter_stream_rev
Definition rtp_stream.h:101
rtpstream_tap_reset_cb tap_reset
Definition rtp_stream.h:88
int npackets
Definition rtp_stream.h:97
rtpstream_tap_draw_cb tap_draw
Definition rtp_stream.h:89
int nstreams
Definition rtp_stream.h:92
rtpstream_info_t * filter_stream_fwd
Definition rtp_stream.h:100
void * tap_data
Definition rtp_stream.h:91
tap_mark_packet_cb tap_mark_packet
Definition rtp_stream.h:90
GList * strinfo_list
Definition rtp_stream.h:93
Definition tap-rtp-analysis.h:43
Definition nstime.h:26
Definition stream.c:41