Skip to main content

Downloads

Overview

This is a traceroute module written in Python. The module sends speculative probe packets and gets the results immediately. Currently, only IPv4 ICMP echo requests are supported as probe packets.

Installation

$ sudo pip install tsubame

Usage

Permission

You need to have super user privileges or set CAP_NET_RAW capability to the Python interpreter binary.

Programing Interface

from tsubame import traceroute

host = 'example.com'
tr = traceroute()

results = tr.probe(host, hop_limit=8, count=1, timeout=1.0, ident=None)

host

A target host name string or an IP address string.

hop_limit

Maximum number of hops. It must be an integer from 1 to 64.

count

The number of probe packets for each hop. It must be an integer from 1 to 4.

ident

Identifier for parallel execution. The size must be 2 bytes. A unique value must be set for each traceroute context. By default, the PID will be set.

Result Structure

Nested structure

[
   [ first_probe, second_probe, ..., nth_probe ], # hop 1
   [ first_probe, second_probe, ..., nth_probe ], # hop 2
...
   [ first_probe, second_probe, ..., nth_probe ], # hop n
]

Each result item

If received a response,

(from_addr, delay_sec, is_target)

e.g.

('192.168.1.1', 0.0011992454528808594, False)

else

None

Example

Simple traceroute command

You can use as a traceroute command as follows.

$ sudo tsubame example.com
traceroute to example.com (93.184.216.34), 32 hops max
1  192.168.1.1  1.146 ms  1.374 ms  1.616 ms
2  * * *
3  * * *
4  * * *
5  * * *
6  111.87.3.234  118.376 ms  118.503 ms  119.928 ms
7  62.115.180.213  123.618 ms  123.894 ms  125.392 ms
8  62.115.155.89  120.319 ms  121.756 ms  122.066 ms
9  152.195.85.133  121.776 ms  123.551 ms  123.544 ms
10  93.184.216.34  127.130 ms  127.199 ms  129.053 ms

Metadata

Release files for tsubame 0.8.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for tsubame 0.8.2
File Interpreter ABI Platform
tsubame-0.8.2-py3-none-any.whl Python 3 none any Details

Release files / tsubame-0.8.2-py3-none-any.whl

Download URL tsubame-0.8.2-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
735cb846fe88290913102f9b18247b18ee2d667fc72ed34d0e3d0f8462954548
BLAKE2b-256 checksum
How to use checksums
355f21980d79af3e56bedea05bb2c6103ee4ba5378cf1d253eaf8ee01d4fe470
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.6

Security for tsubame 0.8.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.8.2 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page