# Ethernet Source Address # Ethernet Destination Address # ARP Operation # ARP Source IPv4 Address # ARP Target IPv4 Address # ARP Source Hardware Address # ARP Target Hardware Address match = Match() match.set_eth_type(eth_type) match.set_eth_src(eth_src) match.set_eth_dst(eth_dst) match.set_arp_opcode(arp_opcode) match.set_arp_src_transport_address(arp_src_ipv4_addr) match.set_arp_tgt_transport_address(arp_tgt_ipv4_addr) match.set_arp_src_hw_address(arp_src_hw_addr) match.set_arp_tgt_hw_address(arp_tgt_hw_addr) flow_entry.add_match(match) print ("\n") print ("<<< Flow to send:") print flow_entry.get_payload() time.sleep(rundelay) result = ofswitch.add_modify_flow(flow_entry) status = result.get_status() if status.eq(STATUS.OK) == True: print ("<<< Flow successfully added to the Controller") else: print ("\n") print ("!!!Demo terminated, reason: %s" % status.brief().lower()) exit(0)
# Ethernet Source Address # Ethernet Destination Address # ARP Operation # ARP Source IPv4 Address # ARP Target IPv4 Address # ARP Source Hardware Address # ARP Target Hardware Address match = Match() match.set_eth_type(eth_type) match.set_eth_src(eth_src) match.set_eth_dst(eth_dst) match.set_arp_opcode(arp_opcode) match.set_arp_src_transport_address(arp_src_ipv4_addr) match.set_arp_tgt_transport_address(arp_tgt_ipv4_addr) match.set_arp_src_hw_address(arp_src_hw_addr) match.set_arp_tgt_hw_address(arp_tgt_hw_addr) flow_entry.add_match(match) print("\n") print("<<< Flow to send:") print flow_entry.get_payload() time.sleep(rundelay) result = ofswitch.add_modify_flow(flow_entry) status = result.get_status() if (status.eq(STATUS.OK) == True): print("<<< Flow successfully added to the Controller") else: print("\n") print("!!!Demo terminated, reason: %s" % status.brief().lower()) exit(0)