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
- InlineUIContainer.cs
- BrowserCapabilitiesCodeGenerator.cs
- EncryptedPackageFilter.cs
- RightsManagementEncryptionTransform.cs
- PathFigureCollectionConverter.cs
- PublisherIdentityPermission.cs
- BufferBuilder.cs
- SelectionWordBreaker.cs
- XmlArrayItemAttributes.cs
- DiscoveryClientReferences.cs
- XmlException.cs
- RepeatButton.cs
- RootProjectionNode.cs
- _Semaphore.cs
- LoaderAllocator.cs
- _StreamFramer.cs
- EntitySqlQueryState.cs
- ConditionalBranch.cs
- HandleDictionary.cs
- HWStack.cs
- AppSecurityManager.cs
- XPathCompileException.cs
- BooleanProjectedSlot.cs
- BufferModeSettings.cs
- BCryptHashAlgorithm.cs
- DataStreams.cs
- WebException.cs
- BreakRecordTable.cs
- DeploymentExceptionMapper.cs
- AutoGeneratedField.cs
- ProcessProtocolHandler.cs
- XmlDataSourceNodeDescriptor.cs
- MarkupExtensionReturnTypeAttribute.cs
- Hashtable.cs
- NamedPipeAppDomainProtocolHandler.cs
- FunctionGenerator.cs
- OrderPreservingPipeliningMergeHelper.cs
- SessionStateContainer.cs
- SQLResource.cs
- PersonalizationStateInfoCollection.cs
- HttpModuleAction.cs
- ChoiceConverter.cs
- DesignerAttribute.cs
- BitmapDownload.cs
- CommandLibraryHelper.cs
- LicenseException.cs
- ContentPresenter.cs
- Processor.cs
- BoolExpressionVisitors.cs
- ExtendedPropertyDescriptor.cs
- ObfuscationAttribute.cs
- CountdownEvent.cs
- ImageListStreamer.cs
- BuildProvider.cs
- securitymgrsite.cs
- TreeNodeBindingDepthConverter.cs
- XmlSerializerFactory.cs
- XmlAttributeAttribute.cs
- PropertyToken.cs
- SimplePropertyEntry.cs
- MasterPageBuildProvider.cs
- DataGridViewLinkColumn.cs
- UniqueID.cs
- ZipIOLocalFileBlock.cs
- HtmlCommandAdapter.cs
- Attributes.cs
- IndicShape.cs
- DataGridPagingPage.cs
- ColorPalette.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs
- UserPersonalizationStateInfo.cs
- QueryHandler.cs
- OleDbParameter.cs
- DeploymentExceptionMapper.cs
- RemotingConfigParser.cs
- ProvidePropertyAttribute.cs
- String.cs
- EntityExpressionVisitor.cs
- HScrollBar.cs
- TreeViewImageKeyConverter.cs
- Menu.cs
- TreeViewImageIndexConverter.cs
- RequestQueryProcessor.cs
- ToolConsole.cs
- MimePart.cs
- ThreadStartException.cs
- ToolTipService.cs
- ModifiableIteratorCollection.cs
- ResourceDefaultValueAttribute.cs
- TypeExtensions.cs
- ListViewItemMouseHoverEvent.cs
- SmiContext.cs
- GZipUtils.cs
- MeshGeometry3D.cs
- DbConnectionPoolIdentity.cs
- PrivilegeNotHeldException.cs
- CodeGen.cs
- Vector3D.cs
- Pkcs7Signer.cs
- log.cs