Code:
/ DotNET / DotNET / 8.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
- InheritanceContextHelper.cs
- SystemIPInterfaceProperties.cs
- EventProperty.cs
- NavigationEventArgs.cs
- SamlDoNotCacheCondition.cs
- RtfNavigator.cs
- RegexTypeEditor.cs
- TransformCollection.cs
- InputLanguageProfileNotifySink.cs
- ControlBuilder.cs
- CqlParser.cs
- AlternationConverter.cs
- CodeEventReferenceExpression.cs
- WebServiceData.cs
- SocketAddress.cs
- MemberPathMap.cs
- Separator.cs
- SqlClientFactory.cs
- CheckPair.cs
- ResourceReader.cs
- ListViewUpdatedEventArgs.cs
- BlockUIContainer.cs
- SiteMapDataSourceView.cs
- SimpleType.cs
- VBIdentifierDesigner.xaml.cs
- ManagementOptions.cs
- GlobalizationSection.cs
- DataGridRelationshipRow.cs
- PeerCredentialElement.cs
- BitmapMetadata.cs
- CommandField.cs
- ReplyAdapterChannelListener.cs
- DataServiceQuery.cs
- PolicyLevel.cs
- FixedTextSelectionProcessor.cs
- DCSafeHandle.cs
- DecoderExceptionFallback.cs
- WorkerRequest.cs
- RegistrySecurity.cs
- PointConverter.cs
- TextServicesProperty.cs
- IndentedWriter.cs
- PrintPreviewControl.cs
- MainMenu.cs
- TreeViewHitTestInfo.cs
- TemplateKeyConverter.cs
- DocumentOrderQuery.cs
- SqlDataReader.cs
- DoubleUtil.cs
- DrawingGroupDrawingContext.cs
- SafeFileMappingHandle.cs
- IndentTextWriter.cs
- TrackingAnnotationCollection.cs
- XmlSchemaAny.cs
- ObjectDataSourceEventArgs.cs
- ProjectionCamera.cs
- BindingSource.cs
- WeakReferenceEnumerator.cs
- SimpleRecyclingCache.cs
- VisualProxy.cs
- CommonObjectSecurity.cs
- ImpersonateTokenRef.cs
- SqlRemoveConstantOrderBy.cs
- log.cs
- XmlHierarchicalDataSourceView.cs
- StandardOleMarshalObject.cs
- FloaterParagraph.cs
- LinqDataView.cs
- QueryOptionExpression.cs
- MessageQueueException.cs
- Ipv6Element.cs
- UniformGrid.cs
- mda.cs
- PasswordRecovery.cs
- ScriptingProfileServiceSection.cs
- ContentAlignmentEditor.cs
- CatalogZoneBase.cs
- FormParameter.cs
- ColumnMapTranslator.cs
- xmlglyphRunInfo.cs
- LiteralSubsegment.cs
- LinearGradientBrush.cs
- Parameter.cs
- PopupRootAutomationPeer.cs
- Base64Decoder.cs
- ContentDisposition.cs
- Base64Stream.cs
- PropertyEmitter.cs
- XmlArrayItemAttributes.cs
- ToolboxDataAttribute.cs
- CommandBinding.cs
- UniqueTransportManagerRegistration.cs
- BitmapEffectInputConnector.cs
- RemotingAttributes.cs
- DataRowCollection.cs
- EncodingDataItem.cs
- CqlLexer.cs
- Base64Stream.cs
- XmlSchemaChoice.cs
- Positioning.cs