Versions in this module Expand all Collapse all v0 v0.0.1 Aug 19, 2020 Changes in this version + const PacketBufferSize + const PacketChanCapacity + const WINDIVERT_LAYER_FLOW + const WINDIVERT_LAYER_NETWORK + const WINDIVERT_LAYER_NETWORK_FORWARD + const WINDIVERT_LAYER_REFLECT + const WINDIVERT_LAYER_SOCKET + const WinDivertDirectionInbound + const WinDivertDirectionOutbound + const WinDivertFlagDebug + const WinDivertFlagDrop + const WinDivertFlagSniff + func HelperCompileFilter(filter string) (bool, int) + func HelperEvalFilter(packet *Packet, filter string) (bool, error) + func LoadDLL(path64, path32 string) + type Direction bool + func (d Direction) String() string + type Packet struct + Addr *WinDivertAddress + IpHdr header.IPHeader + NextHeader header.ProtocolHeader + PacketLen uint + Raw []byte + func (p *Packet) CalcNewChecksum(wd *WinDivertHandle) + func (p *Packet) Direction() Direction + func (p *Packet) DstIP() net.IP + func (p *Packet) DstPort() (uint16, error) + func (p *Packet) EvalFilter(filter string) (bool, error) + func (p *Packet) IpVersion() int + func (p *Packet) NextHeaderProtocolName() string + func (p *Packet) NextHeaderType() uint8 + func (p *Packet) ParseHeaders() + func (p *Packet) Send(wd *WinDivertHandle) (uint, error) + func (p *Packet) SetDstIP(ip net.IP) + func (p *Packet) SetDstPort(port uint16) error + func (p *Packet) SetSrcIP(ip net.IP) + func (p *Packet) SetSrcPort(port uint16) error + func (p *Packet) SrcIP() net.IP + func (p *Packet) SrcPort() (uint16, error) + func (p *Packet) String() string + func (p *Packet) VerifyParsed() + type WinDivertAddress struct + Flags uint64 + IfIdx uint32 + SubIfIdx uint32 + Timestamp int64 + func (w *WinDivertAddress) Direction() Direction + func (w *WinDivertAddress) IPv6() bool + func (w *WinDivertAddress) Impostor() bool + func (w *WinDivertAddress) Loopback() bool + func (w *WinDivertAddress) SetDirection(d int) + func (w *WinDivertAddress) String() string + func (w *WinDivertAddress) ValidIPChecksum() bool + func (w *WinDivertAddress) ValidTCPChecksum() bool + func (w *WinDivertAddress) ValidUDPChecksum() bool + type WinDivertHandle struct + func NewWinDivertHandle(filter string) (*WinDivertHandle, error) + func NewWinDivertHandleWithFlags(filter string, layer int, flags uint8) (*WinDivertHandle, error) + func (wd *WinDivertHandle) Close() error + func (wd *WinDivertHandle) HelperCalcChecksum(packet *Packet) + func (wd *WinDivertHandle) Packets() (chan *Packet, error) + func (wd *WinDivertHandle) Recv() (*Packet, error) + func (wd *WinDivertHandle) Send(packet *Packet) (uint, error)