Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Net / System / Net / NetworkInformation / PingOptions.cs / 1 / PingOptions.cs
//determines which options will be used for sending icmp requests, as well as what options //were set in the returned icmp reply. namespace System.Net.NetworkInformation { // Represent the possible ip options used for the icmp packet public class PingOptions { const int DontFragmentFlag = 2; int ttl = 128; bool dontFragment; internal PingOptions (IPOptions options) { this.ttl = options.ttl; this.dontFragment = ((options.flags & DontFragmentFlag) > 0 ? true : false); } public PingOptions (int ttl, bool dontFragment) { if (ttl <= 0) { throw new ArgumentOutOfRangeException("ttl"); } this.ttl = ttl; this.dontFragment = dontFragment; } public PingOptions () { } public int Ttl { get { return ttl; } set { if (value <= 0) { throw new ArgumentOutOfRangeException("value"); } ttl = value; //useful to discover routes } } public bool DontFragment { get { return dontFragment; } set { dontFragment = value; //useful for discovering mtu } } } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- RelatedView.cs
- CodeDOMProvider.cs
- COM2EnumConverter.cs
- EnumMember.cs
- ErrorFormatterPage.cs
- AttachedProperty.cs
- IndexerNameAttribute.cs
- DataKey.cs
- ChangeTracker.cs
- SelectedCellsCollection.cs
- XPathItem.cs
- cache.cs
- MemoryRecordBuffer.cs
- formatstringdialog.cs
- JsonStringDataContract.cs
- GB18030Encoding.cs
- Transform.cs
- BaseTemplateBuildProvider.cs
- ExpressionHelper.cs
- SystemDiagnosticsSection.cs
- ContextTokenTypeConverter.cs
- VisualStyleTypesAndProperties.cs
- ItemsControl.cs
- CodeAttributeDeclarationCollection.cs
- Atom10FeedFormatter.cs
- ScriptingProfileServiceSection.cs
- ProcessRequestArgs.cs
- SqlDataSourceCache.cs
- DesignerVerbCollection.cs
- XmlSerializationReader.cs
- OptimalBreakSession.cs
- MatrixTransform3D.cs
- CultureInfoConverter.cs
- KnownTypesHelper.cs
- DPTypeDescriptorContext.cs
- DataKey.cs
- securitycriticaldataformultiplegetandset.cs
- WebPartTracker.cs
- FilterQuery.cs
- GenerateTemporaryTargetAssembly.cs
- DeflateStreamAsyncResult.cs
- EntityDataSourceWrapper.cs
- ButtonAutomationPeer.cs
- CommandID.cs
- GridViewDeleteEventArgs.cs
- CustomWebEventKey.cs
- DataGridPageChangedEventArgs.cs
- DateTimeValueSerializerContext.cs
- KeyConverter.cs
- SelectionUIService.cs
- CommunicationObject.cs
- DeflateStream.cs
- Win32MouseDevice.cs
- StyleBamlRecordReader.cs
- GlyphRun.cs
- wgx_exports.cs
- LinqDataSourceInsertEventArgs.cs
- CommandValueSerializer.cs
- WithStatement.cs
- XPathAncestorQuery.cs
- MarshalByValueComponent.cs
- XmlDownloadManager.cs
- RegexWorker.cs
- CommandLibraryHelper.cs
- CaseCqlBlock.cs
- PropertyValueChangedEvent.cs
- Converter.cs
- RecipientServiceModelSecurityTokenRequirement.cs
- RectangleHotSpot.cs
- EncodingTable.cs
- CodeParameterDeclarationExpressionCollection.cs
- PageFunction.cs
- Mapping.cs
- WebSysDisplayNameAttribute.cs
- ExpandCollapsePattern.cs
- XXXOnTypeBuilderInstantiation.cs
- MutexSecurity.cs
- PerformanceCounterPermission.cs
- AdapterSwitches.cs
- ServiceChannelProxy.cs
- ParameterModifier.cs
- AutoScrollExpandMessageFilter.cs
- PropertyChangedEventArgs.cs
- ConstrainedDataObject.cs
- SettingsPropertyWrongTypeException.cs
- ResizeGrip.cs
- SingleConverter.cs
- BinaryFormatter.cs
- HostProtectionException.cs
- DataGridCommandEventArgs.cs
- PageParser.cs
- CreateParams.cs
- ZipIOFileItemStream.cs
- PrintingPermission.cs
- FormatterConverter.cs
- TableNameAttribute.cs
- DataGridRowHeaderAutomationPeer.cs
- SessionStateSection.cs
- DataGridViewCellValidatingEventArgs.cs
- basecomparevalidator.cs