I think what you want is something like the following:
msg1 = nx.nx_flow_mod()
msg1.idle_timeout = 100
msg1.hard_timeout = 120
msg1.match.eth_type = packet.IP_TYPE
msg1.match.eth_src = packet.src
msg1.match.eth_dst = packet.dst
msg1.match.ip_dst = IPAddr("10.1.0.1")
msg1.priority = 65001
There are actually several ways to do this; the above is just one of them. It
helps to understand the Nicira match extension, which is described some in the
documentation and examples for Open vSwitch. It also may help to read
pox/openflow/nicira.py; especially the docs for nx_match.
-- Murphy
On Oct 25, 2013, at 6:33 PM, AMER <[email protected]> wrote:
> Hello
> I would like to do the following command in nx nicirat extention:
>
> packet = event.parsed
> msg1 = of.ofp_flow_mod()
> msg1.idle_timeout = 100
> msg1.hard_timeout = 120
> msg1.match.dl_type = packet.IP_TYPE
> msg.match.dl_src = packet.src
> msg.match.dl_dst = packet.dst
> msg1.match.nw_dst =IPAddr("10.1.0.1")
> msg1.match.priority = 65001
> msg1.match.nw_src = None
>
> I have gone through l2_nx but i did not find much info even in OVS nicira and
> openflow.nicira
>
>
> Thank you
> Best regards,
> Eng Amer Alghadhban
> COE
> SANS-GCFW
> CEH, SCNP, CCNA
>