res_getname.h File Reference

#include <rsbac/types.h>

Go to the source code of this file.

Functions

char * get_res_name (char *name, u_int value)
int get_res_nr (const char *name)


Function Documentation

char* get_res_name char *  name,
u_int  value
 

Definition at line 34 of file res_getname.c.

References NULL, res_list, and RSBAC_RES_MAX.

00036   {
00037     if(!name)
00038       return(NULL);
00039     if(value > RSBAC_RES_MAX)
00040       strcpy(name, "ERROR!");
00041     else
00042       strcpy(name, res_list[value]);
00043     return(name);
00044   };

int get_res_nr const char *  name  ) 
 

Definition at line 46 of file res_getname.c.

References res_list, RSBAC_RES_MAX, and RSBAC_RES_NONE.

00047   {
00048     int i;
00049     
00050     if(!name)
00051       return(RSBAC_RES_NONE);
00052     for (i = 0; i <= RSBAC_RES_MAX; i++)
00053       {
00054         if (!strcmp(name, res_list[i]))
00055           {
00056             return(i);
00057           }
00058       }
00059     return(RSBAC_RES_NONE);
00060   };


Generated on Sun May 21 14:30:59 2006 for RSBAC by  doxygen 1.4.2