docs: def send_one_ping(sock: socket, dest_addr: str, icmp_id: int, seq: int, size: int):
      """Sends one ping to the given destination.
  
      ICMP Header (bits): type (8), code (8), checksum (16), id (16), sequence (16)
      ICMP Payload: time (double), data
      ICMP Wikipedia: https://en.wikipedia.org/wiki/Internet_Control_Message_Protocol
  
      Args:
          sock: Socket.
          dest_addr: The destination address, can be an IP address or a domain name. Ex. "192.168.1.1"/"example.com"
          icmp_id: ICMP packet id, usually is same as pid.
          seq: ICMP packet sequence, usually increases from 0 in the same process.
          size: The ICMP packet payload size in bytes. Note this is only for the payload part.
  
      Raises:
          HostUnkown: If destination address is a domain name and cannot resolved.
      """
      try:
          dest_addr = socket.gethostbyname(dest_addr)  # Domain name will translated into IP address, and IP address leaves unchanged.
      except socket.gaierror as e:
          print("Cannot resolve {}: Unknown host".format(dest_addr))
          raise errors.HostUnknown(dest_addr) from e
      pseudo_checksum = 0  # Pseudo checksum is used to calculate the real checksum.
      icmp_header = struct.pack(ICMP_HEADER_FORMAT, IcmpType.ECHO_REQUEST, ICMP_DEFAULT_CODE, pseudo_checksum, icmp_id, seq)
      padding = (size - struct.calcsize(ICMP_TIME_FORMAT) - struct.calcsize(ICMP_HEADER_FORMAT)) * "Q"  # Using double to store current time.
      icmp_payload = struct.pack(ICMP_TIME_FORMAT, default_timer()) + padding.encode()
      real_checksum = checksum(icmp_header + icmp_payload)  # Calculates the checksum on the dummy header and the icmp_payload.
      # Don't know why I need socket.htons() on real_checksum since ICMP_HEADER_FORMAT already in Network Bytes Order (big-endian)
      icmp_header = struct.pack(ICMP_HEADER_FORMAT, IcmpType.ECHO_REQUEST, ICMP_DEFAULT_CODE, socket.htons(real_checksum), icmp_id, seq)  # Put real checksum into ICMP header.
      packet = icmp_header + icmp_payload
      sock.sendto(packet, (dest_addr, 0))