ホーム › NetworkManagement.WiFi › DOT11_SCAN_REQUEST_V2
DOT11_SCAN_REQUEST_V2
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| dot11BSSType | DOT11_BSS_TYPE | 4 | +0 | +0 | スキャン対象の BSS 種別(インフラ/アドホック)。 |
| dot11BSSID | BYTE | 6 | +4 | +4 | スキャン対象 BSSID。全FFでワイルドカード指定。 |
| dot11ScanType | DOT11_SCAN_TYPE | 4 | +12 | +12 | アクティブ/パッシブ等のスキャン方式を示す。 |
| bRestrictedScan | BOOLEAN | 1 | +16 | +16 | 制限付きスキャンを行うか示すフラグ。 |
| udot11SSIDsOffset | DWORD | 4 | +20 | +20 | SSID 配列への先頭からのオフセット。 |
| uNumOfdot11SSIDs | DWORD | 4 | +24 | +24 | スキャン対象 SSID の個数を表す。 |
| bUseRequestIE | BOOLEAN | 1 | +28 | +28 | 要求情報要素を使用するか示すフラグ。 |
| uRequestIDsOffset | DWORD | 4 | +32 | +32 | 要求 ID 配列への先頭からのオフセット。 |
| uNumOfRequestIDs | DWORD | 4 | +36 | +36 | 要求 ID の個数を表す。 |
| uPhyTypeInfosOffset | DWORD | 4 | +40 | +40 | PHY 種別情報配列への先頭からのオフセット。 |
| uNumOfPhyTypeInfos | DWORD | 4 | +44 | +44 | PHY 種別情報の個数を表す。 |
| uIEsOffset | DWORD | 4 | +48 | +48 | 情報要素データへの先頭からのオフセット。 |
| uIEsLength | DWORD | 4 | +52 | +52 | 情報要素データのバイト長を表す。 |
| ucBuffer | BYTE | 1 | +56 | +56 | 可変長データを格納する汎用バッファ。 |
各言語での定義
#include <windows.h>
// DOT11_SCAN_REQUEST_V2 (x64 60 / x86 60 バイト)
typedef struct DOT11_SCAN_REQUEST_V2 {
DOT11_BSS_TYPE dot11BSSType;
BYTE dot11BSSID[6];
DOT11_SCAN_TYPE dot11ScanType;
BOOLEAN bRestrictedScan;
DWORD udot11SSIDsOffset;
DWORD uNumOfdot11SSIDs;
BOOLEAN bUseRequestIE;
DWORD uRequestIDsOffset;
DWORD uNumOfRequestIDs;
DWORD uPhyTypeInfosOffset;
DWORD uNumOfPhyTypeInfos;
DWORD uIEsOffset;
DWORD uIEsLength;
BYTE ucBuffer[1];
} DOT11_SCAN_REQUEST_V2;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DOT11_SCAN_REQUEST_V2
{
public int dot11BSSType;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)] public byte[] dot11BSSID;
public int dot11ScanType;
[MarshalAs(UnmanagedType.U1)] public bool bRestrictedScan;
public uint udot11SSIDsOffset;
public uint uNumOfdot11SSIDs;
[MarshalAs(UnmanagedType.U1)] public bool bUseRequestIE;
public uint uRequestIDsOffset;
public uint uNumOfRequestIDs;
public uint uPhyTypeInfosOffset;
public uint uNumOfPhyTypeInfos;
public uint uIEsOffset;
public uint uIEsLength;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)] public byte[] ucBuffer;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DOT11_SCAN_REQUEST_V2
Public dot11BSSType As Integer
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=6)> Public dot11BSSID() As Byte
Public dot11ScanType As Integer
<MarshalAs(UnmanagedType.U1)> Public bRestrictedScan As Boolean
Public udot11SSIDsOffset As UInteger
Public uNumOfdot11SSIDs As UInteger
<MarshalAs(UnmanagedType.U1)> Public bUseRequestIE As Boolean
Public uRequestIDsOffset As UInteger
Public uNumOfRequestIDs As UInteger
Public uPhyTypeInfosOffset As UInteger
Public uNumOfPhyTypeInfos As UInteger
Public uIEsOffset As UInteger
Public uIEsLength As UInteger
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=1)> Public ucBuffer() As Byte
End Structureimport ctypes
from ctypes import wintypes
class DOT11_SCAN_REQUEST_V2(ctypes.Structure):
_fields_ = [
("dot11BSSType", ctypes.c_int),
("dot11BSSID", ctypes.c_ubyte * 6),
("dot11ScanType", ctypes.c_int),
("bRestrictedScan", ctypes.c_byte),
("udot11SSIDsOffset", wintypes.DWORD),
("uNumOfdot11SSIDs", wintypes.DWORD),
("bUseRequestIE", ctypes.c_byte),
("uRequestIDsOffset", wintypes.DWORD),
("uNumOfRequestIDs", wintypes.DWORD),
("uPhyTypeInfosOffset", wintypes.DWORD),
("uNumOfPhyTypeInfos", wintypes.DWORD),
("uIEsOffset", wintypes.DWORD),
("uIEsLength", wintypes.DWORD),
("ucBuffer", ctypes.c_ubyte * 1),
]#[repr(C)]
pub struct DOT11_SCAN_REQUEST_V2 {
pub dot11BSSType: i32,
pub dot11BSSID: [u8; 6],
pub dot11ScanType: i32,
pub bRestrictedScan: u8,
pub udot11SSIDsOffset: u32,
pub uNumOfdot11SSIDs: u32,
pub bUseRequestIE: u8,
pub uRequestIDsOffset: u32,
pub uNumOfRequestIDs: u32,
pub uPhyTypeInfosOffset: u32,
pub uNumOfPhyTypeInfos: u32,
pub uIEsOffset: u32,
pub uIEsLength: u32,
pub ucBuffer: [u8; 1],
}import "golang.org/x/sys/windows"
type DOT11_SCAN_REQUEST_V2 struct {
dot11BSSType int32
dot11BSSID [6]byte
dot11ScanType int32
bRestrictedScan byte
udot11SSIDsOffset uint32
uNumOfdot11SSIDs uint32
bUseRequestIE byte
uRequestIDsOffset uint32
uNumOfRequestIDs uint32
uPhyTypeInfosOffset uint32
uNumOfPhyTypeInfos uint32
uIEsOffset uint32
uIEsLength uint32
ucBuffer [1]byte
}type
DOT11_SCAN_REQUEST_V2 = record
dot11BSSType: Integer;
dot11BSSID: array[0..5] of Byte;
dot11ScanType: Integer;
bRestrictedScan: ByteBool;
udot11SSIDsOffset: DWORD;
uNumOfdot11SSIDs: DWORD;
bUseRequestIE: ByteBool;
uRequestIDsOffset: DWORD;
uNumOfRequestIDs: DWORD;
uPhyTypeInfosOffset: DWORD;
uNumOfPhyTypeInfos: DWORD;
uIEsOffset: DWORD;
uIEsLength: DWORD;
ucBuffer: array[0..0] of Byte;
end;const DOT11_SCAN_REQUEST_V2 = extern struct {
dot11BSSType: i32,
dot11BSSID: [6]u8,
dot11ScanType: i32,
bRestrictedScan: u8,
udot11SSIDsOffset: u32,
uNumOfdot11SSIDs: u32,
bUseRequestIE: u8,
uRequestIDsOffset: u32,
uNumOfRequestIDs: u32,
uPhyTypeInfosOffset: u32,
uNumOfPhyTypeInfos: u32,
uIEsOffset: u32,
uIEsLength: u32,
ucBuffer: [1]u8,
};type
DOT11_SCAN_REQUEST_V2 {.bycopy.} = object
dot11BSSType: int32
dot11BSSID: array[6, uint8]
dot11ScanType: int32
bRestrictedScan: uint8
udot11SSIDsOffset: uint32
uNumOfdot11SSIDs: uint32
bUseRequestIE: uint8
uRequestIDsOffset: uint32
uNumOfRequestIDs: uint32
uPhyTypeInfosOffset: uint32
uNumOfPhyTypeInfos: uint32
uIEsOffset: uint32
uIEsLength: uint32
ucBuffer: array[1, uint8]struct DOT11_SCAN_REQUEST_V2
{
int dot11BSSType;
ubyte[6] dot11BSSID;
int dot11ScanType;
ubyte bRestrictedScan;
uint udot11SSIDsOffset;
uint uNumOfdot11SSIDs;
ubyte bUseRequestIE;
uint uRequestIDsOffset;
uint uNumOfRequestIDs;
uint uPhyTypeInfosOffset;
uint uNumOfPhyTypeInfos;
uint uIEsOffset;
uint uIEsLength;
ubyte[1] ucBuffer;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DOT11_SCAN_REQUEST_V2 サイズ: 60 バイト(x64)
dim st, 15 ; 4byte整数×15(構造体サイズ 60 / 4 切り上げ)
; dot11BSSType : DOT11_BSS_TYPE (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; dot11BSSID : BYTE (+4, 6byte) varptr(st)+4 を基点に操作(6byte:入れ子/配列)
; dot11ScanType : DOT11_SCAN_TYPE (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; bRestrictedScan : BOOLEAN (+16, 1byte) poke st,16,値 / 値 = peek(st,16)
; udot11SSIDsOffset : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; uNumOfdot11SSIDs : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; bUseRequestIE : BOOLEAN (+28, 1byte) poke st,28,値 / 値 = peek(st,28)
; uRequestIDsOffset : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; uNumOfRequestIDs : DWORD (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; uPhyTypeInfosOffset : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; uNumOfPhyTypeInfos : DWORD (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; uIEsOffset : DWORD (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; uIEsLength : DWORD (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; ucBuffer : BYTE (+56, 1byte) varptr(st)+56 を基点に操作(1byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DOT11_SCAN_REQUEST_V2
#field int dot11BSSType
#field byte dot11BSSID 6
#field int dot11ScanType
#field bool1 bRestrictedScan
#field int udot11SSIDsOffset
#field int uNumOfdot11SSIDs
#field bool1 bUseRequestIE
#field int uRequestIDsOffset
#field int uNumOfRequestIDs
#field int uPhyTypeInfosOffset
#field int uNumOfPhyTypeInfos
#field int uIEsOffset
#field int uIEsLength
#field byte ucBuffer 1
#endstruct
stdim st, DOT11_SCAN_REQUEST_V2 ; NSTRUCT 変数を確保
st->dot11BSSType = 100
mes "dot11BSSType=" + st->dot11BSSType