Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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 } } } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ContentDisposition.cs
- CustomTokenProvider.cs
- ButtonColumn.cs
- ObjectIDGenerator.cs
- InvokeGenerator.cs
- TypeBuilderInstantiation.cs
- SchemaElementDecl.cs
- IOThreadScheduler.cs
- XmlSchemaAttributeGroup.cs
- TypeInitializationException.cs
- MexHttpsBindingCollectionElement.cs
- MenuBase.cs
- SiteMapHierarchicalDataSourceView.cs
- ChtmlImageAdapter.cs
- Point.cs
- MessageQueueInstaller.cs
- DeviceOverridableAttribute.cs
- DataService.cs
- ResXFileRef.cs
- BulletedListDesigner.cs
- StreamResourceInfo.cs
- DocumentManager.cs
- LocalizableAttribute.cs
- _SslSessionsCache.cs
- RequestContext.cs
- ControlIdConverter.cs
- SelectionWordBreaker.cs
- QueryContinueDragEvent.cs
- ObservableCollectionDefaultValueFactory.cs
- GridSplitter.cs
- Byte.cs
- CounterCreationDataCollection.cs
- NativeMethods.cs
- _HeaderInfoTable.cs
- XamlTypeMapper.cs
- DesignerResources.cs
- SoapProcessingBehavior.cs
- TcpTransportSecurityElement.cs
- CellTreeNodeVisitors.cs
- TriggerBase.cs
- SponsorHelper.cs
- SymbolEqualComparer.cs
- InstanceDataCollection.cs
- FloaterBaseParaClient.cs
- KeyBinding.cs
- ConfigXmlCDataSection.cs
- XmlObjectSerializerContext.cs
- GridItemProviderWrapper.cs
- _BufferOffsetSize.cs
- SqlServer2KCompatibilityAnnotation.cs
- CharConverter.cs
- FunctionDetailsReader.cs
- BamlLocalizer.cs
- GAC.cs
- InvokeFunc.cs
- DynamicEndpoint.cs
- MSAAEventDispatcher.cs
- TripleDES.cs
- ResourcesChangeInfo.cs
- OutputCacheProfile.cs
- MsmqInputSessionChannelListener.cs
- HtmlInputImage.cs
- Publisher.cs
- TrackingRecord.cs
- Table.cs
- SoapException.cs
- XmlLinkedNode.cs
- JsonFormatWriterGenerator.cs
- XPathNavigatorKeyComparer.cs
- TrimSurroundingWhitespaceAttribute.cs
- InputDevice.cs
- DbDeleteCommandTree.cs
- ConsoleTraceListener.cs
- XmlReflectionMember.cs
- MimeImporter.cs
- linebase.cs
- TemplateEditingFrame.cs
- ConnectionProviderAttribute.cs
- PublisherMembershipCondition.cs
- SocketElement.cs
- UInt64.cs
- LicenseException.cs
- SafeNativeMemoryHandle.cs
- ZipIOLocalFileBlock.cs
- ProcessManager.cs
- SqlDataRecord.cs
- ContentPropertyAttribute.cs
- CryptoHandle.cs
- LineSegment.cs
- WebPartDisplayModeCollection.cs
- ServerProtocol.cs
- FlowLayoutSettings.cs
- SqlExpander.cs
- SerializerWriterEventHandlers.cs
- DifferencingCollection.cs
- Item.cs
- ToolStripItemRenderEventArgs.cs
- Line.cs
- DataGridViewRowPostPaintEventArgs.cs
- ADRoleFactory.cs