Comments (6)
Hi @audeoudh 👋
Wow! Thank you for taking the time to detail your request.
I'll see how to implement this for the next release.
from icmplib.
I'll see how to implement this for the next release.
Just replace this line
Line 272 in 40e951c
with this line
self._sock.sendto(packet,socket.getaddrinfo(request.destination, port=None, family=socket.AF_INET if self._IP_VERSION == 4 else socket.AF_INET6, type=socket.SOCK_DGRAM)[0][4])
I've tested it and it looks like everything works
host = ping('fe80::d250:99ff:fe28:7d19%em1' ,count=10, interval=0.2, privileged=False)
(host.address ,host.avg_rtt ,host.is_alive ,host.jitter ,host.max_rtt ,host.min_rtt ,host.packet_loss ,host.packets_received ,host.packets_sent)
('fe80::d250:99ff:fe28:7d19%em1', 0.355, True, 0.17, 0.751, 0.139, 0.0, 10, 10)
host = ping('localhost' ,count=10, interval=0.2, privileged=False)
(host.address ,host.avg_rtt ,host.is_alive ,host.jitter ,host.max_rtt ,host.min_rtt ,host.packet_loss ,host.packets_received ,host.packets_sent)
('127.0.0.1', 0.462, True, 0.093, 0.604, 0.386, 0.0, 10, 10)
from icmplib.
Hi @sunwire,
Sorry for the delay.
It is not so simple. I'm trying to avoid putting any code related to IPv6 in the ICMPSocket
class. The ideal would be to place this code in the ICMPv6Socket
class. However, this class does not have its own send
method. I have to find a solution not to duplicate the code.
from icmplib.
The PR #38 does not add IPv6-specific code to ICMPSocket
class. It forwards the self._sock.family
and self._sock.type
attributes to getaddrinfo
. It works for both versions.
from icmplib.
I added tests to make sure that things works well with these modifications. Do you have a specific test bench to run to ensure all is working well?
from icmplib.
Hi @audeoudh, sorry for the delay...
Thank you for your PR! I have integrated some of your work in the version 3.0.2 of icmplib.
Otherwise, there are no unit tests at the moment, at least on GitHub. I have to improve them before committing them.
from icmplib.
Related Issues (20)
- Enhancement: class Host to return a dict with it's data HOT 1
- The regular time.time() function does not work well in Windows, rtt = 0 HOT 2
- Can only receive the last hop using traceroute on Windows HOT 3
- The future of icmplib
- traceroute only provides last hop HOT 1
- samsung.com - Packetloss 100.0% HOT 1
- Add the ability to set the DF flag and get MTU size feedback from the ICMP protocol.
- Actual license is unclear: is it LGPLv3 or LGPLv3+? HOT 1
- Add reply payload retrieval and checking HOT 1
- The traceroute under ipv6 only displays the last hop HOT 5
- Whats the difference between icmpLib and the icmpLibv2(forked from IcmpLib) ? HOT 3
- Use predefined socket either SOCK_DGRAM / SOCK_RAW on every invocation of ping API HOT 1
- After upgrading to ubuntu 22.04 sysctl changes are needed again HOT 3
- Feature: auto-detect best "privileged" setting HOT 3
- Feature: unprivileged traceroute HOT 4
- Error on running very basic Ping command HOT 1
- Running traceroute only returns final hop HOT 1
- Make payload more flexible HOT 2
- Unnecessary last `sleep()` in `multiping()` HOT 2
- Feature: Async traceroute
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from icmplib.