Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
sidtab.h File Reference
#include "context.h"

Go to the source code of this file.

Data Structures

struct  sidtab_node
 
struct  sidtab
 

Macros

#define SIDTAB_HASH_BITS   7
 
#define SIDTAB_HASH_BUCKETS   (1 << SIDTAB_HASH_BITS)
 
#define SIDTAB_HASH_MASK   (SIDTAB_HASH_BUCKETS-1)
 
#define SIDTAB_SIZE   SIDTAB_HASH_BUCKETS
 
#define SIDTAB_CACHE_LEN   3
 

Functions

int sidtab_init (struct sidtab *s)
 
int sidtab_insert (struct sidtab *s, u32 sid, struct context *context)
 
struct contextsidtab_search (struct sidtab *s, u32 sid)
 
struct contextsidtab_search_force (struct sidtab *s, u32 sid)
 
int sidtab_map (struct sidtab *s, int(*apply)(u32 sid, struct context *context, void *args), void *args)
 
int sidtab_context_to_sid (struct sidtab *s, struct context *context, u32 *sid)
 
void sidtab_hash_eval (struct sidtab *h, char *tag)
 
void sidtab_destroy (struct sidtab *s)
 
void sidtab_set (struct sidtab *dst, struct sidtab *src)
 
void sidtab_shutdown (struct sidtab *s)
 

Macro Definition Documentation

#define SIDTAB_CACHE_LEN   3

Definition at line 29 of file sidtab.h.

#define SIDTAB_HASH_BITS   7

Definition at line 18 of file sidtab.h.

#define SIDTAB_HASH_BUCKETS   (1 << SIDTAB_HASH_BITS)

Definition at line 19 of file sidtab.h.

#define SIDTAB_HASH_MASK   (SIDTAB_HASH_BUCKETS-1)

Definition at line 20 of file sidtab.h.

#define SIDTAB_SIZE   SIDTAB_HASH_BUCKETS

Definition at line 22 of file sidtab.h.

Function Documentation

int sidtab_context_to_sid ( struct sidtab s,
struct context context,
u32 sid 
)

Definition at line 197 of file sidtab.c.

void sidtab_destroy ( struct sidtab s)

Definition at line 267 of file sidtab.c.

void sidtab_hash_eval ( struct sidtab h,
char tag 
)

Definition at line 240 of file sidtab.c.

int sidtab_init ( struct sidtab s)

Definition at line 17 of file sidtab.c.

int sidtab_insert ( struct sidtab s,
u32  sid,
struct context context 
)

Definition at line 33 of file sidtab.c.

int sidtab_map ( struct sidtab s,
int(*)(u32 sid, struct context *context, void *args apply,
void args 
)

Definition at line 125 of file sidtab.c.

struct context* sidtab_search ( struct sidtab s,
u32  sid 
)
read

Definition at line 115 of file sidtab.c.

struct context* sidtab_search_force ( struct sidtab s,
u32  sid 
)
read

Definition at line 120 of file sidtab.c.

void sidtab_set ( struct sidtab dst,
struct sidtab src 
)

Definition at line 291 of file sidtab.c.

void sidtab_shutdown ( struct sidtab s)

Definition at line 306 of file sidtab.c.