diff options
author | Anders Broman <anders.broman@ericsson.com> | 2009-06-21 18:27:34 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2009-06-21 18:27:34 +0000 |
commit | 983175d9cfe9a537ef3e2133c23ad13e36632faa (patch) | |
tree | 5ddfeb746b53f9f48d05e6729db434038c08f2b9 /epan | |
parent | 2ca110fb2e8ed866603d674ce289bccc356c22a6 (diff) |
Add duration to the tap info.
svn path=/trunk/; revision=28791
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-rtp-events.c | 20 | ||||
-rw-r--r-- | epan/dissectors/packet-rtp-events.h | 79 |
2 files changed, 53 insertions, 46 deletions
diff --git a/epan/dissectors/packet-rtp-events.c b/epan/dissectors/packet-rtp-events.c index c57e4015b0..f1c549b1c6 100644 --- a/epan/dissectors/packet-rtp-events.c +++ b/epan/dissectors/packet-rtp-events.c @@ -22,6 +22,7 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Ref http://www.ietf.org/rfc/rfc4733.txt?number=4733 */ /* @@ -124,13 +125,18 @@ dissect_rtp_events( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) rtp_events_tree = proto_item_add_subtree( ti, ett_rtp_events ); proto_tree_add_uint ( rtp_events_tree, hf_rtp_events_event, tvb, offset, 1, rtp_evt); - - octet = tvb_get_guint8(tvb, offset +1 ); - proto_tree_add_boolean (rtp_events_tree, hf_rtp_events_end, tvb, offset+1, 1, octet); - proto_tree_add_boolean (rtp_events_tree, hf_rtp_events_reserved, tvb, offset+1, 1, octet); - proto_tree_add_uint ( rtp_events_tree, hf_rtp_events_volume, tvb, offset+1, 1, octet); - - proto_tree_add_item ( rtp_events_tree, hf_rtp_events_duration, tvb, offset+2, 2, FALSE); + offset++; + octet = tvb_get_guint8(tvb, offset); + proto_tree_add_boolean (rtp_events_tree, hf_rtp_events_end, tvb, offset, 1, octet); + proto_tree_add_boolean (rtp_events_tree, hf_rtp_events_reserved, tvb, offset, 1, octet); + proto_tree_add_uint ( rtp_events_tree, hf_rtp_events_volume, tvb, offset, 1, octet); + offset++; + + /* The duration field indicates the duration of the event or segment + * being reported, in timestamp units. + */ + rtp_event_info.info_duration = tvb_get_ntohs(tvb, offset); + proto_tree_add_item ( rtp_events_tree, hf_rtp_events_duration, tvb, offset, 2, FALSE); /* set the end info for the tap */ if (octet & 0x80) diff --git a/epan/dissectors/packet-rtp-events.h b/epan/dissectors/packet-rtp-events.h index 9175ddb330..2b3a0bdf0b 100644 --- a/epan/dissectors/packet-rtp-events.h +++ b/epan/dissectors/packet-rtp-events.h @@ -169,56 +169,56 @@ static const value_string rtp_event_type_values[] = { RTP_DTMF_C, "DTMF C" }, { RTP_DTMF_D, "DTMF D" }, { RTP_DTMF_FLASH, "Flash" }, - { RTP_ANS, "Fax ANS"}, - { RTP_ANSREV, "Fax /ANS"}, + { RTP_ANS, "Fax ANS"}, + { RTP_ANSREV, "Fax /ANS"}, { RTP_ANSAM, "Fax ANSam"}, { RTP_ANSAMREV, "Fax /ANSam"}, - { RTP_CNG, "Fax CNG"}, + { RTP_CNG, "Fax CNG"}, { RTP_V21C1B0, "V.21 channel 1, 0 bit"}, { RTP_V21C1B1, "V.21 channel 1, 1 bit"}, { RTP_V21C2B0, "V.21 channel 2, 0 bit"}, { RTP_V21C2B1, "V.21 channel 2, 1 bit"}, - { RTP_CRDI, "Fax CRdi"}, - { RTP_CRDR, "Fax CRdr"}, - { RTP_CRE, "Fax CRe"}, - { RTP_ESI, "Fax ESi"}, - { RTP_ESR, "Fax ESr"}, - { RTP_MRDI, "Fax MRdi"}, - { RTP_MRDR, "Fax MRdr"}, - { RTP_MRE, "Fax MRe"}, - { RTP_CT, "Fax CT"}, + { RTP_CRDI, "Fax CRdi"}, + { RTP_CRDR, "Fax CRdr"}, + { RTP_CRE, "Fax CRe"}, + { RTP_ESI, "Fax ESi"}, + { RTP_ESR, "Fax ESr"}, + { RTP_MRDI, "Fax MRdi"}, + { RTP_MRDR, "Fax MRdr"}, + { RTP_MRE, "Fax MRe"}, + { RTP_CT, "Fax CT"}, { RTP_OFFHOOK, "Off Hook"}, { RTP_ONHOOK, "On Hook"}, { RTP_DIALTONE, "Dial tone"}, - { RTP_INTDT, "PABX internal dial tone"}, - { RTP_SPCDT, "Special dial tone"}, - { RTP_2NDDT, "Second dial tone"}, - { RTP_RGTONE, "Ringing tone"}, - { RTP_SPRGTONE, "Special ringing tone"}, - { RTP_BUSYTONE, "Busy tone"}, - { RTP_CNGTONE, "Congestion tone"}, - { RTP_SPINFOTN, "Special information tone"}, - { RTP_CMFTTONE, "Comfort tone"}, - { RTP_HOLDTONE, "Hold tone"}, - { RTP_RECTONE, "Record tone"}, + { RTP_INTDT, "PABX internal dial tone"}, + { RTP_SPCDT, "Special dial tone"}, + { RTP_2NDDT, "Second dial tone"}, + { RTP_RGTONE, "Ringing tone"}, + { RTP_SPRGTONE, "Special ringing tone"}, + { RTP_BUSYTONE, "Busy tone"}, + { RTP_CNGTONE, "Congestion tone"}, + { RTP_SPINFOTN, "Special information tone"}, + { RTP_CMFTTONE, "Comfort tone"}, + { RTP_HOLDTONE, "Hold tone"}, + { RTP_RECTONE, "Record tone"}, { RTP_CLRWTTONE, "Caller waiting tone"}, - { RTP_CWTONE, "Call waiting tone"}, - { RTP_PAYTONE, "Pay tone"}, - { RTP_POSINDTONE, "Positive indication tone"}, - { RTP_NEGINDTONE, "Negative indication tone"}, - { RTP_WARNTONE, "Warning tone"}, - { RTP_INTRTONE, "Intrusion tone"}, - { RTP_CALLCDTONE, "Calling card service tone"}, - { RTP_PAYPHONE, "Payphone recognition tone"}, - { RTP_CAS, "CPE alerting signal (CAS)"}, - { RTP_OFFHKWARN, "Off-hook warning tone"}, - { RTP_RING, "Ring"}, - { RTP_ACCPTTONE, "Acceptance tone"}, - { RTP_CONFIRMTN, "Confirmation tone"}, + { RTP_CWTONE, "Call waiting tone"}, + { RTP_PAYTONE, "Pay tone"}, + { RTP_POSINDTONE, "Positive indication tone"}, + { RTP_NEGINDTONE, "Negative indication tone"}, + { RTP_WARNTONE, "Warning tone"}, + { RTP_INTRTONE, "Intrusion tone"}, + { RTP_CALLCDTONE, "Calling card service tone"}, + { RTP_PAYPHONE, "Payphone recognition tone"}, + { RTP_CAS, "CPE alerting signal (CAS)"}, + { RTP_OFFHKWARN, "Off-hook warning tone"}, + { RTP_RING, "Ring"}, + { RTP_ACCPTTONE, "Acceptance tone"}, + { RTP_CONFIRMTN, "Confirmation tone"}, { RTP_DLTNRECALL, "Dial tone, recall"}, - { RTP_END3WAYTN, "End of three party service tone"}, - { RTP_FACTONE, "Facilities tone"}, - { RTP_LNLOCKTN, "Line lockout tone"}, + { RTP_END3WAYTN, "End of three party service tone"}, + { RTP_FACTONE, "Facilities tone"}, + { RTP_LNLOCKTN, "Line lockout tone"}, { RTP_NUMUNOBT, "Number unobtainable tone"}, { RTP_OFFERGTONE, "Offering tone"}, { RTP_PERMSIGTN, "Permanent signal tone"}, @@ -273,6 +273,7 @@ static const value_string rtp_event_type_values[] = struct _rtp_event_info { guint8 info_rtp_evt; guint32 info_setup_frame_num; /* the frame num of the packet that set this RTP connection */ + guint16 info_duration; gboolean info_end; }; |