Code:
/ FX-1434 / FX-1434 / 1.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
- TimeSpan.cs
- FunctionImportMapping.cs
- LinqToSqlWrapper.cs
- InputDevice.cs
- UniqueIdentifierService.cs
- WebPartCatalogCloseVerb.cs
- CheckableControlBaseAdapter.cs
- RawAppCommandInputReport.cs
- BamlLocalizableResourceKey.cs
- ResourceContainer.cs
- CheckedListBox.cs
- PropertyKey.cs
- SecurityCookieModeValidator.cs
- BitmapEffectrendercontext.cs
- ClassDataContract.cs
- TypeSemantics.cs
- Membership.cs
- PropertyMapper.cs
- HitTestParameters.cs
- webeventbuffer.cs
- BrowserCapabilitiesCodeGenerator.cs
- DrawingAttributes.cs
- DbProviderServices.cs
- SelectionProcessor.cs
- MessageDecoder.cs
- EntryPointNotFoundException.cs
- RadioButtonList.cs
- VirtualizingPanel.cs
- MimeWriter.cs
- HttpHandlerActionCollection.cs
- XmlUrlResolver.cs
- FrameworkElement.cs
- TemplateBaseAction.cs
- Classification.cs
- FixedSOMFixedBlock.cs
- AtomContentProperty.cs
- RadialGradientBrush.cs
- Lasso.cs
- DependencyPropertyChangedEventArgs.cs
- ToolboxDataAttribute.cs
- Attributes.cs
- BindUriHelper.cs
- LineServicesCallbacks.cs
- EndpointDiscoveryBehavior.cs
- _TimerThread.cs
- Pkcs7Signer.cs
- OdbcRowUpdatingEvent.cs
- ObjectStateFormatter.cs
- ContentElement.cs
- TimerEventSubscription.cs
- CharEnumerator.cs
- IHttpResponseInternal.cs
- XmlUtf8RawTextWriter.cs
- ISFClipboardData.cs
- SerialErrors.cs
- SystemSounds.cs
- XmlDocumentSchema.cs
- NetDispatcherFaultException.cs
- XsltInput.cs
- BaseProcessProtocolHandler.cs
- SynthesizerStateChangedEventArgs.cs
- EdmProperty.cs
- LoaderAllocator.cs
- EncodingNLS.cs
- LongValidatorAttribute.cs
- JsonXmlDataContract.cs
- XmlMemberMapping.cs
- TextTreeTextElementNode.cs
- IdentityManager.cs
- StackOverflowException.cs
- ResourceManager.cs
- ApplicationSettingsBase.cs
- AdornerHitTestResult.cs
- OrCondition.cs
- XmlILConstructAnalyzer.cs
- MiniModule.cs
- SqlDataSourceCache.cs
- InternalBase.cs
- __ComObject.cs
- PropertyGroupDescription.cs
- DispatcherProcessingDisabled.cs
- WebBrowserHelper.cs
- DataContractSerializerMessageContractImporter.cs
- JoinCqlBlock.cs
- MexNamedPipeBindingElement.cs
- SchemeSettingElement.cs
- PersonalizableAttribute.cs
- RegexParser.cs
- KnownBoxes.cs
- DesignerActionService.cs
- httpserverutility.cs
- ErrorHandler.cs
- ReadOnlyDictionary.cs
- SoapTransportImporter.cs
- RuntimeConfigurationRecord.cs
- CodeMemberProperty.cs
- DataGridViewEditingControlShowingEventArgs.cs
- Triplet.cs
- SetIterators.cs
- DescendentsWalker.cs