Print this page
*** NO COMMENTS ***
*** 20,54 ****
* CDDL HEADER END
*/
/*
* Copyright 1995 Sun Microsystems Inc.
* All rights reserved.
*/
-
#ifndef __TABLE_H
#define __TABLE_H
- #pragma ident "%Z%%M% %I% %E% SMI" /* SMI4.1 1.4 */
-
#ifdef __cplusplus
extern "C" {
#endif
#define NUMLETTERS 27 /* 26 letters + 1 for anything else */
#define TABLESIZE (NUMLETTERS*NUMLETTERS)
typedef struct tablenode *tablelist;
! struct tablenode {
char *key;
char *datum;
tablelist next;
! };
! typedef struct tablenode tablenode;
! typedef tablelist stringtable[TABLESIZE];
int tablekey();
char *lookup();
void store();
#ifdef __cplusplus
--- 20,75 ----
* CDDL HEADER END
*/
/*
* Copyright 1995 Sun Microsystems Inc.
* All rights reserved.
+ *
+ * Copyright 2012 Nexenta Systems, Inc. All rights reserved.
*/
#ifndef __TABLE_H
#define __TABLE_H
#ifdef __cplusplus
extern "C" {
#endif
+ #include <sys/types.h>
+
#define NUMLETTERS 27 /* 26 letters + 1 for anything else */
#define TABLESIZE (NUMLETTERS*NUMLETTERS)
typedef struct tablenode *tablelist;
! typedef struct tablenode {
char *key;
char *datum;
tablelist next;
! } tablenode;
! /* Stores a list of strings */
! typedef struct stringnode {
! char *str;
! struct stringnode *s_next;
! } stringnode;
+ /* Stores a list of (name,list-of-groups) */
+ typedef struct groupentrynode *groupentrylist;
+
+ typedef struct groupentrynode {
+ char *name;
+ stringnode *groups;
+ groupentrylist next;
+ } groupentrynode;
+
+ typedef struct revhandle {
+ tablelist ngtable[TABLESIZE];
+ groupentrylist grouptable[TABLESIZE];
+ struct grouplist *grouplist; /* stores a list of users in a group */
+ uint_t rh_index;
+ boolean_t rh_byuser;
+ } revhandle_t;
+
int tablekey();
char *lookup();
void store();
#ifdef __cplusplus