read

package
v0.0.0-...-7d815bf Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2022 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

* @File: dns.go * @Date: 2019-06-07 12:56:20 * @OA: Antonio Escalera * @CA: Antonio Escalera * @Time: 2019-06-07 14:40:48 * @Mail: antonioe@wolfram.com * @Copy: Copyright © 2019 Antonio Escalera <aj@angelofdeauth.host>

* @File: unique.go * @Date: 2019-06-07 12:53:02 * @OA: Antonio Escalera * @CA: Antonio Escalera * @Time: 2019-06-07 12:53:09 * @Mail: antonioe@wolfram.com * @Copy: Copyright © 2019 Antonio Escalera <aj@angelofdeauth.host>

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DnsHostnames

func DnsHostnames(debug bool, ip net.IP) ([]string, error)

func HostsInSubnet

func HostsInSubnet(s *net.IPNet, subFn SubnetFunc) error

func PingHostnames

func PingHostnames(ip net.IP, attempts int, interval time.Duration, timeout time.Duration) (*ping.Pinger, error)

func ReadAWDataIntoSlice

func ReadAWDataIntoSlice(s string, debug bool) ([]net.IP, error)

func ReadArpDataIntoSlice

func ReadArpDataIntoSlice(path string, debug bool) ([]net.IP, error)

func ReadSubnetIntoChan

func ReadSubnetIntoChan(s *net.IPNet, debug bool) (<-chan net.IP, <-chan error)

func ReadSubnetIntoChans(s *net.IPNet, d <-chan struct{}, debug bool) (<-chan net.IP, <-chan error) {

Types

type AWData

type AWData struct {
	Macaddr string
	Ipaddr  net.IP
	Time    int64
	Name    string
}

func ReadAWDataIntoStruct

func ReadAWDataIntoStruct(s string) ([]AWData, error)

type ArpData

type ArpData struct {
	Ipaddr  net.IP
	Macaddr string
	Iface   string
}

func ReadArpDataIntoStruct

func ReadArpDataIntoStruct(path string) ([]ArpData, error)

type FieldsReader

type FieldsReader struct {
	*csv.Reader
}

func NewFieldsReader

func NewFieldsReader(r io.Reader) *FieldsReader

func (*FieldsReader) Read

func (r *FieldsReader) Read() (record []string, err error)

func (*FieldsReader) ReadAll

func (r *FieldsReader) ReadAll() (records [][]string, err error)

type SubnetFunc

type SubnetFunc func(s *net.IPNet, ip net.IP, err error) error

Jump to

Keyboard shortcuts

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