Alternative approaches to get a PacketInMessage into my southbound plugin.
1. Figure out how to add a second OpenflowProtocolListener to
“ConnectionManagerImpl”. (It appears this can only have a single value). Also
looked at ConnectionAdapterImpl, as that is where PacketInMessages are
dispatched from.
2. Try to figure out how to transform a “PacketReceived” into a
“PacketInMessage”. There are plenty of classes that do the opposite
(openflowplugin/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/translator/PacketReceivedTranslator.java)
3. Try to figure out how to access MDController from within my plugin, so I can
register an additional Translator for PacketInMessage. (The tests use the
getMessageTranslators function, but MDController doesn’t seem to be a singleton
that I can access from within my plugin, I looked in OpenflowPluginProvider).
4. Figure out how a PacketInMessage is instantiated, and work backwards from
there. I started with PacketInMessageBuilder, then to PacketInMessageFactory,
then to MessageDeserializerInitializer. (I got lost while trying to figure out
what is calling the
5. See if “MessageSpy” lets me subscribe to PacketInMessages?
I’m still digging. I’ve been reading the docs as well, the file below
confirmed the tracing I had done by hand, but didn’t show my any entry points
where a southbound plugin can access or the data as it is being processed. (my
primary goal is to not alter any source code of any of my dependencies, just
have my own little plugin off to the side)
docs/manuals/developer-guide/src/main/asciidoc/openflowjava/odl-openflowjava-protocol-dev.adoc
Again, any direction on how to receive PacketInMessages in a southbound plugin,
or how to transform a “PacketReceived” into a “PacketInMessage” would be
appreciated.
-Ryan Dietrich
> On May 6, 2016, at 3:13 PM, Luis Gomez <[email protected]> wrote:
>
> cc-ing openflow people.
>
>> On May 6, 2016, at 1:41 PM, Ryan Dietrich <[email protected]
>> <mailto:[email protected]>> wrote:
>>
>> So, I have a working southbound plugin using the PacketProcessingListener.
>> My goal is to read the payload of the OpenFlow 1.3 “PacketIn” message.
>> This “per packet” approach seems unwieldy, as I am parsing both the Ethernet
>> header as well as the IP and TCP headers. Is there a “shortcut” ?
>>
>> I went searching for a simpler approach and found this file:
>>
>> controller/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/BindingDOMNotificationServiceAdapter.java
>>
>> This is what my plugin calls when it registers itself as a packet handler
>> (implementing the “onPacketReceived”).
>>
>> 1. I tried to create another listener using the “OpenflowProtocolListener”,
>> and used the same approach to register it, but it is never called (I have an
>> OVS pointed to my controller, and the PacketProcessingListener is logging
>> like crazy). Do I need to add anything to my yang file beyond the
>> notification service? Or some other configuration that is not immediately
>> apparent?
>>
>> 2. Can you even listen to PacketInMessage using the notification service?
>> Or are they considered RPC, and do you implement that differently (similar
>> to how Toaster implements RPC)?
>>
>> …
>>
>> Long story short, I’m currently using the PacketProcessingListener, and I
>> tried to use OpenflowProtocolListener the same way, to get the
>> “onPacketInMessage” to fire, but it is not working, and I’m not sure if it
>> is configuration related, or me doing something totally incorrect.
>>
>> Thanks to anyone who can give me a pointer in the right direction.
>>
>> -Ryan Dietrich
>> _______________________________________________
>> controller-dev mailing list
>> [email protected]
>> <mailto:[email protected]>
>> https://lists.opendaylight.org/mailman/listinfo/controller-dev
>
_______________________________________________
openflowplugin-dev mailing list
[email protected]
https://lists.opendaylight.org/mailman/listinfo/openflowplugin-dev