libpcap-ruby doesn't work with ppp devices

Bug #201737 reported by Hadmut Danisch
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libpcap-ruby (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: libpcap-ruby1.8

Hi,

the libpcap-ruby1.8 does not seem to work with ppp devices.

I ran the example program /usr/share/doc/libpcap-ruby1.8/examples/httpdump.rb on a computer that is connected with Ethernet to a LAN, and it worked.

I tried the same example on a computer that is not connected through ethernet, but with a UMTS mobile phone via USB, /dev/ttyACM0 and a ppp daemon. The daemon opens the IP interface ppp0, which is a point-to-point-Interface:

# ifconfig ppp0
ppp0 Link encap:Point-to-Point Protocol
          inet addr:10.161.204.249 P-t-P:10.6.6.6 Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
          RX packets:4410 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3662 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:5304327 (5.0 MB) TX bytes:346052 (337.9 KB)

In order to use that interface I modified the example program and added "-i ppp0":

   httpdump = Pcaplet.new('-s 1500 -i ppp0')

When i run it, it waits. But when I issue the first HTTP request the program aborts with the
error message

# ruby /tmp/httpdump.rb
1 packets received by filter
0 packets dropped by kernel
/usr/lib/ruby/1.8/pcaplet.rb:90:in `loop': Unknown data-link type (113) (Pcap::PcapError)
        from /usr/lib/ruby/1.8/pcaplet.rb:90:in `each_packet'
        from /tmp/httpdump.rb:9

libpcap0.8 defines type 113 as

#define LINKTYPE_LINUX_SLL 113 /* Linux cooked socket capture */

so this is a regular type and should be supported.

regards
Hadmut

Revision history for this message
Antono Vasiljev (antono) wrote :

same bug
Unknown data-link type (113) (Pcap::PcapError)
whery trying to use -s ppp0

Daniel T Chen (crimsun)
Changed in libpcap-ruby:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.