Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- StickyNoteAnnotations.cs
- TextContainerChangeEventArgs.cs
- DataSetUtil.cs
- TraceData.cs
- MergeFailedEvent.cs
- CharUnicodeInfo.cs
- HostingEnvironment.cs
- RunClient.cs
- NotImplementedException.cs
- InstanceDescriptor.cs
- SQLInt64.cs
- ClientScriptManagerWrapper.cs
- DirtyTextRange.cs
- HiddenFieldDesigner.cs
- DataSet.cs
- webbrowsersite.cs
- FeatureAttribute.cs
- IntSecurity.cs
- URLEditor.cs
- TableLayoutStyle.cs
- WindowPatternIdentifiers.cs
- ReversePositionQuery.cs
- PropertyEntry.cs
- TypeConverterAttribute.cs
- ChangeConflicts.cs
- SafeCryptoHandles.cs
- TranslateTransform3D.cs
- Reference.cs
- ContextMenuStrip.cs
- WindowsAuthenticationEventArgs.cs
- CommunicationObject.cs
- ExternalException.cs
- BuildProvider.cs
- SAPICategories.cs
- ToolStripSeparatorRenderEventArgs.cs
- CodeVariableReferenceExpression.cs
- ObjectListCommandCollection.cs
- InvalidateEvent.cs
- EmptyTextWriter.cs
- DesignTableCollection.cs
- StructuredTypeEmitter.cs
- FactoryId.cs
- HashHelper.cs
- AttributeSetAction.cs
- HostingEnvironment.cs
- ListBoxAutomationPeer.cs
- AttributeUsageAttribute.cs
- HttpClientProtocol.cs
- CqlLexerHelpers.cs
- GroupBox.cs
- HostSecurityManager.cs
- ButtonColumn.cs
- LicenseProviderAttribute.cs
- BufferedGraphics.cs
- TriggerBase.cs
- ControllableStoryboardAction.cs
- IPPacketInformation.cs
- MailMessage.cs
- GridViewSortEventArgs.cs
- SemanticResolver.cs
- DelegatingHeader.cs
- NullableLongAverageAggregationOperator.cs
- DecoratedNameAttribute.cs
- TargetException.cs
- DirectoryObjectSecurity.cs
- TextShapeableCharacters.cs
- TextDecorationUnitValidation.cs
- FileReader.cs
- TextPenaltyModule.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- InstanceDescriptor.cs
- Activator.cs
- BindingNavigator.cs
- WebHttpSecurity.cs
- TextServicesPropertyRanges.cs
- ThreadStartException.cs
- FieldDescriptor.cs
- TypeInitializationException.cs
- NonBatchDirectoryCompiler.cs
- ProfileGroupSettingsCollection.cs
- CanExecuteRoutedEventArgs.cs
- IsolatedStorageFilePermission.cs
- XmlProcessingInstruction.cs
- CurrentTimeZone.cs
- PropertyToken.cs
- TextTreeDeleteContentUndoUnit.cs
- Drawing.cs
- DataGridHeaderBorder.cs
- Type.cs
- Rule.cs
- AspNetSynchronizationContext.cs
- Rect3DValueSerializer.cs
- DependencyObjectProvider.cs
- BaseDataListComponentEditor.cs
- OAVariantLib.cs
- RelatedImageListAttribute.cs
- CanonicalFontFamilyReference.cs
- ObjectDataSourceStatusEventArgs.cs
- InternalTypeHelper.cs
- RelatedImageListAttribute.cs