docs: document ncp23 bindery object layouts
This commit is contained in:
79
src/nwbind.c
79
src/nwbind.c
@@ -1297,6 +1297,18 @@ static void handle_fxx(int gelen, int func)
|
||||
|
||||
|
||||
case 0x32 : { /* Create Bindery Object */
|
||||
/*
|
||||
* SDK 23/50 / wire 0x32 Create Bindery Object.
|
||||
* Request payload after SubFunctionCode:
|
||||
* byte StatusFlags
|
||||
* byte SecurityLevel
|
||||
* word ObjectType (Hi-Lo)
|
||||
* byte ObjectNameLen
|
||||
* byte ObjectName[ObjectNameLen]
|
||||
* Parser comparison: field order and ObjectType byte
|
||||
* order match the documented layout. The include-level
|
||||
* cross-check is NWCreateObject() in nwbindry.h.
|
||||
*/
|
||||
NETOBJ obj;
|
||||
int result;
|
||||
uint8 *p = rdata;
|
||||
@@ -1309,6 +1321,15 @@ static void handle_fxx(int gelen, int func)
|
||||
} break;
|
||||
|
||||
case 0x33 : { /* delete OBJECT */
|
||||
/*
|
||||
* SDK 23/51 / wire 0x33 Delete Bindery Object.
|
||||
* Request payload after SubFunctionCode:
|
||||
* word ObjectType (Hi-Lo)
|
||||
* byte ObjectNameLen
|
||||
* byte ObjectName[ObjectNameLen]
|
||||
* Parser comparison: matches the documented layout.
|
||||
* Include cross-check: NWDeleteObject() in nwbindry.h.
|
||||
*/
|
||||
uint8 *p = rdata;
|
||||
int result;
|
||||
NETOBJ obj;
|
||||
@@ -1319,6 +1340,19 @@ static void handle_fxx(int gelen, int func)
|
||||
} break;
|
||||
|
||||
case 0x34 : { /* rename OBJECT, only SU */
|
||||
/*
|
||||
* SDK 23/52 / wire 0x34 Rename Object.
|
||||
* Request payload after SubFunctionCode:
|
||||
* word ObjectType (Hi-Lo)
|
||||
* byte OldObjectNameLen
|
||||
* byte OldObjectName[OldObjectNameLen]
|
||||
* byte NewObjNameLen
|
||||
* byte NewObjectName[NewObjNameLen]
|
||||
* Parser comparison: matches the documented order.
|
||||
* The implementation additionally enforces local SU
|
||||
* rights before calling nw_rename_obj().
|
||||
* Include cross-check: NWRenameObject() in nwbindry.h.
|
||||
*/
|
||||
int result=-0xff;
|
||||
if (act_c->id_flags&1) {
|
||||
uint8 *p = rdata;
|
||||
@@ -1335,6 +1369,17 @@ static void handle_fxx(int gelen, int func)
|
||||
|
||||
|
||||
case 0x35 : { /* get Bindery Object ID */
|
||||
/*
|
||||
* SDK 23/53 / wire 0x35 Get Bindery Object ID.
|
||||
* Request payload after SubFunctionCode:
|
||||
* word ObjectType (Hi-Lo)
|
||||
* byte ObjectNameLen
|
||||
* byte ObjectName[ObjectNameLen]
|
||||
* Reply: ObjectID (Hi-Lo), ObjectType (Hi-Lo), and
|
||||
* ObjectName[48]. Parser/reply comparison matches the
|
||||
* documented layout.
|
||||
* Include cross-check: NWGetObjectID() in nwbindry.h.
|
||||
*/
|
||||
struct XDATA {
|
||||
uint8 object_id[4];
|
||||
uint8 object_type[2];
|
||||
@@ -1356,6 +1401,15 @@ static void handle_fxx(int gelen, int func)
|
||||
} break;
|
||||
|
||||
case 0x36 : { /* get Bindery Object Name */
|
||||
/*
|
||||
* SDK 23/54 / wire 0x36 Get Bindery Object Name.
|
||||
* Request payload after SubFunctionCode:
|
||||
* long ObjectID (Hi-Lo)
|
||||
* Reply: ObjectID (Hi-Lo), ObjectType (Hi-Lo), and
|
||||
* ObjectName[48]. Parser/reply comparison matches the
|
||||
* documented layout.
|
||||
* Include cross-check: NWGetObjectName() in nwbindry.h.
|
||||
*/
|
||||
struct XDATA {
|
||||
uint8 object_id[4];
|
||||
uint8 object_type[2];
|
||||
@@ -1375,6 +1429,18 @@ static void handle_fxx(int gelen, int func)
|
||||
} break;
|
||||
|
||||
case 0x37 : { /* Scan Bindery Object */
|
||||
/*
|
||||
* SDK 23/55 / wire 0x37 Scan Bindery Object.
|
||||
* Request payload after SubFunctionCode:
|
||||
* long LastObjectSeen (Hi-Lo)
|
||||
* word SearchObjectType (Hi-Lo)
|
||||
* byte SearchNameLen
|
||||
* byte SearchObjectName[SearchNameLen]
|
||||
* Reply includes ObjectID, ObjectType, ObjectName[48],
|
||||
* ObjectFlags, ObjectSecurity, and ObjectHasProperties.
|
||||
* Parser/reply comparison matches the documented layout.
|
||||
* Include cross-check: NWScanObject() in nwbindry.h.
|
||||
*/
|
||||
struct XDATA {
|
||||
uint8 object_id[4];
|
||||
uint8 object_type[2];
|
||||
@@ -1406,6 +1472,19 @@ static void handle_fxx(int gelen, int func)
|
||||
break;
|
||||
|
||||
case 0x38 : { /* change Bindery Objekt Security */
|
||||
/*
|
||||
* SDK 23/56 / wire 0x38 Change Bindery Object Security.
|
||||
* Request payload after SubFunctionCode:
|
||||
* byte NewSecurity
|
||||
* word ObjectType (Hi-Lo)
|
||||
* byte ObjectNameLen
|
||||
* byte ObjectName[ObjectNameLen]
|
||||
* Parser comparison: matches the documented layout.
|
||||
* The implementation additionally enforces local SU
|
||||
* rights before calling nw_change_obj_security().
|
||||
* Include cross-check: NWChangeObjectSecurity() in
|
||||
* nwbindry.h.
|
||||
*/
|
||||
/* only SU ! */
|
||||
int result= -0xff;
|
||||
if (act_c->id_flags&1) {
|
||||
|
||||
Reference in New Issue
Block a user