GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - GMLC-TDC/netif: Header-only C++14 library for getting addresses associated with network interfaces without name lookups on Windows, macOS, Linux, and FreeBSD

BranchesTags
Open more actions menu

Latest commit

 

History

149 Commits
149 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
gmlc/netif
gmlc/netif
 
 
tests
tests
 
 
.cirrus.yml
.cirrus.yml
 
 
.clang-format
.clang-format
 
 
.editorconfig
.editorconfig
 
 
.pre-commit-config.yaml
.pre-commit-config.yaml
 
 
CMakeLists.txt
CMakeLists.txt
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
CONTRIBUTORS.md
CONTRIBUTORS.md
 
 
LICENSE
LICENSE
 
 
NOTICE
NOTICE
 
 
README.md
README.md
 
 

Repository files navigation

NetIF

Get addresses associated with network interfaces on a system without using name lookups. Header-only, requires C++14.

Usage

Add the header file to the include path for your project. The main functions for getting interface addresses all return a vector of strings (std::vector<std::string>) with the typical human-readable representation of IP addresses (e.g. 127.0.0.1 for IPv4 and 2001:0db8:85a3:0000:0000:8a2e:0370:7334 for IPv6).

#include "gmlc/netif/NetIF.hpp"

auto addrs_ipv4 = gmlc::netif::getInterfaceAddressesV4(); // Get all IPv4 addresses
auto addrs_ipv6 = gmlc::netif::getInterfaceAddressesV6(); // Get all IPv6 addresses
auto addrs_all = gmlc::netif::getInterfaceAddressesAll(); // Get all addresses (IPv4 and IPv6)

CI Test Status

OS CPU Arch Status
FreeBSD x86_64 Build Status
Linux (Alpine) AArch64 Build Status
Linux (Ubuntu) x86_64 CI
Linux (Ubuntu) AArch64 CI
macOS ARM64 CI
Windows 10 x86_64 CI

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. See Contributing for more details and Contributors for a list of the current and past contributors to this project.

Please make sure to update tests as appropriate.

Release

NetIF is distributed under the terms of the BSD-3 clause license. All new contributions must be made under this license. See LICENSE for more detail.

SPDX-License-Identifier: BSD-3-Clause

Portions of the code written by LLNL with release number LLNL-CODE-739319

About

Header-only C++14 library for getting addresses associated with network interfaces without name lookups on Windows, macOS, Linux, and FreeBSD

Topics

cpp14hacktoberfestheader-onlynetworkingsockets

Resources

Readme
BSD-3-Clause license

Code of conduct

Code of conduct

Contributing

Contributing
Activity
Custom properties

Stars

17 stars

Watchers

8 watching

Forks

1 fork
Report repository

Releases

Packages

Used by

Contributors

Languages

Generated from nightlark/cpci
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.