Documentation ¶
Rendered for windows/amd64
Index ¶
Constants ¶
View Source
const ( GetStatsIOCTL = 0x122004 SetFlowFilterIOCTL = 0x122010 SetDataFilterIOCTL = 0x12200c SetMaxFlowsIOCTL = 0x122018 )
View Source
const ( FlowDirectionMask = 0x300 FlowDirectionBits = 0x8 FlowDirectionInbound = 0x1 FlowDirectionOutbound = 0x2 FlowClosedMask = 0x10 TCPFlowEstablishedMask = 0x20 )
View Source
const ( DirectionInbound = 0x0 DirectionOutbound = 0x1 )
View Source
const DriverStatsSize = 0x148
View Source
const FilterDefinitionSize = 0x98
View Source
const FilterPacketHeaderSize = 0x48
View Source
const (
LayerTransport = 0x1
)
View Source
const PerFlowDataSize = 0x94
View Source
const Signature = 0xddfd0000000a
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DriverStats ¶
type FilterAddress ¶
type FilterDefinition ¶
type FilterPacketHeader ¶
type Handle ¶
Handle struct stores the windows handle for the driver as well as information about what type of filter is set
func NewHandle ¶
func NewHandle(flags uint32, handleType HandleType) (*Handle, error)
NewHandle creates a new windows handle attached to the driver
func (*Handle) GetStatsForHandle ¶
GetStatsForHandle gets the relevant stats depending on the handle type
func (*Handle) SetDataFilters ¶
func (dh *Handle) SetDataFilters(filters []FilterDefinition) error
SetDataFilters installs the provided filters for data
func (*Handle) SetFlowFilters ¶
func (dh *Handle) SetFlowFilters(filters []FilterDefinition) error
SetFlowFilters installs the provided filters for flows
type HandleStats ¶
type HandleType ¶
type HandleType string
HandleType represents what type of data the windows handle created on the driver is intended to return. It implicitly implies if there are filters set for a handle
const ( // FlowHandle is keyed to return 5-tuples from the driver that represents a flow. Used with: (#define FILTER_LAYER_TRANSPORT ((uint64_t) 1) FlowHandle HandleType = "Flow" // DataHandle is keyed to return full packets from the driver. Used with: #define FILTER_LAYER_IPPACKET ((uint64_t) 0) DataHandle HandleType = "Data" // StatsHandle has no filter set and is used to pull total stats from the driver StatsHandle HandleType = "Stats" )
type PerFlowData ¶
type PerFlowData struct { FlowHandle uint64 ProcessId uint64 AddressFamily uint16 Protocol uint16 Flags uint32 LocalAddress [16]uint8 RemoteAddress [16]uint8 PacketsOut uint64 MonotonicSentBytes uint64 TransportBytesOut uint64 PacketsIn uint64 MonotonicRecvBytes uint64 TransportBytesIn uint64 Timestamp uint64 LocalPort uint16 RemotePort uint16 U [32]byte }
func (PerFlowData) TCPFlow ¶
func (f PerFlowData) TCPFlow() *TCPFlowData
TCPFlow returns the TCP-specific flow data
func (PerFlowData) UDPFlow ¶
func (f PerFlowData) UDPFlow() *UDPFlowData
UDPFlow returns the UDP-specific flow data
type Stats ¶
type Stats struct { Handle_stats HandleStats Flow_stats FlowStats Transport_stats TransportStats }
type TCPFlowData ¶
type TransportStats ¶
type UDPFlowData ¶
type UDPFlowData struct {
Reserved uint64
}
Click to show internal directories.
Click to hide internal directories.