Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- XmlSerializerFactory.cs
- InnerItemCollectionView.cs
- PositiveTimeSpanValidator.cs
- ReadWriteObjectLock.cs
- SrgsSemanticInterpretationTag.cs
- Accessible.cs
- WorkflowMarkupSerializationProvider.cs
- _SslSessionsCache.cs
- XmlIterators.cs
- CultureTableRecord.cs
- HandlerWithFactory.cs
- StringPropertyBuilder.cs
- StatementContext.cs
- ViewStateException.cs
- GeneralTransform.cs
- LambdaCompiler.Generated.cs
- SafeNativeMethods.cs
- wgx_commands.cs
- RecordConverter.cs
- CompoundFileIOPermission.cs
- LabelDesigner.cs
- regiisutil.cs
- InputProcessorProfiles.cs
- C14NUtil.cs
- FileDialog_Vista_Interop.cs
- ValueTypeFixupInfo.cs
- WebColorConverter.cs
- TdsRecordBufferSetter.cs
- Point3DCollection.cs
- ModelVisual3D.cs
- FrameworkElement.cs
- ReferentialConstraint.cs
- Part.cs
- SubpageParaClient.cs
- CoordinationService.cs
- UseManagedPresentationElement.cs
- Location.cs
- SessionStateContainer.cs
- Polygon.cs
- PageCatalogPartDesigner.cs
- ObjectMemberMapping.cs
- SafeNativeMethods.cs
- GenericParameterDataContract.cs
- Ops.cs
- Scene3D.cs
- UiaCoreApi.cs
- Condition.cs
- CodeDomComponentSerializationService.cs
- ProtectedConfigurationSection.cs
- UriSection.cs
- ErrorHandler.cs
- SpeechDetectedEventArgs.cs
- parserscommon.cs
- WebProxyScriptElement.cs
- HierarchicalDataSourceControl.cs
- ContentPlaceHolder.cs
- ResourceBinder.cs
- ConfigurationSection.cs
- DataSourceControlBuilder.cs
- UpdatePanelControlTrigger.cs
- DataContractAttribute.cs
- SqlAliaser.cs
- DbConvert.cs
- ExtenderProvidedPropertyAttribute.cs
- NCryptNative.cs
- Root.cs
- AmbientProperties.cs
- ButtonFieldBase.cs
- SQLInt32.cs
- RequestQueryProcessor.cs
- TrackingProfileCache.cs
- PackageRelationship.cs
- ItemCheckEvent.cs
- ItemsPanelTemplate.cs
- DataGridViewSelectedColumnCollection.cs
- UrlPath.cs
- ValidateNames.cs
- ToolStripContainer.cs
- OleDbCommand.cs
- TargetConverter.cs
- UserCancellationException.cs
- Main.cs
- SystemDiagnosticsSection.cs
- SettingsPropertyValue.cs
- WebZone.cs
- DataBinding.cs
- WindowsListView.cs
- InProcStateClientManager.cs
- invalidudtexception.cs
- DoubleStorage.cs
- HttpHandlerAction.cs
- RightsManagementUser.cs
- DoubleLinkListEnumerator.cs
- GenericUriParser.cs
- DataBoundLiteralControl.cs
- GridViewEditEventArgs.cs
- SymmetricKeyWrap.cs
- RecognitionResult.cs
- HTMLTextWriter.cs
- MSAAEventDispatcher.cs