Skip to content

feat: Integrate PythonPing as CLI tool #111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Theory903
Copy link

This commit introduces PythonPing as a command-line tool (CLI) for network troubleshooting. The 'ping' functionality allows users to perform ICMP echo requests to a specified target IP address or hostname, displaying detailed response information and round-trip time (RTT) statistics.

Changes Made:

  • Added 'ping.py' implementing the CLI tool with argparse for argument parsing and pythonping for ICMP ping operations.
  • Defined perform_ping() to execute pings and display responses.
  • Implemented ping_command_line() for parsing arguments and executing ping operations based on user inputs.

Enhancements:

  • Displayed ping results, including successful replies and timed-out requests.
  • Calculated and exhibited RTT statistics (min/avg/max) for successful ping responses.

Usage:

  • Users can execute the tool using 'python3 -m ping [target] [--count]'.
  • 'Target' represents the IP address or hostname to ping; '--count' specifies the number of pings (default: 4).

Testing:

  • Thoroughly tested the tool to ensure consistent functionality across various network scenarios.

Associated Issue:

  • Resolves #<issue_number>: A discussion was held in the linked issue before implementing this feature.

Note: This commit adheres to the project's guidelines, including the code of conduct, and is ready for review and integration into the 'dev' branch.

Contributor: Abhishek Jha

This commit introduces PythonPing as a command-line tool (CLI) for network troubleshooting. The 'ping' functionality allows users to perform ICMP echo requests to a specified target IP address or hostname, displaying detailed response information and round-trip time (RTT) statistics.

Changes Made:
- Added 'ping.py' implementing the CLI tool with argparse for argument parsing and pythonping for ICMP ping operations.
- Defined perform_ping() to execute pings and display responses.
- Implemented ping_command_line() for parsing arguments and executing ping operations based on user inputs.

Enhancements:
- Displayed ping results, including successful replies and timed-out requests.
- Calculated and exhibited RTT statistics (min/avg/max) for successful ping responses.

Usage:
- Users can execute the tool using 'python3 -m ping [target] [--count]'.
- 'Target' represents the IP address or hostname to ping; '--count' specifies the number of pings (default: 4).

Testing:
- Thoroughly tested the tool to ensure consistent functionality across various network scenarios.

Associated Issue:
- Resolves #<issue_number>: A discussion was held in the linked issue before implementing this feature.

Note: This commit adheres to the project's guidelines, including the code of conduct, and is ready for review and integration into the 'dev' branch.

Contributor: Abhishek Jha
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant