Win32 API 日本語リファレンス
ホームNetworkManagement.WiFi › DOT11_EXTAP_ATTRIBUTES

DOT11_EXTAP_ATTRIBUTES

構造体
サイズx64: 80 バイト / x86: 56 バイト

サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。

フィールド

フィールドサイズx64x86説明
HeaderNDIS_OBJECT_HEADER4+0+0NDISオブジェクトの種類・リビジョン・サイズを示す共通ヘッダー。
uScanSSIDListSizeDWORD4+4+4スキャン要求で指定可能なSSIDリストの最大サイズ。
uDesiredSSIDListSizeDWORD4+8+8希望SSIDリストの最大サイズ。
uPrivacyExemptionListSizeDWORD4+12+12プライバシー免除リストの最大サイズ。
uAssociationTableSizeDWORD4+16+16アソシエーションテーブルの最大エントリ数。
uDefaultKeyTableSizeDWORD4+20+20既定キーテーブルの最大エントリ数。
uWEPKeyValueMaxLengthDWORD4+24+24WEPキー値の最大バイト長。
bStrictlyOrderedServiceClassImplementedBOOLEAN1+28+28厳密順序サービスクラスを実装しているかを示す真偽値。
uNumSupportedCountryOrRegionStringsDWORD4+32+32サポートする国/地域文字列の数。
pSupportedCountryOrRegionStringsBYTE*8/4+40+36サポートする国/地域文字列配列へのポインタ。
uInfraNumSupportedUcastAlgoPairsDWORD4+48+40インフラストラクチャでサポートするユニキャスト認証/暗号ペア数。
pInfraSupportedUcastAlgoPairsDOT11_AUTH_CIPHER_PAIR*8/4+56+44サポートするユニキャスト認証/暗号ペア配列へのポインタ。
uInfraNumSupportedMcastAlgoPairsDWORD4+64+48インフラストラクチャでサポートするマルチキャスト認証/暗号ペア数。
pInfraSupportedMcastAlgoPairsDOT11_AUTH_CIPHER_PAIR*8/4+72+52サポートするマルチキャスト認証/暗号ペア配列へのポインタ。

各言語での定義

#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_EXTAP_ATTRIBUTES  (x64 80 / x86 56 バイト)
typedef struct DOT11_EXTAP_ATTRIBUTES {
    NDIS_OBJECT_HEADER Header;
    DWORD uScanSSIDListSize;
    DWORD uDesiredSSIDListSize;
    DWORD uPrivacyExemptionListSize;
    DWORD uAssociationTableSize;
    DWORD uDefaultKeyTableSize;
    DWORD uWEPKeyValueMaxLength;
    BOOLEAN bStrictlyOrderedServiceClassImplemented;
    DWORD uNumSupportedCountryOrRegionStrings;
    BYTE* pSupportedCountryOrRegionStrings;
    DWORD uInfraNumSupportedUcastAlgoPairs;
    DOT11_AUTH_CIPHER_PAIR* pInfraSupportedUcastAlgoPairs;
    DWORD uInfraNumSupportedMcastAlgoPairs;
    DOT11_AUTH_CIPHER_PAIR* pInfraSupportedMcastAlgoPairs;
} DOT11_EXTAP_ATTRIBUTES;
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_EXTAP_ATTRIBUTES
{
    public NDIS_OBJECT_HEADER Header;
    public uint uScanSSIDListSize;
    public uint uDesiredSSIDListSize;
    public uint uPrivacyExemptionListSize;
    public uint uAssociationTableSize;
    public uint uDefaultKeyTableSize;
    public uint uWEPKeyValueMaxLength;
    [MarshalAs(UnmanagedType.U1)] public bool bStrictlyOrderedServiceClassImplemented;
    public uint uNumSupportedCountryOrRegionStrings;
    public IntPtr pSupportedCountryOrRegionStrings;
    public uint uInfraNumSupportedUcastAlgoPairs;
    public IntPtr pInfraSupportedUcastAlgoPairs;
    public uint uInfraNumSupportedMcastAlgoPairs;
    public IntPtr pInfraSupportedMcastAlgoPairs;
}
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_EXTAP_ATTRIBUTES
    Public Header As NDIS_OBJECT_HEADER
    Public uScanSSIDListSize As UInteger
    Public uDesiredSSIDListSize As UInteger
    Public uPrivacyExemptionListSize As UInteger
    Public uAssociationTableSize As UInteger
    Public uDefaultKeyTableSize As UInteger
    Public uWEPKeyValueMaxLength As UInteger
    <MarshalAs(UnmanagedType.U1)> Public bStrictlyOrderedServiceClassImplemented As Boolean
    Public uNumSupportedCountryOrRegionStrings As UInteger
    Public pSupportedCountryOrRegionStrings As IntPtr
    Public uInfraNumSupportedUcastAlgoPairs As UInteger
    Public pInfraSupportedUcastAlgoPairs As IntPtr
    Public uInfraNumSupportedMcastAlgoPairs As UInteger
    Public pInfraSupportedMcastAlgoPairs As IntPtr
