Code Monkey home page Code Monkey logo

Comments (12)

ValentinBELYN avatar ValentinBELYN commented on August 28, 2024

Hi, thank you for taking the time to report your issue 👍

However, I don't understand how these values can be negative. Could you tell me:

  • What is your operating system?
  • Which version of icmplib are you using?
  • Does the phenomenon reproduce systematically?
  • Do you have the same results when you ping the same IP addresses?
  • Finally, can you test with another computer?

Thank you in advance for your answers 😄

From my side, I just retested on different platforms and I do not encounter this problem.

from icmplib.

ValentinBELYN avatar ValentinBELYN commented on August 28, 2024

I hope my questions didn't scare you! 😄

from icmplib.

ValentinBELYN avatar ValentinBELYN commented on August 28, 2024

I close this issue because I don't think the problem comes from this library. Nothing could explain it at the code level. If you encounter this problem again, feel free to open a new issue.

from icmplib.

LGTH avatar LGTH commented on August 28, 2024

sorry, I see it now.
1.operating system is macos
2.icmplib==2.0.1
3. the phenomenon occur by chance
But I think this issue can be closed, if i find the reason, I will back to write the reason

from icmplib.

tkoch96 avatar tkoch96 commented on August 28, 2024

I'm having this issue as well..

from icmplib.

tkoch96 avatar tkoch96 commented on August 28, 2024

Looking in ping.py here:
image

I see something special about Linux. This all makes me think requests and replies are not being mapped appropriately. I'm running the library as sudo. Is that a problem?

from icmplib.

ValentinBELYN avatar ValentinBELYN commented on August 28, 2024

Hi @tkoch96!

Sorry, I forgot to answer your question.

The identifier and the sequence number are used to match an ICMP request and a response. In the event that you execute several pings simultaneously (threads or others), you must make sure that the identifier used is different. Concerning the sequence number, it is automatically incremented by one by the library. So you don't have to worry about this number.

Why is there a difference when you run the library with or without privileges? When the library is run with root privileges and the privileged parameter is True, raw sockets are created. These sockets even intercept ICMP packets destined for other sockets. The identifier is therefore very important to link requests with the correct responses.

When using the library without privileges, DGRAM sockets are used. These sockets only receive the response associated with the request sent. This operation is handled by the Kernel automatically and therefore the identifier is of little use here. Otherwise, some systems such as Linux automatically replace this identifier with a random number.

I hope to have answered your question 😄

from icmplib.

tkoch96 avatar tkoch96 commented on August 28, 2024

What you said makes sense, but the problem remains that I'm seeing negative RTTs. I was trying to probe ~4k addresses every ~20s using multiping. Worked fine on Windows.

from icmplib.

ValentinBELYN avatar ValentinBELYN commented on August 28, 2024

You encounter this problem on the ping or the multiping function or both?

from icmplib.

tkoch96 avatar tkoch96 commented on August 28, 2024

In multiping

from icmplib.

ValentinBELYN avatar ValentinBELYN commented on August 28, 2024

Can you give me the parameters passed to the multiping function so that I can reproduce the phenomenon?
By the way, what is your operating system and its version, as well as the version of icmplib?

Finally, can you install an older version of icmplib (1.2.2) and tell me if you still experience this behavior?

pip3 uninstall icmplib
pip3 install icmplib==1.2.2

Thanks 😃

from icmplib.

ValentinBELYN avatar ValentinBELYN commented on August 28, 2024

The multiping function will be completely rewritten in the next version. The bug you see will definitely be fixed. Therefore, I close this issue.

from icmplib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.