Function anjay_access_control_set_owner
Defined in File access_control.h
Function Documentation
-
int anjay_access_control_set_owner(anjay_t *anjay, anjay_oid_t target_oid, anjay_iid_t target_iid, anjay_ssid_t owner_ssid, anjay_iid_t *inout_acl_iid)
Set the Access Control Owner for a given Object Instance.
- Parameters:
anjay – ANJAY object with the Access Control module installed
target_oid – Object ID of the target Instance.
target_iid – Target Object Instance ID, or
ANJAY_ID_INVALID(i.e., MAX_ID==65535) to set an ACL referring to new instance creation.owner_ssid – SSID of the server which should become the Access Control Owner for the given Object Instance.
ANJAY_SSID_BOOTSTRAPcan be specified to signify that the ACL shall not be editable by any regular LwM2M Server.inout_acl_iid – Setting related to the Instance ID of the Access Control Object Instance that governs the given target.
If
NULL, any existing instance governing the given target will be used if present, or a new instance with a first free Instance ID will be created.If non-
NULLand*inout_acl_iid == ANJAY_ID_INVALID, any existing instance governing the given target will be used if present, or a new instance with a first free Instance ID will be created, and*inout_acl_iidwill be set to the Instance ID of the affected Access Control Object Instance upon a successful return from this function.If non-
NULLand*inout_acl_iid != ANJAY_ID_INVALID, a new instance with that ID will be created; an existing instance may also be used, but only if the instance governing the given target has the ID specified. If an instance governing the given target already exists and has a different Instance ID, or if an instance with the given ID, but governs a different target,*inout_acl_iidwill be set to the ID of the conflicting instance and this function will return an error.
- Returns:
0 in case of success, negative value in case of an error (including the case where target Object Instance does not exist).