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

2011-08-24 Thread Kalapriya Kannan1
hi McCauley, By original connection I mean that the connection is to a machine on port 2 (so no header rewriting to the machine on port 2), but i am trying to interpret it and send it to a machine on port 3. I am trying to do this in the mininet, so is it possible to achieve the approach you

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

2011-08-24 Thread Murphy McCauley
Remember that you will need to rewrite every packet in the connection in both directions. You will need to install flow rules such that each packet comes to the controller, and you'll need to rewrite addresses in both directions. Remember that the packets from the machine on port 3 will

[nox-dev] FW: Checksum calculation bug?

2011-08-24 Thread ibrahim mun
Hi, I think we have a bug in packet_utils.checksum, please check it: = def checksum(data, start, skip_word = 0): if len(data) % 2 != 0: arr = array.array('H', data[:-1]) else: arr = array.array('H', data) if skip_word: for i

Re: [nox-dev] FW: Checksum calculation bug?

2011-08-24 Thread Murphy McCauley
Do you have any reason to suspect that it isn't functioning correctly? It seems like you are assuming that arr is an array of bytes. However, if you look at the top of the function, you'll see that it's actually an array.array of H values, which are unsigned two-byte values. -- Murphy On Aug

Re: [nox-dev] Wrong Route update after link down event

2011-08-24 Thread karim torkmen
In fact, I think the problem is that the routing modules treats the link_down event after the components that depend on it. Karim On 08/20/2011 04:21 AM, Murphy McCauley wrote: Just going to note that I have suspected there was a problem here for several months, but haven't really looked into

Re: [nox-dev] FW: Checksum calculation bug?

2011-08-24 Thread ibrahim mun
The reason is that wireshark shows checksum error in received packets (I've built). in python prompt I tried:data=array.array('B',example)arr=array.array('H', data)and the result was an array of bytes! modifying the code I don't receive any erroneous packets. Is this my special casa or maybe a

Re: [nox-dev] FW: Checksum calculation bug?

2011-08-24 Thread ibrahim mun
Hi Rob, The code does work as written (maybe is not the optimum code), the only problem is the Byte/word confusion. I did the calculation by hand, adding bytes (not words) and I obtained the same erroneous checksum I had received. However, as you said and in my guess, it's infrequently called

Re: [nox-dev] FW: Checksum calculation bug?

2011-08-24 Thread Murphy McCauley
checksum() is expecting the payload to be a str, not an array.array('B'). IIRC, the NOX packet library basically always ends up with a str (struct.pack()ing the header fields and concatenating with the payload after possibly calling .tostring() on it). This is the kind of thing that it calls

Re: [nox-dev] [openflow-indigo] I can't make flow-table entry manually

2011-08-24 Thread Min-Hyup KANG
Hi,Can you run "./nox_core -i ptcp:6633 -v pyswitch" ? (in destiny)In destiny,00025|openflow-event|ERR:received Openflow error packet from dpid=002320aa3f26: type=3, code=0, 80 bytes of data00026|openflow-event|ERR:received Openflow error packet from dpid=002320aa3f26: type=3, code=0,