pf

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Rendered for darwin/amd64

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAddr

func AddAddr(dev int, name, anchor string, ip net.IP) (bool, error)

func AddTable

func AddTable(dev int, name, anchor string) (bool, error)

Return true, nil if added successfully

false, nil if given name[:anchor] already exists

func Close

func Close(dev int) error

func IsEnabled

func IsEnabled(dev int) (bool, error)

func Open

func Open(oflag int) (int, error)

Types

type ErrnoError

type ErrnoError int

func (ErrnoError) Errno

func (e ErrnoError) Errno() int

func (ErrnoError) Error

func (e ErrnoError) Error() string

see:

runtime: goroutine stack exceeds 1000000000-byte limit in simple task #34251
https://github.com/golang/go/issues/34251#issuecomment-530672361
os.SyscallError#Error()

type Flags

type Flags uint

func (Flags) IsCreateIfNotExist

func (f Flags) IsCreateIfNotExist() bool

func (Flags) IsV4Only

func (f Flags) IsV4Only() bool

func (Flags) IsV6Only

func (f Flags) IsV6Only() bool

func (Flags) IsValid

func (f Flags) IsValid() bool

func (*Flags) TurnOnCreateIfNotExist

func (f *Flags) TurnOnCreateIfNotExist()

func (*Flags) TurnOnV4Only

func (f *Flags) TurnOnV4Only()

func (*Flags) TurnOnV6Only

func (f *Flags) TurnOnV6Only()

type TableSet

type TableSet map[table]Flags

XXX: not thread safe

func (*TableSet) Add

func (s *TableSet) Add(name, anchor string, flags Flags) error

func (*TableSet) String

func (s *TableSet) String() string

Jump to

Keyboard shortcuts

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