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
- ContentElement.cs
- WebPartConnectionsCloseVerb.cs
- SqlBooleanMismatchVisitor.cs
- FileRecordSequenceHelper.cs
- StateDesignerConnector.cs
- CodeSnippetCompileUnit.cs
- Camera.cs
- MultipleCopiesCollection.cs
- WindowsSidIdentity.cs
- ConfigurationManager.cs
- ValidatingReaderNodeData.cs
- InfoCardAsymmetricCrypto.cs
- GenericIdentity.cs
- UxThemeWrapper.cs
- FrameworkContentElement.cs
- SafeProcessHandle.cs
- ToolStripDropDownMenu.cs
- SqlDataReader.cs
- TypeEnumerableViewSchema.cs
- ProxySimple.cs
- SimplePropertyEntry.cs
- GridViewColumn.cs
- DrawingCollection.cs
- SQLDecimal.cs
- RoleManagerSection.cs
- ProfileModule.cs
- OperatorExpressions.cs
- ModelItem.cs
- FixedTextContainer.cs
- ObjectStateEntryDbDataRecord.cs
- Menu.cs
- cryptoapiTransform.cs
- ColorTransform.cs
- PackageStore.cs
- TileModeValidation.cs
- UiaCoreTypesApi.cs
- GeometryModel3D.cs
- NetNamedPipeBindingCollectionElement.cs
- DataRelationCollection.cs
- TraceAsyncResult.cs
- FlowPosition.cs
- Pkcs7Signer.cs
- ExtensionSimplifierMarkupObject.cs
- TextTreeRootTextBlock.cs
- ReflectionPermission.cs
- MetadataSource.cs
- FileSystemEventArgs.cs
- ComponentResourceKey.cs
- IApplicationTrustManager.cs
- AllMembershipCondition.cs
- ModuleConfigurationInfo.cs
- ImageCollectionCodeDomSerializer.cs
- EventLogPropertySelector.cs
- SQLSingleStorage.cs
- BitmapVisualManager.cs
- ResourceKey.cs
- TextElementEditingBehaviorAttribute.cs
- DeviceContexts.cs
- DataGridViewTextBoxColumn.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- VariableQuery.cs
- ConnectionStringsExpressionBuilder.cs
- SafeSecurityHandles.cs
- SoapFault.cs
- HtmlMobileTextWriter.cs
- Point.cs
- ObjectAnimationBase.cs
- ClickablePoint.cs
- CompModSwitches.cs
- CopyNamespacesAction.cs
- SecurityManager.cs
- UniqueSet.cs
- CFGGrammar.cs
- ReliabilityContractAttribute.cs
- HostingPreferredMapPath.cs
- StyleModeStack.cs
- HebrewCalendar.cs
- SizeAnimationClockResource.cs
- AppDomain.cs
- DataGridViewCellStyleConverter.cs
- AvtEvent.cs
- DesignerGenericWebPart.cs
- _RequestCacheProtocol.cs
- DataObject.cs
- ListSortDescriptionCollection.cs
- cache.cs
- QilSortKey.cs
- ListBindingHelper.cs
- baseaxisquery.cs
- ScriptResourceAttribute.cs
- ImageSourceConverter.cs
- ProgressChangedEventArgs.cs
- ConfigurationStrings.cs
- Stroke.cs
- Rect.cs
- RootBuilder.cs
- TextChange.cs
- XhtmlTextWriter.cs
- SiteMapSection.cs
- ExtendedPropertiesHandler.cs