Divert2

package module
v0.0.0-...-3e65a4a Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2019 License: GPL-2.0 Imports: 3 Imported by: 0

README

Windivert2-Go

An partial go binding for Windivert2

Code Example

RabbitHole

Something different

DivertInit()

Load WinDivert.dll

DivertPacket Struct
type DivertPacket struct {
	Data []byte //PacketData
	Addr WINDIVERTADDRESS //Only for network mode
}
type WINDIVERTADDRESS struct {
	Timestamp int64
	Flag      uint64
	IfIdx     uint64
}

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DivertCalcCheckSums *syscall.LazyProc
View Source
var DivertClose *syscall.LazyProc
View Source
var DivertOpen *syscall.LazyProc
View Source
var DivertRecv *syscall.LazyProc
View Source
var DivertSend *syscall.LazyProc
View Source
var DivertShutdown *syscall.LazyProc
View Source
var EndFlag bool
View Source
var RXChan chan *DivertPacket
View Source
var TXChan chan *DivertPacket

Functions

func DivertInit

func DivertInit()

func SendOut

func SendOut(Handle uintptr, Data []byte)

func WinDivertClose

func WinDivertClose(Handle uintptr) error

func WinDivertOpen

func WinDivertOpen(filter string, layer int, priority int16, flags uint64) (uintptr, error)

func WinDivertSend

func WinDivertSend(Handle uintptr, packet *DivertPacket) error

func WinDivertShutdown

func WinDivertShutdown(Handle uintptr, How uint) error

Types

type DivertPacket

type DivertPacket struct {
	Data []byte
	Addr WINDIVERTADDRESS
}

func WinDivertRecv

func WinDivertRecv(Handle uintptr) (*DivertPacket, error)

type WINDIVERTADDRESS

type WINDIVERTADDRESS struct {
	Timestamp int64
	Flag      uint64
	IfIdx     uint64
}

Jump to

Keyboard shortcuts

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