Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Net / System / Net / NetworkInformation / SystemIPGlobalStatistics.cs / 1 / 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;}} } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ButtonBase.cs
- SmiRequestExecutor.cs
- IPAddress.cs
- DateTimeParse.cs
- RightsManagementResourceHelper.cs
- VerificationException.cs
- KeyboardNavigation.cs
- NamedElement.cs
- CodeTypeDeclaration.cs
- SetStoryboardSpeedRatio.cs
- FilteredSchemaElementLookUpTable.cs
- ResourceSet.cs
- login.cs
- ReadContentAsBinaryHelper.cs
- SqlNotificationEventArgs.cs
- QilUnary.cs
- MarkupExtensionSerializer.cs
- ProviderConnectionPoint.cs
- DataKeyCollection.cs
- ModelVisual3D.cs
- ProtectedConfigurationProviderCollection.cs
- DataGridViewButtonCell.cs
- WindowsRegion.cs
- FormViewPagerRow.cs
- ImpersonateTokenRef.cs
- CuspData.cs
- keycontainerpermission.cs
- DependencyPropertyAttribute.cs
- TaiwanCalendar.cs
- Viewport3DAutomationPeer.cs
- ColorMatrix.cs
- UnsafeNativeMethods.cs
- Cursor.cs
- SineEase.cs
- DbXmlEnabledProviderManifest.cs
- DBAsyncResult.cs
- SqlReorderer.cs
- DataGridViewRowCollection.cs
- XmlDownloadManager.cs
- MatrixStack.cs
- AmbientProperties.cs
- PackWebRequest.cs
- HttpHandlerActionCollection.cs
- Compiler.cs
- MessagePartDescription.cs
- RequestCachePolicy.cs
- basenumberconverter.cs
- ButtonBase.cs
- Funcletizer.cs
- EventRoute.cs
- TabletDevice.cs
- SHA512Managed.cs
- SafeNativeMethods.cs
- HashRepartitionStream.cs
- LogRestartAreaEnumerator.cs
- RunWorkerCompletedEventArgs.cs
- TextEditorLists.cs
- ButtonBaseAdapter.cs
- HttpProtocolImporter.cs
- Listbox.cs
- InlineCategoriesDocument.cs
- UnauthorizedAccessException.cs
- DropShadowBitmapEffect.cs
- SafeArrayTypeMismatchException.cs
- DataGridViewColumnConverter.cs
- WebPartAuthorizationEventArgs.cs
- ScriptingJsonSerializationSection.cs
- _LocalDataStore.cs
- PingOptions.cs
- BulletChrome.cs
- KeyInfo.cs
- DataListItemCollection.cs
- ClientBuildManagerCallback.cs
- AsmxEndpointPickerExtension.cs
- CodeIndexerExpression.cs
- _CacheStreams.cs
- ProfileService.cs
- TraceHandler.cs
- RetrieveVirtualItemEventArgs.cs
- XmlSchemaFacet.cs
- Evidence.cs
- SQLBinaryStorage.cs
- CodeValidator.cs
- validation.cs
- LinearQuaternionKeyFrame.cs
- CopyOnWriteList.cs
- OptimizerPatterns.cs
- SQLMoney.cs
- DisplayNameAttribute.cs
- LinqDataSourceUpdateEventArgs.cs
- XmlSubtreeReader.cs
- UniformGrid.cs
- XmlSchemaFacet.cs
- sqlmetadatafactory.cs
- Geometry.cs
- HttpRawResponse.cs
- GregorianCalendar.cs
- ColorMatrix.cs
- DataContractSet.cs
- PenLineCapValidation.cs