c-icap-doc
0.1
|
Access control lists related API.
More...
Data Structures | |
struct | ci_acl_type |
This is the struct used to implement an acl type object. More... | |
Typedefs | |
typedef struct ci_acl_type | ci_acl_type_t |
This is the struct used to implement an acl type object. | |
typedef struct ci_acl_spec | ci_acl_spec_t |
This struct holds an access control list (acl). More... | |
typedef struct ci_access_entry | ci_access_entry_t |
An access entry object holds an access control list, and can be connected to linked lists of access entries. More... | |
Functions | |
ci_access_entry_t * | ci_access_entry_new (ci_access_entry_t **list, int type) |
Append a new access entry object to an access entries list More... | |
void | ci_access_entry_release (ci_access_entry_t *list) |
Destroy an access entries list More... | |
int | ci_access_entry_add_acl_by_name (ci_access_entry_t *access_entry, const char *aclname) |
Add an acl to an access entry object More... | |
int | ci_access_entry_match_request (ci_access_entry_t *access_entry, ci_request_t *req) |
Check if an access entries list matches a request object More... | |
void | ci_acl_init () |
Initializes the c-icap acl subsystem. More... | |
void | ci_acl_reset () |
Resets the c-icap acl subsystem. More... | |
const ci_acl_type_t * | ci_acl_type_search (const char *name) |
Search for an acl type More... | |
int | ci_acl_type_add (const ci_acl_type_t *type) |
Add a custom acl type to the c-icap acl subsystem More... | |
Access control lists related API.
Structures, functions and macros used to define custom acl types, and use access control lists in services and modules.
typedef struct ci_access_entry ci_access_entry_t |
An access entry object holds an access control list, and can be connected to linked lists of access entries.
This struct used to implement lists of access control lists. Each access entry can hold an "allow" or "deny" access control list. An access entries list represents the following c-icap config lines:
each of the above lines represented by an ci_access_entry object. The ci_access_entry objects can be connected to a simple linked list.
typedef struct ci_acl_spec ci_acl_spec_t |
This struct holds an access control list (acl).
Imagine the following access control list defined in the c-icap config file:
This struct represents access control lists like the above
int ci_access_entry_add_acl_by_name | ( | ci_access_entry_t * | access_entry, |
const char * | aclname | ||
) |
Add an acl to an access entry object
access_entry | Pointer to the access entry object |
aclname | The name of the acl to be added. |
int ci_access_entry_match_request | ( | ci_access_entry_t * | access_entry, |
ci_request_t * | req | ||
) |
Check if an access entries list matches a request object
access_entry | Pointer to the access entries list (a linked list of ci_access_entry_t objects) |
req | pointer to the request object (ci_request_t object) |
ci_access_entry_t* ci_access_entry_new | ( | ci_access_entry_t ** | list, |
int | type | ||
) |
Append a new access entry object to an access entries list
list | Pointer to the access entry list |
type | CI_ACCESS_ALLOW if CI_ACCESS_DENY to specify if this access entry holds an "allow" or "deny" access control list |
void ci_access_entry_release | ( | ci_access_entry_t * | list | ) |
Destroy an access entries list
list | Pointer to the access entries list |
void ci_acl_init | ( | ) |
Initializes the c-icap acl subsystem.
It is not thread safe
void ci_acl_reset | ( | ) |
Resets the c-icap acl subsystem.
It is not thread safe
int ci_acl_type_add | ( | const ci_acl_type_t * | type | ) |
Add a custom acl type to the c-icap acl subsystem
type | Pointer to the c-acl_type_t struct which implements the acl type |
const ci_acl_type_t* ci_acl_type_search | ( | const char * | name | ) |
Search for an acl type
name | The name of the acl type |