Hi list,

Using OF 1.2 I'm trying to match different header fields of incoming packets. 
Unfortunately on the in_port field seems to exist:

Code:

    @set_ev_cls(ofp_event.EventOFPPacketIn, MAIN_DISPATCHER)
    def packet_in_handler(self, ev):

        msg = ev.msg
        dp = msg.datapath
        ofp = dp.ofproto
        dpid = dp.id
        pkt = packet.Packet(array.array('B', msg.data))
        in_port = ''
        eth_src = ''
        eth_dst = ''
        eth_type = ''
        fields = msg.match.fields
        print len(fields)
        for f in fields:
            if f.header == ofp.OXM_OF_IN_PORT:
                in_port = f.value
                print f.value
            elif f.header == ofp.OXM_OF_ETH_SRC:
                eth_src = f.value
                print f.value
            elif f.header == ofp.OXM_OF_ETH_DST:
                eth_dst = f.value
            elif f.header == ofp.OXM_OF_ETH_TYPE:
                eth_type = f.value
                print f.value
        print 'in_port: {}, eth_src: {}, eth_dst: {}, eth_type: 
{}'.format(in_port, eth_src, eth_dst, eth_type)


Output:
1 (#length of field)
4294967294 (# port no.)
in_port: 4294967294, eth_src: , eth_dst: , eth_type:


am I missing something?

Thanks,
Michael
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to