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
- PropertyCollection.cs
- HttpClientChannel.cs
- CoTaskMemHandle.cs
- CompilationSection.cs
- QueryRewriter.cs
- EpmSourcePathSegment.cs
- SelectQueryOperator.cs
- SimplePropertyEntry.cs
- LinqDataSourceDisposeEventArgs.cs
- WebPartActionVerb.cs
- TextRangeBase.cs
- EnumerableCollectionView.cs
- ReliableOutputConnection.cs
- Monitor.cs
- PropertyStore.cs
- SecurityAttributeGenerationHelper.cs
- CheckBoxField.cs
- UndoManager.cs
- CodePageUtils.cs
- SmtpClient.cs
- StringBuilder.cs
- EmptyQuery.cs
- TransformedBitmap.cs
- Attribute.cs
- DataServiceRequestOfT.cs
- DataSysAttribute.cs
- OpenFileDialog.cs
- HMACMD5.cs
- ComponentResourceKey.cs
- ErrorStyle.cs
- TraceProvider.cs
- MobileTemplatedControlDesigner.cs
- TextUtf8RawTextWriter.cs
- ColumnWidthChangedEvent.cs
- ButtonChrome.cs
- EllipseGeometry.cs
- AccessorTable.cs
- WebConfigurationHostFileChange.cs
- HtmlTextArea.cs
- UrlPropertyAttribute.cs
- ConfigurationManagerHelper.cs
- NonSerializedAttribute.cs
- RequestTimeoutManager.cs
- OdbcConnectionOpen.cs
- XmlPropertyBag.cs
- ListViewTableRow.cs
- Separator.cs
- CombinedHttpChannel.cs
- DefaultObjectMappingItemCollection.cs
- CommonObjectSecurity.cs
- ReadContentAsBinaryHelper.cs
- ReflectionHelper.cs
- _UriTypeConverter.cs
- WizardDesigner.cs
- XsltCompileContext.cs
- ContactManager.cs
- LayoutManager.cs
- TextFormatterContext.cs
- RuntimeWrappedException.cs
- XmlObjectSerializerReadContext.cs
- SoapHeaderAttribute.cs
- CultureInfo.cs
- PointCollection.cs
- GiveFeedbackEvent.cs
- XmlRawWriter.cs
- QuaternionAnimation.cs
- LinqMaximalSubtreeNominator.cs
- SafeCancelMibChangeNotify.cs
- DetailsView.cs
- ConfigXmlComment.cs
- BevelBitmapEffect.cs
- CollectionBase.cs
- AtomicFile.cs
- DataGridViewCellLinkedList.cs
- PagerSettings.cs
- XmlSchemaSimpleContent.cs
- CreateUserWizardStep.cs
- IntegerValidator.cs
- FontWeights.cs
- SmiXetterAccessMap.cs
- SelectorItemAutomationPeer.cs
- CompiledAction.cs
- RemotingSurrogateSelector.cs
- ComboBoxRenderer.cs
- XmlQueryTypeFactory.cs
- TileBrush.cs
- CustomValidator.cs
- AutoResetEvent.cs
- CodeTypeDelegate.cs
- PropertyReferenceSerializer.cs
- ListViewCancelEventArgs.cs
- Util.cs
- IList.cs
- StyleSheetComponentEditor.cs
- XslAstAnalyzer.cs
- ExclusiveCanonicalizationTransform.cs
- ExecutedRoutedEventArgs.cs
- ScrollItemPattern.cs
- VectorAnimation.cs
- FlatButtonAppearance.cs