go-network-compo

module
v0.2.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2022 License: Apache-2.0

README

go-network-compo

Golang - System native network components

DNS settings

Route Table

Fetch Route Table from System

Implementation

Mac OS / BSD variant:

We use golang.org/x/net/route package to fetch route table.

for Mac OS: Raise kernel shared memory limit by put the plist to /Library/LaunchDaemons/ and autostart via launchctl load xxx.plist, File owner should be root:wheel.

for BSD: I don't know.

Windows:

Use syscall to load API from dll then call.

Use GetIpForwardTable2 from IPHLPAPI.DLL to fetch route table.

Linux:

Parse /proc/net/route file.

Note

Tested on Windows 7,10; Linux; Mac OS Monetrery.

Usage

Routes: routes.Retrieve()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL