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
- HtmlInputFile.cs
- DbProviderFactories.cs
- FunctionParameter.cs
- ColumnCollection.cs
- sqlstateclientmanager.cs
- MdImport.cs
- ClientSettingsStore.cs
- BCryptHashAlgorithm.cs
- ObjectFullSpanRewriter.cs
- SamlDoNotCacheCondition.cs
- DPTypeDescriptorContext.cs
- OSEnvironmentHelper.cs
- TextTreeUndo.cs
- DataGridViewComboBoxColumn.cs
- EmptyCollection.cs
- UrlAuthFailedErrorFormatter.cs
- ProcessHostMapPath.cs
- DataBoundControl.cs
- RoutingExtension.cs
- List.cs
- UInt64.cs
- OptionalRstParameters.cs
- TypefaceCollection.cs
- FaultDescriptionCollection.cs
- DataGridViewColumnConverter.cs
- ProtocolInformationReader.cs
- ClientBuildManagerTypeDescriptionProviderBridge.cs
- AdditionalEntityFunctions.cs
- XPathDocumentIterator.cs
- EmptyEnumerable.cs
- NavigateEvent.cs
- StorageComplexPropertyMapping.cs
- MetaData.cs
- WindowsGrip.cs
- ImageAttributes.cs
- ToolboxDataAttribute.cs
- DivideByZeroException.cs
- CodeDelegateCreateExpression.cs
- SafeUserTokenHandle.cs
- PolicyAssertionCollection.cs
- AuthenticationException.cs
- QueueNameHelper.cs
- DbBuffer.cs
- DataGridCaption.cs
- ReferencedType.cs
- DataRecord.cs
- Persist.cs
- RegexCode.cs
- TypeGeneratedEventArgs.cs
- HtmlButton.cs
- SqlClientMetaDataCollectionNames.cs
- ConstructorBuilder.cs
- BaseParaClient.cs
- GlobalEventManager.cs
- MethodRental.cs
- MasterPageCodeDomTreeGenerator.cs
- TextBoxDesigner.cs
- ListSortDescription.cs
- LineSegment.cs
- HttpGetProtocolImporter.cs
- DefaultValueAttribute.cs
- RepeatInfo.cs
- HtmlPanelAdapter.cs
- CheckBoxFlatAdapter.cs
- MiniParameterInfo.cs
- EventMappingSettings.cs
- SqlDependency.cs
- ParameterCollection.cs
- StrokeNodeData.cs
- FileResponseElement.cs
- TrackingLocation.cs
- DataGridHeaderBorder.cs
- TextEditorTables.cs
- SpellerError.cs
- StandardCommands.cs
- ExportOptions.cs
- AuthenticationModuleElement.cs
- EnumDataContract.cs
- SystemBrushes.cs
- TextServicesDisplayAttribute.cs
- WebPartMenu.cs
- MouseGestureValueSerializer.cs
- MessageQuerySet.cs
- DynamicValidatorEventArgs.cs
- SessionPageStateSection.cs
- AutoScrollHelper.cs
- TextEditorMouse.cs
- AutoCompleteStringCollection.cs
- CacheMemory.cs
- OciEnlistContext.cs
- ClusterRegistryConfigurationProvider.cs
- ExceptionValidationRule.cs
- DesignerDataParameter.cs
- MaskedTextProvider.cs
- InputScope.cs
- ResumeStoryboard.cs
- SubqueryTrackingVisitor.cs
- ApplicationFileParser.cs
- DivideByZeroException.cs
- StyleBamlRecordReader.cs