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
- SoapElementAttribute.cs
- AssemblyAssociatedContentFileAttribute.cs
- ActivationService.cs
- CompoundFileStreamReference.cs
- VirtualPathProvider.cs
- CaretElement.cs
- MessageBox.cs
- StylusPointDescription.cs
- PublishLicense.cs
- FrameworkElementFactory.cs
- RsaElement.cs
- RegexGroupCollection.cs
- LinearGradientBrush.cs
- CommandEventArgs.cs
- MenuItemStyle.cs
- UInt64.cs
- PrivacyNoticeElement.cs
- XmlEncoding.cs
- ProxyManager.cs
- OdbcConnectionOpen.cs
- ToolZone.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- DataGridViewColumnHeaderCell.cs
- TextBounds.cs
- RuleSettingsCollection.cs
- ConditionalBranch.cs
- LinkLabel.cs
- CachingHintValidation.cs
- QueryCacheEntry.cs
- DataGridHeaderBorder.cs
- ThaiBuddhistCalendar.cs
- Signature.cs
- GroupAggregateExpr.cs
- DbDataRecord.cs
- XmlSchemaNotation.cs
- BitHelper.cs
- FacetDescription.cs
- BitmapImage.cs
- WindowsTitleBar.cs
- ValidatingPropertiesEventArgs.cs
- ValidationResult.cs
- SafeRightsManagementQueryHandle.cs
- BitmapImage.cs
- CallContext.cs
- SortableBindingList.cs
- StandardOleMarshalObject.cs
- Binding.cs
- WebBrowserUriTypeConverter.cs
- ScrollItemPatternIdentifiers.cs
- Socket.cs
- safex509handles.cs
- ScrollChrome.cs
- CodeTypeReference.cs
- HostedTransportConfigurationBase.cs
- NavigationCommands.cs
- PreservationFileReader.cs
- ListControlDesigner.cs
- TemplateComponentConnector.cs
- StrokeNodeOperations2.cs
- CodeCommentStatementCollection.cs
- ToolBarTray.cs
- SystemSounds.cs
- ReliableSession.cs
- BatchServiceHost.cs
- XmlSerializationGeneratedCode.cs
- DynamicValidatorEventArgs.cs
- MessageHeaderException.cs
- PrintingPermissionAttribute.cs
- XmlQueryCardinality.cs
- SourceLineInfo.cs
- Int64Converter.cs
- BCLDebug.cs
- AbstractSvcMapFileLoader.cs
- SpAudioStreamWrapper.cs
- TraceLevelHelper.cs
- PropertyEmitterBase.cs
- ServiceHttpModule.cs
- HtmlShimManager.cs
- SmtpFailedRecipientsException.cs
- MobileListItemCollection.cs
- ReachUIElementCollectionSerializer.cs
- CodePageUtils.cs
- PKCS1MaskGenerationMethod.cs
- BaseDataList.cs
- OutputScopeManager.cs
- NotifyIcon.cs
- ExtendedProtectionPolicyElement.cs
- SafeHGlobalHandleCritical.cs
- CustomAttributeFormatException.cs
- TableStyle.cs
- InvalidCastException.cs
- DataGridViewTopLeftHeaderCell.cs
- SqlCacheDependencyDatabaseCollection.cs
- Int32Rect.cs
- SignatureConfirmationElement.cs
- MemberHolder.cs
- XmlILAnnotation.cs
- MessageHeaderInfoTraceRecord.cs
- PreviewPrintController.cs
- SelectionWordBreaker.cs