ID Database


Data Structures

struct  nm_iddb

Defines

#define NM_IDDB_INITIALIZER

Functions

void nm_iddb_init (struct nm_iddb *iddb)
 Initialize an IDDB.
int nm_iddb_alloc (struct nm_iddb *iddb)
 Allocate an Identifier.
void nm_iddb_free (struct nm_iddb *iddb, int id)
 Free an Identifier.

Define Documentation

#define NM_IDDB_INITIALIZER

Value:

{                               \
        .ids_used = { 0 },      \
        .id_min = -1,           \
        .id_max = -1,           \
        .id_free = -1           \
}
Macro to statically intiallize an IDDB

Definition at line 32 of file nm_iddb.h.


Function Documentation

int nm_iddb_alloc ( struct nm_iddb iddb  ) 

Allocate an Identifier.

Parameters:
iddb Pointer to the IDDB.

void nm_iddb_free ( struct nm_iddb iddb,
int  id 
)

Free an Identifier.

Parameters:
iddb Pointer to the IDDB.
id The identifier to return to the free pool.

void nm_iddb_init ( struct nm_iddb iddb  ) 

Initialize an IDDB.

Parameters:
iddb Pointer to the dynamically allocated IDDB.


Generated on Wed Sep 1 09:40:57 2010 for NetManage by  doxygen 1.5.6