ipfilter

package
v2.1.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2014 License: BSD-3-Clause, GPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDNSNotFound = errors.New("dns not found")

Functions

func Getaddr

func Getaddr(lookuper sutils.Lookuper, hostname string) (ip net.IP)

Types

type DNSCache

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

func CreateDNSCache

func CreateDNSCache(lookuper sutils.Lookuper) (dc *DNSCache)

func (DNSCache) LookupIP

func (dc DNSCache) LookupIP(hostname string) (addrs []net.IP, err error)

type FilteredDialer

type FilteredDialer struct {
	sutils.Dialer
	// contains filtered or unexported fields
}

func NewFilteredDialer

func NewFilteredDialer(dialer sutils.Dialer, dialer2 sutils.Dialer,
	lookuper sutils.Lookuper, filename string) (fd *FilteredDialer, err error)

func (*FilteredDialer) Dial

func (fd *FilteredDialer) Dial(network, address string) (conn net.Conn, err error)

type IPEntry

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

type IPList

type IPList []net.IPNet

func ReadIPList

func ReadIPList(f io.Reader) (iplist IPList, err error)

func ReadIPListFile

func ReadIPListFile(filename string) (iplist IPList, err error)

func (IPList) Contain

func (iplist IPList) Contain(ip net.IP) bool

FIXME: can be better?

Jump to

Keyboard shortcuts

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