Function anjay_access_control_set_acl
Defined in File access_control.h
Function Documentation
-
int anjay_access_control_set_acl(anjay_t *anjay, anjay_oid_t oid, anjay_iid_t iid, anjay_ssid_t ssid, anjay_access_mask_t access_mask)
Assign permissions for Instance /OID/IID to a particular server.
- Parameters:
anjay – ANJAY object with the Access Control module installed
oid – Object ID of the target Instance.
iid – Target Object Instance ID, or
ANJAY_ID_INVALID(i.e., MAX_ID==65535) to set an ACL referring to new instance creation.ssid – SSID of the server to grant permissions to. ANJAY_SSID_ANY may be used to set default permissions for all servers with no explicit ACL entry. Must not be equal to MAX_ID (65535).
access_mask – ACL value to set for given Instance. NOTE: Create permission makes no sense for an Instance, and other permissions make no sense for new instance creation.
- Returns:
0 in case of success, negative value in case of an error (including the case where target Object Instance does not exist).