Update of /cvsroot/dhcp-agent/dhcp-agent/src
In directory sc8-pr-cvs1:/tmp/cvs-serv25421/src
Modified Files:
dhcp-lease.c dhcp-server-conf.c dhcp-server-conf.h
Log Message:
now creating type-none constraint
Index: dhcp-lease.c
===================================================================
RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-lease.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** dhcp-lease.c 17 Aug 2003 00:57:33 -0000 1.9
--- dhcp-lease.c 18 Aug 2003 16:16:08 -0000 1.10
***************
*** 57,60 ****
--- 57,63 ----
break;
+ case LEASE_CONSTRAINT_NONE:
+ break;
+
default:
FATAL_MESSAGE("illegal constraint type passed. this is a bug report me.");
Index: dhcp-server-conf.c
===================================================================
RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-server-conf.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** dhcp-server-conf.c 18 Aug 2003 01:49:58 -0000 1.14
--- dhcp-server-conf.c 18 Aug 2003 16:16:08 -0000 1.15
***************
*** 237,240 ****
--- 237,245 ----
}
+ list_t *server_conf_get_lease_defs(server_conf_t *sc)
+ {
+ return sc->lease_defs;
+ }
+
/* * * * * * * * * * *
* utility routines. *
***************
*** 438,441 ****
--- 443,447 ----
static int directive_range_handler(server_conf_t *server_conf, directive_t *directive, int group_type, void *group_data)
{
+ lease_constraint_t *constraint;
lease_definition_t *lease_def;
ip_addr_t bottom_address, top_address;
***************
*** 475,483 ****
list_add_to_end(address_pair, &bottom_address);
/* create option handler by calling the general lease handler. */
option_list = list_create();
directive_lease_handler_proc(server_conf, directive, GROUP_LEASE_DEF, group_data, option_list);
! lease_def = lease_definition_create(NULL, subnet_address, subnet_mask, LEASE_RANGE_ADDRESS,
address_pair, option_list, lease_expiry, renew_time, rebind_time);
list_add(server_conf->lease_defs, lease_def);
--- 481,492 ----
list_add_to_end(address_pair, &bottom_address);
+ /* create empty constraint. */
+ constraint = lease_constraint_create(LEASE_CONSTRAINT_NONE, NULL);
+
/* create option handler by calling the general lease handler. */
option_list = list_create();
directive_lease_handler_proc(server_conf, directive, GROUP_LEASE_DEF, group_data, option_list);
! lease_def = lease_definition_create(constraint, subnet_address, subnet_mask, LEASE_RANGE_ADDRESS,
address_pair, option_list, lease_expiry, renew_time, rebind_time);
list_add(server_conf->lease_defs, lease_def);
Index: dhcp-server-conf.h
===================================================================
RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-server-conf.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** dhcp-server-conf.h 18 Aug 2003 01:49:58 -0000 1.11
--- dhcp-server-conf.h 18 Aug 2003 16:16:08 -0000 1.12
***************
*** 30,34 ****
typedef struct {
! list_t *lease_defs; /* list of lease definitions. */
const char *interface; /* interface name: read only. */
--- 30,34 ----
typedef struct {
! list_t *lease_defs; /* list of lease definitions. */
const char *interface; /* interface name: read only. */
***************
*** 65,68 ****
--- 65,69 ----
extern uint8_t server_conf_assume_interface_local_subnet(server_conf_t *sc);
extern list_t *server_conf_get_local_subnets(server_conf_t *sc);
+ extern list_t *server_conf_get_lease_defs(server_conf_t *sc);
#endif /* DHCP_SERVER_CONF_H */
|