Skip to content

Commit c2082ce

Browse files
author
Vitaly Orekhov
authored
[PSDK] Define maximum SSID length properly (reactos#7394)
Avoid using magic numbers for structures and ease the day for those who do not remember IEEE 802.11 specifications by heart. - Add a #define that matches by name with one used since day one of Visual Studio 2008 (VS2005 does not have Native Wi-Fi SDK) - Remove magic constant from DOT11_SSID.ucSSID size definition Reference: https://learn.microsoft.com/en-us/windows/win32/nativewifi/dot11-ssid CORE-6905
1 parent 1c0b769 commit c2082ce

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

sdk/include/psdk/windot11.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ typedef DOT11_MAC_ADDRESS* PDOT11_MAC_ADDRESS;
6464

6565
typedef struct _DOT11_SSID {
6666
ULONG uSSIDLength;
67-
UCHAR ucSSID[32];
67+
UCHAR ucSSID[DOT11_SSID_MAX_LENGTH];
6868
} DOT11_SSID, *PDOT11_SSID;
6969

7070
typedef struct _DOT11_BSSID_LIST {

sdk/include/psdk/wlantypes.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ typedef enum _DOT11_BSS_TYPE {
77
dot11_BSS_type_any
88
} DOT11_BSS_TYPE;
99

10+
#define DOT11_SSID_MAX_LENGTH 32
1011

1112
#endif
1213

0 commit comments

Comments
 (0)