aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.WiFi/Win32/Interop/Structs.cs
blob: b0efd6eefc4ef699ee550404edea90026a9f1c9f (plain)
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
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.NetworkInformation;
using System.Runtime.InteropServices;
using System.Text;

namespace Tango.WiFi.Win32.Interop
{

	/// <summary>
	/// The header of an array of information about available networks.
	/// </summary>
	[StructLayout(LayoutKind.Sequential)]
	internal struct WlanAvailableNetworkListHeader
	{
		/// <summary>
		/// Contains the number of <see cref=""/> items following the header.
		/// </summary>
		public uint numberOfItems;
		/// <summary>
		/// The index of the current item. The index of the first item is 0.
		/// </summary>
		public uint index;
	}

	/// <summary>
	/// Contains information about an available wireless network.
	/// </summary>
	[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
	public struct WlanAvailableNetwork
	{
		/// <summary>
		/// Contains the profile name associated with the network.
		/// If the network doesn't have a profile, this member will be empty.
		/// If multiple profiles are associated with the network, there will be multiple entries with the same SSID in the visible network list. Profile names are case-sensitive.
		/// </summary>
		[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
		public string profileName;
		/// <summary>
		/// Contains the SSID of the visible wireless network.
		/// </summary>
		public Dot11Ssid dot11Ssid;
		/// <summary>
		/// Specifies whether the network is infrastructure or ad hoc.
		/// </summary>
		public Dot11BssType dot11BssType;
		/// <summary>
		/// Indicates the number of BSSIDs in the network.
		/// </summary>
		public uint numberOfBssids;
		/// <summary>
		/// Indicates whether the network is connectable or not.
		/// </summary>
		public bool networkConnectable;
		/// <summary>
		/// Indicates why a network cannot be connected to. This member is only valid when <see cref="networkConnectable"/> is <c>false</c>.
		/// </summary>
		public WlanReasonCode wlanNotConnectableReason;
		/// <summary>
		/// The number of PHY types supported on available networks.
		/// The maximum value of this field is 8. If more than 8 PHY types are supported, <see cref="morePhyTypes"/> must be set to <c>true</c>.
		/// </summary>
		private uint numberOfPhyTypes;
		/// <summary>
		/// Contains an array of <see cref="Dot11PhyType"/> values that represent the PHY types supported by the available networks.
		/// When <see cref="numberOfPhyTypes"/> is greater than 8, this array contains only the first 8 PHY types.
		/// </summary>
		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
		private Dot11PhyType[] dot11PhyTypes;
		/// <summary>
		/// Gets the <see cref="Dot11PhyType"/> values that represent the PHY types supported by the available networks.
		/// </summary>
		public Dot11PhyType[] Dot11PhyTypes
		{
			get
			{
				Dot11PhyType[] ret = new Dot11PhyType[numberOfPhyTypes];
				Array.Copy(dot11PhyTypes, ret, numberOfPhyTypes);
				return ret;
			}
		}
		/// <summary>
		/// Specifies if there are more than 8 PHY types supported.
		/// When this member is set to <c>true</c>, an application must call <see cref="WlanClient.WlanInterface.GetNetworkBssList"/> to get the complete list of PHY types.
		/// <see cref="WlanBssEntry.phyId"/> contains the PHY type for an entry.
		/// </summary>
		public bool morePhyTypes;
		/// <summary>
		/// A percentage value that represents the signal quality of the network.
		/// This field contains a value between 0 and 100.
		/// A value of 0 implies an actual RSSI signal strength of -100 dbm.
		/// A value of 100 implies an actual RSSI signal strength of -50 dbm.
		/// You can calculate the RSSI signal strength value for values between 1 and 99 using linear interpolation.
		/// </summary>
		public uint wlanSignalQuality;
		/// <summary>
		/// Indicates whether security is enabled on the network.
		/// </summary>
		public bool securityEnabled;
		/// <summary>
		/// Indicates the default authentication algorithm used to join this network for the first time.
		/// </summary>
		public Dot11AuthAlgorithm dot11DefaultAuthAlgorithm;
		/// <summary>
		/// Indicates the default cipher algorithm to be used when joining this network.
		/// </summary>
		public Dot11CipherAlgorithm dot11DefaultCipherAlgorithm;
		/// <summary>
		/// Contains various flags for the network.
		/// </summary>
		public WlanAvailableNetworkFlags flags;
		/// <summary>
		/// Reserved for future use. Must be set to NULL.
		/// </summary>
		uint reserved;

		public bool Equals(WlanAvailableNetwork network)
		{
			// Compares the two SSID byte arrays
			return this.dot11Ssid.SSIDLength == network.dot11Ssid.SSIDLength 
				&& this.dot11Ssid.SSID.SequenceEqual(network.dot11Ssid.SSID);
		}
	}

	/// <summary>
	/// Contains information provided when registering for notifications.
	/// </summary>
	/// <remarks>
	/// Corresponds to the native <c>WLAN_NOTIFICATION_DATA</c> type.
	/// </remarks>
	[StructLayout(LayoutKind.Sequential)]
	public struct WlanNotificationData
	{
		/// <summary>
		/// Specifies where the notification comes from.
		/// </summary>
		/// <remarks>
		/// On Windows XP SP2, this field must be set to <see cref="WlanNotificationSource.None"/>, <see cref="WlanNotificationSource.All"/> or <see cref="WlanNotificationSource.ACM"/>.
		/// </remarks>
		public WlanNotificationSource notificationSource;
		/// <summary>
		/// Indicates the type of notification. The value of this field indicates what type of associated data will be present in <see cref="dataPtr"/>.
		/// </summary>
		public int notificationCode;
		/// <summary>
		/// Indicates which interface the notification is for.
		/// </summary>
		public Guid interfaceGuid;
		/// <summary>
		/// Specifies the size of <see cref="dataPtr"/>, in bytes.
		/// </summary>
		public int dataSize;
		/// <summary>
		/// Pointer to additional data needed for the notification, as indicated by <see cref="notificationCode"/>.
		/// </summary>
		public IntPtr dataPtr;

		/// <summary>
		/// Gets the notification code (in the correct enumeration type) according to the notification source.
		/// </summary>
		public object NotificationCode
		{
			get
			{
				if (notificationSource == WlanNotificationSource.MSM)
					return (WlanNotificationCodeMsm)notificationCode;
				else if (notificationSource == WlanNotificationSource.ACM)
					return (WlanNotificationCodeAcm)notificationCode;
				else
					return notificationCode;
			}

		}
	}


	/// <summary>
	/// Specifies the parameters used when using the <see cref="WlanConnect"/> function.
	/// </summary>
	/// <remarks>
	/// Corresponds to the native <c>WLAN_CONNECTION_PARAMETERS</c> type.
	/// </remarks>
	[StructLayout(LayoutKind.Sequential)]
	public struct WlanConnectionParameters
	{
		/// <summary>
		/// Specifies the mode of connection.
		/// </summary>
		public WlanConnectionMode wlanConnectionMode;
		/// <summary>
		/// Specifies the profile being used for the connection.
		/// The contents of the field depend on the <see cref="wlanConnectionMode"/>:
		/// <list type="table">
		/// <listheader>
		/// <term>Value of <see cref="wlanConnectionMode"/></term>
		/// <description>Contents of the profile string</description>
		/// </listheader>
		/// <item>
		/// <term><see cref="WlanConnectionMode.Profile"/></term>
		/// <description>The name of the profile used for the connection.</description>
		/// </item>
		/// <item>
		/// <term><see cref="WlanConnectionMode.TemporaryProfile"/></term>
		/// <description>The XML representation of the profile used for the connection.</description>
		/// </item>
		/// <item>
		/// <term><see cref="WlanConnectionMode.DiscoverySecure"/>, <see cref="WlanConnectionMode.DiscoveryUnsecure"/> or <see cref="WlanConnectionMode.Auto"/></term>
		/// <description><c>null</c></description>
		/// </item>
		/// </list>
		/// </summary>
		[MarshalAs(UnmanagedType.LPWStr)]
		public string profile;
		/// <summary>
		/// Pointer to a <see cref="Dot11Ssid"/> structure that specifies the SSID of the network to connect to.
		/// This field is optional. When set to <c>null</c>, all SSIDs in the profile will be tried.
		/// This field must not be <c>null</c> if <see cref="wlanConnectionMode"/> is set to <see cref="WlanConnectionMode.DiscoverySecure"/> or <see cref="WlanConnectionMode.DiscoveryUnsecure"/>.
		/// </summary>
		public IntPtr dot11SsidPtr;
		/// <summary>
		/// Pointer to a <see cref="Dot11BssidList"/> structure that contains the list of basic service set (BSS) identifiers desired for the connection.
		/// </summary>
		/// <remarks>
		/// On Windows XP SP2, must be set to <c>null</c>.
		/// </remarks>
		public IntPtr desiredBssidListPtr;
		/// <summary>
		/// A <see cref="Dot11BssType"/> value that indicates the BSS type of the network. If a profile is provided, this BSS type must be the same as the one in the profile.
		/// </summary>
		public Dot11BssType dot11BssType;
		/// <summary>
		/// Specifies ocnnection parameters.
		/// </summary>
		/// <remarks>
		/// On Windows XP SP2, must be set to 0.
		/// </remarks>
		public WlanConnectionFlags flags;
	}

	[StructLayout(LayoutKind.Sequential)]
	internal struct WlanBssListHeader
	{
		internal uint totalSize;
		internal uint numberOfItems;
	}
	
	/// <summary>
	/// Contains information about a basic service set (BSS).
	/// </summary>
	[StructLayout(LayoutKind.Sequential)]
	public struct WlanBssEntry
	{
		/// <summary>
		/// Contains the SSID of the access point (AP) associated with the BSS.
		/// </summary>
		public Dot11Ssid dot11Ssid;
		/// <summary>
		/// The identifier of the PHY on which the AP is operating.
		/// </summary>
		public uint phyId;
		/// <summary>
		/// Contains the BSS identifier.
		/// </summary>
		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
		public byte[] dot11Bssid;
		/// <summary>
		/// Specifies whether the network is infrastructure or ad hoc.
		/// </summary>
		public Dot11BssType dot11BssType;
		public Dot11PhyType dot11BssPhyType;
		/// <summary>
		/// The received signal strength in dBm.
		/// </summary>
		public int rssi;
		/// <summary>
		/// The link quality reported by the driver. Ranges from 0-100.
		/// </summary>
		public uint linkQuality;
		/// <summary>
		/// If 802.11d is not implemented, the network interface card (NIC) must set this field to TRUE. If 802.11d is implemented (but not necessarily enabled), the NIC must set this field to TRUE if the BSS operation complies with the configured regulatory domain.
		/// </summary>
		public bool inRegDomain;
		/// <summary>
		/// Contains the beacon interval value from the beacon packet or probe response.
		/// </summary>
		public ushort beaconPeriod;
		/// <summary>
		/// The timestamp from the beacon packet or probe response.
		/// </summary>
		public ulong timestamp;
		/// <summary>
		/// The host timestamp value when the beacon or probe response is received.
		/// </summary>
		public ulong hostTimestamp;
		/// <summary>
		/// The capability value from the beacon packet or probe response.
		/// </summary>
		public ushort capabilityInformation;
		/// <summary>
		/// The frequency of the center channel, in kHz.
		/// </summary>
		public uint chCenterFrequency;
		/// <summary>
		/// Contains the set of data transfer rates supported by the BSS.
		/// </summary>
		public WlanRateSet wlanRateSet;
		/// <summary>
		/// Offset of the information element (IE) data blob.
		/// </summary>
		public uint ieOffset;
		/// <summary>
		/// Size of the IE data blob, in bytes.
		/// </summary>
		public uint ieSize;
	}

	/// <summary>
	/// Contains the set of supported data rates.
	/// </summary>
	[StructLayout(LayoutKind.Sequential)]
	public struct WlanRateSet
	{
		/// <summary>
		/// The length, in bytes, of <see cref="rateSet"/>.
		/// </summary>
		private uint rateSetLength;
		/// <summary>
		/// An array of supported data transfer rates.
		/// If the rate is a basic rate, the first bit of the rate value is set to 1.
		/// A basic rate is the data transfer rate that all stations in a basic service set (BSS) can use to receive frames from the wireless medium.
		/// </summary>
		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 126)]
		private ushort[] rateSet;

		public ushort[] Rates
		{
			get
			{
				ushort[] rates = new ushort[rateSetLength / sizeof(ushort)];
				Array.Copy(rateSet, rates, rates.Length);
				return rates;
			}
		}

		/// <summary>
		/// CalculateS the data transfer rate in Mbps for an arbitrary supported rate.
		/// </summary>
		/// <param name="rate"></param>
		/// <returns></returns>
		public double GetRateInMbps(int rate)
		{
			return (rateSet[rate] & 0x7FFF) * 0.5;
		}
	}


	/// <summary>
	/// Contains information about connection related notifications.
	/// </summary>
	/// <remarks>
	/// Corresponds to the native <c>WLAN_CONNECTION_NOTIFICATION_DATA</c> type.
	/// </remarks>
	[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
	public struct WlanConnectionNotificationData
	{
		/// <remarks>
		/// On Windows XP SP 2, only <see cref="WlanConnectionMode.Profile"/> is supported.
		/// </remarks>
		public WlanConnectionMode wlanConnectionMode;
		/// <summary>
		/// The name of the profile used for the connection. Profile names are case-sensitive.
		/// </summary>
		[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
		public string profileName;
		/// <summary>
		/// The SSID of the association.
		/// </summary>
		public Dot11Ssid dot11Ssid;
		/// <summary>
		/// The BSS network type.
		/// </summary>
		public Dot11BssType dot11BssType;
		/// <summary>
		/// Indicates whether security is enabled for this connection.
		/// </summary>
		public bool securityEnabled;
		/// <summary>
		/// Indicates the reason for an operation failure.
		/// This field has a value of <see cref="WlanReasonCode.Success"/> for all connection-related notifications except <see cref="WlanNotificationCodeAcm.ConnectionComplete"/>.
		/// If the connection fails, this field indicates the reason for the failure.
		/// </summary>
		public WlanReasonCode wlanReasonCode;
		/// <summary>
		/// This field contains the XML presentation of the profile used for discovery, if the connection succeeds.
		/// </summary>
		[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1)]
		public string profileXml;
	}


	/// <summary>
	/// Contains the SSID of an interface.
	/// </summary>
	public struct Dot11Ssid
	{
		/// <summary>
		/// The length, in bytes, of the <see cref="SSID"/> array.
		/// </summary>
		public uint SSIDLength;
		/// <summary>
		/// The SSID.
		/// </summary>
		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
		public byte[] SSID;
	}

	/// <summary>
	/// Contains association attributes for a connection
	/// </summary>
	/// <remarks>
	/// Corresponds to the native <c>WLAN_ASSOCIATION_ATTRIBUTES</c> type.
	/// </remarks>
	[StructLayout(LayoutKind.Sequential)]
	public struct WlanAssociationAttributes
	{
		/// <summary>
		/// The SSID of the association.
		/// </summary>
		public Dot11Ssid dot11Ssid;
		/// <summary>
		/// Specifies whether the network is infrastructure or ad hoc.
		/// </summary>
		public Dot11BssType dot11BssType;
		/// <summary>
		/// The BSSID of the association.
		/// </summary>
		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
		public byte[] dot11Bssid;
		/// <summary>
		/// The physical type of the association.
		/// </summary>
		public Dot11PhyType dot11PhyType;
		/// <summary>
		/// The position of the <see cref="Dot11PhyType"/> value in the structure containing the list of PHY types.
		/// </summary>
		public uint dot11PhyIndex;
		/// <summary>
		/// A percentage value that represents the signal quality of the network.
		/// This field contains a value between 0 and 100.
		/// A value of 0 implies an actual RSSI signal strength of -100 dbm.
		/// A value of 100 implies an actual RSSI signal strength of -50 dbm.
		/// You can calculate the RSSI signal strength value for values between 1 and 99 using linear interpolation.
		/// </summary>
		public uint wlanSignalQuality;
		/// <summary>
		/// The receiving rate of the association.
		/// </summary>
		public uint rxRate;
		/// <summary>
		/// The transmission rate of the association.
		/// </summary>
		public uint txRate;

		/// <summary>
		/// Gets the BSSID of the associated access point.
		/// </summary>
		/// <value>The BSSID.</value>
		public PhysicalAddress Dot11Bssid
		{
			get { return new PhysicalAddress(dot11Bssid); }
		}
	}

	/// <summary>
	/// Defines the security attributes for a wireless connection.
	/// </summary>
	/// <remarks>
	/// Corresponds to the native <c>WLAN_SECURITY_ATTRIBUTES</c> type.
	/// </remarks>
	[StructLayout(LayoutKind.Sequential)]
	public struct WlanSecurityAttributes
	{
		/// <summary>
		/// Indicates whether security is enabled for this connection.
		/// </summary>
		[MarshalAs(UnmanagedType.Bool)]
		public bool securityEnabled;
		[MarshalAs(UnmanagedType.Bool)]
		public bool oneXEnabled;
		/// <summary>
		/// The authentication algorithm.
		/// </summary>
		public Dot11AuthAlgorithm dot11AuthAlgorithm;
		/// <summary>
		/// The cipher algorithm.
		/// </summary>
		public Dot11CipherAlgorithm dot11CipherAlgorithm;
	}

	/// <summary>
	/// Defines the attributes of a wireless connection.
	/// </summary>
	/// <remarks>
	/// Corresponds to the native <c>WLAN_CONNECTION_ATTRIBUTES</c> type.
	/// </remarks>
	[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
	public struct WlanConnectionAttributes
	{
		/// <summary>
		/// The state of the interface.
		/// </summary>
		public WlanInterfaceState isState;
		/// <summary>
		/// The mode of the connection.
		/// </summary>
		public WlanConnectionMode wlanConnectionMode;
		/// <summary>
		/// The name of the profile used for the connection. Profile names are case-sensitive.
		/// </summary>
		[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
		public string profileName;
		/// <summary>
		/// The attributes of the association.
		/// </summary>
		public WlanAssociationAttributes wlanAssociationAttributes;
		/// <summary>
		/// The security attributes of the connection.
		/// </summary>
		public WlanSecurityAttributes wlanSecurityAttributes;
	}

	/// <summary>
	/// Contains information about a LAN interface.
	/// </summary>
	[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
	public struct WlanInterfaceInfo
	{
		/// <summary>
		/// The GUID of the interface.
		/// </summary>
		public Guid interfaceGuid;
		/// <summary>
		/// The description of the interface.
		/// </summary>
		[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
		public string interfaceDescription;
		/// <summary>
		/// The current state of the interface.
		/// </summary>
		public WlanInterfaceState isState;
	}

	/// <summary>
	/// The header of the list returned by <see cref="WlanEnumInterfaces"/>.
	/// </summary>
	[StructLayout(LayoutKind.Sequential)]
	internal struct WlanInterfaceInfoListHeader
	{
		public uint numberOfItems;
		public uint index;
	}

	/// <summary>
	/// The header of the list returned by <see cref="WlanGetProfileList"/>.
	/// </summary>
	[StructLayout(LayoutKind.Sequential)]
	internal struct WlanProfileInfoListHeader
	{
		public uint numberOfItems;
		public uint index;
	}

	/// <summary>
	/// Contains basic information about a profile.
	/// </summary>
	[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
	public struct WlanProfileInfo
	{
		/// <summary>
		/// The name of the profile. This value may be the name of a domain if the profile is for provisioning. Profile names are case-sensitive.
		/// </summary>
		[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
		public string profileName;
		/// <summary>
		/// Profile flags.
		/// </summary>
		public WlanProfileFlags profileFlags;
	}

	/*
	/// <summary>
	/// The EAP_METHOD_TYPE structure contains type, identification, and author information about an EAP method.
	/// </summary>
	[StructLayout(LayoutKind.Sequential)]
	public struct EapMethodType
	{
		public EapType eapType; // EAP_TYPE structure that contains the ID for the EAP method as well as specific vendor information.
		public uint dwAuthorId; // The numeric ID for the author of the EAP method.
	}

	/// <summary>
	/// The EAP_TYPE structure contains type and vendor identification information for an EAP method.
	/// </summary>
	[StructLayout(LayoutKind.Sequential)]
	public struct EapType
	{
		public byte type;			// The numeric type code for this EAP method, Note  For more information on the allocation of EAP method types, see section 6.2 of RFC 3748: http://go.microsoft.com/fwlink/p/?linkid=84016
		public uint dwVendorId;		// The vendor ID for the EAP method.
		public uint dwVendorType;	// The numeric type code for the vendor of this EAP method.
	}*/
}