nfs-ganesha 1.4
Functions | Variables

nfs41_session_id.c File Reference

#include "sal_functions.h"

Go to the source code of this file.

Functions

size_t strnlen (const char *s, size_t maxlen)
int display_session_id (char *session_id, char *str)
int display_session_id_key (hash_buffer_t *pbuff, char *str)
int display_session (nfs41_session_t *psession, char *str)
int display_session_id_val (hash_buffer_t *pbuff, char *str)
int compare_session_id (hash_buffer_t *buff1, hash_buffer_t *buff2)
uint32_t session_id_value_hash_func (hash_parameter_t *p_hparam, hash_buffer_t *buffclef)
uint64_t session_id_rbt_hash_func (hash_parameter_t *p_hparam, hash_buffer_t *buffclef)
int nfs41_Init_session_id (nfs_session_id_parameter_t param)
void nfs41_Build_sessionid (clientid4 *pclientid, char *sessionid)
int nfs41_Session_Set (char sessionid[NFS4_SESSIONID_SIZE], nfs41_session_t *psession_data)
int nfs41_Session_Get_Pointer (char sessionid[NFS4_SESSIONID_SIZE], nfs41_session_t **psession_data)
int nfs41_Session_Del (char sessionid[NFS4_SESSIONID_SIZE])
void nfs41_Session_PrintAll (void)

Variables

pool_tnfs41_session_pool = NULL
 The management of the session id cache.
hash_table_tht_session_id
uint64_t global_sequence = 0
pthread_mutex_t mutex_sequence = PTHREAD_MUTEX_INITIALIZER

Function Documentation

int compare_session_id ( hash_buffer_t buff1,
hash_buffer_t buff2 
)

Definition at line 81 of file nfs41_session_id.c.

int display_session ( nfs41_session_t psession,
char *  str 
)

Definition at line 65 of file nfs41_session_id.c.

int display_session_id ( char *  session_id,
char *  str 
)

Definition at line 47 of file nfs41_session_id.c.

int display_session_id_key ( hash_buffer_t pbuff,
char *  str 
)

Definition at line 54 of file nfs41_session_id.c.

int display_session_id_val ( hash_buffer_t pbuff,
char *  str 
)

Definition at line 76 of file nfs41_session_id.c.

void nfs41_Build_sessionid ( clientid4 pclientid,
char *  sessionid 
)

nfs41_Build_sessionid

This routine fills in the pcontext field in the compound data. pentry is supposed to be locked when this function is called.

Parameters:
pclientid[IN] pointer to the related clientid
sessionid[OUT] the sessionid
Returns:
1 if ok, 0 otherwise.

Definition at line 166 of file nfs41_session_id.c.

int nfs41_Init_session_id ( nfs_session_id_parameter_t  param)

nfs41_Init_session_id: Init the hashtable for Session Id cache.

Perform all the required initialization for hashtable Session Id cache

Parameters:
param[IN] parameter used to init the session id cache
Returns:
0 if successful, -1 otherwise

Definition at line 141 of file nfs41_session_id.c.

int nfs41_Session_Del ( char  sessionid[NFS4_SESSIONID_SIZE])

nfs41_Session_Del

This routine removes a session from the sessions's hashtable.

Parameters:
sessionid[IN] sessionid, used as a hash key
Returns:
1 if ok, 0 otherwise.

Definition at line 275 of file nfs41_session_id.c.

int nfs41_Session_Get_Pointer ( char  sessionid[NFS4_SESSIONID_SIZE],
nfs41_session_t **  psession_data 
)

nfs41_Session_Get_Pointer

This routine gets a pointer to a session from the sessions's hashtable.

Parameters:
psession[IN] pointer to the sessionid to be checked.
ppsession_data[OUT] pointer's session found
Returns:
1 if ok, 0 otherwise.

Definition at line 232 of file nfs41_session_id.c.

void nfs41_Session_PrintAll ( void  )

nfs41_Session_PrintAll

This routine displays the content of the hashtable used to store the sessions.

Returns:
nothing (void function)

Definition at line 318 of file nfs41_session_id.c.

int nfs41_Session_Set ( char  sessionid[NFS4_SESSIONID_SIZE],
nfs41_session_t psession_data 
)

nfs41_Session_Set

This routine sets a session into the sessions's hashtable.

Parameters:
psession[IN] pointer to the sessionid to be checked.
Returns:
1 if ok, 0 otherwise.

Definition at line 190 of file nfs41_session_id.c.

uint64_t session_id_rbt_hash_func ( hash_parameter_t p_hparam,
hash_buffer_t buffclef 
)

Definition at line 108 of file nfs41_session_id.c.

uint32_t session_id_value_hash_func ( hash_parameter_t p_hparam,
hash_buffer_t buffclef 
)

Definition at line 86 of file nfs41_session_id.c.

size_t strnlen ( const char *  s,
size_t  maxlen 
)

Variable Documentation

Definition at line 44 of file nfs41_session_id.c.

Definition at line 43 of file nfs41_session_id.c.

pthread_mutex_t mutex_sequence = PTHREAD_MUTEX_INITIALIZER

Definition at line 45 of file nfs41_session_id.c.

The management of the session id cache.

Definition at line 39 of file nfs41_session_id.c.