server/mdb.c File Reference

#include "dhcpd.h"
#include "omapip/hash.h"

Go to the source code of this file.

Data Structures

struct  host_id_info

Defines

#define SS_NOSYNC   1
#define SS_QFOLLOW   2
#define FREE_LEASES   0
#define ACTIVE_LEASES   1
#define EXPIRED_LEASES   2
#define ABANDONED_LEASES   3
#define BACKUP_LEASES   4
#define RESERVED_LEASES   5

Typedefs

typedef struct host_id_info host_id_info_t

Functions

isc_result_t enter_class (struct class *cd, int dynamicp, int commit)
void change_host_uid (struct host_decl *host, const char *uid, int len)
isc_result_t enter_host (struct host_decl *hd, int dynamicp, int commit)
isc_result_t delete_class (struct class *cp, int commit)
isc_result_t delete_host (struct host_decl *hd, int commit)
int find_hosts_by_haddr (struct host_decl **hp, int htype, const unsigned char *haddr, unsigned hlen, const char *file, int line)
int find_hosts_by_uid (struct host_decl **hp, const unsigned char *data, unsigned len, const char *file, int line)
int find_hosts_by_option (struct host_decl **hp, struct packet *packet, struct option_state *opt_state, const char *file, int line)
int find_host_for_network (struct subnet **sp, struct host_decl **host, struct iaddr *addr, struct shared_network *share)
void new_address_range (struct parse *cfile, struct iaddr low, struct iaddr high, struct subnet *subnet, struct pool *pool, struct lease **lpchain)
int find_subnet (struct subnet **sp, struct iaddr addr, const char *file, int line)
int find_grouped_subnet (struct subnet **sp, struct shared_network *share, struct iaddr addr, const char *file, int line)
int subnet_inner_than (const struct subnet *subnet, const struct subnet *scan, int warnp)
void enter_subnet (struct subnet *subnet)
void enter_shared_network (struct shared_network *share)
void new_shared_network_interface (struct parse *cfile, struct shared_network *share, const char *name)
void enter_lease (struct lease *lease)
int supersede_lease (struct lease *comp, struct lease *lease, int commit, int propogate, int pimmediate)
void make_binding_state_transition (struct lease *lease)
int lease_copy (struct lease **lp, struct lease *lease, const char *file, int line)
void release_lease (struct lease *lease, struct packet *packet)
void abandon_lease (struct lease *lease, const char *message)
void pool_timer (void *vpool)
int find_lease_by_ip_addr (struct lease **lp, struct iaddr addr, const char *file, int line)
int find_lease_by_uid (struct lease **lp, const unsigned char *uid, unsigned len, const char *file, int line)
int find_lease_by_hw_addr (struct lease **lp, const unsigned char *hwaddr, unsigned hwlen, const char *file, int line)
void uid_hash_add (struct lease *lease)
void uid_hash_delete (struct lease *lease)
void hw_hash_add (struct lease *lease)
void hw_hash_delete (struct lease *lease)
int write_leases4 (void)
int write_leases ()
int lease_enqueue (struct lease *comp)
isc_result_t lease_instantiate (const void *key, unsigned len, void *object)
void expire_all_pools ()
void dump_subnets ()

Variables

struct subnetsubnets
struct shared_networkshared_networks
host_hash_thost_hw_addr_hash
host_hash_thost_uid_hash
host_hash_thost_name_hash
lease_id_hash_tlease_uid_hash
lease_ip_hash_tlease_ip_addr_hash
lease_id_hash_tlease_hw_addr_hash
int numclasseswritten
omapi_object_type_tdhcp_type_host

Define Documentation

#define ABANDONED_LEASES   3
#define ACTIVE_LEASES   1
#define BACKUP_LEASES   4
#define EXPIRED_LEASES   2
#define FREE_LEASES   0
#define RESERVED_LEASES   5
#define SS_NOSYNC   1

Definition at line 120 of file mdb.c.

#define SS_QFOLLOW   2

Definition at line 121 of file mdb.c.


Typedef Documentation

typedef struct host_id_info host_id_info_t

Function Documentation

void abandon_lease ( struct lease lease,
const char *  message 
)

Definition at line 1789 of file mdb.c.

void change_host_uid ( struct host_decl host,
const char *  uid,
int  len 
)

Definition at line 184 of file mdb.c.

isc_result_t delete_class ( struct class cp,
int  commit 
)

Definition at line 436 of file mdb.c.

isc_result_t delete_host ( struct host_decl hd,
int  commit 
)

Definition at line 468 of file mdb.c.

void dump_subnets ( void   ) 

Definition at line 2738 of file mdb.c.

isc_result_t enter_class ( struct class cd,
int  dynamicp,
int  commit 
)

