/
PingOptions.xml
329 lines (293 loc) · 19.3 KB
/
PingOptions.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
<Type Name="PingOptions" FullName="System.Net.NetworkInformation.PingOptions">
<TypeSignature Language="C#" Value="public class PingOptions" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit PingOptions extends System.Object" />
<TypeSignature Language="DocId" Value="T:System.Net.NetworkInformation.PingOptions" />
<TypeSignature Language="VB.NET" Value="Public Class PingOptions" />
<TypeSignature Language="F#" Value="type PingOptions = class" />
<TypeSignature Language="C++ CLI" Value="public ref class PingOptions" />
<AssemblyInfo>
<AssemblyName>System.Net.Ping</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<TypeForwardingChain>
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Net.Ping" ToVersion="5.0.0.0" FrameworkAlternate="net-5.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Net.Ping" ToVersion="6.0.0.0" FrameworkAlternate="net-6.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Net.Ping" ToVersion="7.0.0.0" FrameworkAlternate="net-7.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Net.Ping" ToVersion="8.0.0.0" FrameworkAlternate="net-8.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Net.Ping" ToVersion="9.0.0.0" FrameworkAlternate="net-9.0" />
</TypeForwardingChain>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>Used to control how <see cref="T:System.Net.NetworkInformation.Ping" /> data packets are transmitted.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Net.NetworkInformation.PingOptions> class provides the <xref:System.Net.NetworkInformation.PingOptions.Ttl%2A> and <xref:System.Net.NetworkInformation.PingOptions.DontFragment%2A> properties to control how Internet Control Message Protocol (ICMP) echo request packets are transmitted.
The <xref:System.Net.NetworkInformation.PingOptions.Ttl%2A> property specifies the Time to Live for packets sent by the <xref:System.Net.NetworkInformation.Ping> class. This value indicates the number of routing nodes that can forward a <xref:System.Net.NetworkInformation.Ping> packet before it is discarded. Setting this option is useful if you want to test the number of forwards, also known as hops, are required to send a packet from a source computer to a destination computer.
The <xref:System.Net.NetworkInformation.PingOptions.DontFragment%2A> property controls whether data sent to a remote host can be divided into multiple packets. This option is useful if you want to test the maximum transmission unit (MTU) of the routers and gateways used to transmit the packet.
Instances of the <xref:System.Net.NetworkInformation.PingOptions> class are passed to the <xref:System.Net.NetworkInformation.Ping.Send%2A> and <xref:System.Net.NetworkInformation.Ping.SendAsync%2A> methods, and the <xref:System.Net.NetworkInformation.PingReply> class returns instances of <xref:System.Net.NetworkInformation.PingOptions> via the <xref:System.Net.NetworkInformation.PingReply.Options%2A> property.
For a list of initial property values for an instance of <xref:System.Net.NetworkInformation.PingOptions>, see the <xref:System.Net.NetworkInformation.PingOptions.%23ctor%2A> constructor.
## Examples
The following code example uses the <xref:System.Net.NetworkInformation.Ping>, <xref:System.Net.NetworkInformation.PingOptions> and <xref:System.Net.NetworkInformation.PingReply> classes to send an ICMP echo request to the host specified on the command line.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclPingSync/CPP/syncping.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IPStatus/Overview/syncping.cs" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/System.Net.NetworkInformation/IPStatus/Overview/syncping.fs" id="Snippet1":::
]]></format>
</remarks>
</Docs>
<Members>
<MemberGroup MemberName=".ctor">
<AssemblyInfo>
<AssemblyName>System.Net.Ping</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Net.NetworkInformation.PingOptions" /> class.</summary>
</Docs>
</MemberGroup>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public PingOptions ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.NetworkInformation.PingOptions.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:
 PingOptions();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Ping</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Net.NetworkInformation.PingOptions" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The following table shows initial property values for an instance of <xref:System.Net.NetworkInformation.PingOptions>.
|Property|Initial Value|
|--------------|-------------------|
|<xref:System.Net.NetworkInformation.PingOptions.Ttl%2A>|128|
|<xref:System.Net.NetworkInformation.PingOptions.DontFragment%2A>|`false`|
You can set the properties to new values before calling <xref:System.Net.NetworkInformation.Ping.Send%2A> or <xref:System.Net.NetworkInformation.Ping.SendAsync%2A>.
## Examples
The following code example demonstrates calling this constructor.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclPingSync/CPP/syncping.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/IPStatus/Overview/syncping.cs" id="Snippet2":::
:::code language="fsharp" source="~/snippets/fsharp/System.Net.NetworkInformation/IPStatus/Overview/syncping.fs" id="Snippet2":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public PingOptions (int ttl, bool dontFragment);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(int32 ttl, bool dontFragment) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.NetworkInformation.PingOptions.#ctor(System.Int32,System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (ttl As Integer, dontFragment As Boolean)" />
<MemberSignature Language="F#" Value="new System.Net.NetworkInformation.PingOptions : int * bool -> System.Net.NetworkInformation.PingOptions" Usage="new System.Net.NetworkInformation.PingOptions (ttl, dontFragment)" />
<MemberSignature Language="C++ CLI" Value="public:
 PingOptions(int ttl, bool dontFragment);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Ping</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="ttl" Type="System.Int32" />
<Parameter Name="dontFragment" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="ttl">An <see cref="T:System.Int32" /> value greater than zero that specifies the number of times that the <see cref="T:System.Net.NetworkInformation.Ping" /> data packets can be forwarded.</param>
<param name="dontFragment">
<see langword="true" /> to prevent data sent to the remote host from being fragmented; otherwise, <see langword="false" />.</param>
<summary>Initializes a new instance of the <see cref="T:System.Net.NetworkInformation.PingOptions" /> class and sets the Time to Live and fragmentation values.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The `ttl` parameter limits the number of routers and gateways that can forward the data. This is useful for testing the length of the route between the local and remote computers. The `dontFragment` parameter allows you to test the maximum transmission unit (MTU) of the routers and gateways used to transmit the packet.
## Examples
The following code example demonstrates calling this constructor and displaying the new instance's property values.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclPingAsync/CPP/asyncping.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/Ping/Overview/asyncping.cs" id="Snippet3":::
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="ttl" /> is less than or equal to zero.</exception>
</Docs>
</Member>
<Member MemberName="DontFragment">
<MemberSignature Language="C#" Value="public bool DontFragment { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool DontFragment" />
<MemberSignature Language="DocId" Value="P:System.Net.NetworkInformation.PingOptions.DontFragment" />
<MemberSignature Language="VB.NET" Value="Public Property DontFragment As Boolean" />
<MemberSignature Language="F#" Value="member this.DontFragment : bool with get, set" Usage="System.Net.NetworkInformation.PingOptions.DontFragment" />
<MemberSignature Language="C++ CLI" Value="public:
 property bool DontFragment { bool get(); void set(bool value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Ping</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a <see cref="T:System.Boolean" /> value that controls fragmentation of the data sent to the remote host.</summary>
<value>
<see langword="true" /> if the data cannot be sent in multiple packets; otherwise <see langword="false" />. The default is <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Applications use this property to control whether data sent to a remote host by the <xref:System.Net.NetworkInformation.Ping> class can be divided into multiple packets. This option is useful if you want to test the maximum transmission unit (MTU) of the routers and gateways used to transmit the packet. If this property is `true` and the data sent to the remote host is larger then the MTU of a gateway or router between the sender and the remote host, the ping operation fails with status <xref:System.Net.NetworkInformation.IPStatus.PacketTooBig>.
## Examples
The following code example demonstrates setting the value of this property using a <xref:System.Net.NetworkInformation.PingOptions.%23ctor%2A> constructor, and then displaying the value.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclPingAsync/CPP/asyncping.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/Ping/Overview/asyncping.cs" id="Snippet3":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Ttl">
<MemberSignature Language="C#" Value="public int Ttl { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 Ttl" />
<MemberSignature Language="DocId" Value="P:System.Net.NetworkInformation.PingOptions.Ttl" />
<MemberSignature Language="VB.NET" Value="Public Property Ttl As Integer" />
<MemberSignature Language="F#" Value="member this.Ttl : int with get, set" Usage="System.Net.NetworkInformation.PingOptions.Ttl" />
<MemberSignature Language="C++ CLI" Value="public:
 property int Ttl { int get(); void set(int value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Ping</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the number of routing nodes that can forward the <see cref="T:System.Net.NetworkInformation.Ping" /> data before it is discarded.</summary>
<value>An <see cref="T:System.Int32" /> value that specifies the number of times the <see cref="T:System.Net.NetworkInformation.Ping" /> data packets can be forwarded. The default is 128.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
As gateways and routers transmit packets through a network, they decrement the current Time-to-Live (TTL) value found in the packet header. If the TTL value reaches zero, the packet is deemed undeliverable and is discarded. This option is useful if you want to test the number of routers and gateways used to transmit the data.
## Examples
The following code example demonstrates setting the value of this property using a <xref:System.Net.NetworkInformation.PingOptions.%23ctor%2A> constructor, and then displaying the value.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/NclPingAsync/CPP/asyncping.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Net.NetworkInformation/Ping/Overview/asyncping.cs" id="Snippet3":::
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">The value specified for a set operation is less than or equal to zero.</exception>
</Docs>
</Member>
</Members>
</Type>