nfs-ganesha 1.4
|
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <search.h>
#include <limits.h>
#include <ctype.h>
#include "nodelist.h"
#include "nodelist_internals.h"
Go to the source code of this file.
Defines | |
#define | MAX_LONG_INT_STRING_SIZE 128 |
Functions | |
int | nodelist_nodelist_equal_patterns (nodelist_nodelist_t *first_list, nodelist_nodelist_t *second_list) |
Check if two nodes shares the same pattern. | |
int | nodelist_nodelist_non_recursive_intersects (nodelist_nodelist_t *first_list, nodelist_nodelist_t *second_list) |
Check if two nodes list intersect in a non recursive way. | |
int | nodelist_nodelist_intersects (nodelist_nodelist_t *first_list, nodelist_nodelist_t *second_list) |
Check if two nodes list intersect. | |
int | nodelist_nodelist_non_recursive_includes (nodelist_nodelist_t *first_list, nodelist_nodelist_t *second_list) |
Check if the second list is included in the first in a non recursive way. | |
int | nodelist_nodelist_includes (nodelist_nodelist_t *first_list, nodelist_nodelist_t *second_list) |
Check if the second list is included in the first. | |
int | nodelist_nodelist_add_ids (nodelist_nodelist_t *nodelist, char *idlist) |
Add ids list to nodes list. | |
int | nodelist_common_split_nodelist_entry (char *list, char **p_prefix, char **p_idlist, char **p_suffix) |
int | nodelist_nodelist_init (nodelist_nodelist_t *nodelist, char **lists, int lists_nb) |
Initialize a bridge nodes list structure. | |
int | nodelist_nodelist_free_contents (nodelist_nodelist_t *nodelist) |
Free a bridge nodes list structure. | |
int | nodelist_nodelist_copy (nodelist_nodelist_t *dest_list, nodelist_nodelist_t *src_list) |
Copy a node list into an other one. | |
int | nodelist_nodelist_is_empty (nodelist_nodelist_t *nodelist) |
Check if a node list is empty. | |
int | nodelist_nodelist_add_nodelist (nodelist_nodelist_t *nodelist, nodelist_nodelist_t *second_list) |
Add a node list to an other one. | |
int | nodelist_nodelist_remove_nodelist (nodelist_nodelist_t *nodelist, nodelist_nodelist_t *second_list) |
Remove a node list from an other one. | |
int | nodelist_nodelist_add_nodes (nodelist_nodelist_t *nodelist, char *list) |
Add a nodes list to a bridge nodes list structure. | |
int | nodelist_nodelist_remove_nodes (nodelist_nodelist_t *nodelist, char *list) |
int | nodelist_nodelist_add_nodes_range (nodelist_nodelist_t *nodelist, long int from_id, long int to_id) |
long int | nodelist_nodelist_non_recursive_nodes_quantity (nodelist_nodelist_t *nodelist) |
long int | nodelist_nodelist_nodes_quantity (nodelist_nodelist_t *nodelist) |
Get nodes quantity. | |
int | nodelist_nodelist_get_extended_string (nodelist_nodelist_t *nodelist, char **p_string) |
Get extended nodes string. | |
int | nodelist_nodelist_get_compacted_string (nodelist_nodelist_t *nodelist, char **p_string) |
Get compacted nodes string. | |
int | nodelist_nodepattern_init (nodelist_nodepattern_t *np) |
Initialize a bridge node pattern structure. | |
int | nodelist_nodepattern_init_by_copy (nodelist_nodepattern_t *np, nodelist_nodepattern_t *npin) |
Initialize a bridge node pattern structure by dumping an other one. | |
int | nodelist_nodepattern_free_contents (nodelist_nodepattern_t *np) |
Clean a bridge node pattern structure. | |
int | nodelist_nodepattern_set_padding (nodelist_nodepattern_t *np, int padding) |
Set bridge node pattern padding. | |
int | nodelist_nodepattern_set_prefix (nodelist_nodepattern_t *np, char *prefix) |
Set bridge node pattern prefix. | |
int | nodelist_nodepattern_set_suffix (nodelist_nodepattern_t *np, char *suffix) |
Set bridge node pattern prefix. | |
int | nodelist_nodepattern_set_basic (nodelist_nodepattern_t *np) |
Set bridge node pattern basic flag. | |
int | nodelist_nodepattern_unset_basic (nodelist_nodepattern_t *np) |
Unset bridge node pattern basic flag. | |
int | nodelist_nodepattern_equals (nodelist_nodepattern_t *np1, nodelist_nodepattern_t *np2) |
Test if two bridge node patterns are identical. |
#define MAX_LONG_INT_STRING_SIZE 128 |
Definition at line 19 of file nodelist.c.
int nodelist_common_split_nodelist_entry | ( | char * | list, |
char ** | p_prefix, | ||
char ** | p_idlist, | ||
char ** | p_suffix | ||
) |
Definition at line 208 of file nodelist.c.
int nodelist_nodelist_add_ids | ( | nodelist_nodelist_t * | nodelist, |
char * | idlist | ||
) |
Add ids list to nodes list.
list | the input nodes list |
idlist | the ids list to add (string representation) |
n | padding length if operation successfully done |
1 | error during the operation |
Definition at line 201 of file nodelist.c.
int nodelist_nodelist_add_nodelist | ( | nodelist_nodelist_t * | nodelist, |
nodelist_nodelist_t * | second_list | ||
) |
Add a node list to an other one.
nodelist | the input/output nodes list |
nodelist | the second list to add to the first one |
0 | success |
-1 | failure |
Definition at line 509 of file nodelist.c.
int nodelist_nodelist_add_nodes_range | ( | nodelist_nodelist_t * | nodelist, |
long int | from_id, | ||
long int | to_id | ||
) |
Definition at line 824 of file nodelist.c.
int nodelist_nodelist_copy | ( | nodelist_nodelist_t * | dest_list, |
nodelist_nodelist_t * | src_list | ||
) |
Copy a node list into an other one.
dest_list | the input/output nodes list |
src_list | the second list to copy into the first one |
0 | success |
-1 | failure |
Definition at line 412 of file nodelist.c.
int nodelist_nodelist_equal_patterns | ( | nodelist_nodelist_t * | first_list, |
nodelist_nodelist_t * | second_list | ||
) |
Check if two nodes shares the same pattern.
first_list | first nodes list |
second_list | second nodes list |
0 | nodes lists patterns are not the same |
1 | nodes lists patterns are the same |
Definition at line 32 of file nodelist.c.
int nodelist_nodelist_includes | ( | nodelist_nodelist_t * | first_list, |
nodelist_nodelist_t * | second_list | ||
) |
Check if the second list is included in the first.
first_list | first nodes list |
second_list | second nodes list |
0 | the second list is not included |
1 | the second list is included |
Definition at line 162 of file nodelist.c.
int nodelist_nodelist_intersects | ( | nodelist_nodelist_t * | first_list, |
nodelist_nodelist_t * | second_list | ||
) |
Check if two nodes list intersect.
first_list | first nodes list |
second_list | second nodes list |
0 | nodes lists don't intersect |
1 | nodes lists intersect |
Definition at line 87 of file nodelist.c.
int nodelist_nodelist_is_empty | ( | nodelist_nodelist_t * | nodelist | ) |
Check if a node list is empty.
nodelist | the input node list |
1 | if empty |
0 | if not empty |
Definition at line 484 of file nodelist.c.
int nodelist_nodelist_non_recursive_includes | ( | nodelist_nodelist_t * | first_list, |
nodelist_nodelist_t * | second_list | ||
) |
Check if the second list is included in the first in a non recursive way.
first_list | first nodes list |
second_list | second nodes list |
0 | the second list is not included |
1 | the second list is included |
Definition at line 129 of file nodelist.c.
int nodelist_nodelist_non_recursive_intersects | ( | nodelist_nodelist_t * | first_list, |
nodelist_nodelist_t * | second_list | ||
) |
Check if two nodes list intersect in a non recursive way.
first_list | first nodes list |
second_list | second nodes list |
0 | nodes lists don't intersect |
1 | nodes lists intersect |
Definition at line 51 of file nodelist.c.
long int nodelist_nodelist_non_recursive_nodes_quantity | ( | nodelist_nodelist_t * | nodelist | ) |
Definition at line 849 of file nodelist.c.
int nodelist_nodelist_remove_nodelist | ( | nodelist_nodelist_t * | nodelist, |
nodelist_nodelist_t * | second_list | ||
) |
Remove a node list from an other one.
nodelist | the input/output nodes list |
nodelist | the second list to remove from the first one |
0 | success |
-1 | failure |
Definition at line 604 of file nodelist.c.
int nodelist_nodelist_remove_nodes | ( | nodelist_nodelist_t * | nodelist, |
char * | list | ||
) |
Definition at line 759 of file nodelist.c.