Re: [nox-dev] IP header rewriting in PySwitch

2011-08-20 Thread Murphy McCauley
Well for one thing, the checksum in the TCP portion is going to be wrong since you changed the IP address. So you'll need to have something similar to the following in there before you actually send it: tcppkt = replypkt.find('tcp') if tcppkt is not None: tcppkt.csum = tcppkt.checksum() (That's

[nox-dev] IP header rewriting in PySwitch

2011-08-20 Thread Kalapriya Kannan1
hi, I am trying to re-write IP header in pyswitch using the following code below /* obtain ip header and packet for the incoming packet*. if packet.type == ethernet.IP_TYPE: iph = packet.find('ipv4') /* if there is a incoming packet in port 1, rewrite the header to have destination

[nox-dev] (no subject)

2011-08-20 Thread Kalapriya Kannan1
hi, I am trying to re-write IP header in pyswitch using the following code below /* obtain ip header and packet for the incoming packet*. if packet.type == ethernet.IP_TYPE: iph = packet.find('ipv4') /* if there is a incoming packet in port 1, rewrite the header to have destinatio

Re: [nox-dev] Nox Sockets

2011-08-20 Thread Murphy McCauley
I assume the typo on the last line isn't in your actual code (server.serve_forever()). But yes, this won't work. server.serve_forever() will block forever, freezing NOX. And you can't just put it in another thread because that will crash or hang or cause other bad things to happen in NOX. Yo

Re: [nox-dev] Nox Sockets

2011-08-20 Thread chris oleke
Hi, I've got another question still related to my NOX application. It is supposed to receive replies from the third party application through use of XML-RPC. I have had a go at the SimpleXMLRPCServer but seem to have no connection established, my thought is that I'm calling it the wrong way. This i