pingIP

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - CODING/DEVELOP
Introduced first in SolidGeometry 5.3, Creation date: 2023-03-13, Last change: 2025-09-15

sends a single ping within one second to check the reachability of FTP server



See Also:

Example Illustration

 missing image of pingIP(IP,tt)

Syntax

isreachable=pingIP([IP,tt])

Input Parameter

IP: IP address
tt: timeout time; default is 1 second

Output Parameter

isreachable: true if a response was found




Copyright 2023-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth

Algorithm (Workflow)

This algorithm is designed to check the reachability of an FTP server by sending a single ping to a specified IP address. It is part of the SolidGeometry library and was introduced in version 5.3.

Input Parameters

Output Results

Algorithm Steps

  1. Retrieve the IP address and timeout time from the input parameters using the getfuncparams function. If not provided, use the default values.
  2. Check the operating system. If it is macOS, construct a ping command using the specified IP and timeout.
  3. Execute the ping command using the system function and capture the output.
  4. Determine if the server is reachable by checking if the output contains the phrase '1 packets transmitted, 1 packets received'.
  5. If the operating system is not macOS, assume the server is reachable by default.
  6. If there are no output arguments, print a message indicating whether the server is responding within the specified timeout.
Algorithm explaination created using ChatGPT on 2025-08-19 00:37. (Please note: No guarantee for the correctness of this explanation)

Last html export of this page out of FM database by TL: 2025-09-21