Parsing open-flow packet and decoding the type of the message


Madhava Bangera, Raksha <raksha.madhava.bangera@...>
 

Hi Michal,

 

Yes, I want to use openflowjava to parse/decode the openflow messages. The code referred in my previous mail is the understanding so far of how that could be done. Am I going in the right direction here? If so, what is the best way to convert the byte array of openflow message received from Java sockets to OfHeader type?

 

Thanks & Regards,

Raksha

 

From: Michal Polkoráb [mailto:michal.polkorab@...]
Sent: Wednesday, October 21, 2015 12:36 AM
To: Madhava Bangera, Raksha; 'openflowjava-dev@...'
Cc: 'integration-dev@...'
Subject: Re: [openflowjava-dev] 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


From: Madhava Bangera, Raksha <raksha.madhava.bangera@...>
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

Image removed by sender. logo

 


Michal Polkorab
 

Hello Raksha,


what code do you refer to ? Do you want to use openflowjava for parsing / decoding openflow messages ?


Regards,

Michal


From: Madhava Bangera, Raksha <raksha.madhava.bangera@...>
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

logo

 


Madhava Bangera, Raksha <raksha.madhava.bangera@...>
 

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