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
- ListViewContainer.cs
- FusionWrap.cs
- TypeExtensionConverter.cs
- SmtpDigestAuthenticationModule.cs
- HtmlInputControl.cs
- ToolStripDropDownItem.cs
- CompletionProxy.cs
- TimeStampChecker.cs
- HwndAppCommandInputProvider.cs
- ShaderEffect.cs
- PathFigureCollectionConverter.cs
- DateTimeUtil.cs
- UIntPtr.cs
- ConstraintStruct.cs
- LocalizeDesigner.cs
- StrokeCollectionDefaultValueFactory.cs
- ActivitySurrogateSelector.cs
- GeneratedCodeAttribute.cs
- QilPatternVisitor.cs
- AuthorizationRule.cs
- DBSqlParserColumn.cs
- X500Name.cs
- Dump.cs
- DisableDpiAwarenessAttribute.cs
- FromReply.cs
- QilExpression.cs
- ViewLoader.cs
- GatewayIPAddressInformationCollection.cs
- Rectangle.cs
- PathFigureCollection.cs
- DomainConstraint.cs
- RowParagraph.cs
- Knowncolors.cs
- QilXmlWriter.cs
- WmpBitmapDecoder.cs
- EventSinkHelperWriter.cs
- ProtocolsConfiguration.cs
- GenericEnumerator.cs
- ContainerUtilities.cs
- FloaterBaseParagraph.cs
- TemplateComponentConnector.cs
- WebBrowserContainer.cs
- AttributeInfo.cs
- RepeaterCommandEventArgs.cs
- TemplateManager.cs
- XmlSerializerOperationBehavior.cs
- GrowingArray.cs
- HandleRef.cs
- XPathExpr.cs
- MarginCollapsingState.cs
- ParseNumbers.cs
- ImageInfo.cs
- StylusSystemGestureEventArgs.cs
- SqlDataReaderSmi.cs
- DocumentPageView.cs
- SessionSymmetricTransportSecurityProtocolFactory.cs
- EllipseGeometry.cs
- PageTheme.cs
- Scheduling.cs
- MailWriter.cs
- AsyncContentLoadedEventArgs.cs
- CodeArrayCreateExpression.cs
- WindowsToolbar.cs
- CachedPathData.cs
- NameValuePair.cs
- BatchParser.cs
- LinkArea.cs
- DetailsViewPagerRow.cs
- ColumnTypeConverter.cs
- SharedRuntimeState.cs
- ErrorWebPart.cs
- localization.cs
- XmlSerializerVersionAttribute.cs
- Variant.cs
- PageParser.cs
- ExpressionBuilderContext.cs
- ExclusiveTcpListener.cs
- DirectoryInfo.cs
- FieldValue.cs
- ButtonBase.cs
- Bidi.cs
- WebReference.cs
- SetStateEventArgs.cs
- BamlResourceSerializer.cs
- RawStylusInputReport.cs
- WebScriptEnablingElement.cs
- PreviewPrintController.cs
- SmiContext.cs
- ComponentResourceKeyConverter.cs
- WebEventCodes.cs
- ModelPropertyCollectionImpl.cs
- path.cs
- SqlDataSourceAdvancedOptionsForm.cs
- XmlParser.cs
- UnknownBitmapEncoder.cs
- TableLayout.cs
- AuthenticationServiceManager.cs
- DockEditor.cs
- GridSplitter.cs
- TransferRequestHandler.cs