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
- Compress.cs
- Typography.cs
- HWStack.cs
- SchemaImporterExtensionElement.cs
- Polyline.cs
- WebDescriptionAttribute.cs
- ChangeInterceptorAttribute.cs
- SecurityPermission.cs
- RadioButtonFlatAdapter.cs
- TextDecoration.cs
- EncoderBestFitFallback.cs
- StreamAsIStream.cs
- GridLength.cs
- ListItemCollection.cs
- XpsSerializationManagerAsync.cs
- SizeLimitedCache.cs
- StringPropertyBuilder.cs
- FeatureManager.cs
- MetadataProperty.cs
- SerTrace.cs
- MessageHeaderT.cs
- GridViewUpdatedEventArgs.cs
- Transform3DGroup.cs
- ListenerSingletonConnectionReader.cs
- NameObjectCollectionBase.cs
- MediaElement.cs
- ActiveXMessageFormatter.cs
- EdmScalarPropertyAttribute.cs
- PropertyReferenceSerializer.cs
- ArgIterator.cs
- CompileLiteralTextParser.cs
- WebPartMovingEventArgs.cs
- TextShapeableCharacters.cs
- TextServicesManager.cs
- BrushProxy.cs
- TextElementAutomationPeer.cs
- ValidatedControlConverter.cs
- ControlEvent.cs
- MsmqBindingElementBase.cs
- DispatchWrapper.cs
- RawStylusActions.cs
- MessageHeaderDescriptionCollection.cs
- ZipFileInfo.cs
- OleCmdHelper.cs
- CodeNamespaceCollection.cs
- UIElementAutomationPeer.cs
- ConfigurationException.cs
- ReadOnlyDictionary.cs
- DetailsViewCommandEventArgs.cs
- WinHttpWebProxyFinder.cs
- Base64Encoder.cs
- BindUriHelper.cs
- DataGridToolTip.cs
- X509ImageLogo.cs
- NullableFloatAverageAggregationOperator.cs
- RotateTransform.cs
- EntityDataSourceReferenceGroup.cs
- DataTablePropertyDescriptor.cs
- Int16AnimationUsingKeyFrames.cs
- contentDescriptor.cs
- linebase.cs
- IntSecurity.cs
- InputMethodStateChangeEventArgs.cs
- ListMarkerSourceInfo.cs
- MaskedTextProvider.cs
- ListViewInsertEventArgs.cs
- XmlNodeWriter.cs
- x509utils.cs
- Brush.cs
- IntegerValidatorAttribute.cs
- DocumentCollection.cs
- SchemaNamespaceManager.cs
- WebScriptServiceHost.cs
- InvalidAsynchronousStateException.cs
- SingleResultAttribute.cs
- SymmetricKey.cs
- Error.cs
- DataGridParentRows.cs
- WebPartUserCapability.cs
- EventInfo.cs
- UnsafeNativeMethods.cs
- SemaphoreFullException.cs
- DynamicDiscoSearcher.cs
- SoapHeaderAttribute.cs
- DrawingImage.cs
- XmlDataProvider.cs
- SizeAnimationBase.cs
- UpdatePanelTrigger.cs
- DataSourceControl.cs
- MexHttpsBindingElement.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- MemoryFailPoint.cs
- RemotingAttributes.cs
- DependencyPropertyValueSerializer.cs
- Formatter.cs
- SourceFilter.cs
- GridSplitterAutomationPeer.cs
- SchemaElementDecl.cs
- ServiceHttpHandlerFactory.cs
- FocusTracker.cs