nexmon – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | /* tap-rtp-analysis.h |
2 | * RTP analysis addition for Wireshark |
||
3 | * |
||
4 | * Copyright 2003, Alcatel Business Systems |
||
5 | * By Lars Ruoff <lars.ruoff@gmx.net> |
||
6 | * |
||
7 | * based on tap_rtp.c |
||
8 | * Copyright 2003, Iskratel, Ltd, Kranj |
||
9 | * By Miha Jemec <m.jemec@iskratel.si> |
||
10 | * |
||
11 | * Wireshark - Network traffic analyzer |
||
12 | * By Gerald Combs <gerald@wireshark.org> |
||
13 | * Copyright 1998 Gerald Combs |
||
14 | * |
||
15 | * This program is free software; you can redistribute it and/or |
||
16 | * modify it under the terms of the GNU General Public License |
||
17 | * as published by the Free Software Foundation; either version 2 |
||
18 | * of the License, or (at your option) any later version. |
||
19 | * |
||
20 | * This program is distributed in the hope that it will be useful, |
||
21 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
22 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
23 | * GNU General Public License for more details. |
||
24 | * |
||
25 | * You should have received a copy of the GNU General Public License |
||
26 | * along with this program; if not, write to the Free Software |
||
27 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
||
28 | */ |
||
29 | |||
30 | #ifndef __TAP_RTP_ANALYSIS_H__ |
||
31 | #define __TAP_RTP_ANALYSIS_H__ |
||
32 | |||
33 | #include <epan/address.h> |
||
34 | #include <epan/packet_info.h> |
||
35 | |||
36 | /** @file |
||
37 | * ??? |
||
38 | * @todo what's this? |
||
39 | */ |
||
40 | |||
41 | #ifdef __cplusplus |
||
42 | extern "C" { |
||
43 | #endif /* __cplusplus */ |
||
44 | |||
45 | void rtp_analysis( |
||
46 | address *ip_src_fwd, |
||
47 | guint32 port_src_fwd, |
||
48 | address *ip_dst_fwd, |
||
49 | guint32 port_dst_fwd, |
||
50 | guint32 ssrc_fwd, |
||
51 | address *ip_src_rev, |
||
52 | guint32 port_src_rev, |
||
53 | address *ip_dst_rev, |
||
54 | guint32 port_dst_rev, |
||
55 | guint32 ssrc_rev |
||
56 | ); |
||
57 | |||
58 | /****************************************************************************/ |
||
59 | /* structure that holds the information about the forward and reversed direction */ |
||
60 | typedef struct _bw_history_item { |
||
61 | double time; |
||
62 | guint32 bytes; |
||
63 | } bw_history_item; |
||
64 | |||
65 | #define BUFF_BW 300 |
||
66 | |||
67 | typedef struct _tap_rtp_stat_t { |
||
68 | gboolean first_packet; /**< do not use in code that is called after rtp_packet_analyse */ |
||
69 | /* use (flags & STAT_FLAG_FIRST) instead */ |
||
70 | /* all of the following fields will be initialized after |
||
71 | * rtp_packet_analyse has been called |
||
72 | */ |
||
73 | address first_packet_mac_addr; /**< MAC address of first packet, used to determine duplicates due to mirroring */ |
||
74 | guint32 flags; /* see STAT_FLAG-defines below */ |
||
75 | guint16 seq_num; |
||
76 | guint32 timestamp; |
||
77 | guint32 first_timestamp; |
||
78 | guint32 delta_timestamp; |
||
79 | double bandwidth; |
||
80 | bw_history_item bw_history[BUFF_BW]; |
||
81 | guint16 bw_start_index; |
||
82 | guint16 bw_index; |
||
83 | guint32 total_bytes; |
||
84 | guint32 clock_rate; |
||
85 | double delta; |
||
86 | double jitter; |
||
87 | double diff; |
||
88 | double skew; |
||
89 | double sumt; |
||
90 | double sumTS; |
||
91 | double sumt2; |
||
92 | double sumtTS; |
||
93 | double time; /**< Unit is ms */ |
||
94 | double start_time; /**< Unit is ms */ |
||
95 | double lastnominaltime; |
||
96 | double max_delta; |
||
97 | double max_jitter; |
||
98 | double max_skew; |
||
99 | double mean_jitter; |
||
100 | guint32 max_nr; |
||
101 | guint16 start_seq_nr; |
||
102 | guint16 stop_seq_nr; |
||
103 | guint32 total_nr; |
||
104 | guint32 sequence; |
||
105 | gboolean under; |
||
106 | gint cycles; |
||
107 | guint16 pt; |
||
108 | int reg_pt; |
||
109 | } tap_rtp_stat_t; |
||
110 | |||
111 | #define PT_UNDEFINED -1 |
||
112 | |||
113 | /* status flags for the flags parameter in tap_rtp_stat_t */ |
||
114 | #define STAT_FLAG_FIRST 0x001 |
||
115 | #define STAT_FLAG_MARKER 0x002 |
||
116 | #define STAT_FLAG_WRONG_SEQ 0x004 |
||
117 | #define STAT_FLAG_PT_CHANGE 0x008 |
||
118 | #define STAT_FLAG_PT_CN 0x010 |
||
119 | #define STAT_FLAG_FOLLOW_PT_CN 0x020 |
||
120 | #define STAT_FLAG_REG_PT_CHANGE 0x040 |
||
121 | #define STAT_FLAG_WRONG_TIMESTAMP 0x080 |
||
122 | #define STAT_FLAG_PT_T_EVENT 0x100 |
||
123 | #define STAT_FLAG_DUP_PKT 0x200 |
||
124 | |||
125 | /* forward */ |
||
126 | struct _rtp_info; |
||
127 | |||
128 | /* function for analysing an RTP packet. Called from rtp_analysis and rtp_streams */ |
||
129 | extern void rtp_packet_analyse(tap_rtp_stat_t *statinfo, |
||
130 | packet_info *pinfo, |
||
131 | const struct _rtp_info *rtpinfo); |
||
132 | |||
133 | #ifdef __cplusplus |
||
134 | } |
||
135 | #endif /* __cplusplus */ |
||
136 | |||
137 | #endif /* __TAP_RTP_ANALYSIS_H__ */ |
||
138 | |||
139 | /* |
||
140 | * Editor modelines - http://www.wireshark.org/tools/modelines.html |
||
141 | * |
||
142 | * Local variables: |
||
143 | * c-basic-offset: 4 |
||
144 | * tab-width: 8 |
||
145 | * indent-tabs-mode: nil |
||
146 | * End: |
||
147 | * |
||
148 | * vi: set shiftwidth=4 tabstop=8 expandtab: |
||
149 | * :indentSize=4:tabSize=8:noTabs=true: |
||
150 | */ |