ホーム › NetworkManagement.Ndis › NDIS_802_11_CONFIGURATION
NDIS_802_11_CONFIGURATION
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Length | DWORD | 4 | +0 | +0 | 本構造体の長さ(バイト)。 |
| BeaconPeriod | DWORD | 4 | +4 | +4 | ビーコン送信間隔(Kマイクロ秒単位)。 |
| ATIMWindow | DWORD | 4 | +8 | +8 | IBSSにおけるATIMウィンドウ時間(Kマイクロ秒単位)。 |
| DSConfig | DWORD | 4 | +12 | +12 | DSSS使用時の周波数チャネル(kHz単位)。 |
| FHConfig | NDIS_802_11_CONFIGURATION_FH | 16 | +16 | +16 | 周波数ホッピング方式の構成パラメータ。 |
各言語での定義
#include <windows.h>
// NDIS_802_11_CONFIGURATION_FH (x64 16 / x86 16 バイト)
typedef struct NDIS_802_11_CONFIGURATION_FH {
DWORD Length;
DWORD HopPattern;
DWORD HopSet;
DWORD DwellTime;
} NDIS_802_11_CONFIGURATION_FH;
// NDIS_802_11_CONFIGURATION (x64 32 / x86 32 バイト)
typedef struct NDIS_802_11_CONFIGURATION {
DWORD Length;
DWORD BeaconPeriod;
DWORD ATIMWindow;
DWORD DSConfig;
NDIS_802_11_CONFIGURATION_FH FHConfig;
} NDIS_802_11_CONFIGURATION;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct NDIS_802_11_CONFIGURATION_FH
{
public uint Length;
public uint HopPattern;
public uint HopSet;
public uint DwellTime;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct NDIS_802_11_CONFIGURATION
{
public uint Length;
public uint BeaconPeriod;
public uint ATIMWindow;
public uint DSConfig;
public NDIS_802_11_CONFIGURATION_FH FHConfig;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure NDIS_802_11_CONFIGURATION_FH
Public Length As UInteger
Public HopPattern As UInteger
Public HopSet As UInteger
Public DwellTime As UInteger
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure NDIS_802_11_CONFIGURATION
Public Length As UInteger
Public BeaconPeriod As UInteger
Public ATIMWindow As UInteger
Public DSConfig As UInteger
Public FHConfig As NDIS_802_11_CONFIGURATION_FH
End Structureimport ctypes
from ctypes import wintypes
class NDIS_802_11_CONFIGURATION_FH(ctypes.Structure):
_fields_ = [
("Length", wintypes.DWORD),
("HopPattern", wintypes.DWORD),
("HopSet", wintypes.DWORD),
("DwellTime", wintypes.DWORD),
]
class NDIS_802_11_CONFIGURATION(ctypes.Structure):
_fields_ = [
("Length", wintypes.DWORD),
("BeaconPeriod", wintypes.DWORD),
("ATIMWindow", wintypes.DWORD),
("DSConfig", wintypes.DWORD),
("FHConfig", NDIS_802_11_CONFIGURATION_FH),
]#[repr(C)]
pub struct NDIS_802_11_CONFIGURATION_FH {
pub Length: u32,
pub HopPattern: u32,
pub HopSet: u32,
pub DwellTime: u32,
}
#[repr(C)]
pub struct NDIS_802_11_CONFIGURATION {
pub Length: u32,
pub BeaconPeriod: u32,
pub ATIMWindow: u32,
pub DSConfig: u32,
pub FHConfig: NDIS_802_11_CONFIGURATION_FH,
}import "golang.org/x/sys/windows"
type NDIS_802_11_CONFIGURATION_FH struct {
Length uint32
HopPattern uint32
HopSet uint32
DwellTime uint32
}
type NDIS_802_11_CONFIGURATION struct {
Length uint32
BeaconPeriod uint32
ATIMWindow uint32
DSConfig uint32
FHConfig NDIS_802_11_CONFIGURATION_FH
}type
NDIS_802_11_CONFIGURATION_FH = record
Length: DWORD;
HopPattern: DWORD;
HopSet: DWORD;
DwellTime: DWORD;
end;
NDIS_802_11_CONFIGURATION = record
Length: DWORD;
BeaconPeriod: DWORD;
ATIMWindow: DWORD;
DSConfig: DWORD;
FHConfig: NDIS_802_11_CONFIGURATION_FH;
end;const NDIS_802_11_CONFIGURATION_FH = extern struct {
Length: u32,
HopPattern: u32,
HopSet: u32,
DwellTime: u32,
};
const NDIS_802_11_CONFIGURATION = extern struct {
Length: u32,
BeaconPeriod: u32,
ATIMWindow: u32,
DSConfig: u32,
FHConfig: NDIS_802_11_CONFIGURATION_FH,
};type
NDIS_802_11_CONFIGURATION_FH {.bycopy.} = object
Length: uint32
HopPattern: uint32
HopSet: uint32
DwellTime: uint32
NDIS_802_11_CONFIGURATION {.bycopy.} = object
Length: uint32
BeaconPeriod: uint32
ATIMWindow: uint32
DSConfig: uint32
FHConfig: NDIS_802_11_CONFIGURATION_FHstruct NDIS_802_11_CONFIGURATION_FH
{
uint Length;
uint HopPattern;
uint HopSet;
uint DwellTime;
}
struct NDIS_802_11_CONFIGURATION
{
uint Length;
uint BeaconPeriod;
uint ATIMWindow;
uint DSConfig;
NDIS_802_11_CONFIGURATION_FH FHConfig;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; NDIS_802_11_CONFIGURATION サイズ: 32 バイト(x64)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; Length : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; BeaconPeriod : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; ATIMWindow : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; DSConfig : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; FHConfig : NDIS_802_11_CONFIGURATION_FH (+16, 16byte) varptr(st)+16 を基点に操作(16byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global NDIS_802_11_CONFIGURATION_FH
#field int Length
#field int HopPattern
#field int HopSet
#field int DwellTime
#endstruct
#defstruct global NDIS_802_11_CONFIGURATION
#field int Length
#field int BeaconPeriod
#field int ATIMWindow
#field int DSConfig
#field NDIS_802_11_CONFIGURATION_FH FHConfig
#endstruct
stdim st, NDIS_802_11_CONFIGURATION ; NSTRUCT 変数を確保
st->Length = 100
mes "Length=" + st->Length