nfs-ganesha 1.4
Classes | Typedefs | Functions

NODELIST_RANGE

Classes

struct  nodelist_range
 structure that represent a range of long int value More...

Typedefs

typedef struct nodelist_range nodelist_range_t
 structure that represent a range of long int value

Functions

int nodelist_range_set (nodelist_range_t *r1, long int v1, long int v2)
 set bridge range values
int nodelist_range_check (nodelist_range_t *r1)
 Indicate if the range is a valid one. That is to say if from value is lower that to value.
int nodelist_range_compare (nodelist_range_t *r1, nodelist_range_t *r2)
 Indicate if the first range equals, is placed before or is placed after the second one.
int nodelist_range_intersects (nodelist_range_t *r1, nodelist_range_t *r2)
 Indicate if it exists an non empty intersection between the two input ranges.
int nodelist_range_intersection (nodelist_range_t *r1, nodelist_range_t *r2, nodelist_range_t *r3)
 Gives the range that is common to the two input ranges.
int nodelist_range_contiguous (nodelist_range_t *r1, nodelist_range_t *r2)
 Indicate if the two input ranges are contiguous.
int nodelist_range_includes (nodelist_range_t *r1, nodelist_range_t *r2)
 Indicate if one of the two input range is included in the other one.
int nodelist_range_union (nodelist_range_t *r1, nodelist_range_t *r2, nodelist_range_t *rout)
 Gives a nodelist_range that represent the union of the two nodelist_ranges given in input. The two ranges must intersect or be continuous otherwise operation will failed.

Typedef Documentation

structure that represent a range of long int value


Function Documentation

int nodelist_range_check ( nodelist_range_t r1)

Indicate if the range is a valid one. That is to say if from value is lower that to value.

Parameters:
r1input range
Return values:
1if the range is valid
0if the range is not valid

Definition at line 35 of file nodelist_range.c.

int nodelist_range_compare ( nodelist_range_t r1,
nodelist_range_t r2 
)

Indicate if the first range equals, is placed before or is placed after the second one.

Parameters:
a1one of the two input ranges
a2one of the two input ranges
Return values:
1if the second one end before the start of the first one
0if the two ranges are equals
-1if the second one start after the end of the first one

Definition at line 50 of file nodelist_range.c.

int nodelist_range_contiguous ( nodelist_range_t r1,
nodelist_range_t r2 
)

Indicate if the two input ranges are contiguous.

Parameters:
r1one of the two input ranges
r2one of the two input ranges
Return values:
0if not continuous
1if continuous and r1 is before r2
2if continuous and r2 is before r1

Definition at line 98 of file nodelist_range.c.

int nodelist_range_includes ( nodelist_range_t r1,
nodelist_range_t r2 
)

Indicate if one of the two input range is included in the other one.

Parameters:
r1one of the two input ranges
r2one of the two input ranges
Return values:
0if no inclusion detected
1if r2 is included in r1 (r1 is the bigger one)
2if r1 is included in r2 (r2 is the bigger one)

Definition at line 112 of file nodelist_range.c.

int nodelist_range_intersection ( nodelist_range_t r1,
nodelist_range_t r2,
nodelist_range_t r3 
)

Gives the range that is common to the two input ranges.

Parameters:
r1one of the two input ranges
r2one of the two input ranges
r3output range
Return values:
0operation successfully done
-1operation failed

Definition at line 83 of file nodelist_range.c.

int nodelist_range_intersects ( nodelist_range_t r1,
nodelist_range_t r2 
)

Indicate if it exists an non empty intersection between the two input ranges.

Parameters:
r1one of the two input ranges
r2one of the two input ranges
Return values:
1an intersection exists
0otherwise

Definition at line 64 of file nodelist_range.c.

int nodelist_range_set ( nodelist_range_t r1,
long int  v1,
long int  v2 
)

set bridge range values

Parameters:
r1input range
v1from value
v2to value
Return values:
0should not return an other value

Definition at line 19 of file nodelist_range.c.

int nodelist_range_union ( nodelist_range_t r1,
nodelist_range_t r2,
nodelist_range_t rout 
)

Gives a nodelist_range that represent the union of the two nodelist_ranges given in input. The two ranges must intersect or be continuous otherwise operation will failed.

Parameters:
r1one of the two input ranges
r2one of the two input ranges
r3output range
Return values:
0operation successfully done
-1operation failed

Definition at line 129 of file nodelist_range.c.