from socket import AF_INET6
from framework import VppTestCase, VppTestRunner
from socket import AF_INET6
from framework import VppTestCase, VppTestRunner
-from vpp_ip_route import VppIpRoute, VppRoutePath, DpoProto, VppIpTable
+from vpp_ip_route import VppIpRoute, VppRoutePath, FibPathProto, VppIpTable
from vpp_srv6 import SRv6LocalSIDBehaviors, VppSRv6LocalSID, VppSRv6Policy, \
SRv6PolicyType, VppSRv6Steering, SRv6PolicySteeringTypes
from vpp_srv6 import SRv6LocalSIDBehaviors, VppSRv6LocalSID, VppSRv6Policy, \
SRv6PolicyType, VppSRv6Steering, SRv6PolicySteeringTypes
from scapy.packet import Raw
from scapy.layers.l2 import Ether, Dot1Q
from scapy.layers.inet6 import IPv6, UDP, IPv6ExtHdrSegmentRouting
from scapy.packet import Raw
from scapy.layers.l2 import Ether, Dot1Q
from scapy.layers.inet6 import IPv6, UDP, IPv6ExtHdrSegmentRouting
# configure route to next segment
route = VppIpRoute(self, sid_list[test_sid_index + 1], 128,
[VppRoutePath(self.pg0.remote_ip6,
# configure route to next segment
route = VppIpRoute(self, sid_list[test_sid_index + 1], 128,
[VppRoutePath(self.pg0.remote_ip6,
# configure route to next segment
route = VppIpRoute(self, sid_list[test_sid_index + 1], 128,
[VppRoutePath(self.pg0.remote_ip6,
# configure route to next segment
route = VppIpRoute(self, sid_list[test_sid_index + 1], 128,
[VppRoutePath(self.pg0.remote_ip6,
# configure route to next segment
route = VppIpRoute(self, sid_list[test_sid_index + 1], 128,
[VppRoutePath(self.pg0.remote_ip6,
# configure route to next segment
route = VppIpRoute(self, sid_list[test_sid_index + 1], 128,
[VppRoutePath(self.pg0.remote_ip6,
tx_ip.chksum = None
# read back the pkt (with str()) to force computing these fields
# probably other ways to accomplish this are possible
tx_ip.chksum = None
# read back the pkt (with str()) to force computing these fields
# probably other ways to accomplish this are possible
tx_ip2.chksum = None
# read back the pkt (with str()) to force computing these fields
# probably other ways to accomplish this are possible
tx_ip2.chksum = None
# read back the pkt (with str()) to force computing these fields
# probably other ways to accomplish this are possible
tx_ip = tx_pkt.getlayer(IPv6)
# we can't just get the 2nd Ether layer
# get the Raw content and dissect it as Ether
tx_ip = tx_pkt.getlayer(IPv6)
# we can't just get the 2nd Ether layer
# get the Raw content and dissect it as Ether
# read back the dumped packet (with str())
# to force computing these fields
# probably other ways are possible
# read back the dumped packet (with str())
# to force computing these fields
# probably other ways are possible
payload_info.data = p.copy()
self.logger.debug(ppp("Created packet:", p))
pkts.append(p)
payload_info.data = p.copy()
self.logger.debug(ppp("Created packet:", p))
pkts.append(p)
except:
# remote L2 header from packet[Raw]:
# take packet[Raw], convert it to an Ether layer
# and then extract Raw from it
payload_info = self.payload_to_info(
except:
# remote L2 header from packet[Raw]:
# take packet[Raw], convert it to an Ether layer
# and then extract Raw from it
payload_info = self.payload_to_info(
:param compare_func: function to compare in and out packet
"""
self.logger.info("Verifying capture on interface %s using function %s"
:param compare_func: function to compare in and out packet
"""
self.logger.info("Verifying capture on interface %s using function %s"