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
- CollectionEditor.cs
- DeclarativeExpressionConditionDeclaration.cs
- AsyncOperation.cs
- SecurityAlgorithmSuiteConverter.cs
- UpdateProgress.cs
- StatusBar.cs
- Variant.cs
- InputScopeNameConverter.cs
- ClientSponsor.cs
- AutomationPatternInfo.cs
- ValidationSummary.cs
- PropertyEmitterBase.cs
- StandardBindingElement.cs
- HitTestParameters3D.cs
- BaseValidator.cs
- DbConnectionPoolOptions.cs
- PrinterUnitConvert.cs
- WindowsGraphics.cs
- CallSiteBinder.cs
- COM2ExtendedTypeConverter.cs
- BindingExpressionBase.cs
- ActivityContext.cs
- ExtendedPropertyDescriptor.cs
- DataSourceCollectionBase.cs
- QueryCorrelationInitializer.cs
- ForeignConstraint.cs
- ConfigXmlAttribute.cs
- CodeEntryPointMethod.cs
- VirtualPathUtility.cs
- HttpHandlersSection.cs
- DesignerLinkAdapter.cs
- CalendarBlackoutDatesCollection.cs
- InvalidEnumArgumentException.cs
- MarkupCompiler.cs
- OutArgument.cs
- _AuthenticationState.cs
- X509Extension.cs
- StreamingContext.cs
- XmlSchemaInclude.cs
- ListGeneralPage.cs
- PathHelper.cs
- RestHandler.cs
- Camera.cs
- TriggerAction.cs
- UnionCodeGroup.cs
- SourceSwitch.cs
- ProxyAttribute.cs
- ConnectionPointCookie.cs
- CodeArrayIndexerExpression.cs
- TextTreeUndoUnit.cs
- IsolatedStorageFileStream.cs
- GeometryConverter.cs
- QuaternionAnimation.cs
- DiscreteKeyFrames.cs
- BatchWriter.cs
- SessionEndedEventArgs.cs
- SpecialFolderEnumConverter.cs
- WebEvents.cs
- XsdDuration.cs
- ErrorWrapper.cs
- Tablet.cs
- BinarySerializer.cs
- MouseButtonEventArgs.cs
- GroupBoxAutomationPeer.cs
- EnumBuilder.cs
- RightsManagementProvider.cs
- HtmlWindow.cs
- ThicknessConverter.cs
- TreePrinter.cs
- KerberosRequestorSecurityToken.cs
- StylusOverProperty.cs
- NaturalLanguageHyphenator.cs
- SimpleWorkerRequest.cs
- DataGridViewCellParsingEventArgs.cs
- ClientConvert.cs
- HandledEventArgs.cs
- EncryptedHeader.cs
- DelayedRegex.cs
- CorrelationQuery.cs
- DocumentOrderComparer.cs
- FileDialogPermission.cs
- FileNotFoundException.cs
- JsonXmlDataContract.cs
- AssemblyCache.cs
- FunctionOverloadResolver.cs
- SolidBrush.cs
- SqlConnection.cs
- DrawingAttributeSerializer.cs
- TrackBarDesigner.cs
- PrimitiveType.cs
- SchemaCreator.cs
- FlowLayout.cs
- SqlRowUpdatingEvent.cs
- RadioButton.cs
- SupportsEventValidationAttribute.cs
- HScrollBar.cs
- HttpInputStream.cs
- MetadataItem_Static.cs
- PagerSettings.cs
- IpcManager.cs