Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / NetworkInformation / SystemIPGlobalStatistics.cs / 1305376 / SystemIPGlobalStatistics.cs
////// namespace System.Net.NetworkInformation { using System.Net.Sockets; using System; using System.ComponentModel; /// /// Provides support for ip configuation information and statistics. /// /// IP statistics internal class SystemIPGlobalStatistics:IPGlobalStatistics { MibIpStats stats = new MibIpStats(); private SystemIPGlobalStatistics(){ } internal SystemIPGlobalStatistics(AddressFamily family){ uint result; if (!ComNetOS.IsPostWin2K){ if (family!= AddressFamily.InterNetwork){ throw new PlatformNotSupportedException(SR.GetString(SR.WinXPRequired)); } result = UnsafeNetInfoNativeMethods.GetIpStatistics(out stats); } else result = UnsafeNetInfoNativeMethods.GetIpStatisticsEx(out stats, family); if (result != IpHelperErrors.Success) { throw new NetworkInformationException((int)result); } } ///public override bool ForwardingEnabled{get {return stats.forwardingEnabled;}} /// public override int DefaultTtl{get {return (int) stats.defaultTtl;}} /// public override long ReceivedPackets{get {return stats.packetsReceived;}} /// public override long ReceivedPacketsWithHeadersErrors{get {return stats.receivedPacketsWithHeaderErrors;}} /// public override long ReceivedPacketsWithAddressErrors{get {return stats.receivedPacketsWithAddressErrors;}} /// public override long ReceivedPacketsForwarded{get {return stats.packetsForwarded;}} /// public override long ReceivedPacketsWithUnknownProtocol{get {return stats.receivedPacketsWithUnknownProtocols;}} /// public override long ReceivedPacketsDiscarded{get {return stats.receivedPacketsDiscarded;}} /// public override long ReceivedPacketsDelivered{get {return stats.receivedPacketsDelivered;}} /// public override long OutputPacketRequests{get {return stats.packetOutputRequests;}} /// public override long OutputPacketRoutingDiscards{get {return stats.outputPacketRoutingDiscards;}} /// public override long OutputPacketsDiscarded{get {return stats.outputPacketsDiscarded;}} /// public override long OutputPacketsWithNoRoute{get {return stats.outputPacketsWithNoRoute;}} /// public override long PacketReassemblyTimeout{get {return stats.packetReassemblyTimeout;}} /// public override long PacketReassembliesRequired{get {return stats.packetsReassemblyRequired;}} /// public override long PacketsReassembled{get {return stats.packetsReassembled;}} /// public override long PacketReassemblyFailures{get {return stats.packetsReassemblyFailed;}} /// public override long PacketsFragmented{get {return stats.packetsFragmented;}} /// public override long PacketFragmentFailures{get {return stats.packetsFragmentFailed;}} /// public override int NumberOfInterfaces{get {return (int)stats.interfaces;}} /// public override int NumberOfIPAddresses{get {return (int)stats.ipAddresses;}} /// public override int NumberOfRoutes{get {return (int)stats.routes;}} } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- RuntimeConfigLKG.cs
- Msmq.cs
- StructuredTypeEmitter.cs
- SiteMapNodeItemEventArgs.cs
- SessionStateSection.cs
- CdpEqualityComparer.cs
- EmptyCollection.cs
- DataColumnPropertyDescriptor.cs
- EventsTab.cs
- SimpleRecyclingCache.cs
- DotAtomReader.cs
- ToolStripProgressBar.cs
- FormViewDeleteEventArgs.cs
- DisplayInformation.cs
- ControlCodeDomSerializer.cs
- TypeExtensions.cs
- IndexedString.cs
- SafeRightsManagementSessionHandle.cs
- ExceptionUtil.cs
- OptimalBreakSession.cs
- DataGridViewCellContextMenuStripNeededEventArgs.cs
- CommandID.cs
- RangeContentEnumerator.cs
- PersonalizationStateInfo.cs
- DynamicEndpoint.cs
- HttpWebResponse.cs
- DataServiceEntityAttribute.cs
- SortKey.cs
- SerializerProvider.cs
- IsolatedStorageFile.cs
- Profiler.cs
- ContentFilePart.cs
- HtmlInputText.cs
- XsltException.cs
- TextWriterTraceListener.cs
- AvTraceFormat.cs
- TimelineGroup.cs
- DataSourceProvider.cs
- UriSection.cs
- DataObject.cs
- XmlNamespaceMappingCollection.cs
- ContextBase.cs
- AutoResetEvent.cs
- UnmanagedMemoryStream.cs
- StringCollectionEditor.cs
- querybuilder.cs
- ZipIOExtraFieldZip64Element.cs
- LocatorBase.cs
- SerializerProvider.cs
- BitmapEffectOutputConnector.cs
- Restrictions.cs
- DrawTreeNodeEventArgs.cs
- ScriptControlManager.cs
- ToolbarAUtomationPeer.cs
- CodeMemberMethod.cs
- AudioFormatConverter.cs
- CompiledQueryCacheEntry.cs
- ReverseInheritProperty.cs
- BeginEvent.cs
- FormattedText.cs
- TextRunCacheImp.cs
- xmlformatgeneratorstatics.cs
- OleDbRowUpdatingEvent.cs
- NameValuePair.cs
- Win32SafeHandles.cs
- Trigger.cs
- PageAsyncTask.cs
- DataGridColumnCollection.cs
- SamlAudienceRestrictionCondition.cs
- TextStore.cs
- OuterGlowBitmapEffect.cs
- TableRowCollection.cs
- ValidationRule.cs
- RootProjectionNode.cs
- IDictionary.cs
- HotSpot.cs
- GridItemCollection.cs
- ImplicitInputBrush.cs
- ProfileBuildProvider.cs
- IntSecurity.cs
- ISAPIRuntime.cs
- ThemeDirectoryCompiler.cs
- Hashtable.cs
- JsonMessageEncoderFactory.cs
- XmlDeclaration.cs
- SecurityTokenInclusionMode.cs
- ServiceModelActivity.cs
- BitVector32.cs
- DataBoundLiteralControl.cs
- SmtpMail.cs
- NumericUpDownAccelerationCollection.cs
- SystemIPAddressInformation.cs
- FragmentNavigationEventArgs.cs
- WsdlParser.cs
- TableRowCollection.cs
- DataStorage.cs
- SqlCacheDependencyDatabaseCollection.cs
- CuspData.cs
- SelectionChangedEventArgs.cs
- PolicyValidationException.cs