network

package
v1.0.27 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPFamilySupport

type IPFamilySupport struct {
	HasIPv4 bool // System has at least one IPv4 address
	HasIPv6 bool // System has at least one IPv6 address
}

IPFamilySupport represents which IP families are available on the system

func DetectIPFamilySupport

func DetectIPFamilySupport() (*IPFamilySupport, error)

DetectIPFamilySupport checks which IP families the system actually has This is critical for nftables: we should only create tables/chains for IP families that exist on the system

func (*IPFamilySupport) GetActiveFamilies

func (s *IPFamilySupport) GetActiveFamilies() []string

GetActiveFamilies returns a list of active IP families for logging

func (*IPFamilySupport) ShouldCreateIPv4Rules

func (s *IPFamilySupport) ShouldCreateIPv4Rules() bool

ShouldCreateIPv4Rules returns true if IPv4 nftables rules should be created

func (*IPFamilySupport) ShouldCreateIPv6Rules

func (s *IPFamilySupport) ShouldCreateIPv6Rules() bool

ShouldCreateIPv6Rules returns true if IPv6 nftables rules should be created

func (*IPFamilySupport) String

func (s *IPFamilySupport) String() string

String returns a human-readable description

Jump to

Keyboard shortcuts

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