Definition at line 73 of file mdb.c.

isc_result_t enter_host ( struct host_decl hd,
int  dynamicp,
int  commit 
)

Definition at line 221 of file mdb.c.

void enter_lease ( struct lease lease  ) 

Definition at line 1051 of file mdb.c.

void enter_shared_network ( struct shared_network share  ) 

Definition at line 994 of file mdb.c.

void enter_subnet ( struct subnet subnet  ) 

Definition at line 947 of file mdb.c.

void expire_all_pools ( void   ) 

Definition at line 2666 of file mdb.c.

int find_grouped_subnet ( struct subnet **  sp,
struct shared_network share,
struct iaddr  addr,
const char *  file,
int  line 
)

Definition at line 900 of file mdb.c.

int find_host_for_network ( struct subnet **  sp,
struct host_decl **  host,
struct iaddr addr,
struct shared_network share 
)

Definition at line 709 of file mdb.c.

int find_hosts_by_haddr ( struct host_decl **  hp,
int  htype,
const unsigned char *  haddr,
unsigned  hlen,
const char *  file,
int  line 
)

Definition at line 610 of file mdb.c.

int find_hosts_by_option ( struct host_decl **  hp,
struct packet packet,
struct option_state opt_state,
const char *  file,
int  line 
)

Definition at line 638 of file mdb.c.

int find_hosts_by_uid ( struct host_decl **  hp,
const unsigned char *  data,
unsigned  len,
const char *  file,
int  line 
)

Definition at line 630 of file mdb.c.

int find_lease_by_hw_addr ( struct lease **  lp,
const unsigned char *  hwaddr,
unsigned  hwlen,
const char *  file,
int  line 
)

Definition at line 2006 of file mdb.c.

int find_lease_by_ip_addr ( struct lease **  lp,
struct iaddr  addr,
const char *  file,
int  line 
)

Definition at line 1991 of file mdb.c.

int find_lease_by_uid ( struct lease **  lp,
const unsigned char *  uid,
unsigned  len,
const char *  file,
int  line 
)

Definition at line 1998 of file mdb.c.

int find_subnet ( struct subnet **  sp,
struct iaddr  addr,
const char *  file,
int  line 
)

Definition at line 884 of file mdb.c.

void hw_hash_add ( struct lease lease  ) 

Definition at line 2190 of file mdb.c.

void hw_hash_delete ( struct lease lease  ) 

Definition at line 2270 of file mdb.c.

int lease_copy ( struct lease **  lp,
struct lease lease,
const char *  file,
int  line 
)

Definition at line 1640 of file mdb.c.

int lease_enqueue ( struct lease comp  ) 

Definition at line 2489 of file mdb.c.

isc_result_t lease_instantiate ( const void *  key,
unsigned  len,
void *  object 
)

Definition at line 2612 of file mdb.c.

void make_binding_state_transition ( struct lease lease  ) 

Definition at line 1462 of file mdb.c.

void new_address_range ( struct parse cfile,
struct iaddr  low,
struct iaddr  high,
struct subnet subnet,
struct pool pool,
struct lease **  lpchain 
)

Definition at line 755 of file mdb.c.

void new_shared_network_interface ( struct parse cfile,
struct shared_network share,
const char *  name 
)

Definition at line 1005 of file mdb.c.

void pool_timer ( void *  vpool  ) 

Definition at line 1863 of file mdb.c.

void release_lease ( struct lease lease,
struct packet packet 
)

Definition at line 1714 of file mdb.c.

int subnet_inner_than ( const struct subnet subnet,
const struct subnet scan,
int  warnp 
)

Definition at line 919 of file mdb.c.

int supersede_lease ( struct lease comp,
struct lease lease,
int  commit,
int  propogate,
int  pimmediate 
)

Definition at line 1094 of file mdb.c.

void uid_hash_add ( struct lease lease  ) 

Definition at line 2073 of file mdb.c.

void uid_hash_delete ( struct lease lease  ) 

Definition at line 2140 of file mdb.c.

int write_leases ( void   ) 

Definition at line 2371 of file mdb.c.

int write_leases4 ( void   ) 

Definition at line 2332 of file mdb.c.


Variable Documentation

Definition at line 71 of file mdb.c.

Definition at line 35 of file mdb.c.

Definition at line 37 of file mdb.c.

Definition at line 36 of file mdb.c.

Definition at line 40 of file mdb.c.

Definition at line 39 of file mdb.c.

Definition at line 38 of file mdb.c.

Definition at line 69 of file mdb.c.

Definition at line 34 of file mdb.c.

struct subnet* subnets

Definition at line 33 of file mdb.c.


Generated on 5 Apr 2014 for ISC DHCP by  doxygen 1.6.1