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
- Header.cs
- Sql8ConformanceChecker.cs
- StyleCollection.cs
- BCryptSafeHandles.cs
- WebPartManagerInternals.cs
- RequestCacheValidator.cs
- TextEditorSpelling.cs
- DataServiceRequest.cs
- _ConnectStream.cs
- MDIControlStrip.cs
- ChangesetResponse.cs
- SecurityElement.cs
- VariableAction.cs
- Transactions.cs
- VisualStyleInformation.cs
- SimpleBitVector32.cs
- OdbcConnectionString.cs
- OdbcConnectionOpen.cs
- HandleCollector.cs
- WSTrust.cs
- SqlNodeAnnotation.cs
- ObjectReaderCompiler.cs
- SqlGenericUtil.cs
- FormViewActionList.cs
- WebConvert.cs
- XmlEntityReference.cs
- PropertyChangedEventArgs.cs
- DocumentPage.cs
- ObfuscateAssemblyAttribute.cs
- EncryptedData.cs
- ReadWriteObjectLock.cs
- EncodingInfo.cs
- XhtmlCssHandler.cs
- basenumberconverter.cs
- WorkflowExecutor.cs
- SHA256CryptoServiceProvider.cs
- RunInstallerAttribute.cs
- PreProcessInputEventArgs.cs
- DropDownList.cs
- BitmapEffectGeneralTransform.cs
- Grid.cs
- XmlSerializerNamespaces.cs
- MachineSettingsSection.cs
- ComplexType.cs
- MonitoringDescriptionAttribute.cs
- PropertyGrid.cs
- HtmlLink.cs
- GuidelineCollection.cs
- TextDecorationUnitValidation.cs
- WebBrowserNavigatingEventHandler.cs
- CharKeyFrameCollection.cs
- DbResourceAllocator.cs
- DPAPIProtectedConfigurationProvider.cs
- HMACMD5.cs
- GridItemCollection.cs
- Literal.cs
- TemplateBamlTreeBuilder.cs
- FixedSOMImage.cs
- TableRowGroupCollection.cs
- TdsParser.cs
- CookielessHelper.cs
- _LazyAsyncResult.cs
- OdbcDataAdapter.cs
- LinqExpressionNormalizer.cs
- FormsAuthenticationUserCollection.cs
- WebControl.cs
- BitmapFrameDecode.cs
- FlowPosition.cs
- StandardOleMarshalObject.cs
- DataGridViewButtonColumn.cs
- SQLBoolean.cs
- FrugalList.cs
- MulticastIPAddressInformationCollection.cs
- ByeOperationCD1AsyncResult.cs
- FtpCachePolicyElement.cs
- SerialPort.cs
- DateTimeFormatInfo.cs
- SimpleMailWebEventProvider.cs
- IndexedString.cs
- SmtpMail.cs
- AssemblyInfo.cs
- CryptoApi.cs
- SiteMapSection.cs
- AggregationMinMaxHelpers.cs
- StrokeRenderer.cs
- NavigatingCancelEventArgs.cs
- BinaryReader.cs
- COM2TypeInfoProcessor.cs
- SqlDataSourceSelectingEventArgs.cs
- ListCollectionView.cs
- StylusPointProperty.cs
- HtmlTableCell.cs
- SQlBooleanStorage.cs
- DataServiceHost.cs
- SemanticAnalyzer.cs
- DbProviderFactory.cs
- WebPartsPersonalizationAuthorization.cs
- CompilerParameters.cs
- ProjectionPlanCompiler.cs
- LoadGrammarCompletedEventArgs.cs