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
- ApplicationFileCodeDomTreeGenerator.cs
- SizeValueSerializer.cs
- QilIterator.cs
- HashStream.cs
- Win32PrintDialog.cs
- SecurityIdentifierConverter.cs
- EntityTransaction.cs
- RelationalExpressions.cs
- DesignerTextViewAdapter.cs
- CustomTypeDescriptor.cs
- WebSysDisplayNameAttribute.cs
- SymLanguageType.cs
- SplineQuaternionKeyFrame.cs
- ListBoxAutomationPeer.cs
- CrossAppDomainChannel.cs
- __Error.cs
- DrawingBrush.cs
- exports.cs
- DbMetaDataColumnNames.cs
- WSFederationHttpBindingCollectionElement.cs
- ValidationErrorEventArgs.cs
- FilterQueryOptionExpression.cs
- StrokeDescriptor.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- ExpandSegment.cs
- DefaultValueConverter.cs
- SafeHandles.cs
- CompletionProxy.cs
- ListViewPagedDataSource.cs
- TreeView.cs
- XPathMultyIterator.cs
- D3DImage.cs
- ContentElement.cs
- TdsValueSetter.cs
- ManagedIStream.cs
- ValidatingCollection.cs
- PropertyStore.cs
- BitmapEffectGeneralTransform.cs
- Vector3DCollectionValueSerializer.cs
- GridViewUpdatedEventArgs.cs
- AtomicFile.cs
- ProcessStartInfo.cs
- TabControlDesigner.cs
- SubpageParaClient.cs
- EntityViewGenerationConstants.cs
- OpenTypeCommon.cs
- TaskHelper.cs
- XPathDocumentBuilder.cs
- ActiveXContainer.cs
- DoubleLink.cs
- DataExpression.cs
- HierarchicalDataSourceConverter.cs
- QilInvokeLateBound.cs
- TlsnegoTokenProvider.cs
- ResourceContainer.cs
- EntityContainerEmitter.cs
- SecurityContext.cs
- BufferedReadStream.cs
- DbParameterCollection.cs
- DBCSCodePageEncoding.cs
- UnionQueryOperator.cs
- Int32AnimationUsingKeyFrames.cs
- TaskbarItemInfo.cs
- TextSerializer.cs
- ElementFactory.cs
- ShimAsPublicXamlType.cs
- ThreadPool.cs
- ToolboxItem.cs
- PropertyManager.cs
- KeyBinding.cs
- TableHeaderCell.cs
- RuleElement.cs
- ConfigXmlDocument.cs
- AlignmentYValidation.cs
- _NTAuthentication.cs
- UITypeEditor.cs
- TemplateComponentConnector.cs
- XpsException.cs
- _ProxyChain.cs
- TraceHandlerErrorFormatter.cs
- BasicHttpMessageSecurityElement.cs
- HierarchicalDataTemplate.cs
- TextParagraph.cs
- Sequence.cs
- _WebProxyDataBuilder.cs
- WebPartAddingEventArgs.cs
- Tracer.cs
- ConnectionsZone.cs
- FixedSOMGroup.cs
- TypeDelegator.cs
- ProcessProtocolHandler.cs
- PerformanceCounterLib.cs
- ListViewTableCell.cs
- MatrixStack.cs
- PerfCounterSection.cs
- SafeRegistryHandle.cs
- ClientType.cs
- QilVisitor.cs
- SqlPersistenceProviderFactory.cs
- ItemCollection.cs