Пример #1
0
 def test_extract_ipv6_tcp_packet_trpt(self):
     """
     Tests to ensure that an IPv6 TCP single packet will be parsed properly
     """
     int_data = oinc.extract_trpt_data(
         self.trpt_pkt_ipv4_out_ipv6_in_tcp[UDP])
     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'])
Пример #2
0
 def test_extract_ipv4_udp_packet_trpt(self):
     """
     Tests to ensure that an IPv4 UDP single packet will be parsed properly
     """
     int_data = oinc.extract_trpt_data(
         self.trpt_pkt_ipv4_out_ipv4_in_udp[UDP])
     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'])
Пример #3
0
 def test_extract_ipv4_tcp_packet_trpt(self):
     """
     Tests to ensure that an IPv4 UDP single packet will be parsed properly
     """
     logger.debug('Packet to test - [%s]',
                  self.trpt_pkt_ipv4_out_ipv4_in_tcp)
     int_data = oinc.extract_trpt_data(
         self.trpt_pkt_ipv4_out_ipv4_in_tcp[UDP])
     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(consts.TCP_PROTO, int_data['protocol'])