windivert

package module
v0.0.0-...-0608d89 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2018 License: BSD-2-Clause Imports: 3 Imported by: 1

README

divert

Build status

Go bindings for WinDivert

Documentation

Rendered for windows/amd64

Index

Constants

View Source
const (
	InvalidHandleValue = -1

	LayerNetwork        = 0
	LayerNetworkForward = 1

	FlagSniff = 1
	FlagDrop  = 2

	DirectionOutbound = 0
	DirectionInbound  = 1

	ParamQueueLen  = 0
	ParamQueueTime = 1
	ParamQueueSize = 2
)

Variables

This section is empty.

Functions

func CalcChecksums

func CalcChecksums(packet []byte) []byte

Types

type Address

type Address struct {
	IfIdx     uint32 // Packet's interface index
	SubIfIdx  uint32 // Packet's sub-interface index
	Direction uint8  // Packet's direction
}

type Handle

type Handle uintptr

func Open

func Open(filter string, layer, priority, flags int) (Handle, error)

func (Handle) Close

func (h Handle) Close() error

func (Handle) GetParam

func (h Handle) GetParam(param uintptr) (uint64, error)

func (Handle) Recv

func (h Handle) Recv(packet []byte) (n int, addr Address, err error)

func (Handle) Send

func (h Handle) Send(packet []byte, addr Address) (n int, err error)

func (Handle) SetParam

func (h Handle) SetParam(param uintptr, value uint64) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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