Narendran Thangarajan
Narendran Thangarajan

Reputation: 23

How can I capture packets from a PPP interface with pypcap?

It's dpkt.ethernet.Ethernet(pkt) for an ethernet interface, what is it for the ppp0 interface?

Upvotes: 2

Views: 1522

Answers (1)

Miles
Miles

Reputation: 32478

You're mixing up dpkt, a library for parsing and creating packets, with pypcap, a Python wrapper for libpcap.

To specify an interface to listen on, use pcap.pcap(name='ppp0').

To deserialize PPP packets, use dpkt.ppp.PPP(pkt).

Upvotes: 4

Related Questions