Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
mediastreamer2
Commits
b7ba603d
Commit
b7ba603d
authored
Dec 02, 2016
by
François Grisez
Browse files
Make PCAP player support IPv6 packets
parent
a69edb71
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/audiofilters/msfileplayer.c
View file @
b7ba603d
...
...
@@ -321,7 +321,7 @@ static void player_process(MSFilter *f){
const
u_char
*
ethernet_header
=
&
d
->
pcap_data
[
0
];
//const u_char *ip_header = ethernet_header; //use this line instead of the next one in case of wireshark capture without link layer*/
const
u_char
*
ip_header
=
ethernet_header
+
14
;
// sizeof(ethernet_header)
const
u_char
*
udp_header
=
ip_header
+
2
0
;
// sizeof(ipv4_header)
const
u_char
*
udp_header
=
(
ip_header
[
0
]
>>
4
)
==
4
?
ip_header
+
20
:
ip_header
+
4
0
;
// sizeof(ipv4_header)
or sizeof(ipv6_header)
const
u_char
*
rtp_header
=
udp_header
+
8
;
// sizeof(udp_header)
const
u_char
*
payload
=
rtp_header
+
12
;
// sizeof(rtp_header)
size_t
headers_size
=
payload
-
ethernet_header
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment