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
- GeneralTransform3D.cs
- ReachDocumentReferenceCollectionSerializerAsync.cs
- TabControl.cs
- VectorAnimation.cs
- ScopedKnownTypes.cs
- RightsManagementUser.cs
- SapiRecoContext.cs
- DynamicILGenerator.cs
- DataGridColumnCollection.cs
- OdbcParameterCollection.cs
- NullableFloatSumAggregationOperator.cs
- EntityViewGenerationAttribute.cs
- SettingsPropertyValueCollection.cs
- Error.cs
- ElasticEase.cs
- ObjectDataSourceFilteringEventArgs.cs
- DataSetUtil.cs
- ArgumentReference.cs
- BypassElementCollection.cs
- AncillaryOps.cs
- FontFamily.cs
- DrawingContextDrawingContextWalker.cs
- WindowAutomationPeer.cs
- LocalizableResourceBuilder.cs
- XmlWrappingWriter.cs
- JoinGraph.cs
- FillErrorEventArgs.cs
- IconBitmapDecoder.cs
- MarkupObject.cs
- SeverityFilter.cs
- CngKeyCreationParameters.cs
- ForeignKeyConstraint.cs
- TypeConverterHelper.cs
- SafeTokenHandle.cs
- EventLogEntryCollection.cs
- TreeWalker.cs
- AvtEvent.cs
- Int32Collection.cs
- ContentFileHelper.cs
- RestHandlerFactory.cs
- ProviderBase.cs
- SqlVisitor.cs
- PolicyUtility.cs
- HitTestFilterBehavior.cs
- NumericPagerField.cs
- CloseCollectionAsyncResult.cs
- ConfigurationProperty.cs
- XmlDeclaration.cs
- BindingContext.cs
- versioninfo.cs
- TextDecorations.cs
- AppDomainEvidenceFactory.cs
- InvariantComparer.cs
- OdbcEnvironmentHandle.cs
- BamlLocalizer.cs
- XmlEventCache.cs
- ToolStripRenderer.cs
- DataGridViewImageColumn.cs
- IOThreadTimer.cs
- BitmapEffect.cs
- Menu.cs
- RegexCapture.cs
- RequestCacheValidator.cs
- ContainerSelectorBehavior.cs
- TemplateManager.cs
- DropSource.cs
- ConfigurationElement.cs
- LogicalTreeHelper.cs
- Number.cs
- DataGridViewRowContextMenuStripNeededEventArgs.cs
- IssuedTokenParametersElement.cs
- TextSelectionHighlightLayer.cs
- SystemResourceKey.cs
- SQLStringStorage.cs
- IntSecurity.cs
- LocalServiceSecuritySettingsElement.cs
- ShapeTypeface.cs
- InheritanceContextHelper.cs
- GeometryModel3D.cs
- _NestedSingleAsyncResult.cs
- ContainerFilterService.cs
- DbLambda.cs
- MailAddressCollection.cs
- SQLDecimalStorage.cs
- HttpListenerException.cs
- NotCondition.cs
- LoginCancelEventArgs.cs
- ArgIterator.cs
- ProjectionCamera.cs
- DataServiceRequest.cs
- AttributeProviderAttribute.cs
- OneWayChannelFactory.cs
- SQLInt64Storage.cs
- AssociatedControlConverter.cs
- ComponentSerializationService.cs
- TagPrefixInfo.cs
- DataStorage.cs
- ModuleElement.cs
- IERequestCache.cs
- Utils.cs