Example #1
0
 def test_parse_ipv6_address(self):
     """
     Tests parsing of an ipv4 address into a network byte value
     """
     address = "2607:f0d0:1002:0051:0000:0000:0000:0004"
     driver = WinDivert(self.dll_path).register()
     result = inet_ntop(socket.AF_INET6, driver.parse_ipv6_address(address))
     self.assertEqual(inet_pton(socket.AF_INET6, address),
                      inet_pton(socket.AF_INET6, result))
Example #2
0
 def test_parse_ipv6_address(self):
     """
     Tests parsing of an ipv4 address into a network byte value
     """
     address = "2607:f0d0:1002:0051:0000:0000:0000:0004"
     driver = WinDivert(self.dll_path)
     driver.register()
     result = driver.parse_ipv6_address(address)
     self.assertEqual(struct.unpack("<HHHHHHHH", inet_pton(socket.AF_INET6, address)), tuple(result))
Example #3
0
 def test_parse_ipv6_address(self):
     """
     Tests parsing of an ipv4 address into a network byte value
     """
     address = "2607:f0d0:1002:0051:0000:0000:0000:0004"
     driver = WinDivert(self.dll_path).register()
     result = inet_ntop(socket.AF_INET6, driver.parse_ipv6_address(address))
     self.assertEqual(inet_pton(socket.AF_INET6, address),
                      inet_pton(socket.AF_INET6, result))
Example #4
0
 def test_parse_ipv6_address(self):
     """
     Tests parsing of an ipv4 address into a network byte value
     """
     address = "2607:f0d0:1002:0051:0000:0000:0000:0004"
     driver = WinDivert(self.dll_path)
     driver.register()
     result = driver.parse_ipv6_address(address)
     self.assertEqual(
         struct.unpack("<HHHHHHHH", inet_pton(socket.AF_INET6, address)),
         tuple(result))