netutil

package
v0.0.0-...-a27da54 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package netutil contains network-related utilities common among dnsproxy packages.

TODO(a.garipov): Move improved versions of these into netutil in module golibs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultHostsPaths

func DefaultHostsPaths() (paths []string, err error)

DefaultHostsPaths returns the slice of default paths to system hosts files.

TODO(s.chzhen): Since [fs.FS] is no longer needed, update the hostsfile.DefaultHostsPaths from golibs.

func ParseSubnet

func ParseSubnet(s string) (p netip.Prefix, err error)

ParseSubnet parses s either as a CIDR prefix itself, or as an IP address, returning the corresponding single-IP CIDR prefix.

TODO(e.burkov): Replace usages with netutil.Prefix.

Types

This section is empty.

Jump to

Keyboard shortcuts

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