|
IoTivity-Lite
|
#include "oc_export.h"#include "oc_ri.h"#include "oc_uuid.h"#include "util/oc_list.h"#include <stdbool.h>#include <stddef.h>Data Structures | |
| struct | oc_ace_res_t |
| ACE resource information. More... | |
| union | oc_ace_subject_t |
| ACE subject information. More... | |
| struct | oc_sec_ace_t |
| Security ACE information. More... | |
| struct | oc_sec_acl_s |
| security access control list More... | |
Typedefs | |
| typedef struct oc_ace_res_t | oc_ace_res_t |
| ACE resource information. More... | |
| typedef union oc_ace_subject_t | oc_ace_subject_t |
| ACE subject information. More... | |
| typedef bool(* | oc_sec_ace_filter_t) (const oc_sec_ace_t *ace, void *user_data) |
| Access control entry (ACE) filtering function. More... | |
| typedef struct oc_sec_ace_t | oc_sec_ace_t |
| Security ACE information. More... | |
| typedef struct oc_sec_acl_s | oc_sec_acl_t |
| security access control list More... | |
| typedef void(* | oc_sec_on_apply_acl_cb_t) (oc_sec_on_apply_acl_data_t data, void *user_data) |
| Callback invoked with a created / updated access control entry. More... | |
| typedef struct oc_sec_on_apply_acl_data_t | oc_sec_on_apply_acl_data_t |
Enumerations | |
| enum | oc_ace_connection_type_t { OC_CONN_AUTH_CRYPT = 0 , OC_CONN_ANON_CLEAR } |
| Access control connection type. More... | |
| enum | oc_ace_subject_type_t { OC_SUBJECT_UUID = 0 , OC_SUBJECT_ROLE , OC_SUBJECT_CONN } |
| ACE subject. More... | |
| enum | oc_ace_wildcard_t { OC_ACE_NO_WC = 0 , OC_ACE_WC_ALL = 0x111 , OC_ACE_WC_ALL_SECURED = 0x01 , OC_ACE_WC_ALL_PUBLIC = 0x10 } |
| ACE wild cards. More... | |
Functions | |
| void | oc_resource_set_access_in_RFOTM (oc_resource_t *resource, bool state, oc_ace_permissions_t permission) |
| Specify if a resource is accessible in RFOTM state. More... | |
| bool | oc_sec_acl_add_bootstrap_acl (size_t device) |
| Add initial access control list for core resources of a device. More... | |
| void | oc_sec_acl_clear (size_t device, oc_sec_ace_filter_t filter, void *user_data) |
| Remove access control entries matching filter from given device. More... | |
| int | oc_sec_apply_acl (const oc_rep_t *rep, size_t device, oc_sec_on_apply_acl_cb_t on_apply_ace_cb, void *on_apply_ace_data) |
| Parse payload and add/update access control list. More... | |
| oc_sec_ace_t * | oc_sec_get_ace_by_aceid (int aceid, size_t device) |
| Get access control entry with given aceid from given device. More... | |
| oc_sec_acl_t * | oc_sec_get_acl (size_t device) |
| Get access control list of a device. More... | |
| void | oc_sec_remove_ace (oc_sec_ace_t *ace, size_t device) |
| Remove access control entry from given device. More... | |
| bool | oc_sec_remove_ace_by_aceid (int aceid, size_t device) |
| Remove access control entry with aceid from given device. More... | |
| typedef struct oc_ace_res_t oc_ace_res_t |
ACE resource information.
| typedef union oc_ace_subject_t oc_ace_subject_t |
ACE subject information.
| typedef bool(* oc_sec_ace_filter_t) (const oc_sec_ace_t *ace, void *user_data) |
Access control entry (ACE) filtering function.
| ace | ACE to check |
| user_data | user data passed from the caller |
| typedef struct oc_sec_ace_t oc_sec_ace_t |
Security ACE information.
| typedef struct oc_sec_acl_s oc_sec_acl_t |
security access control list
| typedef void(* oc_sec_on_apply_acl_cb_t) (oc_sec_on_apply_acl_data_t data, void *user_data) |
Callback invoked with a created / updated access control entry.
| data | Data with new/updated ACL data |
| user_data | User data passed from the caller |
| enum oc_ace_wildcard_t |
| void oc_resource_set_access_in_RFOTM | ( | oc_resource_t * | resource, |
| bool | state, | ||
| oc_ace_permissions_t | permission | ||
| ) |
Specify if a resource is accessible in RFOTM state.
| [in] | resource | to specify as accessible or non-accessible in RFOTM state |
| [in] | state | if true the resource will be accessible in RFOTM state |
| [in] | permission | the permission of the resource in RFOTM state |
| bool oc_sec_acl_add_bootstrap_acl | ( | size_t | device | ) |
Add initial access control list for core resources of a device.
| device | Index of the device |
| void oc_sec_acl_clear | ( | size_t | device, |
| oc_sec_ace_filter_t | filter, | ||
| void * | user_data | ||
| ) |
Remove access control entries matching filter from given device.
| device | Index of the device |
| filter | Filtering function (if NULL all existing ACEs match) |
| user_data | User data passed from the caller |
| int oc_sec_apply_acl | ( | const oc_rep_t * | rep, |
| size_t | device, | ||
| oc_sec_on_apply_acl_cb_t | on_apply_ace_cb, | ||
| void * | on_apply_ace_data | ||
| ) |
Parse payload and add/update access control list.
| rep | Payload to parse |
| device | Index of the device |
| on_apply_ace_cb | Callback invoked when a new access control entry is added or updated |
| on_apply_ace_data | User data passed to the on_apply_ace_cb function |
| oc_sec_ace_t* oc_sec_get_ace_by_aceid | ( | int | aceid, |
| size_t | device | ||
| ) |
Get access control entry with given aceid from given device.
| aceid | Access control entry id |
| device | Index of the device |
| oc_sec_acl_t* oc_sec_get_acl | ( | size_t | device | ) |
Get access control list of a device.
| device | Index of the device |
| void oc_sec_remove_ace | ( | oc_sec_ace_t * | ace, |
| size_t | device | ||
| ) |
Remove access control entry from given device.
| ace | Access control entry to remove |
| device | Index of the device |
| bool oc_sec_remove_ace_by_aceid | ( | int | aceid, |
| size_t | device | ||
| ) |
Remove access control entry with aceid from given device.
| aceid | Access control entry id |
| device | Index of the device |