Code:
/ 4.0 / 4.0 / 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. //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
- DataKey.cs
- Certificate.cs
- DataSetMappper.cs
- MostlySingletonList.cs
- ScriptModule.cs
- ArrayTypeMismatchException.cs
- InputGestureCollection.cs
- RegexWriter.cs
- XmlSchemaSimpleType.cs
- UserControlAutomationPeer.cs
- ListBindingConverter.cs
- SchemaElementDecl.cs
- SerializationStore.cs
- TrustManagerPromptUI.cs
- GridItemPattern.cs
- ListViewSortEventArgs.cs
- PkcsMisc.cs
- MetadataItemCollectionFactory.cs
- MsmqMessageSerializationFormat.cs
- Button.cs
- TokenBasedSetEnumerator.cs
- BeginEvent.cs
- sqlpipe.cs
- BamlResourceSerializer.cs
- ObjectResult.cs
- BaseValidatorDesigner.cs
- InheritablePropertyChangeInfo.cs
- X509PeerCertificateAuthenticationElement.cs
- ImageMetadata.cs
- NativeMethods.cs
- ListViewCommandEventArgs.cs
- ScopedMessagePartSpecification.cs
- AutomationPropertyInfo.cs
- ListViewItemSelectionChangedEvent.cs
- GeometryModel3D.cs
- PageContentAsyncResult.cs
- ListBoxAutomationPeer.cs
- PerformanceCounterPermissionAttribute.cs
- ConvertBinder.cs
- SafeNativeMethods.cs
- SmiRequestExecutor.cs
- MdImport.cs
- InputMethod.cs
- BasicKeyConstraint.cs
- PropVariant.cs
- listitem.cs
- TraceSection.cs
- SQLBytesStorage.cs
- ContainerCodeDomSerializer.cs
- HtmlTableRow.cs
- PartManifestEntry.cs
- StringReader.cs
- TraceData.cs
- DefaultMemberAttribute.cs
- TypeSystemProvider.cs
- PrivateFontCollection.cs
- CacheChildrenQuery.cs
- OperationAbortedException.cs
- SqlConnection.cs
- PointLightBase.cs
- FileLogRecord.cs
- BuilderPropertyEntry.cs
- ListSortDescriptionCollection.cs
- AvTraceFormat.cs
- LocalizableResourceBuilder.cs
- SecurityResources.cs
- HtmlShimManager.cs
- LogicalTreeHelper.cs
- IntSecurity.cs
- WeakReferenceList.cs
- ToolStripLabel.cs
- MaterializeFromAtom.cs
- CodeTypeReferenceCollection.cs
- XmlNullResolver.cs
- BigInt.cs
- ExceptionTranslationTable.cs
- ControlBindingsCollection.cs
- SerializableReadOnlyDictionary.cs
- WebPartZoneCollection.cs
- EntityDataSourceView.cs
- HttpHandler.cs
- DataGridViewCellValueEventArgs.cs
- MarshalDirectiveException.cs
- RootAction.cs
- DispatchOperationRuntime.cs
- OdbcErrorCollection.cs
- TextBoxLine.cs
- BoundColumn.cs
- WorkflowInstanceQuery.cs
- WebPartZoneCollection.cs
- GcSettings.cs
- SqlProfileProvider.cs
- BulletChrome.cs
- SemaphoreSecurity.cs
- WorkflowViewElement.cs
- ADMembershipProvider.cs
- TrustLevelCollection.cs
- DispatcherFrame.cs
- GridViewRow.cs
- BitmapCodecInfo.cs