ホーム › NetworkManagement.WiFi › DOT11_EXTSTA_CAPABILITY
DOT11_EXTSTA_CAPABILITY
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Header | NDIS_OBJECT_HEADER | 4 | +0 | +0 | NDIS オブジェクトのバージョン情報を含むヘッダー。 |
| uScanSSIDListSize | DWORD | 4 | +4 | +4 | スキャン SSID リストの最大サイズを表す。 |
| uDesiredBSSIDListSize | DWORD | 4 | +8 | +8 | 希望 BSSID リストの最大サイズを表す。 |
| uDesiredSSIDListSize | DWORD | 4 | +12 | +12 | 希望 SSID リストの最大サイズを表す。 |
| uExcludedMacAddressListSize | DWORD | 4 | +16 | +16 | 除外 MAC アドレスリストの最大サイズを表す。 |
| uPrivacyExemptionListSize | DWORD | 4 | +20 | +20 | プライバシー免除リストの最大サイズを表す。 |
| uKeyMappingTableSize | DWORD | 4 | +24 | +24 | 鍵マッピングテーブルの最大サイズを表す。 |
| uDefaultKeyTableSize | DWORD | 4 | +28 | +28 | 既定鍵テーブルの最大サイズを表す。 |
| uWEPKeyValueMaxLength | DWORD | 4 | +32 | +32 | WEP 鍵値の最大長を表す。 |
| uPMKIDCacheSize | DWORD | 4 | +36 | +36 | PMKID キャッシュの最大サイズを表す。 |
| uMaxNumPerSTADefaultKeyTables | DWORD | 4 | +40 | +40 | STA ごとの既定鍵テーブル最大数を表す。 |
各言語での定義
#include <windows.h>
// NDIS_OBJECT_HEADER (x64 4 / x86 4 バイト)
typedef struct NDIS_OBJECT_HEADER {
BYTE Type;
BYTE Revision;
WORD Size;
} NDIS_OBJECT_HEADER;
// DOT11_EXTSTA_CAPABILITY (x64 44 / x86 44 バイト)
typedef struct DOT11_EXTSTA_CAPABILITY {
NDIS_OBJECT_HEADER Header;
DWORD uScanSSIDListSize;
DWORD uDesiredBSSIDListSize;
DWORD uDesiredSSIDListSize;
DWORD uExcludedMacAddressListSize;
DWORD uPrivacyExemptionListSize;
DWORD uKeyMappingTableSize;
DWORD uDefaultKeyTableSize;
DWORD uWEPKeyValueMaxLength;
DWORD uPMKIDCacheSize;
DWORD uMaxNumPerSTADefaultKeyTables;
} DOT11_EXTSTA_CAPABILITY;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct NDIS_OBJECT_HEADER
{
public byte Type;
public byte Revision;
public ushort Size;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DOT11_EXTSTA_CAPABILITY
{
public NDIS_OBJECT_HEADER Header;
public uint uScanSSIDListSize;
public uint uDesiredBSSIDListSize;
public uint uDesiredSSIDListSize;
public uint uExcludedMacAddressListSize;
public uint uPrivacyExemptionListSize;
public uint uKeyMappingTableSize;
public uint uDefaultKeyTableSize;
public uint uWEPKeyValueMaxLength;
public uint uPMKIDCacheSize;
public uint uMaxNumPerSTADefaultKeyTables;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure NDIS_OBJECT_HEADER
Public Type As Byte
Public Revision As Byte
Public Size As UShort
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DOT11_EXTSTA_CAPABILITY
Public Header As NDIS_OBJECT_HEADER
Public uScanSSIDListSize As UInteger
Public uDesiredBSSIDListSize As UInteger
Public uDesiredSSIDListSize As UInteger
Public uExcludedMacAddressListSize As UInteger
Public uPrivacyExemptionListSize As UInteger
Public uKeyMappingTableSize As UInteger
Public uDefaultKeyTableSize As UInteger
Public uWEPKeyValueMaxLength As UInteger
Public uPMKIDCacheSize As UInteger
Public uMaxNumPerSTADefaultKeyTables As UInteger
End Structureimport ctypes
from ctypes import wintypes
class NDIS_OBJECT_HEADER(ctypes.Structure):
_fields_ = [
("Type", ctypes.c_ubyte),
("Revision", ctypes.c_ubyte),
("Size", ctypes.c_ushort),
]
class DOT11_EXTSTA_CAPABILITY(ctypes.Structure):
_fields_ = [
("Header", NDIS_OBJECT_HEADER),
("uScanSSIDListSize", wintypes.DWORD),
("uDesiredBSSIDListSize", wintypes.DWORD),
("uDesiredSSIDListSize", wintypes.DWORD),
("uExcludedMacAddressListSize", wintypes.DWORD),
("uPrivacyExemptionListSize", wintypes.DWORD),
("uKeyMappingTableSize", wintypes.DWORD),
("uDefaultKeyTableSize", wintypes.DWORD),
("uWEPKeyValueMaxLength", wintypes.DWORD),
("uPMKIDCacheSize", wintypes.DWORD),
("uMaxNumPerSTADefaultKeyTables", wintypes.DWORD),
]#[repr(C)]
pub struct NDIS_OBJECT_HEADER {
pub Type: u8,
pub Revision: u8,
pub Size: u16,
}
#[repr(C)]
pub struct DOT11_EXTSTA_CAPABILITY {
pub Header: NDIS_OBJECT_HEADER,
pub uScanSSIDListSize: u32,
pub uDesiredBSSIDListSize: u32,
pub uDesiredSSIDListSize: u32,
pub uExcludedMacAddressListSize: u32,
pub uPrivacyExemptionListSize: u32,
pub uKeyMappingTableSize: u32,
pub uDefaultKeyTableSize: u32,
pub uWEPKeyValueMaxLength: u32,
pub uPMKIDCacheSize: u32,
pub uMaxNumPerSTADefaultKeyTables: u32,
}import "golang.org/x/sys/windows"
type NDIS_OBJECT_HEADER struct {
Type byte
Revision byte
Size uint16
}
type DOT11_EXTSTA_CAPABILITY struct {
Header NDIS_OBJECT_HEADER
uScanSSIDListSize uint32
uDesiredBSSIDListSize uint32
uDesiredSSIDListSize uint32
uExcludedMacAddressListSize uint32
uPrivacyExemptionListSize uint32
uKeyMappingTableSize uint32
uDefaultKeyTableSize uint32
uWEPKeyValueMaxLength uint32
uPMKIDCacheSize uint32
uMaxNumPerSTADefaultKeyTables uint32
}type
NDIS_OBJECT_HEADER = record
Type: Byte;
Revision: Byte;
Size: Word;
end;
DOT11_EXTSTA_CAPABILITY = record
Header: NDIS_OBJECT_HEADER;
uScanSSIDListSize: DWORD;
uDesiredBSSIDListSize: DWORD;
uDesiredSSIDListSize: DWORD;
uExcludedMacAddressListSize: DWORD;
uPrivacyExemptionListSize: DWORD;
uKeyMappingTableSize: DWORD;
uDefaultKeyTableSize: DWORD;
uWEPKeyValueMaxLength: DWORD;
uPMKIDCacheSize: DWORD;
uMaxNumPerSTADefaultKeyTables: DWORD;
end;const NDIS_OBJECT_HEADER = extern struct {
Type: u8,
Revision: u8,
Size: u16,
};
const DOT11_EXTSTA_CAPABILITY = extern struct {
Header: NDIS_OBJECT_HEADER,
uScanSSIDListSize: u32,
uDesiredBSSIDListSize: u32,
uDesiredSSIDListSize: u32,
uExcludedMacAddressListSize: u32,
uPrivacyExemptionListSize: u32,
uKeyMappingTableSize: u32,
uDefaultKeyTableSize: u32,
uWEPKeyValueMaxLength: u32,
uPMKIDCacheSize: u32,
uMaxNumPerSTADefaultKeyTables: u32,
};type
NDIS_OBJECT_HEADER {.bycopy.} = object
Type: uint8
Revision: uint8
Size: uint16
DOT11_EXTSTA_CAPABILITY {.bycopy.} = object
Header: NDIS_OBJECT_HEADER
uScanSSIDListSize: uint32
uDesiredBSSIDListSize: uint32
uDesiredSSIDListSize: uint32
uExcludedMacAddressListSize: uint32
uPrivacyExemptionListSize: uint32
uKeyMappingTableSize: uint32
uDefaultKeyTableSize: uint32
uWEPKeyValueMaxLength: uint32
uPMKIDCacheSize: uint32
uMaxNumPerSTADefaultKeyTables: uint32struct NDIS_OBJECT_HEADER
{
ubyte Type;
ubyte Revision;
ushort Size;
}
struct DOT11_EXTSTA_CAPABILITY
{
NDIS_OBJECT_HEADER Header;
uint uScanSSIDListSize;
uint uDesiredBSSIDListSize;
uint uDesiredSSIDListSize;
uint uExcludedMacAddressListSize;
uint uPrivacyExemptionListSize;
uint uKeyMappingTableSize;
uint uDefaultKeyTableSize;
uint uWEPKeyValueMaxLength;
uint uPMKIDCacheSize;
uint uMaxNumPerSTADefaultKeyTables;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DOT11_EXTSTA_CAPABILITY サイズ: 44 バイト(x64)
dim st, 11 ; 4byte整数×11(構造体サイズ 44 / 4 切り上げ)
; Header : NDIS_OBJECT_HEADER (+0, 4byte) varptr(st)+0 を基点に操作(4byte:入れ子/配列)
; uScanSSIDListSize : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; uDesiredBSSIDListSize : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; uDesiredSSIDListSize : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; uExcludedMacAddressListSize : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; uPrivacyExemptionListSize : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; uKeyMappingTableSize : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; uDefaultKeyTableSize : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; uWEPKeyValueMaxLength : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; uPMKIDCacheSize : DWORD (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; uMaxNumPerSTADefaultKeyTables : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global NDIS_OBJECT_HEADER
#field byte Type
#field byte Revision
#field short Size
#endstruct
#defstruct global DOT11_EXTSTA_CAPABILITY
#field NDIS_OBJECT_HEADER Header
#field int uScanSSIDListSize
#field int uDesiredBSSIDListSize
#field int uDesiredSSIDListSize
#field int uExcludedMacAddressListSize
#field int uPrivacyExemptionListSize
#field int uKeyMappingTableSize
#field int uDefaultKeyTableSize
#field int uWEPKeyValueMaxLength
#field int uPMKIDCacheSize
#field int uMaxNumPerSTADefaultKeyTables
#endstruct
stdim st, DOT11_EXTSTA_CAPABILITY ; NSTRUCT 変数を確保
st->uScanSSIDListSize = 100
mes "uScanSSIDListSize=" + st->uScanSSIDListSize