utils

package
v0.0.0-...-02319c3 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFilters

func AddFilters(v []string, v2 []string) []string

AddFilters add some filter rules

func FileIsExist

func FileIsExist(f string) bool

FileIsExist check file

func GetAllDevices

func GetAllDevices() ([]*pcap.Interface, error)

GetAllDevices get all network interface

func GetIPs

func GetIPs(v string) ([]string, error)

GetIPs get ips

func GetLocalIPs

func GetLocalIPs(v string) (map[string]string, error)

GetLocalIPs get the specified network interface info

func GetNIC

func GetNIC(v string) *pcap.Interface

GetNIC network interface details

func GetPacketReader

func GetPacketReader(v string, snaplen int, rtimeout int64) (*pcap.Handle, error)

GetPacketReader get packet reader

func GetPacketWriter

func GetPacketWriter(v string, snaplen int) (*pcapgo.Writer, error)

GetPacketWriter get packet writer

func GetPorts

func GetPorts(v string) ([]string, error)

GetPorts get ports

func PacketFilter

func PacketFilter(custom, ports, ips string) (string, error)

PacketFilter set packet filtering rules

Types

This section is empty.

Jump to

Keyboard shortcuts

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