Skip to content

Releases: alessandromaggio/pythonping

Count beyond 16-bit

25 Oct 10:36
afa1e95
Compare
Choose a tag to compare

This release improves documentation and code maintenance in the app and removes the 16-bit limit from the count parameter:

  • count parameter can now go beyond 16-bit (thanks to @dabell-cc)
  • README.md is updated to describe how the module works in detail (thanks to @AleksaZatezalo), and requirements.txt has been added
  • Linting issues have been fixed (thaks to @marksmayo)

Additionally, contributing guidelines have slightly changed to ensure all merges go through dev. All PR will now have to be set to merge into the dev branch (not master) and without increasing version number. Version number will be increased when merging dev into master.

Add ResponseList statistics

19 Aug 13:17
1c5a69f
Compare
Choose a tag to compare

This release addresses issue #82 and adds new statistics to the ResponseList class.

  • self.stats_packets_sent = Total packets sent
  • self.stats_packets_returned = Total packet sent for which we have received a reply
  • self.stats_packets_lost = stats_packet_sent - stats_packets_returned (computed)
  • self.stats_success_ratio = stats_packet_returned / stats_packets_sent (computed)
  • self.stats_lost_ratio = 1 - stats_success_ratio (computed)

Thanks to @ilyapashuk for providing both code and tests to this release!

Specify Source Interface

30 Jul 16:49
877ccc1
Compare
Choose a tag to compare

I am pleased to annouce we are introducing one of the most sought after features, specifying the source interface. This works by specifying which socket we want to bind pythonping to, and at the moment we can consider this experimental. The default behaviour remains specifying no source, and let the OS figure out what interface to use.

We are also improving the quality of our code by running tests on every push in GitHub. And, we are also slightly tweaked tests to consider RFC8244 for local domains.

Thanks to @aryzach for the specify-source-interface code, to @stephengroat for the tests.

Fix displayed Packet Length

31 Dec 09:22
Compare
Choose a tag to compare

This release allows you to correctly detect the size of packets sent and received and addresses issue #74.

Backward Compatibility Mode

For backward compatibility, we continue to output in the same format, but now with correct packet size referring to the ICMP reply. Consider the following code snippet:

from pythonping import ping

ping('8.8.8.8', count=1, verbose=True)

This piece of code will continue to generate the following output, now with the packet size which correspond to the IP packet total length of the ICMP reply.

Reply from 8.8.8.8, 29 bytes in 5.28ms

New Implementation

The output format defaults to legacy and this will change in subsequent releases. You can change it right now be forcing it to None as follows:

from pythonping import ping

ping('8.8.8.8', count=1, verbose=True, out_format=None)

This will yield the results in the new output format, showing size of both request and response:

status=OK       from=8.8.8.8    ms=5.14         bytes   snt=29  rcv=29

A special thanks to @s1198576 for having spotted the issue and doing some analysis with WireShark!

Add Interval Option

04 Jun 17:20
Compare
Choose a tag to compare

Add a linux-like interval option to set the time to wait between pings, in seconds. Thanks to @deltronzero for the PR and the idea!

This is a BREAKING change to some extent. If you are using positional parameters, the interval option was added BEFORE some existing parameters, so you would end up filling the wrong parameter with your data. Specifically:

  • If you are calling ping() and providing payload, sweep_start or sweep_end positionally, you need to update your code to provide interval first (default value is zero).
  • If you are instantiating the Communicator class and providing either socket_options, seed_id, verbose, or output positionally, then you need to update your code to include interval first (also here, default value is None but zero is fine as well).

Fix Packet Loss Calculation

04 Jun 17:04
Compare
Choose a tag to compare

Fix packet loss calculation when succesful requests are mixed with failed requests. Thanks to @handymenny for the PR!

Enable ping sweep without setting size

12 Mar 06:52
482144c
Compare
Choose a tag to compare

It is now possible to run a ping sweep by specifying only the sweep start size and the sweep end size, without hardcoding a static size. Previously it was necessary to manually set size to None for sweep settings to be considered, now if they are set size is ignored. This is not a breaking change as setting both sweep size and static size makes no sense and has no use case.

Special thanks to @xalier1 for raising issue #64, now closed with this release.

Add Packet Loss Statistics

12 Nov 18:11
3b27565
Compare
Choose a tag to compare

Thanks to @samgomena, we now have statistics on packet loss!
To get this statistics, simply access the packet_loss property on the Reponse List (the object returned from ping). A value of 1.0 represents 100% of packets lost, while 0% represents no packet lost.

rs = ping('127.0.0.1', verbose=True)
rs.packet_loss

Fix Intermittent Threaded Usage Failure

12 Sep 13:33
Compare
Choose a tag to compare

This release fixes the Python Issue 30482 that made the underlying socket.getprotobyname() unreliable, as detailed in PR #56. Thanks to @malbers15 for the fix.

Restore Python 3.5 Support

26 Aug 18:36
8833ca6
Compare
Choose a tag to compare

Recent changes broke compatibility with python3.5, this release restores the compatibility.

  • Restored full python3.5 compatibility (thanks to @malbers15 for the quick fix)
  • Improved docs for tiemout parameter (thanks to @petermeissner, and also to @malbers15 for reviewing the change)