Re: Parsing open-flow packet and decoding the type of the message
Hello Raksha,
what code do you refer to ? Do you want to use openflowjava for parsing / decoding openflow messages ?
Regards,
Michal
Sent: 21 October 2015 06:59
To: 'openflowjava-dev@...'
Cc: 'integration-dev@...'
Subject: [openflowjava-dev] Parsing open-flow packet and decoding the type of the message
Hi,
I would like to parse/decode the openflow packets received from Java sockets. The received openflow packets are in byte[] format and as far as I could understand, it should be converted to OfHeader.
OfHeader ofheader = (OfHeader) msg
if ( ofheader instanceof FlowRemovedMessage ) {
LOG.info("FlowRemoved received\n");
} else if ( ofheader instanceof HelloMessage) {
LOG.info("Hello reply received\n");
} else if ( ofheader instanceof ErrorMessage) {
LOG.info("Error message received\n");
}
}
1. Is the above approach right to decode Openflow packets?
2. What is the best way to convert byte[] received from Java sockets to OfHeader?
Thanks & Regards,
Raksha
MichalPolkoráb
Software Developer
Sídlo / Mlynské
Nivy 56 /
821 05 Bratislava
/ Slovakia
R&D centrum / Janka Kráľa 9 /
974 01 Banská Bystrica / Slovakia
+421 918 378 907 /
michal.polkorab@...
reception: +421 2 206 65 114
/
www.pantheon.sk