xxnet

package
v0.0.0-...-63b2ac5 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2019 License: GPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckIP

func CheckIP(ip []byte) bool

func CheckPort

func CheckPort(port int) bool

func GetLocalAddress

func GetLocalAddress(iterfaceName string) (addr *net.IP, err error)

func Icmp

func Icmp(addr net.IPAddr, opts ...ss)

func ParseHttpHeadString

func ParseHttpHeadString(text string) map[string][]string

func PasrseTcpAddr

func PasrseTcpAddr(addr *net.TCPAddr) (ipv4 []byte, port int, err error)

Types

type HostAddr

type HostAddr struct {
	Hostip string
	Port   string
}

func ParseHostAddr

func ParseHostAddr(ipport string) (hostaddr HostAddr, err error)

type IcmpOptions

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

func (*IcmpOptions) WithTimeout

func (i *IcmpOptions) WithTimeout(d time.Duration) ss

type IcmpRequest

type IcmpRequest struct {
	Type        byte
	Code        byte
	Checksum    uint16
	Identifier  uint16
	SequenceNum uint16
}

type IcmpResp

type IcmpResp struct {
}

icmp 响应.

type Iface

type Iface struct {
	net.Interface
}

func (Iface) GetIpv4

func (this Iface) GetIpv4() (*net.IPAddr, error)

Jump to

Keyboard shortcuts

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