Session Module
Functions
libsession.h File Reference

The header of the userspace library that allows the user to start a session based file access. More...

Go to the source code of this file.

Functions

int session_init (void)
 session_init express the wish to initialize a session More...
 
int session_open (int, int)
 opens a session on a specific file descriptor More...
 
int session_close (int, int)
 closes a session on a specific file descriptor More...
 
int session_exit (int)
 session_exit expresses the whish of terminating the session More...
 

Detailed Description

The header of the userspace library that allows the user to start a session based file access.

Author
Federico Alfano
Date
2 May, 2020

Function Documentation

int session_close ( int  ,
int   
)

closes a session on a specific file descriptor

Parameters
session_idthe id returned by the init
fdthe file descriptor on which the session must be close
Returns
0 if everything goes well, otherwise returns an error code
int session_exit ( int  )

session_exit expresses the whish of terminating the session

Parameters
session_idthe id returned by the init
Returns
0 if everything goes well, otherwise returns an error code
int session_init ( void  )

session_init express the wish to initialize a session

Returns
the id representing the session if everything goes well, otherwise returns an error code
int session_open ( int  ,
int   
)

opens a session on a specific file descriptor

Parameters
session_idthe id returned by the init
fdthe file descriptor on which the session must be open
Returns
0 if everything goes well, otherwise returns an error code