End Structure
import 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_EXTAP_ATTRIBUTES(ctypes.Structure):
    _fields_ = [
        ("Header", NDIS_OBJECT_HEADER),
        ("uScanSSIDListSize", wintypes.DWORD),
        ("uDesiredSSIDListSize", wintypes.DWORD),
        ("uPrivacyExemptionListSize", wintypes.DWORD),
        ("uAssociationTableSize", wintypes.DWORD),
        ("uDefaultKeyTableSize", wintypes.DWORD),
        ("uWEPKeyValueMaxLength", wintypes.DWORD),
        ("bStrictlyOrderedServiceClassImplemented", ctypes.c_byte),
        ("uNumSupportedCountryOrRegionStrings", wintypes.DWORD),
        ("pSupportedCountryOrRegionStrings", ctypes.c_void_p),
        ("uInfraNumSupportedUcastAlgoPairs", wintypes.DWORD),
        ("pInfraSupportedUcastAlgoPairs", ctypes.c_void_p),
        ("uInfraNumSupportedMcastAlgoPairs", wintypes.DWORD),
        ("pInfraSupportedMcastAlgoPairs", ctypes.c_void_p),
    ]
#[repr(C)]
pub struct NDIS_OBJECT_HEADER {
    pub Type: u8,
    pub Revision: u8,
    pub Size: u16,
}

#[repr(C)]
pub struct DOT11_EXTAP_ATTRIBUTES {
    pub Header: NDIS_OBJECT_HEADER,
    pub uScanSSIDListSize: u32,
    pub uDesiredSSIDListSize: u32,
    pub uPrivacyExemptionListSize: u32,
    pub uAssociationTableSize: u32,
    pub uDefaultKeyTableSize: u32,
    pub uWEPKeyValueMaxLength: u32,
    pub bStrictlyOrderedServiceClassImplemented: u8,
    pub uNumSupportedCountryOrRegionStrings: u32,
    pub pSupportedCountryOrRegionStrings: *mut core::ffi::c_void,
    pub uInfraNumSupportedUcastAlgoPairs: u32,
    pub pInfraSupportedUcastAlgoPairs: *mut core::ffi::c_void,
    pub uInfraNumSupportedMcastAlgoPairs: u32,
    pub pInfraSupportedMcastAlgoPairs: *mut core::ffi::c_void,
}
import "golang.org/x/sys/windows"

type NDIS_OBJECT_HEADER struct {
	Type byte
	Revision byte
	Size uint16
}

type DOT11_EXTAP_ATTRIBUTES struct {
	Header NDIS_OBJECT_HEADER
	uScanSSIDListSize uint32
	uDesiredSSIDListSize uint32
	uPrivacyExemptionListSize uint32
	uAssociationTableSize uint32
	uDefaultKeyTableSize uint32
	uWEPKeyValueMaxLength uint32
	bStrictlyOrderedServiceClassImplemented byte
	uNumSupportedCountryOrRegionStrings uint32
	pSupportedCountryOrRegionStrings uintptr
	uInfraNumSupportedUcastAlgoPairs uint32
	pInfraSupportedUcastAlgoPairs uintptr
	uInfraNumSupportedMcastAlgoPairs uint32
	pInfraSupportedMcastAlgoPairs uintptr
}
type
  NDIS_OBJECT_HEADER = record
    Type: Byte;
    Revision: Byte;
    Size: Word;
  end;

  DOT11_EXTAP_ATTRIBUTES = record
    Header: NDIS_OBJECT_HEADER;
    uScanSSIDListSize: DWORD;
    uDesiredSSIDListSize: DWORD;
    uPrivacyExemptionListSize: DWORD;
    uAssociationTableSize: DWORD;
    uDefaultKeyTableSize: DWORD;
    uWEPKeyValueMaxLength: DWORD;
    bStrictlyOrderedServiceClassImplemented: ByteBool;
    uNumSupportedCountryOrRegionStrings: DWORD;
    pSupportedCountryOrRegionStrings: Pointer;
    uInfraNumSupportedUcastAlgoPairs: DWORD;
    pInfraSupportedUcastAlgoPairs: Pointer;
    uInfraNumSupportedMcastAlgoPairs: DWORD;
    pInfraSupportedMcastAlgoPairs: Pointer;
  end;
