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
- GridViewDesigner.cs
- ColorConverter.cs
- DataGridPagingPage.cs
- DBDataPermission.cs
- PerfService.cs
- TextEffectCollection.cs
- ComponentResourceKeyConverter.cs
- KeyProperty.cs
- WebConfigurationFileMap.cs
- ImageSource.cs
- CellParaClient.cs
- HTMLTextWriter.cs
- CounterCreationDataCollection.cs
- RegularExpressionValidator.cs
- SmtpDateTime.cs
- EmptyEnumerable.cs
- regiisutil.cs
- PersonalizationStateQuery.cs
- ChannelEndpointElement.cs
- OutKeywords.cs
- PersonalizationStateQuery.cs
- DbModificationClause.cs
- DeadCharTextComposition.cs
- OleStrCAMarshaler.cs
- MouseGestureConverter.cs
- HtmlTableCell.cs
- Literal.cs
- LockCookie.cs
- StorageConditionPropertyMapping.cs
- DataShape.cs
- StylusPointPropertyId.cs
- StaticResourceExtension.cs
- SqlConnectionHelper.cs
- BufferAllocator.cs
- DragDrop.cs
- XhtmlBasicLabelAdapter.cs
- DetailsViewUpdateEventArgs.cs
- VirtualDirectoryMapping.cs
- KeyPullup.cs
- PointLightBase.cs
- MessageHeaderDescription.cs
- GPStream.cs
- XsdDataContractImporter.cs
- SSmlParser.cs
- RSAPKCS1KeyExchangeFormatter.cs
- XPathScanner.cs
- FormsAuthenticationUser.cs
- CustomPopupPlacement.cs
- ExtensionElement.cs
- MergeFilterQuery.cs
- PermissionSet.cs
- ApplicationManager.cs
- PriorityQueue.cs
- ProgressBarRenderer.cs
- DiscoveryReference.cs
- XMLUtil.cs
- WebBrowserDocumentCompletedEventHandler.cs
- SystemIPGlobalProperties.cs
- ExpressionPrefixAttribute.cs
- XXXInfos.cs
- EventsTab.cs
- UnsafeNativeMethodsPenimc.cs
- DataGridViewBand.cs
- DynamicPhysicalDiscoSearcher.cs
- LockCookie.cs
- wmiprovider.cs
- SecurityKeyType.cs
- EditableTreeList.cs
- RsaSecurityTokenAuthenticator.cs
- CorruptStoreException.cs
- XmlDataDocument.cs
- ModelUIElement3D.cs
- Assert.cs
- Camera.cs
- ServiceDescriptionReflector.cs
- _IPv4Address.cs
- ServiceHostingEnvironment.cs
- SecurityVerifiedMessage.cs
- __TransparentProxy.cs
- ApplicationServiceHelper.cs
- SerialErrors.cs
- Maps.cs
- ActiveXHost.cs
- DefaultTextStoreTextComposition.cs
- DetailsViewPageEventArgs.cs
- AstTree.cs
- PropertyEmitterBase.cs
- StoreContentChangedEventArgs.cs
- DataFormat.cs
- SessionStateItemCollection.cs
- XmlNodeChangedEventArgs.cs
- WebPartCancelEventArgs.cs
- CodeDomExtensionMethods.cs
- Region.cs
- CompileLiteralTextParser.cs
- ListView.cs
- ViewgenGatekeeper.cs
- PropertyEntry.cs
- ToolStripScrollButton.cs
- FilterFactory.cs