Reputation: 11
I am using project Floodlight to understand the software defined networking for my personal project. My custom module uses floodlightProvider controller module and IOFMessageListener to listen for openflow messages. I can successfully listen to PACKET_IN openflow messages, however I am not able to listen to any synchronous openflow messages(HELLO, EQHO_REQUEST, etc). I followed the documentation and if I am not mistaken, openflow messages can be listened by using the floodlightProvider controller module. Can anyone assist me as I am very curious. The program for listening for messages is given on floodlight tutorial under "how to write a module" . However, I am editing the startup method and the receive method. Those are as follows:
@Override
public void startUp(FloodlightModuleContext context) {
floodlightProvider.addOFMessageListener(OFType.PACKET_IN, this);
floodlightProvider.addOFMessageListener(OFType.HELLO, this);
}
@Override
public net.floodlightcontroller.core.IListener.Command receive(IOFSwitch sw, OFMessage msg, FloodlightContext cntx) {
switch(msg.getType()){
case PACKET_IN:
// print the openflow message in console
break;
case HELLO:
// print the openflow message in console
break;
default:
break;
}
return Command.CONTINUE;
}
Upvotes: 1
Views: 109