ホーム › NetworkManagement.WiFi › DOT11_WFD_GROUP_OWNER_CAPABILITY_CONFIG_V2
DOT11_WFD_GROUP_OWNER_CAPABILITY_CONFIG_V2
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Header | NDIS_OBJECT_HEADER | 4 | +0 | +0 | NDISオブジェクトの種類・リビジョン・サイズを示す共通ヘッダー。 |
| bPersistentGroupEnabled | BOOLEAN | 1 | +4 | +4 | 永続グループが有効かを示す真偽値。 |
| bIntraBSSDistributionSupported | BOOLEAN | 1 | +5 | +5 | BSS内配信をサポートするかを示す真偽値。 |
| bCrossConnectionSupported | BOOLEAN | 1 | +6 | +6 | クロスコネクションをサポートするかを示す真偽値。 |
| bPersistentReconnectSupported | BOOLEAN | 1 | +7 | +7 | 永続再接続をサポートするかを示す真偽値。 |
| bGroupFormationEnabled | BOOLEAN | 1 | +8 | +8 | グループ形成が有効かを示す真偽値。 |
| uMaximumGroupLimit | DWORD | 4 | +12 | +12 | グループに参加可能なクライアントの最大数。 |
| bEapolKeyIpAddressAllocationSupported | BOOLEAN | 1 | +16 | +16 | EAPOLキー交換によるIPアドレス割り当てをサポートするかを示す真偽値。 |
各言語での定義
#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_WFD_GROUP_OWNER_CAPABILITY_CONFIG_V2 (x64 20 / x86 20 バイト)
typedef struct DOT11_WFD_GROUP_OWNER_CAPABILITY_CONFIG_V2 {
NDIS_OBJECT_HEADER Header;
BOOLEAN bPersistentGroupEnabled;
BOOLEAN bIntraBSSDistributionSupported;
BOOLEAN bCrossConnectionSupported;
BOOLEAN bPersistentReconnectSupported;
BOOLEAN bGroupFormationEnabled;
DWORD uMaximumGroupLimit;
BOOLEAN bEapolKeyIpAddressAllocationSupported;
} DOT11_WFD_GROUP_OWNER_CAPABILITY_CONFIG_V2;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_WFD_GROUP_OWNER_CAPABILITY_CONFIG_V2
{
public NDIS_OBJECT_HEADER Header;
[MarshalAs(UnmanagedType.U1)] public bool bPersistentGroupEnabled;
[MarshalAs(UnmanagedType.U1)] public bool bIntraBSSDistributionSupported;
[MarshalAs(UnmanagedType.U1)] public bool bCrossConnectionSupported;
[MarshalAs(UnmanagedType.U1)] public bool bPersistentReconnectSupported;
[MarshalAs(UnmanagedType.U1)] public bool bGroupFormationEnabled;
public uint uMaximumGroupLimit;
[MarshalAs(UnmanagedType.U1)] public bool bEapolKeyIpAddressAllocationSupported;
}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_WFD_GROUP_OWNER_CAPABILITY_CONFIG_V2
Public Header As NDIS_OBJECT_HEADER
<MarshalAs(UnmanagedType.U1)> Public bPersistentGroupEnabled As Boolean
<MarshalAs(UnmanagedType.U1)> Public bIntraBSSDistributionSupported As Boolean
<MarshalAs(UnmanagedType.U1)> Public bCrossConnectionSupported As Boolean
<MarshalAs(UnmanagedType.U1)> Public bPersistentReconnectSupported As Boolean
<MarshalAs(UnmanagedType.U1)> Public bGroupFormationEnabled As Boolean
Public uMaximumGroupLimit As UInteger
<MarshalAs(UnmanagedType.U1)> Public bEapolKeyIpAddressAllocationSupported As Boolean
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_WFD_GROUP_OWNER_CAPABILITY_CONFIG_V2(ctypes.Structure):
_fields_ = [
("Header", NDIS_OBJECT_HEADER),
("bPersistentGroupEnabled", ctypes.c_byte),
("bIntraBSSDistributionSupported", ctypes.c_byte),
("bCrossConnectionSupported", ctypes.c_byte),
("bPersistentReconnectSupported", ctypes.c_byte),
("bGroupFormationEnabled", ctypes.c_byte),
("uMaximumGroupLimit", wintypes.DWORD),
("bEapolKeyIpAddressAllocationSupported", ctypes.c_byte),
]#[repr(C)]
pub struct NDIS_OBJECT_HEADER {
pub Type: u8,
pub Revision: u8,
pub Size: u16,
}
#[repr(C)]
pub struct DOT11_WFD_GROUP_OWNER_CAPABILITY_CONFIG_V2 {
pub Header: NDIS_OBJECT_HEADER,
pub bPersistentGroupEnabled: u8,
pub bIntraBSSDistributionSupported: u8,
pub bCrossConnectionSupported: u8,
pub bPersistentReconnectSupported: u8,
pub bGroupFormationEnabled: u8,
pub uMaximumGroupLimit: u32,
pub bEapolKeyIpAddressAllocationSupported: u8,
}import "golang.org/x/sys/windows"
type NDIS_OBJECT_HEADER struct {
Type byte
Revision byte
Size uint16
}
type DOT11_WFD_GROUP_OWNER_CAPABILITY_CONFIG_V2 struct {
Header NDIS_OBJECT_HEADER
bPersistentGroupEnabled byte
bIntraBSSDistributionSupported byte
bCrossConnectionSupported byte
bPersistentReconnectSupported byte
bGroupFormationEnabled byte
uMaximumGroupLimit uint32
bEapolKeyIpAddressAllocationSupported byte
}type
NDIS_OBJECT_HEADER = record
Type: Byte;
Revision: Byte;
Size: Word;
end;
DOT11_WFD_GROUP_OWNER_CAPABILITY_CONFIG_V2 = record
Header: NDIS_OBJECT_HEADER;
bPersistentGroupEnabled: ByteBool;
bIntraBSSDistributionSupported: ByteBool;
bCrossConnectionSupported: ByteBool;
bPersistentReconnectSupported: ByteBool;
bGroupFormationEnabled: ByteBool;
uMaximumGroupLimit: DWORD;
bEapolKeyIpAddressAllocationSupported: ByteBool;
end;const NDIS_OBJECT_HEADER = extern struct {
Type: u8,
Revision: u8,
Size: u16,
};
const DOT11_WFD_GROUP_OWNER_CAPABILITY_CONFIG_V2 = extern struct {
Header: NDIS_OBJECT_HEADER,
bPersistentGroupEnabled: u8,
bIntraBSSDistributionSupported: u8,
bCrossConnectionSupported: u8,
bPersistentReconnectSupported: u8,
bGroupFormationEnabled: u8,
uMaximumGroupLimit: u32,
bEapolKeyIpAddressAllocationSupported: u8,
};type
NDIS_OBJECT_HEADER {.bycopy.} = object
Type: uint8
Revision: uint8
Size: uint16
DOT11_WFD_GROUP_OWNER_CAPABILITY_CONFIG_V2 {.bycopy.} = object
Header: NDIS_OBJECT_HEADER
bPersistentGroupEnabled: uint8
bIntraBSSDistributionSupported: uint8
bCrossConnectionSupported: uint8
bPersistentReconnectSupported: uint8
bGroupFormationEnabled: uint8
uMaximumGroupLimit: uint32
bEapolKeyIpAddressAllocationSupported: uint8struct NDIS_OBJECT_HEADER
{
ubyte Type;
ubyte Revision;
ushort Size;
}
struct DOT11_WFD_GROUP_OWNER_CAPABILITY_CONFIG_V2
{
NDIS_OBJECT_HEADER Header;
ubyte bPersistentGroupEnabled;
ubyte bIntraBSSDistributionSupported;
ubyte bCrossConnectionSupported;
ubyte bPersistentReconnectSupported;
ubyte bGroupFormationEnabled;
uint uMaximumGroupLimit;
ubyte bEapolKeyIpAddressAllocationSupported;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DOT11_WFD_GROUP_OWNER_CAPABILITY_CONFIG_V2 サイズ: 20 バイト(x64)
dim st, 5 ; 4byte整数×5(構造体サイズ 20 / 4 切り上げ)
; Header : NDIS_OBJECT_HEADER (+0, 4byte) varptr(st)+0 を基点に操作(4byte:入れ子/配列)
; bPersistentGroupEnabled : BOOLEAN (+4, 1byte) poke st,4,値 / 値 = peek(st,4)
; bIntraBSSDistributionSupported : BOOLEAN (+5, 1byte) poke st,5,値 / 値 = peek(st,5)
; bCrossConnectionSupported : BOOLEAN (+6, 1byte) poke st,6,値 / 値 = peek(st,6)
; bPersistentReconnectSupported : BOOLEAN (+7, 1byte) poke st,7,値 / 値 = peek(st,7)
; bGroupFormationEnabled : BOOLEAN (+8, 1byte) poke st,8,値 / 値 = peek(st,8)
; uMaximumGroupLimit : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; bEapolKeyIpAddressAllocationSupported : BOOLEAN (+16, 1byte) poke st,16,値 / 値 = peek(st,16)
; ※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_WFD_GROUP_OWNER_CAPABILITY_CONFIG_V2
#field NDIS_OBJECT_HEADER Header
#field bool1 bPersistentGroupEnabled
#field bool1 bIntraBSSDistributionSupported
#field bool1 bCrossConnectionSupported
#field bool1 bPersistentReconnectSupported
#field bool1 bGroupFormationEnabled
#field int uMaximumGroupLimit
#field bool1 bEapolKeyIpAddressAllocationSupported
#endstruct
stdim st, DOT11_WFD_GROUP_OWNER_CAPABILITY_CONFIG_V2 ; NSTRUCT 変数を確保
st->bPersistentGroupEnabled = 100
mes "bPersistentGroupEnabled=" + st->bPersistentGroupEnabled