Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- _NativeSSPI.cs
- IConvertible.cs
- MarkedHighlightComponent.cs
- FirstQueryOperator.cs
- DependencyPropertyAttribute.cs
- HeaderedItemsControl.cs
- ClientRuntimeConfig.cs
- BasicExpandProvider.cs
- SourceFileBuildProvider.cs
- WindowsFont.cs
- StrongNameKeyPair.cs
- LayoutManager.cs
- exports.cs
- LinqDataSourceEditData.cs
- RC2.cs
- CroppedBitmap.cs
- TextBox.cs
- GroupJoinQueryOperator.cs
- StylusPlugin.cs
- PrivilegedConfigurationManager.cs
- TextTreeInsertElementUndoUnit.cs
- LocalizationCodeDomSerializer.cs
- AttributeQuery.cs
- LinkButton.cs
- GAC.cs
- ByteArrayHelperWithString.cs
- BitStack.cs
- FloatUtil.cs
- ProgressBarAutomationPeer.cs
- SmtpCommands.cs
- Blend.cs
- DbModificationCommandTree.cs
- SerializableAttribute.cs
- UpDownBase.cs
- ListViewDeletedEventArgs.cs
- UnicastIPAddressInformationCollection.cs
- ConsoleCancelEventArgs.cs
- DetailsViewPagerRow.cs
- CryptoApi.cs
- cache.cs
- RegionData.cs
- DetailsViewRow.cs
- MobileContainerDesigner.cs
- ContextMenuStrip.cs
- TextModifier.cs
- BasicCommandTreeVisitor.cs
- DataGridBoolColumn.cs
- WindowsTab.cs
- AsyncCodeActivity.cs
- PackageDigitalSignature.cs
- ChildDocumentBlock.cs
- PerformanceCounter.cs
- PreviewKeyDownEventArgs.cs
- CSharpCodeProvider.cs
- QilXmlReader.cs
- Size3DValueSerializer.cs
- SettingsPropertyWrongTypeException.cs
- WindowsListViewGroupSubsetLink.cs
- AttributeUsageAttribute.cs
- XmlWrappingWriter.cs
- ResourceSet.cs
- ToolStripContentPanelRenderEventArgs.cs
- BaseCollection.cs
- TypeInfo.cs
- Win32KeyboardDevice.cs
- ObjRef.cs
- DeviceContext.cs
- TitleStyle.cs
- DLinqDataModelProvider.cs
- ThemeableAttribute.cs
- XPathNodeInfoAtom.cs
- WorkflowDesignerColors.cs
- BrowserCapabilitiesCodeGenerator.cs
- SqlClientFactory.cs
- SqlNotificationRequest.cs
- DefaultEvaluationContext.cs
- DataGridRow.cs
- CharacterBuffer.cs
- InvariantComparer.cs
- XmlSchemaExporter.cs
- ProfileProvider.cs
- GridViewDeletedEventArgs.cs
- ThemeableAttribute.cs
- Hex.cs
- TableLayoutColumnStyleCollection.cs
- LogicalCallContext.cs
- DataSourceXmlAttributeAttribute.cs
- ErrorHandler.cs
- ColorConvertedBitmapExtension.cs
- AuthenticationSection.cs
- ScrollData.cs
- DrawingDrawingContext.cs
- DefaultWorkflowTransactionService.cs
- ObjectPersistData.cs
- WebEncodingValidator.cs
- ButtonBaseAdapter.cs
- SelectorAutomationPeer.cs
- LocalIdKeyIdentifierClause.cs
- DbProviderFactories.cs
- HTTPNotFoundHandler.cs