Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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 } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //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 } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- AsyncSerializedWorker.cs
- GB18030Encoding.cs
- CollectionChangeEventArgs.cs
- RefType.cs
- QueryCacheManager.cs
- ObjectMemberMapping.cs
- ControlBuilder.cs
- ChangeBlockUndoRecord.cs
- TraceContextRecord.cs
- SqlCommand.cs
- PerspectiveCamera.cs
- AudioDeviceOut.cs
- SymbolEqualComparer.cs
- SqlDataSourceParameterParser.cs
- CaseStatementSlot.cs
- HttpApplicationFactory.cs
- AsymmetricSignatureDeformatter.cs
- __ConsoleStream.cs
- PackageRelationshipCollection.cs
- HttpModuleCollection.cs
- XmlMtomReader.cs
- ArrayTypeMismatchException.cs
- TranslateTransform.cs
- ParameterCollectionEditorForm.cs
- InheritedPropertyDescriptor.cs
- ScriptBehaviorDescriptor.cs
- DataGrid.cs
- ListView.cs
- ChangeProcessor.cs
- DataRowChangeEvent.cs
- HttpRequestCacheValidator.cs
- WSSecurityOneDotZeroSendSecurityHeader.cs
- DateTimeOffsetAdapter.cs
- RadioButtonRenderer.cs
- CapabilitiesSection.cs
- DispatcherHookEventArgs.cs
- Configuration.cs
- SnapshotChangeTrackingStrategy.cs
- SerializableAttribute.cs
- XmlQueryCardinality.cs
- TextEmbeddedObject.cs
- XmlUtil.cs
- UserControl.cs
- XmlResolver.cs
- XsltSettings.cs
- DBParameter.cs
- ConnectorDragDropGlyph.cs
- ObjectList.cs
- PagerSettings.cs
- ImageListUtils.cs
- StateRuntime.cs
- SqlRecordBuffer.cs
- BindingElement.cs
- UnsafeNativeMethods.cs
- ApplicationServiceManager.cs
- HttpResponseInternalWrapper.cs
- ClosableStream.cs
- AssemblyInfo.cs
- XmlSchemaProviderAttribute.cs
- XmlReturnReader.cs
- ListViewGroup.cs
- PageThemeCodeDomTreeGenerator.cs
- DocumentXmlWriter.cs
- WorkflowControlClient.cs
- DecoderReplacementFallback.cs
- ViewStateModeByIdAttribute.cs
- ObjectStateFormatter.cs
- ContentPosition.cs
- MultiSelectRootGridEntry.cs
- ReservationNotFoundException.cs
- FilterException.cs
- UnknownBitmapDecoder.cs
- DefaultAssemblyResolver.cs
- ContainsRowNumberChecker.cs
- Label.cs
- UpdateProgress.cs
- DetailsViewAutoFormat.cs
- XmlQualifiedNameTest.cs
- baseaxisquery.cs
- TreeWalkHelper.cs
- DataControlLinkButton.cs
- LambdaCompiler.Expressions.cs
- EventLogWatcher.cs
- HttpMethodAttribute.cs
- MenuDesigner.cs
- Rfc2898DeriveBytes.cs
- ComContractElement.cs
- CssTextWriter.cs
- BookmarkCallbackWrapper.cs
- xamlnodes.cs
- Identifier.cs
- ProviderBase.cs
- SevenBitStream.cs
- TemplateControlParser.cs
- DataServiceExpressionVisitor.cs
- Latin1Encoding.cs
- ChangeProcessor.cs
- XPathSelfQuery.cs
- ObservableCollectionDefaultValueFactory.cs
- RepeaterItemCollection.cs