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
- TreeNodeClickEventArgs.cs
- SessionIDManager.cs
- TitleStyle.cs
- Encoder.cs
- MexHttpsBindingCollectionElement.cs
- MimePart.cs
- EventHandlerList.cs
- OdbcPermission.cs
- RedirectionProxy.cs
- XmlILAnnotation.cs
- LinkConverter.cs
- BuildManagerHost.cs
- UserControlBuildProvider.cs
- Screen.cs
- EventEntry.cs
- CompositeActivityTypeDescriptorProvider.cs
- sqlmetadatafactory.cs
- TextBoxView.cs
- OrderedEnumerableRowCollection.cs
- DataExpression.cs
- WhitespaceRuleLookup.cs
- Context.cs
- RestrictedTransactionalPackage.cs
- SqlTypesSchemaImporter.cs
- webproxy.cs
- TableDesigner.cs
- JsonEnumDataContract.cs
- ErrorLog.cs
- SelectionRange.cs
- MenuCommand.cs
- AssemblyInfo.cs
- TypeSystem.cs
- WebPartDescriptionCollection.cs
- TryCatch.cs
- AssociationSetMetadata.cs
- InfoCardCryptoHelper.cs
- TextContainerChangeEventArgs.cs
- ElementsClipboardData.cs
- WebEventCodes.cs
- SimpleBitVector32.cs
- InboundActivityHelper.cs
- BindToObject.cs
- CultureSpecificCharacterBufferRange.cs
- ListViewVirtualItemsSelectionRangeChangedEvent.cs
- TypeUnloadedException.cs
- CodeValidator.cs
- MergablePropertyAttribute.cs
- TypeContext.cs
- ElementsClipboardData.cs
- Vector3DConverter.cs
- MatrixUtil.cs
- ProtocolsSection.cs
- LightweightCodeGenerator.cs
- dsa.cs
- DataListItemCollection.cs
- ResolveNameEventArgs.cs
- _TLSstream.cs
- InstanceKeyCollisionException.cs
- InvalidateEvent.cs
- TreeNodeConverter.cs
- ImageFormatConverter.cs
- FixedSOMPageElement.cs
- DynamicValueConverter.cs
- FtpWebResponse.cs
- ImageEditor.cs
- GridViewDeletedEventArgs.cs
- ConfigsHelper.cs
- IListConverters.cs
- NullExtension.cs
- PartialTrustVisibleAssembliesSection.cs
- XmlUrlResolver.cs
- Odbc32.cs
- TextBoxBase.cs
- AutomationIdentifierGuids.cs
- StatusBar.cs
- OutputChannel.cs
- ProfileProvider.cs
- figurelengthconverter.cs
- NativeMethods.cs
- PropagatorResult.cs
- NextPreviousPagerField.cs
- RequiredAttributeAttribute.cs
- MetadataHelper.cs
- FileSystemInfo.cs
- DbConnectionHelper.cs
- WebPartCatalogCloseVerb.cs
- EncryptedPackage.cs
- RuntimeResourceSet.cs
- WebPartUtil.cs
- TreeWalkHelper.cs
- DeploymentSectionCache.cs
- GridViewUpdatedEventArgs.cs
- WorkflowService.cs
- ProbeMatchesApril2005.cs
- Emitter.cs
- OptimizedTemplateContentHelper.cs
- ArithmeticException.cs
- HtmlTextArea.cs
- GetPageCompletedEventArgs.cs
- COM2ComponentEditor.cs