[Twisted-Python] TCP and ICMP

David Stainton dstainton415 at gmail.com
Sun May 11 04:15:19 MDT 2014


Hi Jay Shah,

I started (but never finished) to implement a tcp traceroute (with
interesting features) for OONI (Open Observatory of Network
Interference... a Tor Project project) probe. You might use parts of
the ooniprobe api to capture your packets... It's written using
Twisted and I'm fairly certain they've already implemented TCP
traceroute... but you still may want to implement your own... because
it's a fun thing to write, you'd learn a lot... and your traceroute
might have interesting features. I think the ooni interface uses raw
sockets to capture packets.

Through my research I became aware of two other linux kernel
interfaces of interest to capturing packets:
- NFLOG
- NFQUEUE

You'd have to write twisted interfaces for these linux kernel
interfaces... but you can also find some mediocre quality code
examples of this on blog posts. I had a bit of trouble with dropped
packets reusing a twisted interface I found for NFQUEUE; this might've
been a problem with the queued packets not getting consumed quick
enough before the queue limit was reached... not sure.

Cheers,

David

On Sat, May 10, 2014 at 2:29 PM, Jay Shah <jayshah30392 at gmail.com> wrote:
> Hiee All,
>
> I have very simple question. I have already implemented custom reactor for
> handling ICMP requests (reference: txnettools) . My problem is: i am
> implementing tcp traceroute. I have handled all icmp time exceed messages.
> But, i want to handle tcp syn-ack reply which i am getting from remote
> server.
> How can i do that ?
> Can i start listening to TCP syn req or replies on the same reactor on which
> i am listening to icmp replies ?
> or
> should i install new custom reactor for listening to tcp replies ?
> I want to parse SYN ACK request ONLY. Neither I want to make a new
> connection with remote server nor handling them! I just need syn ack replies
> to be parsed so that i can figure out whether i have reached my destination
> or not.
> thank you.
>
> Jay Shah
> (Technische Universität München,
> München, Deutschland
> Tel. +49 176 7266 7259 )
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>




More information about the Twisted-Python mailing list