Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

Add additional Network.Host methods. #414

Merged
merged 29 commits into from
Feb 22, 2018
Merged

Add additional Network.Host methods. #414

merged 29 commits into from
Feb 22, 2018

Conversation

Yomodo
Copy link
Collaborator

@Yomodo Yomodo commented Feb 5, 2018

Network List Manager

I think this is a useful addition to AlphaFS.Network.Host class as it offers easy
enumeration of networks and/or network connections on the local host.

These methods (with a few overloaded methods) are added:

AlphaFS.Network.Host.EnumerateNetworks
AlphaFS.Network.Host.GetNetwork

AlphaFS.Network.Host.EnumerateNetworkConnections
AlphaFS.Network.Host.GetNetworkConnection

which provides us the following information:

Network: [ChinaWall]

Instance: [Alphaleonis.Win32.Network.NetworkInfo]

#001	Category              = [Public]
#002	Connections           = [Alphaleonis.Win32.Network.NetworkInfo+<get_Connections>d__5]
#003	ConnectionTime        = [05/02/2018 14:15:44]
#004	ConnectionTimeUtc     = [05/02/2018 13:15:44]
#005	Connectivity          = [IPv6NoTraffic, IPv4Internet]
#006	CreationTime          = [09/01/2018 19:36:43]
#007	CreationTimeUtc       = [09/01/2018 18:36:43]
#008	Description           = [Network]
#009	DomainType            = [None]
#010	IsConnected           = [True]
#011	IsConnectedToInternet = [True]
#012	Name                  = [ChinaWall]
#013	NetworkID             = [e773761b-6883-4598-898f-05f83e9d0454]

	Instance: [Alphaleonis.Win32.Network.NetworkConnectionInfo]

	#001	AdapterDescription    = [Intel(R) Dual Band Wireless-AC 8265]
	#002	AdapterID             = [70383d57-b8b4-48be-a3e0-732b7967fb5e]
	#003	AdapterName           = [Wi-Fi]
	#004	ConnectionID          = [0081c770-acf7-d4e6-f980-8a00a9884fff]
	#005	Connectivity          = [IPv6NoTraffic, IPv4Internet]
	#006	DomainType            = [None]
	#007	IsConnected           = [True]
	#008	IsConnectedToInternet = [True]
	#009	NetworkInfo           = [Alphaleonis.Win32.Network.NetworkInfo]

	Instance: [Alphaleonis.Win32.Network.NetworkConnectionInfo]

	#001	AdapterDescription    = [Intel(R) Ethernet Connection (4) I219-LM]
	#002	AdapterID             = [64e56567-4b1b-43dc-8512-7eba57321079]
	#003	AdapterName           = [My Ethernet Adapter]
	#004	ConnectionID          = [005a925e-7188-7bf2-0ae2-81008f7a426e]
	#005	Connectivity          = [IPv6NoTraffic, IPv4Internet]
	#006	DomainType            = [None]
	#007	IsConnected           = [True]
	#008	IsConnectedToInternet = [True]
	#009	NetworkInfo           = [Alphaleonis.Win32.Network.NetworkInfo]

@Yomodo Yomodo added this to the Release 2.2 milestone Feb 5, 2018
@Yomodo Yomodo requested a review from alphaleonis February 5, 2018 18:24
@Yomodo
Copy link
Collaborator Author

Yomodo commented Feb 10, 2018

Added Host.GetServerStatistics using NetStatisticsGet for Server service:

Instance: [Alphaleonis.Win32.Network.ServerStatisticsInfo]

