docs: document ncp23 bindery property layouts

This commit is contained in:
AI Patch
2026-06-01 22:58:53 +00:00
committed by Mario Fetka
parent 05b8dc8875
commit 7a434547ea
2 changed files with 106 additions and 3 deletions

21
TODO.md
View File

@@ -528,6 +528,12 @@ Current status:
- SDK `23/54` / wire `0x36` Get Bindery Object Name
- SDK `23/55` / wire `0x37` Scan Bindery Object
- SDK `23/56` / wire `0x38` Change Bindery Object Security
- SDK `23/57` / wire `0x39` Create Property
- SDK `23/58` / wire `0x3a` Delete Property
- SDK `23/59` / wire `0x3b` Change Property Security
- SDK `23/60` / wire `0x3c` Scan Property
- SDK `23/61` / wire `0x3d` Read Property Value
- SDK `23/62` / wire `0x3e` Write Property Value
- SDK `23/15` request payload offsets match the current parser:
`LastSearchIndex`, `DirectoryHandle`, `SearchAttributes`, `FileNameLen`,
and `FileName`. The reply shape also matches the documented fixed file
@@ -549,6 +555,14 @@ Current status:
The current `nwbind.c` parsers match the documented request payload order and
Hi-Lo object type/object ID fields. Replies for SDK `23/53`, `23/54`, and
`23/55` match the documented fixed bindery object reply blocks.
- Bindery property calls SDK `23/57` through SDK `23/62` were compared against
the NDK/Core-Protocols PDF, WebSDK API names, and `nwbindry.h` prototypes.
The current `nwbind.c` parsers match the documented request payload order,
including Hi-Lo ObjectType and Hi-Lo LastInstance/SearchInstance for
SDK `23/60`. Replies for SDK `23/60` and SDK `23/61` match the documented
fixed property reply blocks. SDK `23/62` names the byte after SegmentNumber
`MoreFlag`; the current local variable is named `erase_segment`, but it
consumes that same byte.
Follow-up:
@@ -568,9 +582,10 @@ Follow-up:
- SDK `23/27` / wire `0x1b` documents `SearchConnNumber` and returned
connection numbers as Lo-Hi long values; the current code reads the search
number with `GET_BE32()` and returns 16-bit connection numbers.
- Audit the remaining forwarded `0x2222/23` property, set, queue, and
management subfunctions in the files that actually handle them instead of
treating the `nwconn.c` forwarding points as complete local implementations.
- Audit the remaining forwarded `0x2222/23` set, password/access-level, queue,
and management subfunctions in the files that actually handle them instead
of treating the `nwconn.c` forwarding points as complete local
implementations.
### Extended volume information field mapping

View File

@@ -1498,6 +1498,21 @@ static void handle_fxx(int gelen, int func)
} break;
case 0x39 : { /* create Property */
/*
* SDK 23/57 / wire 0x39 Create Property.
* Request payload after SubFunctionCode:
* word ObjectType (Hi-Lo)
* byte ObjectNameLen
* byte ObjectName[ObjectNameLen]
* byte PropertyFlags
* byte PropertySecurity
* byte PropertyNameLen
* byte PropertyName[PropertyNameLen]
* Parser comparison: matches the documented field
* order and ObjectType byte order.
* Include/WebSDK cross-check: NWCreateProperty() in
* nwbindry.h.
*/
uint8 *p = rdata;
int object_type = GET_BE16(p);
int object_namlen = (int) *(p+=2);
@@ -1515,6 +1530,18 @@ static void handle_fxx(int gelen, int func)
case 0x3a : { /* delete property */
/*
* SDK 23/58 / wire 0x3a Delete Property.
* Request payload after SubFunctionCode:
* word ObjectType (Hi-Lo)
* byte ObjectNameLen
* byte ObjectName[ObjectNameLen]
* byte PropertyNameLen
* byte PropertyName[PropertyNameLen]
* Parser comparison: matches the documented layout.
* Include/WebSDK cross-check: NWDeleteProperty() in
* nwbindry.h.
*/
uint8 *p = rdata;
int object_type = GET_BE16(p);
int object_namlen = (int) *(p+2);
@@ -1528,6 +1555,19 @@ static void handle_fxx(int gelen, int func)
} break;
case 0x3b : { /* Change Prop Security */
/*
* SDK 23/59 / wire 0x3b Change Property Security.
* Request payload after SubFunctionCode:
* word ObjectType (Hi-Lo)
* byte ObjectNameLen
* byte ObjectName[ObjectNameLen]
* byte NewPropertySecurity
* byte PropertyNameLen
* byte PropertyName[PropertyNameLen]
* Parser comparison: matches the documented layout.
* Include/WebSDK cross-check:
* NWChangePropertySecurity() in nwbindry.h.
*/
uint8 *p = rdata;
int object_type = GET_BE16(p);
int object_namlen = (int) *(p+=2);
@@ -1542,6 +1582,22 @@ static void handle_fxx(int gelen, int func)
} break;
case 0x3c : { /* Scan Property */
/*
* SDK 23/60 / wire 0x3c Scan Property.
* Request payload after SubFunctionCode:
* word ObjectType (Hi-Lo)
* byte ObjectNameLen
* byte ObjectName[ObjectNameLen]
* long LastInstance (Hi-Lo)
* byte PropertyNameLen
* byte SearchPropertyName[PropertyNameLen]
* Reply: PropertyName[16], flags, security,
* SearchInstance (Hi-Lo), ValueAvailable, and
* MoreProperties. Parser/reply comparison matches
* the documented layout.
* Include/WebSDK cross-check: NWScanProperty() in
* nwbindry.h.
*/
struct XDATA {
uint8 prop_name[16];
uint8 flags; /* set=2, dynamic=1 */
@@ -1574,6 +1630,21 @@ static void handle_fxx(int gelen, int func)
} break;
case 0x3d : { /* read Bindery Property Value */
/*
* SDK 23/61 / wire 0x3d Read Property Value.
* Request payload after SubFunctionCode:
* word ObjectType (Hi-Lo)
* byte ObjectNameLen
* byte ObjectName[ObjectNameLen]
* byte SegmentNumber
* byte PropertyNameLen
* byte PropertyName[PropertyNameLen]
* Reply: PropertyValue[128], MoreFlag, and
* PropertyFlags. Parser/reply comparison matches the
* documented layout.
* Include/WebSDK cross-check: NWReadPropertyValue() in
* nwbindry.h.
*/
struct XDATA {
uint8 property_value[128];
uint8 more_segments;
@@ -1599,6 +1670,23 @@ static void handle_fxx(int gelen, int func)
} break;
case 0x3e : { /* write Bindery Property Value */
/*
* SDK 23/62 / wire 0x3e Write Property Value.
* Request payload after SubFunctionCode:
* word ObjectType (Hi-Lo)
* byte ObjectNameLen
* byte ObjectName[ObjectNameLen]
* byte SegmentNumber
* byte MoreFlag
* byte PropertyNameLen
* byte PropertyName[PropertyNameLen]
* byte PropertyValue[128]
* Parser comparison: matches the documented field
* order. The local variable is named erase_segment,
* but it consumes the SDK MoreFlag byte.
* Include/WebSDK cross-check: NWWritePropertyValue()
* in nwbindry.h.
*/
uint8 *p = rdata;
int object_type = GET_BE16(p);
int object_namlen = (int) *(p+2);