[Twisted-Python] Ethernet frames

Tommi Virtanen tv at tv.debian.net
Mon Oct 20 11:59:54 MDT 2003


twisted-10152003 at atlas.lcs.mit.edu wrote:
> Can I use twisted to read and write ethernet frames? How do I listen
> and write packets on a particular interface?  

Well, there's doc/examples/pairudp.py, which uses twisted.pair to 
read/write packets on TUN/TAP virtual interfaces.

In twisted.protocols, you will see ethernet, ip and rawup modules,
helping you to parse raw packets.

The same thing can be hooked into e.g. pcap, or directly to raw sockets, 
and packet sockets. That part hasn't been written yet, but should be 
relatively straightforward.





More information about the Twisted-Python mailing list