Esempio n. 1
0
 def test_extract_ipv6_tcp_packet(self):
     """
     Tests to ensure that an IPv6 TCP single packet will be parsed properly
     """
     int_data = oinc.extract_int_data(self.int_pkt_ipv6_tcp[Ether])
     self.assertEqual(self.orig_mac, int_data['devMac'])
     self.assertEqual(str(self.src_ipv6), int_data['devAddr'])
     self.assertEqual(str(self.dst_ipv6), int_data['dstAddr'])
     self.assertEqual(self.dport, int_data['dstPort'])
     self.assertEqual(consts.TCP_PROTO, int_data['protocol'])
Esempio n. 2
0
 def test_extract_ipv4_udp_packet(self):
     """
     Tests to ensure that an IPv4 UDP single packet will be parsed properly
     """
     int_data = oinc.extract_int_data(self.int_pkt_ipv4_udp[Ether])
     self.assertEqual(self.orig_mac, int_data['devMac'])
     self.assertEqual(self.src_ipv4, int_data['devAddr'])
     self.assertEqual(self.dst_ipv4, int_data['dstAddr'])
     self.assertEqual(self.dport, int_data['dstPort'])
     self.assertEqual(trans_sec.consts.UDP_PROTO, int_data['protocol'])