Update of /cvsroot/dhcp-agent/dhcp-agent/src
In directory sc8-pr-cvs1:/tmp/cvs-serv26079/src
Modified Files:
dhcp-option.c dhcp-option.h
Log Message:
dhcp_option_added copy_list
Index: dhcp-option.c
===================================================================
RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-option.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** dhcp-option.c 27 Jun 2003 03:16:27 -0000 1.6
--- dhcp-option.c 5 Aug 2003 04:57:38 -0000 1.7
***************
*** 1448,1451 ****
--- 1448,1469 ----
}
+ /* copy a list of options. */
+ list_t *dhcp_option_copy_list(list_t *option_list)
+ {
+ list_t *new_list;
+ dhcp_opt_t *option;
+
+ new_list = list_create();
+
+ list_rewind(option_list);
+ while((option = list_next(option_list)) != NULL) {
+
+ list_add(new_list, option);
+
+ }
+
+ return new_list;
+ }
+
/* append to a dhcp list datum. */
void dhcp_option_append(dhcp_opt_t *orig, dhcp_opt_t *data)
Index: dhcp-option.h
===================================================================
RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-option.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** dhcp-option.h 27 Jun 2003 20:59:17 -0000 1.7
--- dhcp-option.h 5 Aug 2003 04:57:38 -0000 1.8
***************
*** 45,48 ****
--- 45,49 ----
extern void dhcp_opt_destroy_option_list(list_t *list);
extern dhcp_opt_t *dhcp_option_copy(dhcp_opt_t *option);
+ extern list_t *dhcp_option_copy_list(list_t *option_list);
extern dhcp_opt_t *dhcp_opt_create_message_type(uint8_t message_type);
***************
*** 51,54 ****
--- 52,56 ----
extern void dhcp_option_append(dhcp_opt_t *orig, dhcp_opt_t *data);
extern void dhcp_option_prepend(dhcp_opt_t *orig, dhcp_opt_t *data);
+
/* constants. */
|