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
- ZipFileInfo.cs
- COM2FontConverter.cs
- ConfigurationElement.cs
- WorkflowOperationErrorHandler.cs
- RefreshEventArgs.cs
- SafeCertificateContext.cs
- AutoResetEvent.cs
- ApplicationManager.cs
- _TLSstream.cs
- AstNode.cs
- HttpWebResponse.cs
- SocketAddress.cs
- VectorCollectionConverter.cs
- XsdDuration.cs
- WebPartConnectionsCancelEventArgs.cs
- XmlArrayItemAttribute.cs
- KeySpline.cs
- DataReaderContainer.cs
- XmlQueryStaticData.cs
- LayoutInformation.cs
- TextDecorations.cs
- IndentTextWriter.cs
- EmptyReadOnlyDictionaryInternal.cs
- SrgsGrammarCompiler.cs
- WebContext.cs
- CodeCatchClauseCollection.cs
- ObjectParameter.cs
- TranslateTransform.cs
- XmlSchemaIdentityConstraint.cs
- RegisteredHiddenField.cs
- CultureTable.cs
- Parsers.cs
- IsolatedStorageFilePermission.cs
- HttpModuleCollection.cs
- KeyPullup.cs
- BorderGapMaskConverter.cs
- ExpressionBindings.cs
- CreateRefExpr.cs
- AttachInfo.cs
- TrustManager.cs
- PEFileReader.cs
- List.cs
- InvalidPropValue.cs
- HyperLink.cs
- PropertyGridView.cs
- StandardRuntimeEnumValidator.cs
- XmlName.cs
- ResXResourceSet.cs
- SelectionRangeConverter.cs
- ComponentManagerBroker.cs
- DispatcherOperation.cs
- CheckBoxStandardAdapter.cs
- AsyncDataRequest.cs
- SafeViewOfFileHandle.cs
- BinaryFormatterWriter.cs
- DataPointer.cs
- DocumentGridPage.cs
- DictionaryBase.cs
- DateTimeValueSerializerContext.cs
- wgx_render.cs
- ManagementException.cs
- TreeNodeEventArgs.cs
- NativeWindow.cs
- CodeDOMProvider.cs
- BinarySerializer.cs
- CacheMode.cs
- CheckedPointers.cs
- CreateBookmarkScope.cs
- TableLayoutSettingsTypeConverter.cs
- DecimalAnimation.cs
- CompilerCollection.cs
- WindowsScrollBarBits.cs
- MLangCodePageEncoding.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- RichTextBoxContextMenu.cs
- ExpressionBindingCollection.cs
- Pair.cs
- HScrollBar.cs
- AggregateNode.cs
- AxHost.cs
- CachedPathData.cs
- PenCursorManager.cs
- MdiWindowListItemConverter.cs
- Deflater.cs
- FormViewPageEventArgs.cs
- IssuanceLicense.cs
- RemotingServices.cs
- SafeThemeHandle.cs
- DataTable.cs
- ConnectorDragDropGlyph.cs
- SqlDataSourceFilteringEventArgs.cs
- HyperLink.cs
- XmlSchemaAny.cs
- DataSvcMapFile.cs
- OverflowException.cs
- DomNameTable.cs
- SystemResourceHost.cs
- ProxyManager.cs
- WorkflowTransactionService.cs
- DataGridPreparingCellForEditEventArgs.cs