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
- Polyline.cs
- ContentElementAutomationPeer.cs
- KeyEvent.cs
- XmlObjectSerializer.cs
- XPathDocumentBuilder.cs
- Wizard.cs
- InternalDispatchObject.cs
- Style.cs
- TableCellAutomationPeer.cs
- CriticalHandle.cs
- HierarchicalDataBoundControl.cs
- RemoteWebConfigurationHostStream.cs
- remotingproxy.cs
- TabPageDesigner.cs
- Interfaces.cs
- ClientSideProviderDescription.cs
- SafeRegistryHandle.cs
- ResXFileRef.cs
- DataConnectionHelper.cs
- JulianCalendar.cs
- ControlDesigner.cs
- TypeGeneratedEventArgs.cs
- ResXResourceWriter.cs
- Int16AnimationUsingKeyFrames.cs
- CommonRemoteMemoryBlock.cs
- PriorityBinding.cs
- NavigationEventArgs.cs
- EntityDataSourceDesignerHelper.cs
- SpecialNameAttribute.cs
- Configuration.cs
- Localizer.cs
- DecoderFallbackWithFailureFlag.cs
- DesignerExtenders.cs
- RelatedView.cs
- Axis.cs
- AvTraceFormat.cs
- EdgeModeValidation.cs
- SelectionList.cs
- ClearTypeHintValidation.cs
- CalendarDay.cs
- BidPrivateBase.cs
- SiteMapPathDesigner.cs
- Point3DAnimationBase.cs
- ReflectionUtil.cs
- PointHitTestResult.cs
- ScriptManager.cs
- WsatAdminException.cs
- PropertyCollection.cs
- Geometry.cs
- HitTestResult.cs
- InvokeMethodDesigner.xaml.cs
- GridViewColumn.cs
- ExpressionWriter.cs
- HostExecutionContextManager.cs
- HttpHandlersSection.cs
- DataSourceControl.cs
- DataGridViewRow.cs
- RoleManagerEventArgs.cs
- ISSmlParser.cs
- DtdParser.cs
- ViewStateException.cs
- VideoDrawing.cs
- Environment.cs
- BindingBase.cs
- Button.cs
- DataGridTemplateColumn.cs
- TextElement.cs
- PerformanceCounterPermissionEntryCollection.cs
- InputProcessorProfilesLoader.cs
- ContentElementAutomationPeer.cs
- EntityContainerAssociationSet.cs
- DataObjectFieldAttribute.cs
- StreamInfo.cs
- TreeBuilderBamlTranslator.cs
- IISUnsafeMethods.cs
- UriTemplateVariableQueryValue.cs
- SoapAttributes.cs
- OciHandle.cs
- InProcStateClientManager.cs
- ComEventsMethod.cs
- WebPartTransformerCollection.cs
- TimeoutValidationAttribute.cs
- Utilities.cs
- ConnectionStringSettings.cs
- DefaultTextStore.cs
- IdentitySection.cs
- FocusChangedEventArgs.cs
- RoutedUICommand.cs
- DataExpression.cs
- SqlUtil.cs
- RoutingBehavior.cs
- Rotation3D.cs
- PathParser.cs
- Command.cs
- ModelItem.cs
- CacheDependency.cs
- PreProcessor.cs
- BuilderInfo.cs
- TrustManagerPromptUI.cs
- FormattedTextSymbols.cs