Documentation ¶
Rendered for windows/amd64
Index ¶
- Constants
- Variables
- func GetExtendedTcpTable(pTcpTable uintptr, pdwSize *uint32, bOrder bool, ulAf uint32, ...) (errcode error)
- func GetExtendedUdpTable(pUdpTable uintptr, pdwSize *uint32, bOrder bool, ulAf uint32, ...) (errcode error)
- func GetTcp6Table2(tcpTable PMIB_TCP6TABLE2, bufSize *uint32, order bool) (errcode error)
- func GetTcpTable2(tcpTable PMIB_TCPTABLE2, bufSize *uint32, order bool) (errcode error)
- type IN6_ADDR
- type IN6_ADDR_U
- type MIB_TCP6ROW2
- type MIB_TCP6ROW_OWNER_PID
- type MIB_TCP6TABLE2
- type MIB_TCP6TABLE_OWNER_PID
- type MIB_TCPROW2
- type MIB_TCPROW_OWNER_PID
- type MIB_TCPTABLE2
- type MIB_TCPTABLE_OWNER_PID
- type MIB_TCP_STATE
- type MIB_UDP6ROW_OWNER_PID
- type MIB_UDP6TABLE_OWNER_PID
- type MIB_UDPROW_OWNER_PID
- type MIB_UDPTABLE_OWNER_PID
- type NetStat
- type PMIB_TCP6TABLE2
- type PMIB_TCP6TABLE_OWNER_PID_ALL
- type PMIB_TCPTABLE2
- type PMIB_TCPTABLE_OWNER_PID_ALL
- type PMIB_UDP6TABLE_OWNER_PID
- type PMIB_UDPTABLE_OWNER_PID
- type TCP_CONNECTION_OFFLOAD_STATE
- type TCP_TABLE_CLASS
- type UDP_TABLE_CLASS
Constants ¶
View Source
const ANY_SIZE = 1
Variables ¶
View Source
var TCPStatuses = map[MIB_TCP_STATE]string{
1: "CLOSED",
2: "LISTEN",
3: "SYN_SENT",
4: "SYN_RECEIVED",
5: "ESTABLISHED",
6: "FIN_WAIT_1",
7: "FIN_WAIT_2",
8: "CLOSE_WAIT",
9: "CLOSING",
10: "LAST_ACK",
11: "TIME_WAIT",
12: "DELETE",
}
TCPStatuses https://msdn.microsoft.com/en-us/library/windows/desktop/bb485761(v=vs.85).aspx
Functions ¶
func GetExtendedTcpTable ¶
func GetExtendedUdpTable ¶
func GetTcp6Table2 ¶
func GetTcp6Table2(tcpTable PMIB_TCP6TABLE2, bufSize *uint32, order bool) (errcode error)
func GetTcpTable2 ¶
func GetTcpTable2(tcpTable PMIB_TCPTABLE2, bufSize *uint32, order bool) (errcode error)
Types ¶
type IN6_ADDR ¶
type IN6_ADDR struct {
U IN6_ADDR_U
}
type IN6_ADDR_U ¶
func (*IN6_ADDR_U) GetByte ¶
func (u *IN6_ADDR_U) GetByte() [16]byte
type MIB_TCP6ROW2 ¶
type MIB_TCP6ROW2 struct { LocalAddr IN6_ADDR DwLocalScopeId uint32 DwLocalPort uint32 RemoteAddr IN6_ADDR DwRemoteScopeId uint32 DwRemotePort uint32 State MIB_TCP_STATE DwOwningPid uint32 DwOffloadState TCP_CONNECTION_OFFLOAD_STATE }
type MIB_TCP6ROW_OWNER_PID ¶
type MIB_TCP6TABLE2 ¶
type MIB_TCP6TABLE2 struct { DwNumEntries uint32 Table [ANY_SIZE]MIB_TCP6ROW2 }
type MIB_TCP6TABLE_OWNER_PID ¶
type MIB_TCP6TABLE_OWNER_PID struct { DwNumEntries uint32 Table [ANY_SIZE]MIB_TCP6ROW_OWNER_PID }
type MIB_TCPROW2 ¶
type MIB_TCPROW_OWNER_PID ¶
type MIB_TCPTABLE2 ¶
type MIB_TCPTABLE2 struct { DwNumEntries uint32 Table [ANY_SIZE]MIB_TCPROW2 }
type MIB_TCPTABLE_OWNER_PID ¶
type MIB_TCPTABLE_OWNER_PID struct { DwNumEntries uint32 Table [ANY_SIZE]MIB_TCPROW_OWNER_PID }
type MIB_TCP_STATE ¶
type MIB_TCP_STATE int32
type MIB_UDP6ROW_OWNER_PID ¶
type MIB_UDP6TABLE_OWNER_PID ¶
type MIB_UDP6TABLE_OWNER_PID struct { DwNumEntries uint32 Table [ANY_SIZE]MIB_UDP6ROW_OWNER_PID }
type MIB_UDPROW_OWNER_PID ¶
https://msdn.microsoft.com/en-us/library/windows/desktop/aa365930(v=vs.85).aspx
type MIB_UDPTABLE_OWNER_PID ¶
type MIB_UDPTABLE_OWNER_PID struct { DwNumEntries uint32 Table [ANY_SIZE]MIB_UDPROW_OWNER_PID }
type NetStat ¶
type NetStat struct { LocalAddr string LocalPort uint16 RemoteAddr string RemotePort uint16 OwningPid int State string }
NetStat return a netstat record
func Connections ¶
Connections list all netstats include: tcp tcp6 udp udp6
type PMIB_TCP6TABLE2 ¶
type PMIB_TCP6TABLE2 *MIB_TCP6TABLE2
type PMIB_TCP6TABLE_OWNER_PID_ALL ¶
type PMIB_TCP6TABLE_OWNER_PID_ALL *MIB_TCP6TABLE_OWNER_PID
type PMIB_TCPTABLE2 ¶
type PMIB_TCPTABLE2 *MIB_TCPTABLE2
type PMIB_TCPTABLE_OWNER_PID_ALL ¶
type PMIB_TCPTABLE_OWNER_PID_ALL *MIB_TCPTABLE_OWNER_PID
type PMIB_UDP6TABLE_OWNER_PID ¶
type PMIB_UDP6TABLE_OWNER_PID *MIB_UDP6TABLE_OWNER_PID
type PMIB_UDPTABLE_OWNER_PID ¶
type PMIB_UDPTABLE_OWNER_PID *MIB_UDPTABLE_OWNER_PID
type TCP_CONNECTION_OFFLOAD_STATE ¶
type TCP_CONNECTION_OFFLOAD_STATE int32
const ( TcpConnectionOffloadStateInHost TCP_CONNECTION_OFFLOAD_STATE = iota TcpConnectionOffloadStateOffloading TcpConnectionOffloadStateOffloaded TcpConnectionOffloadStateUploading TcpConnectionOffloadStateMax )
type TCP_TABLE_CLASS ¶
type TCP_TABLE_CLASS int32
const ( TCP_TABLE_BASIC_LISTENER TCP_TABLE_CLASS = iota TCP_TABLE_BASIC_CONNECTIONS TCP_TABLE_BASIC_ALL TCP_TABLE_OWNER_PID_LISTENER TCP_TABLE_OWNER_PID_CONNECTIONS TCP_TABLE_OWNER_PID_ALL TCP_TABLE_OWNER_MODULE_LISTENER TCP_TABLE_OWNER_MODULE_CONNECTIONS TCP_TABLE_OWNER_MODULE_ALL )
type UDP_TABLE_CLASS ¶
type UDP_TABLE_CLASS int32
const ( UDP_TABLE_BASIC UDP_TABLE_CLASS = iota UDP_TABLE_OWNER_PID UDP_TABLE_OWNER_MODULE )
Click to show internal directories.
Click to hide internal directories.