/* rtp_stream.h
- * RTP streams summary addition for ethereal
+ * RTP streams summary addition for Wireshark
*
- * $Id: rtp_stream.h,v 1.2 2003/11/20 23:34:31 guy Exp $
+ * $Id$
*
* Copyright 2003, Alcatel Business Systems
* By Lars Ruoff <lars.ruoff@gmx.net>
*
- * Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@ethereal.com>
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*
* This program is free software; you can redistribute it and/or
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#ifndef RTP_STREAM_H_INCLUDED
-#define RTP_STREAM_H_INCLUDED
+#ifndef __RTP_STREAM_H__
+#define __RTP_STREAM_H__
+#include "rtp_analysis.h"
#include <glib.h>
#include <stdio.h>
+#include <epan/address.h>
+
/****************************************************************************/
/* type for storing rtp frame information */
typedef struct st_rtp_sample_header {
- guint32 rec_time; /* miliseconds since start of recording */
+ guint32 rec_time; /* milliseconds since start of recording */
guint16 frame_length; /* number of bytes in *frame */
} rtp_sample_header_t;
/* defines an rtp stream */
typedef struct _rtp_stream_info {
- guint32 src_addr;
+ address src_addr;
guint16 src_port;
- guint32 dest_addr;
+ address dest_addr;
guint16 dest_port;
guint32 ssrc;
guint8 pt;
+ gchar *info_payload_type_str;
guint32 npackets;
guint32 first_frame_num; /* frame number of first frame */
+ guint32 setup_frame_number; /* frame number of setup message */
/* start of recording (GMT) of this stream */
- guint32 start_sec; /* seconds */
- guint32 start_usec; /* microseconds */
+ guint32 start_sec; /* seconds */
+ guint32 start_usec; /* microseconds */
gboolean tag_vlan_error;
+ guint32 start_rel_sec; /* start stream rel seconds */
+ guint32 start_rel_usec; /* start stream rel microseconds */
+ guint32 stop_rel_sec; /* stop stream rel seconds */
+ guint32 stop_rel_usec; /* stop stream rel microseconds */
gboolean tag_diffserv_error;
guint16 vlan_id;
+ tap_rtp_stat_t rtp_stats; /* here goes the RTP statistics info */
+ gboolean problem; /* if the streams had wrong sequence numbers or wrong timerstamps */
} rtp_stream_info_t;
/* tapping modes */
typedef enum
{
- TAP_ANALYSE,
- TAP_SAVE,
- TAP_MARK
+ TAP_ANALYSE,
+ TAP_SAVE,
+ TAP_MARK
} tap_mode_t;
gboolean is_registered; /* if the tap listener is currently registered or not */
} rtpstream_tapinfo_t;
-
/****************************************************************************/
/* INTERFACE */
-/*
+/**
* Registers the rtp_streams tap listener (if not already done).
* From that point on, the RTP streams list will be updated with every redissection.
* This function is also the entry point for the initialization routine of the tap system.
-* So whenever rtp_stream.c is added to the list of ETHEREAL_TAP_SRCs, the tap will be registered on startup.
+* So whenever rtp_stream.c is added to the list of WIRESHARK_TAP_SRCs, the tap will be registered on startup.
* If not, it will be registered on demand by the rtp_streams and rtp_analysis functions that need it.
*/
void register_tap_listener_rtp_stream(void);
-/*
+/**
* Removes the rtp_streams tap listener (if not already done)
* From that point on, the RTP streams list won't be updated any more.
*/
void remove_tap_listener_rtp_stream(void);
-/*
+/**
* Retrieves a constant reference to the unique info structure of the rtp_streams tap listener.
* The user should not modify the data pointed to.
*/
-const rtpstream_tapinfo_t* rtpstream_get_info();
+const rtpstream_tapinfo_t* rtpstream_get_info(void);
-/*
+/**
* Cleans up memory of rtp streams tap.
*/
-void rtpstream_reset(rtpstream_tapinfo_t *tapinfo _U_);
+void rtpstream_reset(rtpstream_tapinfo_t *tapinfo);
-/*
+/**
* Scans all packets for RTP streams and updates the RTP streams list.
* (redissects all packets)
*/
-void rtpstream_scan();
+void rtpstream_scan(void);
-/*
+/**
* Saves an RTP stream as raw data stream with timestamp information for later RTP playback.
* (redissects all packets)
*/
-void rtpstream_save(rtp_stream_info_t* stream, const gchar *filename);
+gboolean rtpstream_save(rtp_stream_info_t* stream, const gchar *filename);
-/*
+/**
* Marks all packets belonging to either of stream_fwd or stream_rev.
* (both can be NULL)
* (redissects all packets)
void rtpstream_mark(rtp_stream_info_t* stream_fwd, rtp_stream_info_t* stream_rev);
-#endif /*RTP_STREAM_H_INCLUDED*/
+#endif /* __RTP_STREAM_H__ */