def check_encapsulation(self, pkt, vni, local_only=False, mcast_pkt=False):
    self.assertEqual(pkt[Ether].src, self.pg0.local_mac)
    if (not local_only):
        if (not mcast_pkt):
            self.assertEqual(pkt[Ether].dst, self.pg0.remote_mac)
        else:
            self.assertEqual(pkt[Ether].dst, type(self).mcast_mac)
    self.assertEqual(pkt[IP].src, self.pg0.local_ip4)
    if (not local_only):
        if (not mcast_pkt):
            self.assertEqual(pkt[IP].dst, self.pg0.remote_ip4)
        else:
            self.assertEqual(pkt[IP].dst, type(self).mcast_ip4)
    self.assertEqual(pkt[UDP].dport, type(self).dport)
    self.assertEqual(pkt[GTP_U_Header].teid, vni)
def check_encapsulation(self, pkt, vni, local_only=False, mcast_pkt=False):
    self.assertEqual(pkt[Ether].src, self.pg0.local_mac)
    if (not local_only):
        if (not mcast_pkt):
            self.assertEqual(pkt[Ether].dst, self.pg0.remote_mac)
        else:
            self.assertEqual(pkt[Ether].dst, type(self).mcast_mac)
    self.assertEqual(pkt[IP].src, self.pg0.local_ip4)
    if (not local_only):
        if (not mcast_pkt):
            self.assertEqual(pkt[IP].dst, self.pg0.remote_ip4)
        else:
            self.assertEqual(pkt[IP].dst, type(self).mcast_ip4)
    self.assertEqual(pkt[UDP].dport, type(self).dport)
    self.assertEqual(pkt[GTP_U_Header].teid, vni)