ホーム › NetworkManagement.WiFi › DOT11_ASSOCIATION_COMPLETION_PARAMETERS
DOT11_ASSOCIATION_COMPLETION_PARAMETERS
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Header | NDIS_OBJECT_HEADER | 4 | +0 | +0 | NDIS オブジェクトのバージョン情報を含むヘッダー。 |
| MacAddr | BYTE | 6 | +4 | +4 | アソシエート対象 AP の MAC アドレス。 |
| uStatus | DWORD | 4 | +12 | +12 | アソシエーションの結果ステータスコードを表す。 |
| bReAssocReq | BOOLEAN | 1 | +16 | +16 | 再アソシエーション要求であったか示すフラグ。 |
| bReAssocResp | BOOLEAN | 1 | +17 | +17 | 再アソシエーション応答であったか示すフラグ。 |
| uAssocReqOffset | DWORD | 4 | +20 | +20 | アソシエーション要求フレームへのオフセット。 |
| uAssocReqSize | DWORD | 4 | +24 | +24 | アソシエーション要求フレームのバイトサイズを表す。 |
| uAssocRespOffset | DWORD | 4 | +28 | +28 | アソシエーション応答フレームへのオフセット。 |
| uAssocRespSize | DWORD | 4 | +32 | +32 | アソシエーション応答フレームのバイトサイズを表す。 |
| uBeaconOffset | DWORD | 4 | +36 | +36 | ビーコン/プローブ応答へのオフセット。 |
| uBeaconSize | DWORD | 4 | +40 | +40 | ビーコン/プローブ応答のバイトサイズを表す。 |
| uIHVDataOffset | DWORD | 4 | +44 | +44 | IHV 固有データへの先頭からのオフセット。 |
| uIHVDataSize | DWORD | 4 | +48 | +48 | IHV 固有データのバイトサイズを表す。 |
| AuthAlgo | DOT11_AUTH_ALGORITHM | 4 | +52 | +52 | 使用された認証アルゴリズム識別子。 |
| UnicastCipher | DOT11_CIPHER_ALGORITHM | 4 | +56 | +56 | 使用されたユニキャスト暗号アルゴリズム識別子。 |
| MulticastCipher | DOT11_CIPHER_ALGORITHM | 4 | +60 | +60 | 使用されたマルチキャスト暗号アルゴリズム識別子。 |
| uActivePhyListOffset | DWORD | 4 | +64 | +64 | アクティブ PHY リストへのオフセット。 |
| uActivePhyListSize | DWORD | 4 | +68 | +68 | アクティブ PHY リストのバイトサイズを表す。 |
| bFourAddressSupported | BOOLEAN | 1 | +72 | +72 | 4アドレスフレーム対応か示すフラグ。 |
| bPortAuthorized | BOOLEAN | 1 | +73 | +73 | 制御ポートが認可済みか示すフラグ。 |
| ucActiveQoSProtocol | BYTE | 1 | +74 | +74 | 有効な QoS プロトコルを示す値。 |
| DSInfo | DOT11_DS_INFO | 4 | +76 | +76 | ダイレクトストリーム情報を示す列挙値。 |
| uEncapTableOffset | DWORD | 4 | +80 | +80 | カプセル化テーブルへのオフセット。 |
| uEncapTableSize | DWORD | 4 | +84 | +84 | カプセル化テーブルのバイトサイズを表す。 |
| MulticastMgmtCipher | DOT11_CIPHER_ALGORITHM | 4 | +88 | +88 | 使用されたマルチキャスト管理暗号アルゴリズム識別子。 |
| uAssocComebackTime | DWORD | 4 | +92 | +92 | アソシエーション再試行までの待機時間を表す。 |
各言語での定義
#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_ASSOCIATION_COMPLETION_PARAMETERS (x64 96 / x86 96 バイト)
typedef struct DOT11_ASSOCIATION_COMPLETION_PARAMETERS {
NDIS_OBJECT_HEADER Header;
BYTE MacAddr[6];
DWORD uStatus;
BOOLEAN bReAssocReq;
BOOLEAN bReAssocResp;
DWORD uAssocReqOffset;
DWORD uAssocReqSize;
DWORD uAssocRespOffset;
DWORD uAssocRespSize;
DWORD uBeaconOffset;
DWORD uBeaconSize;
DWORD uIHVDataOffset;
DWORD uIHVDataSize;
DOT11_AUTH_ALGORITHM AuthAlgo;
DOT11_CIPHER_ALGORITHM UnicastCipher;
DOT11_CIPHER_ALGORITHM MulticastCipher;
DWORD uActivePhyListOffset;
DWORD uActivePhyListSize;
BOOLEAN bFourAddressSupported;
BOOLEAN bPortAuthorized;
BYTE ucActiveQoSProtocol;
DOT11_DS_INFO DSInfo;
DWORD uEncapTableOffset;
DWORD uEncapTableSize;
DOT11_CIPHER_ALGORITHM MulticastMgmtCipher;
DWORD uAssocComebackTime;
} DOT11_ASSOCIATION_COMPLETION_PARAMETERS;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_ASSOCIATION_COMPLETION_PARAMETERS
{
public NDIS_OBJECT_HEADER Header;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)] public byte[] MacAddr;
public uint uStatus;
[MarshalAs(UnmanagedType.U1)] public bool bReAssocReq;
[MarshalAs(UnmanagedType.U1)] public bool bReAssocResp;
public uint uAssocReqOffset;
public uint uAssocReqSize;
public uint uAssocRespOffset;
public uint uAssocRespSize;
public uint uBeaconOffset;
public uint uBeaconSize;
public uint uIHVDataOffset;
public uint uIHVDataSize;
public int AuthAlgo;
public int UnicastCipher;
public int MulticastCipher;
public uint uActivePhyListOffset;
public uint uActivePhyListSize;
[MarshalAs(UnmanagedType.U1)] public bool bFourAddressSupported;
[MarshalAs(UnmanagedType.U1)] public bool bPortAuthorized;
public byte ucActiveQoSProtocol;
public int DSInfo;
public uint uEncapTableOffset;
public uint uEncapTableSize;
public int MulticastMgmtCipher;
public uint uAssocComebackTime;
}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_ASSOCIATION_COMPLETION_PARAMETERS
Public Header As NDIS_OBJECT_HEADER
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=6)> Public MacAddr() As Byte
Public uStatus As UInteger
<MarshalAs(UnmanagedType.U1)> Public bReAssocReq As Boolean
<MarshalAs(UnmanagedType.U1)> Public bReAssocResp As Boolean
Public uAssocReqOffset As UInteger
Public uAssocReqSize As UInteger
Public uAssocRespOffset As UInteger
Public uAssocRespSize As UInteger
Public uBeaconOffset As UInteger
Public uBeaconSize As UInteger
Public uIHVDataOffset As UInteger
Public uIHVDataSize As UInteger
Public AuthAlgo As Integer
Public UnicastCipher As Integer
Public MulticastCipher As Integer
Public uActivePhyListOffset As UInteger
Public uActivePhyListSize As UInteger
<MarshalAs(UnmanagedType.U1)> Public bFourAddressSupported As Boolean
<MarshalAs(UnmanagedType.U1)> Public bPortAuthorized As Boolean
Public ucActiveQoSProtocol As Byte
Public DSInfo As Integer
Public uEncapTableOffset As UInteger
Public uEncapTableSize As UInteger
Public MulticastMgmtCipher As Integer
Public uAssocComebackTime 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_ASSOCIATION_COMPLETION_PARAMETERS(ctypes.Structure):
_fields_ = [
("Header", NDIS_OBJECT_HEADER),
("MacAddr", ctypes.c_ubyte * 6),
("uStatus", wintypes.DWORD),
("bReAssocReq", ctypes.c_byte),
("bReAssocResp", ctypes.c_byte),
("uAssocReqOffset", wintypes.DWORD),
("uAssocReqSize", wintypes.DWORD),
("uAssocRespOffset", wintypes.DWORD),
("uAssocRespSize", wintypes.DWORD),
("uBeaconOffset", wintypes.DWORD),
("uBeaconSize", wintypes.DWORD),
("uIHVDataOffset", wintypes.DWORD),
("uIHVDataSize", wintypes.DWORD),
("AuthAlgo", ctypes.c_int),
("UnicastCipher", ctypes.c_int),
("MulticastCipher", ctypes.c_int),
("uActivePhyListOffset", wintypes.DWORD),
("uActivePhyListSize", wintypes.DWORD),
("bFourAddressSupported", ctypes.c_byte),
("bPortAuthorized", ctypes.c_byte),
("ucActiveQoSProtocol", ctypes.c_ubyte),
("DSInfo", ctypes.c_int),
("uEncapTableOffset", wintypes.DWORD),
("uEncapTableSize", wintypes.DWORD),
("MulticastMgmtCipher", ctypes.c_int),
("uAssocComebackTime", wintypes.DWORD),
]#[repr(C)]
pub struct NDIS_OBJECT_HEADER {
pub Type: u8,
pub Revision: u8,
pub Size: u16,
}
#[repr(C)]
pub struct DOT11_ASSOCIATION_COMPLETION_PARAMETERS {
pub Header: NDIS_OBJECT_HEADER,
pub MacAddr: [u8; 6],
pub uStatus: u32,
pub bReAssocReq: u8,
pub bReAssocResp: u8,
pub uAssocReqOffset: u32,
pub uAssocReqSize: u32,
pub uAssocRespOffset: u32,
pub uAssocRespSize: u32,
pub uBeaconOffset: u32,
pub uBeaconSize: u32,
pub uIHVDataOffset: u32,
pub uIHVDataSize: u32,
pub AuthAlgo: i32,
pub UnicastCipher: i32,
pub MulticastCipher: i32,
pub uActivePhyListOffset: u32,
pub uActivePhyListSize: u32,
pub bFourAddressSupported: u8,
pub bPortAuthorized: u8,
pub ucActiveQoSProtocol: u8,
pub DSInfo: i32,
pub uEncapTableOffset: u32,
pub uEncapTableSize: u32,
pub MulticastMgmtCipher: i32,
pub uAssocComebackTime: u32,
}import "golang.org/x/sys/windows"
type NDIS_OBJECT_HEADER struct {
Type byte
Revision byte
Size uint16
}
type DOT11_ASSOCIATION_COMPLETION_PARAMETERS struct {
Header NDIS_OBJECT_HEADER
MacAddr [6]byte
uStatus uint32
bReAssocReq byte
bReAssocResp byte
uAssocReqOffset uint32
uAssocReqSize uint32
uAssocRespOffset uint32
uAssocRespSize uint32
uBeaconOffset uint32
uBeaconSize uint32
uIHVDataOffset uint32
uIHVDataSize uint32
AuthAlgo int32
UnicastCipher int32
MulticastCipher int32
uActivePhyListOffset uint32
uActivePhyListSize uint32
bFourAddressSupported byte
bPortAuthorized byte
ucActiveQoSProtocol byte
DSInfo int32
uEncapTableOffset uint32
uEncapTableSize uint32
MulticastMgmtCipher int32
uAssocComebackTime uint32
}type
NDIS_OBJECT_HEADER = record
Type: Byte;
Revision: Byte;
Size: Word;
end;
DOT11_ASSOCIATION_COMPLETION_PARAMETERS = record
Header: NDIS_OBJECT_HEADER;
MacAddr: array[0..5] of Byte;
uStatus: DWORD;
bReAssocReq: ByteBool;
bReAssocResp: ByteBool;
uAssocReqOffset: DWORD;
uAssocReqSize: DWORD;
uAssocRespOffset: DWORD;
uAssocRespSize: DWORD;
uBeaconOffset: DWORD;
uBeaconSize: DWORD;
uIHVDataOffset: DWORD;
uIHVDataSize: DWORD;
AuthAlgo: Integer;
UnicastCipher: Integer;
MulticastCipher: Integer;
uActivePhyListOffset: DWORD;
uActivePhyListSize: DWORD;
bFourAddressSupported: ByteBool;
bPortAuthorized: ByteBool;
ucActiveQoSProtocol: Byte;
DSInfo: Integer;
uEncapTableOffset: DWORD;
uEncapTableSize: DWORD;
MulticastMgmtCipher: Integer;
uAssocComebackTime: DWORD;
end;const NDIS_OBJECT_HEADER = extern struct {
Type: u8,
Revision: u8,
Size: u16,
};
const DOT11_ASSOCIATION_COMPLETION_PARAMETERS = extern struct {
Header: NDIS_OBJECT_HEADER,
MacAddr: [6]u8,
uStatus: u32,
bReAssocReq: u8,
bReAssocResp: u8,
uAssocReqOffset: u32,
uAssocReqSize: u32,
uAssocRespOffset: u32,
uAssocRespSize: u32,
uBeaconOffset: u32,
uBeaconSize: u32,
uIHVDataOffset: u32,
uIHVDataSize: u32,
AuthAlgo: i32,
UnicastCipher: i32,
MulticastCipher: i32,
uActivePhyListOffset: u32,
uActivePhyListSize: u32,
bFourAddressSupported: u8,
bPortAuthorized: u8,
ucActiveQoSProtocol: u8,
DSInfo: i32,
uEncapTableOffset: u32,
uEncapTableSize: u32,
MulticastMgmtCipher: i32,
uAssocComebackTime: u32,
};type
NDIS_OBJECT_HEADER {.bycopy.} = object
Type: uint8
Revision: uint8
Size: uint16
DOT11_ASSOCIATION_COMPLETION_PARAMETERS {.bycopy.} = object
Header: NDIS_OBJECT_HEADER
MacAddr: array[6, uint8]
uStatus: uint32
bReAssocReq: uint8
bReAssocResp: uint8
uAssocReqOffset: uint32
uAssocReqSize: uint32
uAssocRespOffset: uint32
uAssocRespSize: uint32
uBeaconOffset: uint32
uBeaconSize: uint32
uIHVDataOffset: uint32
uIHVDataSize: uint32
AuthAlgo: int32
UnicastCipher: int32
MulticastCipher: int32
uActivePhyListOffset: uint32
uActivePhyListSize: uint32
bFourAddressSupported: uint8
bPortAuthorized: uint8
ucActiveQoSProtocol: uint8
DSInfo: int32
uEncapTableOffset: uint32
uEncapTableSize: uint32
MulticastMgmtCipher: int32
uAssocComebackTime: uint32struct NDIS_OBJECT_HEADER
{
ubyte Type;
ubyte Revision;
ushort Size;
}
struct DOT11_ASSOCIATION_COMPLETION_PARAMETERS
{
NDIS_OBJECT_HEADER Header;
ubyte[6] MacAddr;
uint uStatus;
ubyte bReAssocReq;
ubyte bReAssocResp;
uint uAssocReqOffset;
uint uAssocReqSize;
uint uAssocRespOffset;
uint uAssocRespSize;
uint uBeaconOffset;
uint uBeaconSize;
uint uIHVDataOffset;
uint uIHVDataSize;
int AuthAlgo;
int UnicastCipher;
int MulticastCipher;
uint uActivePhyListOffset;
uint uActivePhyListSize;
ubyte bFourAddressSupported;
ubyte bPortAuthorized;
ubyte ucActiveQoSProtocol;
int DSInfo;
uint uEncapTableOffset;
uint uEncapTableSize;
int MulticastMgmtCipher;
uint uAssocComebackTime;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DOT11_ASSOCIATION_COMPLETION_PARAMETERS サイズ: 96 バイト(x64)
dim st, 24 ; 4byte整数×24(構造体サイズ 96 / 4 切り上げ)
; Header : NDIS_OBJECT_HEADER (+0, 4byte) varptr(st)+0 を基点に操作(4byte:入れ子/配列)
; MacAddr : BYTE (+4, 6byte) varptr(st)+4 を基点に操作(6byte:入れ子/配列)
; uStatus : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; bReAssocReq : BOOLEAN (+16, 1byte) poke st,16,値 / 値 = peek(st,16)
; bReAssocResp : BOOLEAN (+17, 1byte) poke st,17,値 / 値 = peek(st,17)
; uAssocReqOffset : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; uAssocReqSize : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; uAssocRespOffset : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; uAssocRespSize : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; uBeaconOffset : DWORD (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; uBeaconSize : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; uIHVDataOffset : DWORD (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; uIHVDataSize : DWORD (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; AuthAlgo : DOT11_AUTH_ALGORITHM (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; UnicastCipher : DOT11_CIPHER_ALGORITHM (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; MulticastCipher : DOT11_CIPHER_ALGORITHM (+60, 4byte) st.15 = 値 / 値 = st.15 (lpoke/lpeek も可)
; uActivePhyListOffset : DWORD (+64, 4byte) st.16 = 値 / 値 = st.16 (lpoke/lpeek も可)
; uActivePhyListSize : DWORD (+68, 4byte) st.17 = 値 / 値 = st.17 (lpoke/lpeek も可)
; bFourAddressSupported : BOOLEAN (+72, 1byte) poke st,72,値 / 値 = peek(st,72)
; bPortAuthorized : BOOLEAN (+73, 1byte) poke st,73,値 / 値 = peek(st,73)
; ucActiveQoSProtocol : BYTE (+74, 1byte) poke st,74,値 / 値 = peek(st,74)
; DSInfo : DOT11_DS_INFO (+76, 4byte) st.19 = 値 / 値 = st.19 (lpoke/lpeek も可)
; uEncapTableOffset : DWORD (+80, 4byte) st.20 = 値 / 値 = st.20 (lpoke/lpeek も可)
; uEncapTableSize : DWORD (+84, 4byte) st.21 = 値 / 値 = st.21 (lpoke/lpeek も可)
; MulticastMgmtCipher : DOT11_CIPHER_ALGORITHM (+88, 4byte) st.22 = 値 / 値 = st.22 (lpoke/lpeek も可)
; uAssocComebackTime : DWORD (+92, 4byte) st.23 = 値 / 値 = st.23 (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_ASSOCIATION_COMPLETION_PARAMETERS
#field NDIS_OBJECT_HEADER Header
#field byte MacAddr 6
#field int uStatus
#field bool1 bReAssocReq
#field bool1 bReAssocResp
#field int uAssocReqOffset
#field int uAssocReqSize
#field int uAssocRespOffset
#field int uAssocRespSize
#field int uBeaconOffset
#field int uBeaconSize
#field int uIHVDataOffset
#field int uIHVDataSize
#field int AuthAlgo
#field int UnicastCipher
#field int MulticastCipher
#field int uActivePhyListOffset
#field int uActivePhyListSize
#field bool1 bFourAddressSupported
#field bool1 bPortAuthorized
#field byte ucActiveQoSProtocol
#field int DSInfo
#field int uEncapTableOffset
#field int uEncapTableSize
#field int MulticastMgmtCipher
#field int uAssocComebackTime
#endstruct
stdim st, DOT11_ASSOCIATION_COMPLETION_PARAMETERS ; NSTRUCT 変数を確保
st->uStatus = 100
mes "uStatus=" + st->uStatus