utils

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Various utilities for parsing and valdating IPs and ports for use inside firewall toolkit

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateAddress

func ValidateAddress(ip netip.Addr) error

Validates an IP address

func ValidateAddressRange

func ValidateAddressRange(start netip.Addr, end netip.Addr) error

Validates an IP address range

func ValidatePort

func ValidatePort(port uint16) error

Validates a port number

func ValidatePortRange

func ValidatePortRange(start uint16, end uint16) error

Validates start and end port numbers

func ValidatePrefix

func ValidatePrefix(prefix netip.Prefix) error

Validates a Prefix/CIDR

Types

This section is empty.

Jump to

Keyboard shortcuts

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