from scapy.contrib.mpls import MPLS
from scapy.layers.inet import IP, UDP, TCP, ICMP, icmptypes, icmpcodes
from scapy.layers.l2 import Ether, Dot1Q, ARP
from scapy.contrib.mpls import MPLS
from scapy.layers.inet import IP, UDP, TCP, ICMP, icmptypes, icmpcodes
from scapy.layers.l2 import Ether, Dot1Q, ARP
packet_index = payload_info.index
self.assertEqual(payload_info.dst, dst_sw_if_index)
self.logger.debug(
packet_index = payload_info.index
self.assertEqual(payload_info.dst, dst_sw_if_index)
self.logger.debug(
self.vapi.ip_add_del_route(n_dest_addr, dest_addr_len,
n_next_hop_addr)
added_ips.append(socket.inet_ntoa(n_dest_addr))
self.vapi.ip_add_del_route(n_dest_addr, dest_addr_len,
n_next_hop_addr)
added_ips.append(socket.inet_ntoa(n_dest_addr))
self.vapi.ip_add_del_route(n_dest_addr, dest_addr_len,
n_next_hop_addr, is_add=0)
removed_ips.append(socket.inet_ntoa(n_dest_addr))
self.vapi.ip_add_del_route(n_dest_addr, dest_addr_len,
n_next_hop_addr, is_add=0)
removed_ips.append(socket.inet_ntoa(n_dest_addr))
- self.vapi.sw_interface_add_del_address(self.pg0.sw_if_index,
- ip_addr_n,
- 16)
+ self.vapi.sw_interface_add_del_address(
+ sw_if_index=self.pg0.sw_if_index, address=ip_addr_n,
+ address_length=16)
pn = (Ether(src=self.pg1.remote_mac,
dst=self.pg1.local_mac) /
pn = (Ether(src=self.pg1.remote_mac,
dst=self.pg1.local_mac) /
self.send_and_assert_no_replies(self.pg1, pb, "IP Broadcast address")
# remove the sub-net and we are forwarding via the cover again
self.send_and_assert_no_replies(self.pg1, pb, "IP Broadcast address")
# remove the sub-net and we are forwarding via the cover again
- self.vapi.sw_interface_add_del_address(self.pg0.sw_if_index,
- ip_addr_n,
- 16,
- is_add=0)
+ self.vapi.sw_interface_add_del_address(
+ sw_if_index=self.pg0.sw_if_index, address=ip_addr_n,
+ address_length=16, is_add=0)
- self.vapi.sw_interface_add_del_address(self.pg0.sw_if_index,
- ip_addr_n,
- 31)
+ self.vapi.sw_interface_add_del_address(
+ sw_if_index=self.pg0.sw_if_index, address=ip_addr_n,
+ address_length=31)
pn = (Ether(src=self.pg1.remote_mac,
dst=self.pg1.local_mac) /
pn = (Ether(src=self.pg1.remote_mac,
dst=self.pg1.local_mac) /
- self.vapi.sw_interface_add_del_address(self.pg0.sw_if_index,
- ip_addr_n,
- 31,
- is_add=0)
+ self.vapi.sw_interface_add_del_address(
+ sw_if_index=self.pg0.sw_if_index, address=ip_addr_n,
+ address_length=31, is_add=0)
- policer = self.vapi.policer_add_del("ip4-punt", 400, 0, 10, 0,
+ policer = self.vapi.policer_add_del(b"ip4-punt", 400, 0, 10, 0,
# remove the poilcer. back to full rx
#
self.vapi.ip_punt_police(policer.policer_index, is_add=0)
# remove the poilcer. back to full rx
#
self.vapi.ip_punt_police(policer.policer_index, is_add=0)
- self.vapi.policer_add_del("ip4-punt", 400, 0, 10, 0,
+ self.vapi.policer_add_del(b"ip4-punt", 400, 0, 10, 0,