Ask is moving to Stack Overflow and! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode


How to decode HTTP packets?

asked 2015-04-03 00:05:24 -0800

Bakshi Gulam gravatar image

updated 2015-04-03 00:06:35 -0800

I want to decode the HTTP header inside TCP packet. I used sal.packet.TCP.getRawPayload and stored the result in a byte[]. There were only 20 bytes and when I tried to print it byte by byte (typecasting it to char), I'm getting some non-alphanumeric characters. Can somebody help?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-04-04 03:57:08 -0800

Dana gravatar image

Do not typecast. Arrays.toString(byte[]); should do the trick.

edit flag offensive delete publish link more


Actually the problem seems to be with OVS switch. Eventhough miss_send_len is set to 0xffff (OFPCML_NO_BUFFER) by ODL, OVS is including only till TCP header in the PacketIn message. There seems to a glitch with sal.packet.TCP too. sal.packet.TCP.getRawPayload is returning TCP options fields.

Bakshi Gulam ( 2015-04-05 02:06:49 -0800 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2015-04-03 00:05:24 -0800

Seen: 209 times

Last updated: Apr 04 '15