[Twisted-Python] New user, help needed with raw UDP packets

Richard Taylor r.taylor at eris.qinetiq.com
Wed Apr 14 10:46:07 EDT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi

I am a completely new user of Twisted. I have read the tutorial and much of 
the manual and I have been searching the archives but I can't work out how to 
get started with my problem.

I am writing a UDP proxy/relay that needs to make detailed changes to the 
internals of the UDP packets as they pass through. I intend to use 'Impacket' 
to access the packet internals. One of the things that I need is to 'fake' 
the destination address of packets leaving the proxy so that they look like 
they have come from the original sender, Impacket has methods to do this for 
'raw' udp packets.

I think that I need to use a sub-class of ConnectedDatagramProtocol to send my 
packets but the "self.transport.write" method takes only the packet payload 
not the headers.

I think that I need to use a sub-class of DatagramProtocol to receive my 
packets but the datagramReceived method only gets the packet payload not the 
headers. 

How can I get at the 'raw' udp packets for receiving and sending?

Sorry if this is obvious.

Many thanks.

Richard

- -- 
QinetiQ                                  
B009 Woodward Building
St. Andrews Road
Malvern
Worcs WR14 3PS
Jabber: RichardTaylor at jabber.org
PGPKey: http://search.keyserver.net:11371/pks/lookup?op=get&search=0xA7DA9FD9
Key fingerprint = D051 A121 E7C3 485F 3C0E  1593 ED9E D868 A7DA 9FD9
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFAfU7B7Z7YaKfan9kRAtJRAKCRkDbM0TEtgI3K3107v7aXk7r9awCg5sz6
X7IT8BGjPiSW0a2aYUGhLcY=
=LKvJ
-----END PGP SIGNATURE-----




More information about the Twisted-Python mailing list