Skip to content
/ getifs Public
generated from al8n/template-rs

A bunch of cross platform network tools for fetching interfaces, multicast addresses, local ip addresses, private ip addresses, public ip addresses and etc.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

al8n/getifs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GetIfs

A bunch of cross-platform network tools for fetching interfaces, multicast addresses, local ip addresses, private ip addresses, public ip addresses and etc.

github LoC Build codecov

docs.rs crates.io crates.io license

Introduction

A bunch of cross-platform network tools for fetching interfaces, multicast addresses, local ip addresses, private ip addresses, public ip addresses and etc.

Installation

[dependencies]
getifs = "0.2"

Examples

Details

OS Approach
Linux socket(AF_NETLINK, SOCK_RAW | SOCK_CLOEXEC, NETLINK_ROUTE)
BSD-like sysctl
Windows GetAdaptersAddresses

Why a new network interfaces crate?

When implementing agnostic-mdns (an mDNS crate), I found that Rust was missing a crate to help play with network interfaces and addresses.

All of current network interfaces crates do not support fetching MTU and multicast addresses, and almost all of them are using libc::getifaddrs. This crate tries to avoid unneeded allocation and use more underlying method to achieve the same functionalities.

Hence, getifs is here, which contain a bunch of cross-platform network tools for fetching interfaces, multicast addresses, local ip addresses, private ip addresses, public ip addresses and etc.

Roadmap

  • Support fetching routing tables (0.3.0)

Sister crates

  • iprobe: Probe if the host system supports IPv4, IPv6 and IPv4-mapped-IPv6.
  • iprfc: Known RFCs for IP addresses.

Pedigree

License

getifs is under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE, LICENSE-MIT for details.

Copyright (c) 2025 Al Liu.

About

A bunch of cross platform network tools for fetching interfaces, multicast addresses, local ip addresses, private ip addresses, public ip addresses and etc.

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Languages