Wireshark 4.7.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 <epan/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
42typedef struct _rtpstream_info {
45 /* --- Payload type tracking --- */
48 const char *payload_type_names[256];
51 /* --- Stream status --- */
52 bool is_srtp;
53 uint32_t packet_count;
57 /* --- Call association --- */
61 /* --- Timing extents --- */
68 /* --- VLAN and QoS tagging --- */
69 uint16_t vlan_id;
73 /* --- Statistics and diagnostics --- */
75 bool problem;
76 const char *ed137_info;
78
88
90
91typedef void (*rtpstream_tap_reset_cb)(rtpstream_tapinfo_t *tapinfo);
92typedef void (*rtpstream_tap_draw_cb)(rtpstream_tapinfo_t *tapinfo);
93typedef void (*tap_mark_packet_cb)(rtpstream_tapinfo_t *tapinfo, frame_data *fd);
94typedef void (*rtpstream_tap_error_cb)(GString *error_string);
95
96/* structure that holds the information about all detected streams */
99 rtpstream_tap_reset_cb tap_reset;
100 rtpstream_tap_draw_cb tap_draw;
101 tap_mark_packet_cb tap_mark_packet;
102 void *tap_data;
105 GHashTable *strinfo_hash;
106 /* multihash means that there can be */
107 /* more values related to one hash key */
109 /* used while tapping. user shouldn't modify these */
110 tap_mode_t mode;
113 FILE *save_file;
116};
117
118#if 0
119#define RTP_STREAM_DEBUG(...) { \
120 char *RTP_STREAM_DEBUG_MSG = ws_strdup_printf(__VA_ARGS__); \
121 ws_warning("rtp_stream: %s:%d %s", G_STRFUNC, __LINE__, RTP_STREAM_DEBUG_MSG); \
122 g_free(RTP_STREAM_DEBUG_MSG); \
123}
124#else
125#define RTP_STREAM_DEBUG(...)
126#endif
127
128/****************************************************************************/
129/* INTERFACE */
130
135void show_tap_registration_error(GString *error_string);
136
144void rtpstream_scan(rtpstream_tapinfo_t *tapinfo, capture_file *cap_file, const char *fstring);
145
155bool rtpstream_save(rtpstream_tapinfo_t *tapinfo, capture_file *cap_file, rtpstream_info_t* stream, const char *filename);
156
166void rtpstream_mark(rtpstream_tapinfo_t *tapinfo, capture_file *cap_file, rtpstream_info_t* stream_fwd, rtpstream_info_t* stream_rev);
167
175
180#define MAX_SILENCE_FRAMES 14400000
181
182#ifdef __cplusplus
183}
184#endif /* __cplusplus */
185
186#endif /* __RTP_STREAM_H__ */
DIAG_OFF_PEDANTIC struct _frame_data frame_data
Frame data structure.
void rtpstream_set_apply_display_filter(rtpstream_tapinfo_t *tapinfo, bool apply)
Sets whether only packets that pass the current main display filter should be scanned for RTP streams...
Definition rtp_stream.c:143
struct _rtpstream_info rtpstream_info_t
Holds all state and statistics accumulated for a single RTP stream.
void rtpstream_scan(rtpstream_tapinfo_t *tapinfo, capture_file *cap_file, const char *fstring)
Scans all packets for RTP streams and updates the RTP streams list. (redissects all packets)
Definition rtp_stream.c:47
tap_mode_t
Selects the operation performed by the RTP stream tap on the collected stream data.
Definition rtp_stream.h:83
@ TAP_ANALYSE
Definition rtp_stream.h:84
@ TAP_MARK
Definition rtp_stream.h:86
@ TAP_SAVE
Definition rtp_stream.h:85
void rtpstream_mark(rtpstream_tapinfo_t *tapinfo, capture_file *cap_file, rtpstream_info_t *stream_fwd, rtpstream_info_t *stream_rev)
Marks all packets belonging to either of stream_fwd or stream_rev. (both can be NULL) (redissects all...
Definition rtp_stream.c:120
bool rtpstream_save(rtpstream_tapinfo_t *tapinfo, capture_file *cap_file, rtpstream_info_t *stream, const char *filename)
Saves an RTP stream as raw data stream with timestamp information for later RTP playback....
Definition rtp_stream.c:70
void show_tap_registration_error(GString *error_string)
Shows an error message when tap registration fails.
Definition rtp_stream.c:39
Represents a capture file and its associated metadata.
Definition cfile.h:84
Definition rtp_stream_id.h:33
Holds all state and statistics accumulated for a single RTP stream.
Definition rtp_stream.h:42
bool tag_diffserv_error
Definition rtp_stream.h:71
const char * payload_type_names[256]
Definition rtp_stream.h:48
const char * first_payload_type_name
Definition rtp_stream.h:47
bool is_srtp
Definition rtp_stream.h:52
rtpstream_id_t id
Definition rtp_stream.h:43
tap_rtp_stat_t rtp_stats
Definition rtp_stream.h:74
uint32_t setup_frame_number
Definition rtp_stream.h:59
uint32_t packet_count
Definition rtp_stream.h:53
frame_data * stop_fd
Definition rtp_stream.h:63
frame_data * start_fd
Definition rtp_stream.h:62
uint8_t first_payload_type
Definition rtp_stream.h:46
nstime_t start_rel_time
Definition rtp_stream.h:64
bool end_stream
Definition rtp_stream.h:54
int call_num
Definition rtp_stream.h:58
nstime_t start_abs_time
Definition rtp_stream.h:66
const char * ed137_info
Definition rtp_stream.h:76
bool problem
Definition rtp_stream.h:75
bool tag_vlan_error
Definition rtp_stream.h:70
int rtp_event
Definition rtp_stream.h:55
nstime_t stop_rel_time
Definition rtp_stream.h:65
uint16_t vlan_id
Definition rtp_stream.h:69
char * all_payload_type_names
Definition rtp_stream.h:49
Definition rtp_stream.h:98
bool is_registered
Definition rtp_stream.h:114
GHashTable * strinfo_hash
Definition rtp_stream.h:105
bool apply_display_filter
Definition rtp_stream.h:115
rtpstream_info_t * filter_stream_rev
Definition rtp_stream.h:112
rtpstream_tap_reset_cb tap_reset
Definition rtp_stream.h:99
int npackets
Definition rtp_stream.h:108
rtpstream_tap_draw_cb tap_draw
Definition rtp_stream.h:100
int nstreams
Definition rtp_stream.h:103
rtpstream_info_t * filter_stream_fwd
Definition rtp_stream.h:111
void * tap_data
Definition rtp_stream.h:102
tap_mark_packet_cb tap_mark_packet
Definition rtp_stream.h:101
GList * strinfo_list
Definition rtp_stream.h:104
Definition tap-rtp-analysis.h:43
Definition nstime.h:26
Definition stream.c:41