display SRTP isntead of RTP if stream is established like a SRTP
svn path=/trunk/; revision=23337
This commit is contained in:
parent
1a83466890
commit
9b3c5f9f03
|
@ -896,6 +896,7 @@ dissect_rtp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
|
|||
gboolean marker_set;
|
||||
unsigned int payload_type;
|
||||
gchar *payload_type_str = NULL;
|
||||
gboolean is_srtp = FALSE;
|
||||
unsigned int i = 0;
|
||||
unsigned int hdr_extension= 0;
|
||||
unsigned int padding_count;
|
||||
|
@ -988,6 +989,7 @@ dissect_rtp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
|
|||
rtp_info->info_seq_num = seq_num;
|
||||
rtp_info->info_timestamp = timestamp;
|
||||
rtp_info->info_sync_src = sync_src;
|
||||
rtp_info->info_is_srtp = FALSE;
|
||||
rtp_info->info_setup_frame_num = 0;
|
||||
rtp_info->info_payload_type_str = NULL;
|
||||
|
||||
|
@ -1028,8 +1030,11 @@ dissect_rtp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
|
|||
get_conv_info(pinfo, rtp_info);
|
||||
p_conv_data = p_get_proto_data(pinfo->fd, proto_rtp);
|
||||
|
||||
if (p_conv_data && p_conv_data->srtp_info) is_srtp = TRUE;
|
||||
rtp_info->info_is_srtp = is_srtp;
|
||||
|
||||
if ( check_col( pinfo->cinfo, COL_PROTOCOL ) ) {
|
||||
col_set_str( pinfo->cinfo, COL_PROTOCOL, "RTP" );
|
||||
col_set_str( pinfo->cinfo, COL_PROTOCOL, (is_srtp) ? "SRTP" : "RTP" );
|
||||
}
|
||||
|
||||
/* check if this is added as an SRTP stream - if so, don't try to dissector the payload data for now */
|
||||
|
|
|
@ -40,6 +40,7 @@ struct _rtp_info {
|
|||
gboolean info_all_data_present; /* FALSE if data is cut off */
|
||||
guint info_payload_offset; /* start of payload relative to info_data */
|
||||
guint info_payload_len; /* length of payload (incl padding) */
|
||||
gboolean info_is_srtp;
|
||||
guint32 info_setup_frame_num; /* the frame num of the packet that set this RTP connection */
|
||||
const guint8* info_data; /* pointer to raw rtp data */
|
||||
gchar *info_payload_type_str;
|
||||
|
|
|
@ -531,6 +531,7 @@ RTP_packet( void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, void con
|
|||
strinfo->end_stream = FALSE;
|
||||
strinfo->pt = pi->info_payload_type;
|
||||
strinfo->pt_str = NULL;
|
||||
strinfo->is_srtp = pi->info_is_srtp;
|
||||
/* if it is dynamic payload, let use the conv data to see if it is defined */
|
||||
if ( (strinfo->pt>95) && (strinfo->pt<128) ) {
|
||||
/* Use existing packet info if available */
|
||||
|
@ -605,7 +606,9 @@ static void RTP_packet_draw(void *prs _U_)
|
|||
if (rtp_listinfo->first_frame_num == gai->frame_num){
|
||||
duration = (rtp_listinfo->stop_rel_sec*1000000 + rtp_listinfo->stop_rel_usec) - (rtp_listinfo->start_rel_sec*1000000 + rtp_listinfo->start_rel_usec);
|
||||
g_free(gai->comment);
|
||||
gai->comment = g_strdup_printf("RTP Num packets:%u Duration:%u.%03us SSRC:0x%X", rtp_listinfo->npackets, duration/1000000,(duration%1000000)/1000, rtp_listinfo->ssrc);
|
||||
gai->comment = g_strdup_printf("%s Num packets:%u Duration:%u.%03us SSRC:0x%X",
|
||||
(rtp_listinfo->is_srtp)?"SRTP":"RTP", rtp_listinfo->npackets,
|
||||
duration/1000000,(duration%1000000)/1000, rtp_listinfo->ssrc);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -623,9 +626,11 @@ static void RTP_packet_draw(void *prs _U_)
|
|||
new_gai->port_src = rtp_listinfo->src_port;
|
||||
new_gai->port_dst = rtp_listinfo->dest_port;
|
||||
duration = (rtp_listinfo->stop_rel_sec*1000000 + rtp_listinfo->stop_rel_usec) - (rtp_listinfo->start_rel_sec*1000000 + rtp_listinfo->start_rel_usec);
|
||||
new_gai->frame_label = g_strdup_printf("RTP (%s) %s", rtp_listinfo->pt_str, (rtp_listinfo->rtp_event == -1)?"":val_to_str(rtp_listinfo->rtp_event, rtp_event_type_values, "Unknown RTP Event"));
|
||||
new_gai->frame_label = g_strdup_printf("%s (%s) %s", (rtp_listinfo->is_srtp)?"SRTP":"RTP", rtp_listinfo->pt_str, (rtp_listinfo->rtp_event == -1)?"":val_to_str(rtp_listinfo->rtp_event, rtp_event_type_values, "Unknown RTP Event"));
|
||||
g_free(rtp_listinfo->pt_str);
|
||||
new_gai->comment = g_strdup_printf("RTP Num packets:%u Duration:%u.%03us SSRC:0x%X", rtp_listinfo->npackets, duration/1000000,(duration%1000000)/1000, rtp_listinfo->ssrc);
|
||||
new_gai->comment = g_strdup_printf("%s Num packets:%u Duration:%u.%03us SSRC:0x%X",
|
||||
(rtp_listinfo->is_srtp)?"SRTP":"RTP", rtp_listinfo->npackets,
|
||||
duration/1000000,(duration%1000000)/1000, rtp_listinfo->ssrc);
|
||||
new_gai->conv_num = conv_num;
|
||||
new_gai->display=FALSE;
|
||||
new_gai->line_style = 2; /* the arrow line will be 2 pixels width */
|
||||
|
|
|
@ -191,6 +191,7 @@ typedef struct _voip_rtp_stream_info {
|
|||
guint32 ssrc;
|
||||
guint32 pt;
|
||||
gchar *pt_str;
|
||||
gboolean is_srtp;
|
||||
guint32 npackets;
|
||||
gboolean end_stream;
|
||||
|
||||
|
|
Loading…
Reference in New Issue