Code:
/ DotNET / DotNET / 8.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
- ImageListStreamer.cs
- PersonalizationDictionary.cs
- SqlException.cs
- GridViewColumnCollection.cs
- SiblingIterators.cs
- XsltArgumentList.cs
- DataGridState.cs
- IItemContainerGenerator.cs
- CodeTypeDelegate.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- MatrixAnimationUsingKeyFrames.cs
- NonBatchDirectoryCompiler.cs
- StagingAreaInputItem.cs
- ProviderIncompatibleException.cs
- NullableFloatMinMaxAggregationOperator.cs
- XPathAncestorQuery.cs
- BuildResultCache.cs
- ValidationPropertyAttribute.cs
- ImportFileRequest.cs
- HelpHtmlBuilder.cs
- ExpressionPrefixAttribute.cs
- WCFModelStrings.Designer.cs
- PeerHelpers.cs
- XmlDigitalSignatureProcessor.cs
- ReflectionUtil.cs
- UnauthorizedWebPart.cs
- InlineCollection.cs
- MultiByteCodec.cs
- Tokenizer.cs
- XPathNode.cs
- APCustomTypeDescriptor.cs
- IdentityReference.cs
- VScrollBar.cs
- MarshalByRefObject.cs
- StylusTip.cs
- WebDisplayNameAttribute.cs
- LocalizableAttribute.cs
- CheckBoxList.cs
- AncillaryOps.cs
- codemethodreferenceexpression.cs
- CompressionTransform.cs
- TableRow.cs
- ProcessModule.cs
- MouseGestureConverter.cs
- WeakRefEnumerator.cs
- Timer.cs
- KeyboardDevice.cs
- _NegoStream.cs
- ClientScriptManager.cs
- StreamAsIStream.cs
- ByteConverter.cs
- ClrProviderManifest.cs
- CompressStream.cs
- ContainerSelectorGlyph.cs
- ThreadExceptionEvent.cs
- FloatSumAggregationOperator.cs
- DbgCompiler.cs
- SAPICategories.cs
- Pen.cs
- JpegBitmapEncoder.cs
- WebBrowserContainer.cs
- HtmlElement.cs
- SchemaElementDecl.cs
- _BasicClient.cs
- RequestCacheManager.cs
- ByteAnimation.cs
- OptionalRstParameters.cs
- TrackPointCollection.cs
- SafeTokenHandle.cs
- XhtmlTextWriter.cs
- MSAANativeProvider.cs
- HiddenFieldPageStatePersister.cs
- TextEffect.cs
- RtType.cs
- LogExtent.cs
- EntityContainerAssociationSet.cs
- UIElementHelper.cs
- _ChunkParse.cs
- IPipelineRuntime.cs
- UnsafeNativeMethods.cs
- DataKeyCollection.cs
- KeyTime.cs
- SpellerInterop.cs
- ViewDesigner.cs
- ResizeGrip.cs
- DataErrorValidationRule.cs
- Section.cs
- IssuedTokenClientBehaviorsElement.cs
- VectorCollection.cs
- Stackframe.cs
- ChangeConflicts.cs
- WarningException.cs
- DbConnectionStringBuilder.cs
- RelationshipNavigation.cs
- TypeInfo.cs
- EventToken.cs
- EmissiveMaterial.cs
- ObjectStateFormatter.cs
- UriSection.cs
- ReaderWriterLock.cs