simc_lsmplugin.c File Reference
#include <libstoragemgmt/libstoragemgmt_plug_interface.h>
#include <string.h>
#include <unistd.h>
#include <crypt.h>
#include <glib.h>
#include <assert.h>
#include <time.h>
#include <stdlib.h>
#include <stdio.h>
#include <openssl/md5.h>
#include "libstoragemgmt/libstoragemgmt_targetport.h"
Go to the source code of this file.
Data Structures |
| struct | allocated_volume |
| struct | allocated_fs |
| struct | allocated_ag |
| struct | plugin_data |
| struct | allocated_job |
Defines |
| #define | _XOPEN_SOURCE |
| #define | BS 512 |
| #define | MAX_SYSTEMS 1 |
| #define | MAX_FS 32 |
| #define | MAX_EXPORT 32 |
Functions |
| char * | md5 (const char *data) |
| void | remove_item (void *array, int remove_index, int num_elems, size_t elem_size) |
| struct allocated_job * | alloc_allocated_job (lsm_data_type type, void *return_data) |
| void | free_allocated_job (void *j) |
| struct allocated_ag * | alloc_allocated_ag (lsm_access_group *ag, lsm_access_group_init_type i) |
| void | free_allocated_ag (void *v) |
| void | free_pool_record (void *p) |
| void | free_fs_record (struct allocated_fs *fs) |
| void | pool_deallocate (lsm_pool *p, uint64_t size) |
| void | free_group_grant_hash (void *v) |
| void | free_allocated_fs (void *v) |
| void | free_disk (void *d) |
| void | free_allocated_volume (void *v) |
| int | load (lsm_plugin_ptr c, const char *uri, const char *password, uint32_t timeout, lsm_flag flags) |
| int | unload (lsm_plugin_ptr c, lsm_flag flags) |
| int | main (int argc, char *argv[]) |
Define Documentation
Function Documentation
| void free_allocated_ag |
( |
void * |
v |
) |
|
| void free_allocated_fs |
( |
void * |
v |
) |
|
| void free_allocated_job |
( |
void * |
j |
) |
|
| void free_allocated_volume |
( |
void * |
v |
) |
|
| void free_disk |
( |
void * |
d |
) |
|
| void free_group_grant_hash |
( |
void * |
v |
) |
|
| void free_pool_record |
( |
void * |
p |
) |
|
| int main |
( |
int |
argc, |
|
|
char * |
argv[] | |
|
) |
| | |
| char* md5 |
( |
const char * |
data |
) |
|
Creates a md5 string (DO NOT FREE RETURN VALUE as the string is static)
- Parameters:
-
| data | Data to generate md5 |
- Returns:
- Pointer to string which contains the string digest
Definition at line 52 of file simc_lsmplugin.c.
| void pool_deallocate |
( |
lsm_pool * |
p, |
|
|
uint64_t |
size | |
|
) |
| | |
| void remove_item |
( |
void * |
array, |
|
|
int |
remove_index, |
|
|
int |
num_elems, |
|
|
size_t |
elem_size | |
|
) |
| | |
Removes an item from an array, shifting the elements and clearing the space that was occupied at the end, use with caution :-)
- Parameters:
-
| array | Base address for the array |
| remove_index | Element index to remove |
| num_elems | Number of elements currently in the array |
| elem_size | Size of each array element |
Definition at line 76 of file simc_lsmplugin.c.