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
Click to show internal directories.
Click to hide internal directories.