LDN services: Difference between revisions

No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 234: Line 234:


The array count must be at least 1. This is clamped to a maximum of 0x18.
The array count must be at least 1. This is clamped to a maximum of 0x18.
[18.0.0+] This now uses the same SecurityMode override as [[#CreateNetwork|CreateNetwork]].


=== ScanPrivate ===
=== ScanPrivate ===
Line 243: Line 241:


See [[#Scan]].
See [[#Scan]].
[18.0.0+] This now uses the same SecurityMode override as [[#CreateNetwork|CreateNetwork]].


=== SetWirelessControllerPolicy ===
=== SetWirelessControllerPolicy ===
Line 436: Line 432:
Takes two input s16s '''Band''' and '''ChannelNumber'''. No output.
Takes two input s16s '''Band''' and '''ChannelNumber'''. No output.


[20.0.0+] Now takes a total of 2-bytes of input instead of 4-bytes.
[20.0.0+] Now takes an input u16 instead of two s16s, merging the two params. Bitmask 0x3FF (low 10-bits) is the ChannelNumber, while the remaining upper 6-bits is the Band. The Band is used as an array index to load the actual Band for passing to a func. Only the following Band input is valid, others return 0x0/0xFFFF: 2 - > 2400, 5 -> 5000, 6 -> 6000.
 
On NX Band must be ([20.0.0+] converted Band from the above array) 50 ([20.0.0+] 5000) or 24 ([20.0.0+] 2400).
 
The [[#State|State]] must be Station.
 
sdknso uses the input channel to convert to the input needed by the cmd.


=== SetTxPower ===
=== SetTxPower ===
Takes an input s16 '''Power'''. No output.
Takes an input s16 '''Power'''. No output.
The input must be 0x0..0xFF.
A state field must be non-zero.
The [[#State|State]] must be 2-5 (AccessPoint*/Station*).


=== ResetTxPower ===
=== ResetTxPower ===
No input/output.
No input/output.
The same state field checked by [[#SetTxPower|SetTxPower]] must be non-zero. The [[#State|State]] check is also the same as [[#SetTxPower|SetTxPower]].


== IClientProcessMonitor ==
== IClientProcessMonitor ==
Line 1,751: Line 1,761:


When encryption is enabled, the encrypted data is at +0x28 (+0x38 with EncryptionType3) with size {remaining frame size}. The key is derived from the raw 0x20-bytes at +0x0. The CTR/IV is {raw Counter above without byte-swap}, with the rest cleared to zeros. The AAD for AES-128-GCM is at +0x0 size 0x28-bytes.
When encryption is enabled, the encrypted data is at +0x28 (+0x38 with EncryptionType3) with size {remaining frame size}. The key is derived from the raw 0x20-bytes at +0x0. The CTR/IV is {raw Counter above without byte-swap}, with the rest cleared to zeros. The AAD for AES-128-GCM is at +0x0 size 0x28-bytes.
Originally [[#Scan]]/[[#ScanPrivate]] used the EncryptionType field to determine encryption handling. With [18.0.0+] these now set an internal SecurityMode field to 0 (Any) initially, then later uses the same SecurityMode override as [[#CreateNetwork|CreateNetwork]]. The internal SecurityMode field is used to determine encryption handling: Any uses the EncryptionType field like before. With non-zero the encryption handling is determined as required by the SecurityMode.


The content data at +{above_header_size} follows, which has the size specified above (which must be >=0x500 with EncryptionType1-2), where all fields are big-endian. For EncryptionType1-2:
The content data at +{above_header_size} follows, which has the size specified above (which must be >=0x500 with EncryptionType1-2), where all fields are big-endian. For EncryptionType1-2: