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
- IsolatedStorageFile.cs
- CmsUtils.cs
- ArcSegment.cs
- ClassHandlersStore.cs
- NonceCache.cs
- UriScheme.cs
- Types.cs
- SyndicationFeed.cs
- mediaeventshelper.cs
- ScriptReferenceEventArgs.cs
- ScriptServiceAttribute.cs
- ContentElementAutomationPeer.cs
- MetadataUtilsSmi.cs
- ObjectAnimationBase.cs
- ShellProvider.cs
- XmlSerializerSection.cs
- CookielessHelper.cs
- HttpHandlerAction.cs
- CryptoProvider.cs
- OdbcConnectionFactory.cs
- CorrelationManager.cs
- X509ImageLogo.cs
- ContainerFilterService.cs
- SchemaTableColumn.cs
- ChangeDirector.cs
- RequestSecurityTokenForGetBrowserToken.cs
- SystemFonts.cs
- DocumentOrderQuery.cs
- WebServiceHostFactory.cs
- DoubleAnimationClockResource.cs
- Figure.cs
- ImageClickEventArgs.cs
- ICspAsymmetricAlgorithm.cs
- RestHandlerFactory.cs
- GlyphRunDrawing.cs
- Ipv6Element.cs
- MachineSettingsSection.cs
- DictionaryTraceRecord.cs
- RuleSettings.cs
- ScrollableControl.cs
- MetadataConversionError.cs
- RuntimeTransactionHandle.cs
- TypeNameParser.cs
- LocalValueEnumerator.cs
- XPathAncestorQuery.cs
- ModelPropertyCollectionImpl.cs
- StringWriter.cs
- BindUriHelper.cs
- SignedInfo.cs
- Msec.cs
- DeploymentSection.cs
- AnyAllSearchOperator.cs
- DBBindings.cs
- odbcmetadatafactory.cs
- DesignerVerb.cs
- Style.cs
- ChtmlCalendarAdapter.cs
- CodeStatement.cs
- SID.cs
- WS2007HttpBindingElement.cs
- DnsPermission.cs
- DiagnosticStrings.cs
- SingleBodyParameterMessageFormatter.cs
- CodeCommentStatement.cs
- InstanceCreationEditor.cs
- BufferedWebEventProvider.cs
- TokenBasedSetEnumerator.cs
- EncodingDataItem.cs
- EncryptedXml.cs
- DataRelation.cs
- KeyedCollection.cs
- WebAdminConfigurationHelper.cs
- FlowDocumentPage.cs
- AccessKeyManager.cs
- IntPtr.cs
- Intellisense.cs
- ObjectHandle.cs
- SqlDataSourceConfigureSortForm.cs
- BatchServiceHost.cs
- Encoder.cs
- LicFileLicenseProvider.cs
- XdrBuilder.cs
- ResourcePart.cs
- EventProxy.cs
- InvokePatternIdentifiers.cs
- cookiecontainer.cs
- AutomationElementCollection.cs
- OAVariantLib.cs
- BinHexDecoder.cs
- RegexNode.cs
- ValueTable.cs
- PageClientProxyGenerator.cs
- WebException.cs
- GridEntry.cs
- AddressHeader.cs
- ApplicationFileParser.cs
- Handle.cs
- ItemsChangedEventArgs.cs
- UdpDiscoveryEndpoint.cs
- GridViewCancelEditEventArgs.cs