Update of /cvsroot/dhcp-agent/dhcp-agent
In directory usw-pr-cvs1:/tmp/cvs-serv21720
Modified Files:
dhcp-agent.h dhcp-cache-entry.c
Log Message:
moved cache types/prototypes back into dhcp-agent.h for now
Index: dhcp-agent.h
===================================================================
RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-agent.h,v
retrieving revision 1.48
retrieving revision 1.49
diff -C2 -d -r1.48 -r1.49
*** dhcp-agent.h 6 Jun 2002 03:25:04 -0000 1.48
--- dhcp-agent.h 6 Jun 2002 03:27:25 -0000 1.49
***************
*** 331,334 ****
--- 331,346 ----
} client_conf_t;
+ /* Cache data types. */
+
+ typedef struct {
+ char *name;
+ char *value;
+ } cache_entry_t;
+
+ typedef struct {
+ char *interface; /* points to dhcp_client_control->interface */
+ list_t *vars;
+ } client_cache_t;
+
/* Client data object. */
***************
*** 451,454 ****
--- 463,489 ----
* Function prototypes *
* * * * * * * * * * * */
+
+ /* cache manipulation. */
+
+ extern client_cache_t *create_client_cache(dhcp_client_control_t *dc);
+ extern void client_cache_destroy(client_cache_t *cc);
+ extern int load_client_cache(client_cache_t *dc, unsigned char use_tmp);
+ extern int client_cache_is_empty(client_cache_t *cc);
+ extern void purge_cache(client_cache_t *cc);
+ extern int client_cache_dump_options(client_cache_t *cc, list_t *options);
+ extern list_t *client_cache_load_option_network_list(client_cache_t *cc,
+ unsigned char use_temp);
+ extern list_t *client_cache_load_option_string_list(client_cache_t *cc,
+ unsigned char use_tmp);
+
+ extern void client_cache_update(client_cache_t *cc);
+ extern void client_cache_delete_cache(client_cache_t *cc);
+ extern void client_cache_delete_tmp_cache(client_cache_t *cc);
+
+ /* cache object manipulation. */
+
+ extern cache_entry_t *make_cache_entry(char *name, char *value);
+ extern void destroy_cache_entry(cache_entry_t *cache);
+ extern void cache_entry_purge_list(list_t *cache_list);
/* Net/Rawnet routines. */
Index: dhcp-cache-entry.c
===================================================================
RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-cache-entry.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** dhcp-cache-entry.c 6 Jun 2002 03:25:04 -0000 1.4
--- dhcp-cache-entry.c 6 Jun 2002 03:27:25 -0000 1.5
***************
*** 28,32 ****
#include <dhcp-agent.h>
- #include <dhcp-cache.h>
/* constructors. */
--- 28,31 ----
|