const NDIS_OBJECT_HEADER = extern struct {
    Type: u8,
    Revision: u8,
    Size: u16,
};

const DOT11_EXTAP_ATTRIBUTES = extern struct {
    Header: NDIS_OBJECT_HEADER,
    uScanSSIDListSize: u32,
    uDesiredSSIDListSize: u32,
    uPrivacyExemptionListSize: u32,
    uAssociationTableSize: u32,
    uDefaultKeyTableSize: u32,
    uWEPKeyValueMaxLength: u32,
    bStrictlyOrderedServiceClassImplemented: u8,
    uNumSupportedCountryOrRegionStrings: u32,
    pSupportedCountryOrRegionStrings: ?*anyopaque,
    uInfraNumSupportedUcastAlgoPairs: u32,
    pInfraSupportedUcastAlgoPairs: ?*anyopaque,
    uInfraNumSupportedMcastAlgoPairs: u32,
    pInfraSupportedMcastAlgoPairs: ?*anyopaque,
};
type
  NDIS_OBJECT_HEADER {.bycopy.} = object
    Type: uint8
    Revision: uint8
    Size: uint16

  DOT11_EXTAP_ATTRIBUTES {.bycopy.} = object
    Header: NDIS_OBJECT_HEADER
    uScanSSIDListSize: uint32
    uDesiredSSIDListSize: uint32
    uPrivacyExemptionListSize: uint32
    uAssociationTableSize: uint32
    uDefaultKeyTableSize: uint32
    uWEPKeyValueMaxLength: uint32
    bStrictlyOrderedServiceClassImplemented: uint8
    uNumSupportedCountryOrRegionStrings: uint32
    pSupportedCountryOrRegionStrings: pointer
    uInfraNumSupportedUcastAlgoPairs: uint32
    pInfraSupportedUcastAlgoPairs: pointer
    uInfraNumSupportedMcastAlgoPairs: uint32
    pInfraSupportedMcastAlgoPairs: pointer
struct NDIS_OBJECT_HEADER
{
    ubyte Type;
    ubyte Revision;
    ushort Size;
}

struct DOT11_EXTAP_ATTRIBUTES
{
    NDIS_OBJECT_HEADER Header;
    uint uScanSSIDListSize;
    uint uDesiredSSIDListSize;
    uint uPrivacyExemptionListSize;
    uint uAssociationTableSize;
    uint uDefaultKeyTableSize;
    uint uWEPKeyValueMaxLength;
    ubyte bStrictlyOrderedServiceClassImplemented;
    uint uNumSupportedCountryOrRegionStrings;
    void* pSupportedCountryOrRegionStrings;
    uint uInfraNumSupportedUcastAlgoPairs;
    void* pInfraSupportedUcastAlgoPairs;
    uint uInfraNumSupportedMcastAlgoPairs;
    void* pInfraSupportedMcastAlgoPairs;
}

HSP用 定義

HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; DOT11_EXTAP_ATTRIBUTES サイズ: 56 バイト(x86)
dim st, 14    ; 4byte整数×14(構造体サイズ 56 / 4 切り上げ)
; Header : NDIS_OBJECT_HEADER (+0, 4byte)  varptr(st)+0 を基点に操作(4byte:入れ子/配列)
; uScanSSIDListSize : DWORD (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; uDesiredSSIDListSize : DWORD (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; uPrivacyExemptionListSize : DWORD (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; uAssociationTableSize : DWORD (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; uDefaultKeyTableSize : DWORD (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; uWEPKeyValueMaxLength : DWORD (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; bStrictlyOrderedServiceClassImplemented : BOOLEAN (+28, 1byte)  poke st,28,値  /  値 = peek(st,28)
; uNumSupportedCountryOrRegionStrings : DWORD (+32, 4byte)  st.8 = 値  /  値 = st.8   (lpoke/lpeek も可)
; pSupportedCountryOrRegionStrings : BYTE* (+36, 4byte)  st.9 = 値  /  値 = st.9   (lpoke/lpeek も可)
; uInfraNumSupportedUcastAlgoPairs : DWORD (+40, 4byte)  st.10 = 値  /  値 = st.10   (lpoke/lpeek も可)
; pInfraSupportedUcastAlgoPairs : DOT11_AUTH_CIPHER_PAIR* (+44, 4byte)  varptr(st)+44 を基点に操作(4byte:入れ子/配列)
; uInfraNumSupportedMcastAlgoPairs : DWORD (+48, 4byte)  st.12 = 値  /  値 = st.12   (lpoke/lpeek も可)
; pInfraSupportedMcastAlgoPairs : DOT11_AUTH_CIPHER_PAIR* (+52, 4byte)  varptr(st)+52 を基点に操作(4byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DOT11_EXTAP_ATTRIBUTES サイズ: 80 バイト(x64)
dim st, 20    ; 4byte整数×20(構造体サイズ 80 / 4 切り上げ)
; Header : NDIS_OBJECT_HEADER (+0, 4byte)  varptr(st)+0 を基点に操作(4byte:入れ子/配列)
; uScanSSIDListSize : DWORD (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; uDesiredSSIDListSize : DWORD (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; uPrivacyExemptionListSize : DWORD (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; uAssociationTableSize : DWORD (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; uDefaultKeyTableSize : DWORD (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; uWEPKeyValueMaxLength : DWORD (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; bStrictlyOrderedServiceClassImplemented : BOOLEAN (+28, 1byte)  poke st,28,値  /  値 = peek(st,28)
; uNumSupportedCountryOrRegionStrings : DWORD (+32, 4byte)  st.8 = 値  /  値 = st.8   (lpoke/lpeek も可)
; pSupportedCountryOrRegionStrings : BYTE* (+40, 8byte)  qpoke st,40,値 / qpeek(st,40)  ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; uInfraNumSupportedUcastAlgoPairs : DWORD (+48, 4byte)  st.12 = 値  /  値 = st.12   (lpoke/lpeek も可)
; pInfraSupportedUcastAlgoPairs : DOT11_AUTH_CIPHER_PAIR* (+56, 8byte)  varptr(st)+56 を基点に操作(8byte:入れ子/配列)
; uInfraNumSupportedMcastAlgoPairs : DWORD (+64, 4byte)  st.16 = 値  /  値 = st.16   (lpoke/lpeek も可)
; pInfraSupportedMcastAlgoPairs : DOT11_AUTH_CIPHER_PAIR* (+72, 8byte)  varptr(st)+72 を基点に操作(8byte:入れ子/配列)
; ※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_EXTAP_ATTRIBUTES
    #field NDIS_OBJECT_HEADER Header
    #field int uScanSSIDListSize
    #field int uDesiredSSIDListSize
    #field int uPrivacyExemptionListSize
    #field int uAssociationTableSize
    #field int uDefaultKeyTableSize
    #field int uWEPKeyValueMaxLength
    #field bool1 bStrictlyOrderedServiceClassImplemented
    #field int uNumSupportedCountryOrRegionStrings
    #field intptr pSupportedCountryOrRegionStrings
    #field int uInfraNumSupportedUcastAlgoPairs
    #field intptr pInfraSupportedUcastAlgoPairs
    #field int uInfraNumSupportedMcastAlgoPairs
    #field intptr pInfraSupportedMcastAlgoPairs
#endstruct

stdim st, DOT11_EXTAP_ATTRIBUTES        ; NSTRUCT 変数を確保
st->uScanSSIDListSize = 100
mes "uScanSSIDListSize=" + st->uScanSSIDListSize