ipmarker

package
v0.0.0-...-967fbc8 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadMark2PrefixFromReader

func LoadMark2PrefixFromReader(r io.Reader) (map[string]netip.Prefix, error)

format: mark,(prefix|"-")[# comment] e.g. "asia,22.22.22.0/24" "asia,-"

"-" means remove the ecs.

Types

type IpMarker

type IpMarker struct {
	// contains filtered or unexported fields
}

func LoadIpMarkerFromReader

func LoadIpMarkerFromReader(r io.Reader) (*IpMarker, error)

format: start,end,mark # comment

func (*IpMarker) IpLen

func (m *IpMarker) IpLen() int

func (*IpMarker) Mark

func (m *IpMarker) Mark(addr netip.Addr) (string, bool)

func (*IpMarker) MarkLen

func (m *IpMarker) MarkLen() int

Jump to

Keyboard shortcuts

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