windivert

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: May 22, 2019 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Packet

type Packet struct {
	packet.PacketBase
	// contains filtered or unexported fields
}

func (*Packet) Accept

func (pkt *Packet) Accept() error

func (*Packet) Block

func (pkt *Packet) Block() error

func (*Packet) Drop

func (pkt *Packet) Drop() error

func (*Packet) PermanentAccept

func (pkt *Packet) PermanentAccept() error

func (*Packet) PermanentBlock

func (pkt *Packet) PermanentBlock() error

func (*Packet) PermanentDrop

func (pkt *Packet) PermanentDrop() error

func (*Packet) RerouteToNameserver

func (pkt *Packet) RerouteToNameserver() error

func (*Packet) RerouteToTunnel

func (pkt *Packet) RerouteToTunnel() error

type WinDivert

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

func New

func New(dllLocation, filter string) (*WinDivert, error)

func (*WinDivert) Close

func (wd *WinDivert) Close() error

func (*WinDivert) GetParam

func (wd *WinDivert) GetParam(param uintptr) (uint64, error)

func (*WinDivert) HelperCalcChecksums

func (wd *WinDivert) HelperCalcChecksums(packetData []byte, address *WinDivertAddress, flags uintptr) error

func (*WinDivert) Open

func (wd *WinDivert) Open(filter string) error

func (*WinDivert) Packets

func (wd *WinDivert) Packets(packets chan packet.Packet) error

func (*WinDivert) Recv

func (wd *WinDivert) Recv() ([]byte, *WinDivertAddress, error)

func (*WinDivert) Send

func (wd *WinDivert) Send(packetData []byte, address *WinDivertAddress) error

func (*WinDivert) SetParam

func (wd *WinDivert) SetParam(param, value uintptr) error

type WinDivertAddress

type WinDivertAddress struct {
	Timestamp         int64  /* Packet's timestamp. */
	IfIdx             uint32 /* Packet's interface index. */
	SubIfIdx          uint32 /* Packet's sub-interface index. */
	Direction         uint8  /* Packet's direction. */
	Loopback          uint8  /* Packet is loopback? */
	Impostor          uint8  /* Packet is impostor? */
	PseudoIPChecksum  uint8  /* Packet has pseudo IPv4 checksum? */
	PseudoTCPChecksum uint8  /* Packet has pseudo TCP checksum? */
	PseudoUDPChecksum uint8  /* Packet has pseudo UDP checksum? */
	Reserved          uint8
}

copied from windivert.h

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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