{"id":15050436,"url":"https://github.com/mozilla/mtu","last_synced_at":"2025-04-07T17:07:45.032Z","repository":{"id":255439225,"uuid":"849874068","full_name":"mozilla/mtu","owner":"mozilla","description":"Rust crate for obtaining the local network interface name and MTU towards a given IP address","archived":false,"fork":false,"pushed_at":"2025-03-31T05:39:29.000Z","size":253,"stargazers_count":26,"open_issues_count":4,"forks_count":6,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-03-31T16:13:56.256Z","etag":null,"topics":["interface","mozilla","mtu"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/mtu","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mozilla.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-30T12:27:11.000Z","updated_at":"2025-03-31T05:39:30.000Z","dependencies_parsed_at":"2024-09-02T10:20:03.000Z","dependency_job_id":"cedb635f-8d36-4aaf-9f4f-6aa686503728","html_url":"https://github.com/mozilla/mtu","commit_stats":{"total_commits":87,"total_committers":4,"mean_commits":21.75,"dds":"0.28735632183908044","last_synced_commit":"aa6b20c661d2a29900666e35a7a34054b45e9283"},"previous_names":["mozilla/mtu"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla%2Fmtu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla%2Fmtu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla%2Fmtu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla%2Fmtu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mozilla","download_url":"https://codeload.github.com/mozilla/mtu/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247558694,"owners_count":20958203,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["interface","mozilla","mtu"],"created_at":"2024-09-24T21:26:29.254Z","updated_at":"2025-04-07T17:07:45.001Z","avatar_url":"https://github.com/mozilla.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Coverage Status](https://codecov.io/gh/mozilla/mtu/branch/main/graph/badge.svg)](https://codecov.io/gh/mozilla/mtu)\n[![Average time to resolve an issue](https://isitmaintained.com/badge/resolution/mozilla/mtu.svg)](https://isitmaintained.com/project/mozilla/mtu \"Average time to resolve an issue\")\n[![Percentage of issues still open](https://isitmaintained.com/badge/open/mozilla/mtu.svg)](https://isitmaintained.com/project/mozilla/mtu \"Percentage of issues still open\")\n![Maintenance](https://img.shields.io/badge/maintenance-activly--developed-brightgreen.svg)\n\n# mtu\n\nA crate to return the name and maximum transmission unit (MTU) of the local network interface\ntowards a given destination `SocketAddr`, optionally from a given local `SocketAddr`.\n\n## Usage\n\nThis crate exports a single function `interface_and_mtu` that returns the name and\n[maximum transmission unit (MTU)](https://en.wikipedia.org/wiki/Maximum_transmission_unit)\nof the outgoing network interface towards a remote destination identified by an `IpAddr`.\n\n## Example\n\n```rust\nlet destination = IpAddr::V4(Ipv4Addr::LOCALHOST);\nlet (name, mtu): (String, usize) = mtu::interface_and_mtu(destination).unwrap();\nprintln!(\"MTU towards {destination} is {mtu} on {name}\");\n```\n\n## Supported Platforms\n\n* Linux\n* Android\n* macOS\n* Windows\n* FreeBSD\n* NetBSD\n* OpenBSD\n* Solaris\n\n## Notes\n\nThe returned MTU may exceed the maximum IP packet size of 65,535 bytes on some platforms for\nsome remote destinations. (For example, loopback destinations on Windows.)\n\nThe returned interface name is obtained from the operating system.\n\n## Contributing\n\nWe're happy to receive PRs that improve this crate. Please take a look at our [community\nguidelines](CODE_OF_CONDUCT.md) beforehand.\n\nLicense: MIT OR Apache-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmozilla%2Fmtu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmozilla%2Fmtu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmozilla%2Fmtu/lists"}