pcapparse: fix SLL parsing
authorFelipe Contreras <felipe.contreras@nokia.com>
Tue, 26 Jul 2011 16:11:16 +0000 (19:11 +0300)
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Wed, 27 Jul 2011 07:30:44 +0000 (09:30 +0200)
commit046af98b301396570488a56443fdd1d8c5aacd79
treeb22fb869bbae10ea858200f00e8c4a001eac92d6
parent634d29cd88fad2c0fb1229f7571a62932bf111cf
pcapparse: fix SLL parsing

The current code is not checking for ethernet type, as it's supposed to,
but link layer device type and it's hard-coded to only accept dumps from
ethernet (ARPHRD_ETHER; 1). We don't care where the dump was fetched
from (wlan, 3G, etc.)

What we care about is the that the ethernet type is IP (ETHERNET_IP;
0x800), which is clearly field 14:

http://www.tcpdump.org/pcap3_man.html

And do a bit of cleanup.

Signed-off-by: Felipe Contreras <felipe.contreras@nokia.com>
gst/pcapparse/gstpcapparse.c