Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CustomValidator.cs
- TimeEnumHelper.cs
- FrameworkRichTextComposition.cs
- IncrementalReadDecoders.cs
- PointConverter.cs
- Shape.cs
- DynamicILGenerator.cs
- ListViewItemMouseHoverEvent.cs
- CharEnumerator.cs
- MappingItemCollection.cs
- WindowsUserNameCachingSecurityTokenAuthenticator.cs
- TabItemAutomationPeer.cs
- HtmlInputReset.cs
- ResourceDescriptionAttribute.cs
- IgnoreDeviceFilterElement.cs
- WebPartTransformer.cs
- RolePrincipal.cs
- FixedSOMSemanticBox.cs
- listitem.cs
- Rule.cs
- EventProxy.cs
- Compiler.cs
- GenericUI.cs
- VectorConverter.cs
- CodeArrayCreateExpression.cs
- Errors.cs
- ValidatingReaderNodeData.cs
- SettingsProperty.cs
- OleDbConnectionInternal.cs
- WindowsPen.cs
- AssemblyCollection.cs
- PointUtil.cs
- WebRequestModuleElementCollection.cs
- XmlParserContext.cs
- KeyGestureConverter.cs
- FilterQuery.cs
- ContentHostHelper.cs
- SizeConverter.cs
- WebPartEditorOkVerb.cs
- RegexCharClass.cs
- SplineKeyFrames.cs
- HMACSHA512.cs
- RenderCapability.cs
- UIServiceHelper.cs
- SizeConverter.cs
- SchemaImporterExtension.cs
- OleAutBinder.cs
- LabelDesigner.cs
- FieldToken.cs
- QualifiedCellIdBoolean.cs
- ChannelTracker.cs
- EventLogEntryCollection.cs
- Helpers.cs
- MobileComponentEditorPage.cs
- CodeCastExpression.cs
- RemotingConfiguration.cs
- CancellationToken.cs
- QueryCursorEventArgs.cs
- BufferBuilder.cs
- ResourceCollectionInfo.cs
- Win32Exception.cs
- ExpandedWrapper.cs
- InputScopeConverter.cs
- ToolstripProfessionalRenderer.cs
- RemotingHelper.cs
- WebPartsPersonalization.cs
- XsdBuilder.cs
- XmlSchemaIdentityConstraint.cs
- MobileControlsSectionHandler.cs
- ContextInformation.cs
- TimeEnumHelper.cs
- CardSpaceException.cs
- Function.cs
- InfoCardRSAOAEPKeyExchangeFormatter.cs
- AlphaSortedEnumConverter.cs
- DbParameterCollection.cs
- StringUtil.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- ComponentConverter.cs
- CheckPair.cs
- SmiEventSink_Default.cs
- FlagsAttribute.cs
- Propagator.ExtentPlaceholderCreator.cs
- webeventbuffer.cs
- ComplexBindingPropertiesAttribute.cs
- SyndicationDeserializer.cs
- PolicyException.cs
- HyperLink.cs
- SqlCacheDependencySection.cs
- TableFieldsEditor.cs
- TypeConverterMarkupExtension.cs
- IdlingCommunicationPool.cs
- Codec.cs
- BlobPersonalizationState.cs
- RectConverter.cs
- ControlAdapter.cs
- XmlSerializableReader.cs
- PropertyInfo.cs
- StrokeRenderer.cs
- PerformanceCounterPermissionEntryCollection.cs