Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / NetworkInformation / PingOptions.cs / 1305376 / 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
- ObjectTypeMapping.cs
- SelectedGridItemChangedEvent.cs
- BitmapEffectRenderDataResource.cs
- FlowDocumentPageViewerAutomationPeer.cs
- InlineCollection.cs
- WindowsFormsSynchronizationContext.cs
- GridProviderWrapper.cs
- AuthenticationService.cs
- BamlMapTable.cs
- RIPEMD160.cs
- FormViewCommandEventArgs.cs
- AssociationProvider.cs
- XmlIncludeAttribute.cs
- JavaScriptString.cs
- WsatServiceCertificate.cs
- CharEnumerator.cs
- TextTreeTextElementNode.cs
- SmiConnection.cs
- ObsoleteAttribute.cs
- DataGridViewRowPostPaintEventArgs.cs
- EmissiveMaterial.cs
- RangeContentEnumerator.cs
- ASCIIEncoding.cs
- TypeSource.cs
- BitmapEffectInputData.cs
- ObjectAnimationBase.cs
- ImageMap.cs
- DoubleLinkListEnumerator.cs
- DbParameterCollection.cs
- WorkflowInstanceQuery.cs
- TimelineCollection.cs
- HitTestResult.cs
- CmsInterop.cs
- MergePropertyDescriptor.cs
- PageContentAsyncResult.cs
- ProxyHelper.cs
- Scalars.cs
- SoapFormatExtensions.cs
- DecoderExceptionFallback.cs
- DataSourceSelectArguments.cs
- MethodAccessException.cs
- ToolBarButton.cs
- manifestimages.cs
- CqlParserHelpers.cs
- ExtensibleClassFactory.cs
- MdImport.cs
- IndependentAnimationStorage.cs
- RefreshEventArgs.cs
- GeneratedView.cs
- DeclarativeConditionsCollection.cs
- DataBoundControlParameterTarget.cs
- ProjectionQueryOptionExpression.cs
- ErrorRuntimeConfig.cs
- StatusBarDrawItemEvent.cs
- ImportDesigner.xaml.cs
- XmlFormatMapping.cs
- BaseDataList.cs
- DataPagerFieldCommandEventArgs.cs
- ResourceExpressionBuilder.cs
- PauseStoryboard.cs
- NamespaceQuery.cs
- FunctionImportElement.cs
- TrustSection.cs
- CustomErrorCollection.cs
- FlowDocument.cs
- PolyBezierSegmentFigureLogic.cs
- BCLDebug.cs
- InfoCardService.cs
- MemberDomainMap.cs
- Accessors.cs
- safePerfProviderHandle.cs
- RegexStringValidatorAttribute.cs
- XmlQuerySequence.cs
- PropertyPath.cs
- PngBitmapDecoder.cs
- SiblingIterators.cs
- WindowsRichEditRange.cs
- XPathNavigatorReader.cs
- LinqMaximalSubtreeNominator.cs
- FormsAuthenticationUserCollection.cs
- HtmlTable.cs
- FileLogRecord.cs
- TrackingProvider.cs
- Pen.cs
- CodeExpressionStatement.cs
- LogicalTreeHelper.cs
- XmlDomTextWriter.cs
- WebPartEditorApplyVerb.cs
- AutomationAttributeInfo.cs
- NativeRecognizer.cs
- FrugalList.cs
- OleDbReferenceCollection.cs
- MobileControl.cs
- BlockUIContainer.cs
- ServiceModelActivationSectionGroup.cs
- Query.cs
- ResizeGrip.cs
- ExceptionHandlers.cs
- WebBrowserHelper.cs
- AtomMaterializer.cs