#001	AccessPermissionErrors = [52580]
#002	AverageResponseTime    = [00:00:00]
#003	BufferAllocationFailed = [0]
#004	BufferRequestFailed    = [0]
#005	BytesReceived          = [86805172906]
#006	BytesReceivedUnitSize  = [80,84 GB]
#007	BytesSent              = [11896408547]
#008	BytesSentUnitSize      = [11,08 GB]
#009	DevicesOpened          = [0]
#010	FilesOpened            = [9289551]
#011	HostName               = [DESKTOP-123]
#012	JobsQueued             = [0]
#013	PasswordViolations     = [0]
#014	SessionsFailed         = [0]
#015	SessionsStarted        = [1]
#016	SessionsTimedOut       = [0]
#017	StatisticsStartTime    = [10/02/2018 14:26:50]
#018	StatisticsStartTimeUtc = [10/02/2018 13:26:50]
#019	SystemErrors           = [0]

@Yomodo
Copy link
Collaborator Author

Yomodo commented Feb 10, 2018

Added Host.GetWorkstationStatistics using NetStatisticsGet for Workstation service:

Instance: [Alphaleonis.Win32.Network.WorkstationStatisticsInfo]

#001	BytesReceived                        = [11897343259]
#002	BytesReceivedUnitSize                = [11,08 GB]
#003	BytesTransmitted                     = [86805206919]
#004	BytesTransmittedUnitSize             = [80,84 GB]
#005	CacheReadBytesRequested              = [76291102963]
#006	CacheReadBytesRequestedUnitSize      = [71,05 GB]
#007	CacheWriteBytesRequested             = [74204864229]
#008	CacheWriteBytesRequestedUnitSize     = [69,11 GB]
#009	CoreConnects                         = [0]
#010	CurrentCommands                      = [0]
#011	FailedCompletionOperations           = [0]
#012	FailedSessions                       = [0]
#013	FailedUseCount                       = [0]
#014	HostName                             = [DESKTOP-123]
#015	HungSessions                         = [0]
#016	InitiallyFailedOperations            = [0]
#017	Lanman20Connects                     = [0]
#018	Lanman21Connects                     = [0]
#019	LanmanNtConnects                     = [0]
#020	LargeReadSmbs                        = [0]
#021	LargeWriteSmbs                       = [0]
#022	NetworkErrors                        = [192]
#023	NetworkReadBytesRequested            = [76302972328]
#024	NetworkReadBytesRequestedUnitSize    = [71,06 GB]
#025	NetworkWriteBytesRequested           = [74204864229]
#026	NetworkWriteBytesRequestedUnitSize   = [69,11 GB]
#027	NonPagingReadBytesRequested          = [0]
#028	NonPagingReadBytesRequestedUnitSize  = [0 B]
#029	NonPagingWriteBytesRequested         = [0]
#030	NonPagingWriteBytesRequestedUnitSize = [0 B]
#031	PagingReadBytesRequested             = [15105024]
#032	PagingReadBytesRequestedUnitSize     = [14,41 MB]
#033	PagingWriteBytesRequested            = [0]
#034	PagingWriteBytesRequestedUnitSize    = [0 B]
#035	RandomReadOperations                 = [7800]
#036	RandomWriteOperations                = [2678]
#037	RawReadsDenied                       = [0]
#038	RawWritesDenied                      = [0]
#039	ReadOperations                       = [163918]
#040	ReadSmbs                             = [0]
#041	Reconnects                           = [0]
#042	ServerDisconnects                    = [2]
#043	Sessions                             = [0]
#044	SmallReadSmbs                        = [0]
#045	SmallWriteSmbs                       = [0]
#046	SmbsReceived                         = [8137]
#047	SmbsTransmitted                      = [0]
#048	StatisticsStartTime                  = [19/01/2018 09:07:52]
#049	StatisticsStartTimeUtc               = [19/01/2018 08:07:52]
#050	UseCount                             = [126746]
#051	WriteOperations                      = [304155]
#052	WriteSmbs                            = [0]

@Yomodo Yomodo changed the title Implement Network List Manager API's Add additional Network.Host methods. Feb 10, 2018
@Yomodo Yomodo self-assigned this Feb 10, 2018
@Yomodo Yomodo merged commit 1a2ff12 into develop Feb 22, 2018
@Yomodo Yomodo deleted the NetworkConnection branch February 22, 2018 18:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant