Ethereal-dev: Re: [Ethereal-dev] h225 + rtp
Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.
From: "Pia Sahlberg" <piabar@xxxxxxxxxxx>
Date: Mon, 11 Aug 2003 14:48:12 +0000
Hi Andreas
I've already wrote such a patch, but for some reason I still can't get it to work right away. Anyway, I'll run a diff and send it to ethereal-dev so you can take a look at it.
I think you just forgot to update teh ipv4_address varaible. Still no attach file thing in hotmail so sorry for the mangled patch. The patch will allow ethereal to find where RTP and RTCP is used. When used with the capture on the website it finds both the RTP and the RTCP sessions fine. Please checkin. ------- *** ethereal-2003-08-04/packet-h245.c 2003-08-01 20:11:54.000000000 +1000 --- ethereal-new/packet-h245.c 2003-08-09 23:23:12.000000000 +1000 *************** *** 31,36 **** --- 31,37 ---- #include <glib.h> #include <epan/packet.h> + #include <epan/conversation.h> #include <stdio.h> #include <string.h> *************** *** 39,44 **** --- 40,48 ---- #include "packet-tpkt.h" #include "packet-per.h" + static dissector_handle_t rtp_handle=NULL; + static dissector_handle_t rtcp_handle=NULL; + static dissector_handle_t h245_handle; static dissector_handle_t MultimediaSystemControlMessage_handle; *************** *** 1454,1459 **** --- 1458,1466 ---- static gint ett_h245_recoveryReferencePicture = -1; static gint ett_h245_iPSourceRouteAddress_route = -1; + static guint32 ipv4_address; + static guint32 ipv4_port; + static gboolean h245_reassembly = TRUE; *************** *** 11014,11020 **** { offset=dissect_per_constrained_integer(tvb, offset, pinfo, tree, hf_h245_tsapIdentifier, 0, 65535, ! NULL, NULL, FALSE); return offset; } --- 11021,11027 ---- { offset=dissect_per_constrained_integer(tvb, offset, pinfo, tree, hf_h245_tsapIdentifier, 0, 65535, ! &ipv4_port, NULL, FALSE); return offset; } *************** *** 12542,12555 **** static intdissect_h245_ipv4network(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
{ - guint32 ip; - /* byte aligned */ if(offset&0x07){ offset=(offset&0xfffffff8)+8; } ! ip=tvb_get_letohl(tvb, offset>>3); ! proto_tree_add_ipv4(tree, hf_h245_ipv4network, tvb, offset>>3, 4, ip); offset+=32; return offset; --- 12549,12560 ---- static intdissect_h245_ipv4network(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
{ /* byte aligned */ if(offset&0x07){ offset=(offset&0xfffffff8)+8; } ! tvb_memcpy(tvb, (char *)&ipv4_address, offset>>3, 4);! proto_tree_add_ipv4(tree, hf_h245_ipv4network, tvb, offset>>3, 4, ipv4_address);
offset+=32; return offset; *************** *** 14307,14321 **** --- 14312,14360 ---- static intdissect_h245_mediaChannel(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{ + ipv4_address=0; + ipv4_port=0; +offset=dissect_per_choice(tvb, offset, pinfo, tree, hf_h245_mediaChannel, ett_h245_TransportAddress, TransportAddress_choice, "mediaChannel", NULL);
+ if((!pinfo->fd->flags.visited) && ipv4_address!=0 && ipv4_port!=0 && rtp_handle){
+ address src_addr; + conversation_t *conv=NULL; + + src_addr.type=AT_IPv4; + src_addr.len=4; + src_addr.data=(char *)&ipv4_address; ++ conv=find_conversation(&src_addr, &src_addr, PT_UDP, ipv4_port, ipv4_port, NO_ADDR_B|NO_PORT_B);
+ if(!conv){+ conv=conversation_new(&src_addr, &src_addr, PT_UDP, ipv4_port, ipv4_port, NO_ADDR_B|NO_PORT_B);
+ conversation_set_dissector(conv, rtp_handle); + } + } return offset; } static intdissect_h245_mediaControlChannel(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{ + ipv4_address=0; + ipv4_port=0; +offset=dissect_per_choice(tvb, offset, pinfo, tree, hf_h245_mediaControlChannel, ett_h245_TransportAddress, TransportAddress_choice, "mediaControlChannel", NULL);
+ if((!pinfo->fd->flags.visited) && ipv4_address!=0 && ipv4_port!=0 && rtcp_handle){
+ address src_addr; + conversation_t *conv=NULL; + + src_addr.type=AT_IPv4; + src_addr.len=4; + src_addr.data=(char *)&ipv4_address; ++ conv=find_conversation(&src_addr, &src_addr, PT_UDP, ipv4_port, ipv4_port, NO_ADDR_B|NO_PORT_B);
+ if(!conv){+ conv=conversation_new(&src_addr, &src_addr, PT_UDP, ipv4_port, ipv4_port, NO_ADDR_B|NO_PORT_B);
+ conversation_set_dissector(conv, rtcp_handle); + } + } return offset; } static int *************** *** 22215,22220 **** --- 22254,22261 ---- h245_handle=create_dissector_handle(dissect_h245, proto_h245);MultimediaSystemControlMessage_handle=create_dissector_handle(dissect_h245_MultimediaSystemControlMessage, proto_h245);
+ rtp_handle = find_dissector("rtp"); + rtcp_handle = find_dissector("rtcp"); dissector_add_handle("tcp.port", h245_handle); dissector_add_handle("udp.port", MultimediaSystemControlMessage_handle); ------------------- _________________________________________________________________ninemsn Extra Storage is now available. Get larger attachments - send/receive up to 3MB attachments (up to three times more per e-mail). Click here http://join.msn.com/
- Follow-Ups:
- Re: [Ethereal-dev] h225 + rtp
- From: Guy Harris
- Re: [Ethereal-dev] h225 + rtp
- Prev by Date: [Ethereal-dev] Linking of ethereal on Win32 doesn't work - Missing function
- Next by Date: [Ethereal-dev] h225 fastStart decoding and improved output to infocolumn
- Previous by thread: Re: [Ethereal-dev] h225 + rtp
- Next by thread: Re: [Ethereal-dev] h225 + rtp
- Index(es):