include/dmlite/c/utils.h File Reference
C wrapper for DMLite utils.
More...
#include "any.h"
#include "../common/config.h"
#include <limits.h>
#include <stdint.h>
Go to the source code of this file.
Detailed Description
C wrapper for DMLite utils.
- Author:
- Alejandro Álvarez Ayllon <aalvarez@cern.ch>
Define Documentation
#define ACL_ENTRIES_MAX 300 |
#define HOST_NAME_MAX _POSIX_HOST_NAME_MAX |
Function Documentation
Frees an array of ACL entries as returned by dm_deserialize_acls.
- Parameters:
-
| nEntries | The number of entries in the array. |
| acl | The ACL. |
void dmlite_deserialize_acl |
( |
const char * |
buffer, |
|
|
unsigned * |
nEntries, |
|
|
dmlite_aclentry ** |
acl | |
|
) |
| | |
Deserializes a string into an array of ACL entries.
- Parameters:
-
| buffer | The string. |
| nEntries | The resulting number of ACL entries. |
| acl | The resulting ACL. |
dmlite_url* dmlite_parse_url |
( |
const char * |
source |
) |
|
Parses a URL.
- Parameters:
-
- Returns:
- Parsed URL.
- Note:
- dest->query must be NULL for the first call, so it is internally allocated.
void dmlite_serialize_acls |
( |
unsigned |
nEntries, |
|
|
dmlite_aclentry * |
acl, |
|
|
char * |
buffer, |
|
|
size_t |
bsize | |
|
) |
| | |
Serializes into a string a set of ACL entries.
- Parameters:
-
| nEntries | The number of ACL entries in the array. |
| acl | The ACL. |
| buffer | Where to put the resulting string. |
| bsize | The buffer size. |
Frees the given url.
- Parameters:
-
char* dmlite_url_serialize |
( |
dmlite_url * |
url, |
|
|
char * |
buffer, |
|
|
size_t |
bsize | |
|
) |
| | |
Serializes a URL.
- Parameters:
-
| url | The url to serialize. |
| buffer | Where to put the serialized version. |
| bsize | The buffer size. |
- Returns:
- Buffer, NULL on error.