Code Monkey home page Code Monkey logo

Comments (4)

ValentinBELYN avatar ValentinBELYN commented on August 28, 2024 1

Hi @limlynn 👋

From what I see, you are using Python 3.6. The latest version of icmplib compatible with this version of Python is 2.1.1. The family parameter of the traceroute function was introduced in version 3.0 of icmplib. So you can't currently use it.

However, for what you want to do, this parameter is not necessary. Indeed, this one is useful only if you pass to the function an FQDN (ex: github.com) and you want to make sure that the DNS lookup returns either an IPv4 address or an IPv6 address.

Since you are directly specifying an IPv6 address, you can directly call the following function and get the expected result:

hops = traceroute('2620:100:6040:18::a27d:f812', timeout=1, fast=True)

Please let me know if it works! 😉

from icmplib.

limlynn avatar limlynn commented on August 28, 2024

Thank you so much I will try and let you know!

from icmplib.

limlynn avatar limlynn commented on August 28, 2024

It works well!! Thank you
But I cannot set up "traffic_class" for IPv6 packet.
Could you please give a little advise on the setting up traffice class(tos field in IPv4) in IPv6?

from icmplib.

ValentinBELYN avatar ValentinBELYN commented on August 28, 2024

Thank you for this feedback!
What do you mean by "I cannot set up "traffic_class" for IPv6 packet"?

To set the traffic class field of your ICMP packets, you have a parameter to do this since the version 1.2 of icmplib:

# Ping
ping('2001:4860:4860::8888', traffic_class=184) # 184 = voice

# Multiping
multiping('2001:4860:4860::8888', traffic_class=184) # 184 = voice

# Traceroute
traceroute('2001:4860:4860::8888', traffic_class=184) # 184 = voice

You will find all the possible values here (field ToS of the table): #11 (comment)
These functions work the same way whether you use IPv4 or IPv6 addresses.

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.