Hi,

I feel noisy that a packet jumps into the handler of EventOFPPacketIn
indiscriminately. Theredore, I would like to filter of a packet in the
handler be based on a certain rule.

I consider the following API:

    @set_ev_cls(ofp_event.EventOFPPacketIn, MAIN_DISPATCHER)
    @packet_in_filter(TypeFilter, {'types': [
        vlan.vlan,
        ipv4.ipv4,
    ]})
    def packet_in_handler(self, ev):
        # Only the packet (event) containing VLAN and IPv4 enters here.

In this example, the filter based on the type contained in a packet is
used. The algorithm of a filter can be changed by a class (Strategy
pattern). It is possible that a user makes arbitrary filters besides it.

How do you think?

Thanks,
Satoshi
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to