Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / NetworkInformation / PingOptions.cs / 1305376 / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SortedList.cs
- BulletedListEventArgs.cs
- ImageFormat.cs
- ZipIOExtraFieldPaddingElement.cs
- XmlNodeComparer.cs
- SettingsPropertyIsReadOnlyException.cs
- BinHexDecoder.cs
- WebPartDisplayModeCollection.cs
- ProcessingInstructionAction.cs
- X500Name.cs
- LinkLabelLinkClickedEvent.cs
- TextDecorations.cs
- ListParaClient.cs
- EtwTrackingParticipant.cs
- UnsafeNativeMethodsPenimc.cs
- GeometryModel3D.cs
- __Filters.cs
- SelectManyQueryOperator.cs
- ConfigurationManagerHelperFactory.cs
- StackBuilderSink.cs
- NumberSubstitution.cs
- ConstructorBuilder.cs
- BinaryNode.cs
- ResourceExpressionBuilder.cs
- ClientEventManager.cs
- VisualCollection.cs
- WebHttpBinding.cs
- DataQuery.cs
- HtmlElement.cs
- HttpRawResponse.cs
- TextBlock.cs
- ScriptDescriptor.cs
- AssemblyContextControlItem.cs
- X509ThumbprintKeyIdentifierClause.cs
- WindowsHyperlink.cs
- JournalEntryStack.cs
- HwndStylusInputProvider.cs
- EntityProviderServices.cs
- RequestResponse.cs
- RouteValueExpressionBuilder.cs
- BinaryParser.cs
- ConfigurationFileMap.cs
- CodeTypeMember.cs
- DummyDataSource.cs
- AnnotationComponentManager.cs
- HttpPostedFile.cs
- InternalCache.cs
- ItemsControl.cs
- DataListItem.cs
- RecipientInfo.cs
- IdentityModelStringsVersion1.cs
- IdleTimeoutMonitor.cs
- OneToOneMappingSerializer.cs
- Dynamic.cs
- QilXmlReader.cs
- CqlParser.cs
- ExpressionEditor.cs
- ResourceAttributes.cs
- Light.cs
- ResourcePermissionBase.cs
- DiscoveryClientDocuments.cs
- sortedlist.cs
- UrlRoutingHandler.cs
- WebPartDescriptionCollection.cs
- EditorPartDesigner.cs
- EditorPartChrome.cs
- WCFModelStrings.Designer.cs
- MouseCaptureWithinProperty.cs
- Span.cs
- GradientSpreadMethodValidation.cs
- Span.cs
- CodeAccessPermission.cs
- SystemIPInterfaceStatistics.cs
- ValidationSummary.cs
- TreeViewImageIndexConverter.cs
- CultureSpecificStringDictionary.cs
- Pen.cs
- InternalBase.cs
- BindingWorker.cs
- Animatable.cs
- ISFClipboardData.cs
- AppDomainFactory.cs
- GradientStop.cs
- ResourceSet.cs
- HandlerBase.cs
- WindowsFormsHelpers.cs
- WindowsRegion.cs
- DataSpaceManager.cs
- HideDisabledControlAdapter.cs
- ClientSideQueueItem.cs
- SingleResultAttribute.cs
- QuaternionAnimationBase.cs
- CustomErrorsSection.cs
- ContainerControl.cs
- ExistsInCollection.cs
- TrackingServices.cs
- ThemeDictionaryExtension.cs
- ClientTargetSection.cs
- EventDescriptor.cs
- CodeCatchClause.cs