Skip to content

Commit

Permalink
Initial version
Browse files Browse the repository at this point in the history
  • Loading branch information
Xowap committed Oct 21, 2020
1 parent 22c6890 commit 6dff211
Show file tree
Hide file tree
Showing 11 changed files with 557 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 4
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[Makefile]
indent_style = tab
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
*.pyc
*.swp
*.un~
.pytest_cache
.idea
dist
*.egg-info
/docs/build/
6 changes: 6 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[settings]
multi_line_output=3
include_trailing_comma=True
force_grid_wrap=0
use_parentheses=True
line_length=88
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
PYTHON_BIN ?= poetry run python

format: isort black

black:
$(PYTHON_BIN) -m black --target-version py38 --exclude '/(\.git|\.hg|\.mypy_cache|\.nox|\.tox|\.venv|_build|buck-out|build|dist|node_modules|webpack_bundles)/' .

isort:
$(PYTHON_BIN) -m isort src

publish:
poetry publish
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
mtuprobe
========

A tool to probe the current
[MTU](https://en.wikipedia.org/wiki/Maximum_transmission_unit) on an IPv4 path.

So far it's compatible with Linux only however it can very easily be adapted
to any other operating system.

## Installation

```
pip install mtuprobe
```

## Usage

The default options are sane and should give you good results. Suppose that
you want to know the current effective MTU towards `wikipedia.org`, in a shell
you can try:

```
% mtuprobe wikipedia.org
Max packet size: 1464
Expected ethernet MTU: 1492
```

You can check out `mtuprobe -h` to get the complete list of options.

Values are:

- **Max packet size** — Max packet size specified to `ping`, meaning the
size of the data segment of the ICMP packet
- **Expected ethernet MTU** — That's what the MTU should be if you're
transmitting over Ethernet and the header sizes are what is expected from
such a setup. This should apply most of the time but surely some weird
network setups could violate this.
188 changes: 188 additions & 0 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[tool.poetry]
name = "mtuprobe"
version = "0.1.0"
description = "A tool to find out maximum MTU size on an IPv4 path"
authors = ["Rémy Sanchez <[email protected]>"]
license = "WTFPL"
readme = "README.md"
homepage = "https://github.com/Xowap/mtuprobe"
repository = "https://github.com/Xowap/mtuprobe"
documentation = "https://github.com/Xowap/mtuprobe"

[tool.poetry.scripts]
mtuprobe = 'mtuprobe.__main__:__main__'

[tool.poetry.dependencies]
python = "^3.8"

[tool.poetry.dev-dependencies]
isort = "^5.6.4"
black = "^20.8b1"

[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
Empty file added src/mtuprobe/__init__.py
Empty file.
Loading

0 comments on commit 6dff211

Please sign in to comment.