[Dhcp-agent-commits] dhcp-agent Makefile.am,1.18,1.19 Makefile.in,1.18,1.19 TODO,1.25,1.26 config.h.
Status: Alpha
Brought to you by:
actmodern
Update of /cvsroot/dhcp-agent/dhcp-agent In directory usw-pr-cvs1:/tmp/cvs-serv1508 Modified Files: Makefile.am Makefile.in TODO config.h.in configure configure.in dhcp-agent.h dhcp-stringbuffer.c dhcp-stringbuffer.h Log Message: update stringbuffer routines; using patrick powell's snprintf instead of system one due to needed semantics -- returns total regardless of what's been written Index: Makefile.am =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/Makefile.am,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Makefile.am 11 Jun 2002 02:10:32 -0000 1.18 --- Makefile.am 15 Jun 2002 14:59:20 -0000 1.19 *************** *** 5,9 **** DEFS = @DEFS@ ! bin_PROGRAMS = dhcpsniff dhcpclient dhcpsniff_SOURCES = dhcp-sniff.c dhcp-print.c dhcp-util.c \ --- 5,9 ---- DEFS = @DEFS@ ! bin_PROGRAMS = dhcpsniff dhcpclient #dhcptest dhcpsniff_SOURCES = dhcp-sniff.c dhcp-print.c dhcp-util.c \ *************** *** 23,26 **** --- 23,36 ---- dhcp-arp-discovery.c dhcp-route.c dhcp-globconf.c dhcp-stringbuffer.c + #dhcptest_SOURCES = dhcp-test.c dhcp-util.c \ + #dhcp-align.c dhcp-net.c dhcp-list.c dhcp-com.c dhcp-eth.c dhcp-ip.c \ + #dhcp-udp.c dhcp-arp.c dhcp-icmp.c dhcp-log.c dhcp-daemon.c \ + #dhcp-client-cache.c dhcp-cache-entry.c dhcp-client-control.c \ + #dhcp-interface.c dhcp-client-conf.c dhcp-snprintf.c dhcp-files.c \ + #dhcp-client-states.c dhcp-options-strings.c dhcp-convert.c \ + #dhcp-sysconf.c dhcp-rtt.c dhcp-packet-build.c dhcp-icmp-discovery.c \ + #dhcp-arp-discovery.c dhcp-route.c dhcp-globconf.c dhcp-stringbuffer.c + + #dhcptest_LDADD = @PCAP_LIB@ @DNET_LIB@ dhcpclient_LDADD = @PCAP_LIB@ @DNET_LIB@ Index: Makefile.in =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/Makefile.in,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Makefile.in 11 Jun 2002 02:10:32 -0000 1.18 --- Makefile.in 15 Jun 2002 14:59:20 -0000 1.19 *************** *** 59,63 **** POST_UNINSTALL = : CC = @CC@ - DHCP_SNPRINTF = @DHCP_SNPRINTF@ DNET_INC = @DNET_INC@ DNET_LIB = @DNET_LIB@ --- 59,62 ---- *************** *** 76,80 **** DEFS = @DEFS@ ! bin_PROGRAMS = dhcpsniff dhcpclient dhcpsniff_SOURCES = dhcp-sniff.c dhcp-print.c dhcp-util.c dhcp-align.c dhcp-net.c dhcp-list.c dhcp-com.c dhcp-eth.c dhcp-ip.c dhcp-udp.c dhcp-arp.c dhcp-icmp.c dhcp-log.c @DHCP_SNPRINTF@ dhcp-sniffer-ohandlers.c dhcp-rtt.c dhcp-interface.c --- 75,79 ---- DEFS = @DEFS@ ! bin_PROGRAMS = dhcpsniff dhcpclient #dhcptest dhcpsniff_SOURCES = dhcp-sniff.c dhcp-print.c dhcp-util.c dhcp-align.c dhcp-net.c dhcp-list.c dhcp-com.c dhcp-eth.c dhcp-ip.c dhcp-udp.c dhcp-arp.c dhcp-icmp.c dhcp-log.c @DHCP_SNPRINTF@ dhcp-sniffer-ohandlers.c dhcp-rtt.c dhcp-interface.c *************** *** 86,89 **** --- 85,98 ---- + #dhcptest_SOURCES = dhcp-test.c dhcp-util.c \ + #dhcp-align.c dhcp-net.c dhcp-list.c dhcp-com.c dhcp-eth.c dhcp-ip.c \ + #dhcp-udp.c dhcp-arp.c dhcp-icmp.c dhcp-log.c dhcp-daemon.c \ + #dhcp-client-cache.c dhcp-cache-entry.c dhcp-client-control.c \ + #dhcp-interface.c dhcp-client-conf.c dhcp-snprintf.c dhcp-files.c \ + #dhcp-client-states.c dhcp-options-strings.c dhcp-convert.c \ + #dhcp-sysconf.c dhcp-rtt.c dhcp-packet-build.c dhcp-icmp-discovery.c \ + #dhcp-arp-discovery.c dhcp-route.c dhcp-globconf.c dhcp-stringbuffer.c + + #dhcptest_LDADD = @PCAP_LIB@ @DNET_LIB@ dhcpclient_LDADD = @PCAP_LIB@ @DNET_LIB@ Index: TODO =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/TODO,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** TODO 11 Jun 2002 03:07:43 -0000 1.25 --- TODO 15 Jun 2002 14:59:20 -0000 1.26 *************** *** 87,88 **** --- 87,90 ---- -- get stringbuffer used in places where strings are being manipulated heavily. + -- fix stringbuffer trimwhitespace to use last_occurance routine, and + add first occurance for finding initial whitespace too. Index: config.h.in =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/config.h.in,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** config.h.in 10 Jun 2002 23:15:20 -0000 1.11 --- config.h.in 15 Jun 2002 14:59:20 -0000 1.12 *************** *** 45,51 **** #undef HAVE_SIGNAL_H - /* Define if you have the `sprintf' function. */ - #undef HAVE_SPRINTF - /* Define if you have the <stdarg.h> header file. */ #undef HAVE_STDARG_H --- 45,48 ---- *************** *** 65,71 **** /* Define if you have the <varargs.h> header file. */ #undef HAVE_VARARGS_H - - /* Define if you have the `vsnprintf' function. */ - #undef HAVE_VSNPRINTF /* Name of package */ --- 62,65 ---- Index: configure =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/configure,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** configure 11 Jun 2002 01:58:53 -0000 1.20 --- configure 15 Jun 2002 14:59:20 -0000 1.21 *************** *** 2624,2707 **** done ! for ac_func in sprintf vsnprintf ! do ! ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh` ! echo "$as_me:2629: checking for $ac_func" >&5 ! echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 ! if eval "test \"\${$ac_ac_var+set}\" = set"; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! cat >conftest.$ac_ext <<_ACEOF ! #line 2635 "configure" ! #include "confdefs.h" ! /* System header to define __stub macros and hopefully few prototypes, ! which can conflict with char $ac_func (); below. */ ! #include <assert.h> ! /* Override any gcc2 internal prototype to avoid an error. */ ! #ifdef __cplusplus ! extern "C" ! #endif ! /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char $ac_func (); ! char (*f) (); ! ! int ! main () ! { ! /* The GNU C library defines this for functions which it implements ! to always fail with ENOSYS. Some functions are actually named ! something starting with __ and the normal name is an alias. */ ! #if defined (__stub_$ac_func) || defined (__stub___$ac_func) ! choke me ! #else ! f = $ac_func; ! #endif ! ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:2666: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:2669: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:2672: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:2675: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! eval "$ac_ac_var=yes" ! else ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! eval "$ac_ac_var=no" ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! fi ! echo "$as_me:2685: result: `eval echo '${'$ac_ac_var'}'`" >&5 ! echo "${ECHO_T}`eval echo '${'$ac_ac_var'}'`" >&6 ! if test `eval echo '${'$ac_ac_var'}'` = yes; then ! cat >>confdefs.h <<EOF ! #define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1 ! EOF ! DHCP_SNPRINTF="dhcp-snprintf.c" ! else ! DHCP_SNPRINTF="" ! fi ! done ! ! echo "$as_me:2697: checking if kill(0, pid) can be used to detect a process" >&5 echo $ECHO_N "checking if kill(0, pid) can be used to detect a process... $ECHO_C" >&6 if test "$cross_compiling" = yes; then ! { { echo "$as_me:2700: error: cannot run test program while cross compiling" >&5 echo "$as_me: error: cannot run test program while cross compiling" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF ! #line 2705 "configure" #include "confdefs.h" --- 2624,2636 ---- done ! echo "$as_me:2626: checking if kill(0, pid) can be used to detect a process" >&5 echo $ECHO_N "checking if kill(0, pid) can be used to detect a process... $ECHO_C" >&6 if test "$cross_compiling" = yes; then ! { { echo "$as_me:2629: error: cannot run test program while cross compiling" >&5 echo "$as_me: error: cannot run test program while cross compiling" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF ! #line 2634 "configure" #include "confdefs.h" *************** *** 2753,2770 **** _ACEOF rm -f conftest$ac_exeext ! if { (eval echo "$as_me:2755: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:2758: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:2760: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:2763: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cat >>confdefs.h <<\EOF #define KILL_SIGNAL_DETECT 1 EOF ! echo "$as_me:2768: result: yes" >&5 echo "${ECHO_T}yes" >&6 else --- 2682,2699 ---- _ACEOF rm -f conftest$ac_exeext ! if { (eval echo "$as_me:2684: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:2687: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:2689: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:2692: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cat >>confdefs.h <<\EOF #define KILL_SIGNAL_DETECT 1 EOF ! echo "$as_me:2697: result: yes" >&5 echo "${ECHO_T}yes" >&6 else *************** *** 2772,2776 **** echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ! echo "$as_me:2774: result: no" >&5 echo "${ECHO_T}no" >&6 fi --- 2701,2705 ---- echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ! echo "$as_me:2703: result: no" >&5 echo "${ECHO_T}no" >&6 fi *************** *** 2778,2782 **** fi ! echo "$as_me:2780: checking for struct bpf_timeval" >&5 echo $ECHO_N "checking for struct bpf_timeval... $ECHO_C" >&6 if test "${ac_cv_type_struct_bpf_timeval+set}" = set; then --- 2707,2711 ---- fi ! echo "$as_me:2709: checking for struct bpf_timeval" >&5 echo $ECHO_N "checking for struct bpf_timeval... $ECHO_C" >&6 if test "${ac_cv_type_struct_bpf_timeval+set}" = set; then *************** *** 2784,2788 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 2786 "configure" #include "confdefs.h" #include <sys/types.h> --- 2713,2717 ---- else cat >conftest.$ac_ext <<_ACEOF ! #line 2715 "configure" #include "confdefs.h" #include <sys/types.h> *************** *** 2803,2816 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:2805: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:2808: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:2811: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:2814: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_struct_bpf_timeval=yes --- 2732,2745 ---- _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:2734: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:2737: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:2740: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:2743: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_struct_bpf_timeval=yes *************** *** 2822,2826 **** rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:2824: result: $ac_cv_type_struct_bpf_timeval" >&5 echo "${ECHO_T}$ac_cv_type_struct_bpf_timeval" >&6 if test $ac_cv_type_struct_bpf_timeval = yes; then --- 2751,2755 ---- rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:2753: result: $ac_cv_type_struct_bpf_timeval" >&5 echo "${ECHO_T}$ac_cv_type_struct_bpf_timeval" >&6 if test $ac_cv_type_struct_bpf_timeval = yes; then *************** *** 2831,2838 **** fi ! echo "$as_me:2833: checking for __progname" >&5 echo $ECHO_N "checking for __progname... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF ! #line 2836 "configure" #include "confdefs.h" --- 2760,2767 ---- fi ! echo "$as_me:2762: checking for __progname" >&5 echo $ECHO_N "checking for __progname... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF ! #line 2765 "configure" #include "confdefs.h" *************** *** 2852,2865 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:2854: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:2857: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:2860: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:2863: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cat >>confdefs.h <<\EOF --- 2781,2794 ---- _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:2783: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:2786: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:2789: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:2792: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cat >>confdefs.h <<\EOF *************** *** 2867,2881 **** EOF ! echo "$as_me:2869: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ! echo "$as_me:2874: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest.$ac_objext conftest.$ac_ext; ! echo "$as_me:2879: checking for sig_atomic_t" >&5 echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6 if test "${ac_cv_type_sig_atomic_t+set}" = set; then --- 2796,2810 ---- EOF ! echo "$as_me:2798: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ! echo "$as_me:2803: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest.$ac_objext conftest.$ac_ext; ! echo "$as_me:2808: checking for sig_atomic_t" >&5 echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6 if test "${ac_cv_type_sig_atomic_t+set}" = set; then *************** *** 2883,2887 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 2885 "configure" #include "confdefs.h" #include <signal.h> --- 2812,2816 ---- else cat >conftest.$ac_ext <<_ACEOF ! #line 2814 "configure" #include "confdefs.h" #include <signal.h> *************** *** 2899,2912 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:2901: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:2904: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:2907: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:2910: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_sig_atomic_t=yes --- 2828,2841 ---- _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:2830: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:2833: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:2836: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:2839: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_sig_atomic_t=yes *************** *** 2918,2922 **** rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:2920: result: $ac_cv_type_sig_atomic_t" >&5 echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6 if test $ac_cv_type_sig_atomic_t = yes; then --- 2847,2851 ---- rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:2849: result: $ac_cv_type_sig_atomic_t" >&5 echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6 if test $ac_cv_type_sig_atomic_t = yes; then *************** *** 2927,2931 **** fi ! echo "$as_me:2929: checking return type of signal handlers" >&5 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 if test "${ac_cv_type_signal+set}" = set; then --- 2856,2860 ---- fi ! echo "$as_me:2858: checking return type of signal handlers" >&5 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 if test "${ac_cv_type_signal+set}" = set; then *************** *** 2933,2937 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 2935 "configure" #include "confdefs.h" #include <sys/types.h> --- 2862,2866 ---- else cat >conftest.$ac_ext <<_ACEOF ! #line 2864 "configure" #include "confdefs.h" #include <sys/types.h> *************** *** 2955,2968 **** _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:2957: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:2960: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:2963: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:2966: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_signal=void --- 2884,2897 ---- _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:2886: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:2889: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:2892: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:2895: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_signal=void *************** *** 2974,2978 **** rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:2976: result: $ac_cv_type_signal" >&5 echo "${ECHO_T}$ac_cv_type_signal" >&6 --- 2903,2907 ---- rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:2905: result: $ac_cv_type_signal" >&5 echo "${ECHO_T}$ac_cv_type_signal" >&6 *************** *** 2983,2987 **** if test -z "$pcap_prefix"; then ! echo "$as_me:2985: checking for pcap library directory" >&5 echo $ECHO_N "checking for pcap library directory... $ECHO_C" >&6 ac_pcap_lib_dir="none" --- 2912,2916 ---- if test -z "$pcap_prefix"; then ! echo "$as_me:2914: checking for pcap library directory" >&5 echo $ECHO_N "checking for pcap library directory... $ECHO_C" >&6 ac_pcap_lib_dir="none" *************** *** 2994,2998 **** if test $ac_pcap_lib_dir = "none" ; then ! { { echo "$as_me:2996: error: I cannot find the pcap library anywhere. Perhaps you did not install the pcap package, or you did not install its development header files." >&5 --- 2923,2927 ---- if test $ac_pcap_lib_dir = "none" ; then ! { { echo "$as_me:2925: error: I cannot find the pcap library anywhere. Perhaps you did not install the pcap package, or you did not install its development header files." >&5 *************** *** 3003,3011 **** fi ! echo "$as_me:3005: result: $ac_pcap_lib_dir" >&5 echo "${ECHO_T}$ac_pcap_lib_dir" >&6 PCAP_LIB="-L$ac_pcap_lib_dir -lpcap" ! echo "$as_me:3009: checking for pcap header directory" >&5 echo $ECHO_N "checking for pcap header directory... $ECHO_C" >&6 ac_pcap_header_dir="none" --- 2932,2940 ---- fi ! echo "$as_me:2934: result: $ac_pcap_lib_dir" >&5 echo "${ECHO_T}$ac_pcap_lib_dir" >&6 PCAP_LIB="-L$ac_pcap_lib_dir -lpcap" ! echo "$as_me:2938: checking for pcap header directory" >&5 echo $ECHO_N "checking for pcap header directory... $ECHO_C" >&6 ac_pcap_header_dir="none" *************** *** 3018,3022 **** if test $ac_pcap_header_dir = "none" ; then ! { { echo "$as_me:3020: error: I cannot find the pcap header file anywhere. Perhaps you did not install the pcap package, or you did not install its development header files." >&5 --- 2947,2951 ---- if test $ac_pcap_header_dir = "none" ; then ! { { echo "$as_me:2949: error: I cannot find the pcap header file anywhere. Perhaps you did not install the pcap package, or you did not install its development header files." >&5 *************** *** 3027,3031 **** fi ! echo "$as_me:3029: result: $ac_pcap_header_dir" >&5 echo "${ECHO_T}$ac_pcap_header_dir" >&6 PCAP_INC="-I$ac_pcap_header_dir" --- 2956,2960 ---- fi ! echo "$as_me:2958: result: $ac_pcap_header_dir" >&5 echo "${ECHO_T}$ac_pcap_header_dir" >&6 PCAP_INC="-I$ac_pcap_header_dir" *************** *** 3044,3048 **** # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 ! echo "$as_me:3046: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_DNET_PATH+set}" = set; then --- 2973,2977 ---- # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 ! echo "$as_me:2975: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_DNET_PATH+set}" = set; then *************** *** 3061,3065 **** if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_DNET_PATH="$ac_dir/$ac_word" ! echo "$as_me:3063: found $ac_dir/$ac_word" >&5 break fi --- 2990,2994 ---- if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_DNET_PATH="$ac_dir/$ac_word" ! echo "$as_me:2992: found $ac_dir/$ac_word" >&5 break fi *************** *** 3072,3079 **** if test -n "$DNET_PATH"; then ! echo "$as_me:3074: result: $DNET_PATH" >&5 echo "${ECHO_T}$DNET_PATH" >&6 else ! echo "$as_me:3077: result: no" >&5 echo "${ECHO_T}no" >&6 fi --- 3001,3008 ---- if test -n "$DNET_PATH"; then ! echo "$as_me:3003: result: $DNET_PATH" >&5 echo "${ECHO_T}$DNET_PATH" >&6 else ! echo "$as_me:3006: result: no" >&5 echo "${ECHO_T}no" >&6 fi *************** *** 3085,3089 **** if test $DNET_PATH = "no"; then ! echo "$as_me:3087: checking for eth_open in -ldnet" >&5 echo $ECHO_N "checking for eth_open in -ldnet... $ECHO_C" >&6 if test "${ac_cv_lib_dnet_eth_open+set}" = set; then --- 3014,3018 ---- if test $DNET_PATH = "no"; then ! echo "$as_me:3016: checking for eth_open in -ldnet" >&5 echo $ECHO_N "checking for eth_open in -ldnet... $ECHO_C" >&6 if test "${ac_cv_lib_dnet_eth_open+set}" = set; then *************** *** 3093,3097 **** LIBS="-ldnet $LIBS" cat >conftest.$ac_ext <<_ACEOF ! #line 3095 "configure" #include "confdefs.h" --- 3022,3026 ---- LIBS="-ldnet $LIBS" cat >conftest.$ac_ext <<_ACEOF ! #line 3024 "configure" #include "confdefs.h" *************** *** 3112,3125 **** _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:3114: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:3117: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:3120: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:3123: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dnet_eth_open=yes --- 3041,3054 ---- _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:3043: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:3046: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:3049: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:3052: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dnet_eth_open=yes *************** *** 3132,3141 **** LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:3134: result: $ac_cv_lib_dnet_eth_open" >&5 echo "${ECHO_T}$ac_cv_lib_dnet_eth_open" >&6 if test $ac_cv_lib_dnet_eth_open = yes; then DNET_LIB="-ldnet" else ! { { echo "$as_me:3139: error: \`libdnet not found http://libdnet.sourceforge.net/ to get a copy'" >&5 echo "$as_me: error: \`libdnet not found http://libdnet.sourceforge.net/ to get a copy'" >&2;} { (exit 1); exit 1; }; } --- 3061,3070 ---- LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:3063: result: $ac_cv_lib_dnet_eth_open" >&5 echo "${ECHO_T}$ac_cv_lib_dnet_eth_open" >&6 if test $ac_cv_lib_dnet_eth_open = yes; then DNET_LIB="-ldnet" else ! { { echo "$as_me:3068: error: \`libdnet not found http://libdnet.sourceforge.net/ to get a copy'" >&5 echo "$as_me: error: \`libdnet not found http://libdnet.sourceforge.net/ to get a copy'" >&2;} { (exit 1); exit 1; }; } *************** *** 3244,3248 **** ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" ! { echo "$as_me:3246: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF --- 3173,3177 ---- ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" ! { echo "$as_me:3175: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF *************** *** 3420,3424 **** --he | --h) # Conflict between --help and --header ! { { echo "$as_me:3422: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 --- 3349,3353 ---- --he | --h) # Conflict between --help and --header ! { { echo "$as_me:3351: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 *************** *** 3444,3453 **** # This is an error. ! -*) { { echo "$as_me:3446: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; ! *) { { echo "$as_me:3451: error: invalid argument: $1" >&5 echo "$as_me: error: invalid argument: $1" >&2;} { (exit 1); exit 1; }; };; --- 3373,3382 ---- # This is an error. ! -*) { { echo "$as_me:3375: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; ! *) { { echo "$as_me:3380: error: invalid argument: $1" >&5 echo "$as_me: error: invalid argument: $1" >&2;} { (exit 1); exit 1; }; };; *************** *** 3570,3574 **** s,@OBJEXT@,$OBJEXT,;t t s,@CPP@,$CPP,;t t - s,@DHCP_SNPRINTF@,$DHCP_SNPRINTF,;t t s,@DNET_PATH@,$DNET_PATH,;t t s,@PCAP_LIB@,$PCAP_LIB,;t t --- 3499,3502 ---- *************** *** 3690,3694 **** if test x"$ac_file" != x-; then ! { echo "$as_me:3692: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" --- 3618,3622 ---- if test x"$ac_file" != x-; then ! { echo "$as_me:3620: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" *************** *** 3708,3712 **** [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) ! test -f "$f" || { { echo "$as_me:3710: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } --- 3636,3640 ---- [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) ! test -f "$f" || { { echo "$as_me:3638: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } *************** *** 3721,3725 **** else # /dev/null tree ! { { echo "$as_me:3723: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } --- 3649,3653 ---- else # /dev/null tree ! { { echo "$as_me:3651: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } *************** *** 3782,3786 **** esac ! test x"$ac_file" != x- && { echo "$as_me:3784: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} --- 3710,3714 ---- esac ! test x"$ac_file" != x- && { echo "$as_me:3712: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} *************** *** 3793,3797 **** [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) ! test -f "$f" || { { echo "$as_me:3795: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } --- 3721,3725 ---- [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) ! test -f "$f" || { { echo "$as_me:3723: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } *************** *** 3806,3810 **** else # /dev/null tree ! { { echo "$as_me:3808: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } --- 3734,3738 ---- else # /dev/null tree ! { { echo "$as_me:3736: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } *************** *** 3923,3927 **** if test x"$ac_file" != x-; then if cmp -s $ac_file $tmp/config.h 2>/dev/null; then ! { echo "$as_me:3925: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else --- 3851,3855 ---- if test x"$ac_file" != x-; then if cmp -s $ac_file $tmp/config.h 2>/dev/null; then ! { echo "$as_me:3853: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else Index: configure.in =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/configure.in,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** configure.in 11 Jun 2002 01:50:27 -0000 1.20 --- configure.in 15 Jun 2002 14:59:20 -0000 1.21 *************** *** 42,50 **** AC_CHECK_FUNCS(strdup uname calloc daemon rename sysconf getrusage getprogname) - AC_CHECK_FUNCS(sprintf vsnprintf, - [DHCP_SNPRINTF="dhcp-snprintf.c"], - [DHCP_SNPRINTF=""]) - AC_SUBST(DHCP_SNPRINTF) - dnl check if kill(pid, 0) can be used to detect a process --- 42,45 ---- Index: dhcp-agent.h =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-agent.h,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** dhcp-agent.h 11 Jun 2002 03:06:39 -0000 1.55 --- dhcp-agent.h 15 Jun 2002 14:59:20 -0000 1.56 *************** *** 110,114 **** /* log string buffer */ ! # define MSG_BUFFER_SIZE 128 /* Snaplen. Use the largest size since DHCP packets could --- 110,114 ---- /* log string buffer */ ! # define MSG_BUFFER_SIZE 256 /* Snaplen. Use the largest size since DHCP packets could *************** *** 563,575 **** extern void setup_interrupt_handlers(void); ! /* Replacement vsnprintf, snprintf if needed. */ - #if !defined(HAVE_SNPRINTF) extern int snprintf (char *str, size_t count, const char *fmt, ...); - #endif - - #if !defined(HAVE_VSNPRINTF) extern int vsnprintf (char *str, size_t count, const char *fmt, va_list arg); - #endif /* Printing functions. */ --- 563,570 ---- extern void setup_interrupt_handlers(void); ! /* Replacement vsnprintf, snprintf that work the way we want them to. */ extern int snprintf (char *str, size_t count, const char *fmt, ...); extern int vsnprintf (char *str, size_t count, const char *fmt, va_list arg); /* Printing functions. */ Index: dhcp-stringbuffer.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-stringbuffer.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** dhcp-stringbuffer.c 11 Jun 2002 02:10:32 -0000 1.1 --- dhcp-stringbuffer.c 15 Jun 2002 14:59:20 -0000 1.2 *************** *** 25,39 **** #include <dhcp-agent.h> #include <dhcp-stringbuffer.h> /* create a new stringbuffer */ ! stringbuffer *make_stringbuffer(void) { stringbuffer *sb; ! sb = malloc(sizeof(stringbuffer)); sb->len = 0; sb->capacity = 0; ! sb->buf = malloc(sizeof(char) * 1); ! sb->buf[0] = 0; return sb; --- 25,115 ---- #include <dhcp-agent.h> #include <dhcp-stringbuffer.h> + #include <dhcp-util.h> + + /* * * * * * * * * * * * * + * raw string routines. * + * * * * * * * * * * * * */ + + /* just malloc out a string. */ + static char *allocate_string(int len) + { + char *s; + s = xmalloc(sizeof(char) * len + 1); /* add for null termination. */ + s[len] = 0; + return s; + } + + /* extend a string. */ + static char *extend_string(char *str, int cur_len, int ex_len) + { + int len = strlen(str); + + str = realloc(str, (sizeof(char) * (len + ex_len + 1))); + str[len + ex_len] = 0; /* make sure it's null terminated. */ + + return str; + } + + /* get a substring. */ + static char *substring(char *begin, int len) + { + char *new_string; + + new_string = allocate_string(len); + strncpy(new_string, begin, len); + new_string[len] = 0; + + return new_string; + } + + /* used in aligning -- we try to get words up to end. */ + static char *get_string_align(char *s, int end, int *len) + { + char *cur_ptr; + + if(s == 0 || *s == 0) /* end of string or no string. */ + return NULL; + + /* if strlen is smaller than len go ahead and just return it. */ + if(strlen(s) < end) { + *len = strlen(s); + return strdup(s); + } + + /* otherwise we need to hop to len */ + cur_ptr = &s[end - 1]; + + /* now check to see if we have a whitespace behind cur_ptr + * if we do return at that point. */ + + for(;cur_ptr != s;cur_ptr--) { + if(*cur_ptr == ' ' || + *cur_ptr == '\t') { + /* copy here and return. */ + *len = (cur_ptr - s) + 1; + return(substring(s, *len)); + } + } + + /* keep walking till we find whitspace or end. */ + for(cur_ptr = &s[end - 1];*cur_ptr != 0 && *cur_ptr != ' ' && *cur_ptr != '\t';cur_ptr++); + + *len = (cur_ptr - s) + 1; + return(substring(s, *len)); + } + + /* * * * * * * * * * * * * * * + * stringbuffer routines. * + * * * * * * * * * * * * * * */ /* create a new stringbuffer */ ! stringbuffer *create_stringbuffer(void) { stringbuffer *sb; ! sb = xmalloc(sizeof(stringbuffer)); sb->len = 0; sb->capacity = 0; ! sb->buf = allocate_string(0); return sb; *************** *** 48,59 **** /* append string to stringbuffer */ ! void stringbuffer_append(stringbuffer *sb, char *s) { int len = strlen(s); ! sb->len += len; ! if(sb->capacity < sb->len) { ! sb->buf = realloc(sb->buf, sizeof(char) * (sb->len + 1)); ! sb->capacity = sb->len; } --- 124,135 ---- /* append string to stringbuffer */ ! void stringbuffer_append(stringbuffer *sb, const char *s) { int len = strlen(s); ! if(sb->capacity <= (len + sb->capacity)) { ! sb->buf = extend_string(sb->buf, sb->len, len); ! sb->len += len; ! sb->capacity = sb->len; } *************** *** 68,78 **** char *end, *begin; char *newbuf; if(sb->len == 0) /* empty string. */ return sb; - /* create a new string */ - newbuf = malloc(sizeof(sb->len + 1) * sizeof(char)); - for(begin = &sb->buf[0]; *begin != '\0' && (*begin == ' ' || *begin == '\t'); --- 144,152 ---- char *end, *begin; char *newbuf; + int len; if(sb->len == 0) /* empty string. */ return sb; for(begin = &sb->buf[0]; *begin != '\0' && (*begin == ' ' || *begin == '\t'); *************** *** 86,102 **** end--); - if(end == begin) { - - /* all spaces! */ - /* zip this string to nothing */ - - destroy_stringbuffer(sb); - free(newbuf); - return make_stringbuffer(); - - } else { ! /* there's something in between. ! * copy out. */ ptr = newbuf; --- 160,167 ---- end--); ! len = (sb->len + 1); /* save old length. */ ! /* create a new string */ ! newbuf = xmalloc(len * sizeof(char)); ptr = newbuf; *************** *** 107,121 **** *ptr = 0; ! free(sb->buf); sb->buf = newbuf; ! ! } } else { /* zap beginning of string. since its all whitespace. */ - free(newbuf); sb->buf[0] = 0; sb->len = 0; ! } ! return sb; --- 172,187 ---- *ptr = 0; ! xfree(sb->buf); sb->buf = newbuf; ! sb->len = strlen(newbuf); ! sb->capacity = len; ! ! } else { + /* zap beginning of string. since its all whitespace. */ sb->buf[0] = 0; sb->len = 0; ! } return sb; *************** *** 161,163 **** --- 227,344 ---- { return sb->buf; + } + + void stringbuffer_copy(stringbuffer *dest, stringbuffer *src) + { + destroy_stringbuffer(dest); /* zap */ + dest = create_stringbuffer(); /* make new */ + + /* append -- simplicity is grand! :-) */ + stringbuffer_append(dest, stringbuffer_getstring(src)); + } + + + /* align a stringbuffer on begin and end columns. */ + void stringbuffer_align(stringbuffer *sb, int begin, int end) + { + char *ptr, *word_string; + stringbuffer *aligned_string; + int len, i; + + + aligned_string = create_stringbuffer(); + ptr = sb->buf; + + while(1) { + + word_string = get_string_align(ptr, end, &len); + + if(word_string == NULL) + break; + + ptr += len; + + for(i = 0;i < begin;i++) + stringbuffer_append(aligned_string, " "); + + stringbuffer_append(aligned_string, word_string); + stringbuffer_append(aligned_string, "\n"); + xfree(word_string); + + } + + stringbuffer_copy(sb, aligned_string); + destroy_stringbuffer(aligned_string); + + return; + } + + /* stringbuffer_*printf* these all use snprintf/snvprintf internally */ + + /* append vprintf with alignment. */ + void stringbuffer_avprintf_align(stringbuffer *sb, int start, int end, char *fmt, va_list ap) + { + stringbuffer *tmp_sb; + char *str; + int total, len; + + /* our first malloc is bogus. */ + len = 1; + str = xmalloc(sizeof(char) * len); + total = vsnprintf(str, len, fmt, ap); + + /* total is the real length needed. */ + xfree(str); + len = total + 1; + str = xmalloc(sizeof(char) * len); + vsnprintf(str, len, fmt, ap); + + /* now align if we want to align. */ + if(start != 0 && end != 0) { + + tmp_sb = create_stringbuffer(); + + stringbuffer_append(tmp_sb, str); + stringbuffer_align(tmp_sb, start, end); + stringbuffer_append(sb, stringbuffer_getstring(tmp_sb)); + + destroy_stringbuffer(tmp_sb); + + } else { + stringbuffer_append(sb, str); + } + + xfree(str); + + return; + } + + /* append printf. */ + void stringbuffer_aprintf(stringbuffer *sb, char *fmt, ...) + { + va_list ap; + + va_start(ap, fmt); + + stringbuffer_avprintf(sb, fmt, ap); + + va_end(ap); + } + + /* append printf with alignment. */ + void stringbuffer_aprintf_align(stringbuffer *sb, int start, int end, char *fmt, ...) + { + va_list ap; + + va_start(ap, fmt); + + stringbuffer_avprintf_align(sb, start, end, fmt, ap); + + va_end(ap); + } + + /* append vprintf. */ + void stringbuffer_avprintf(stringbuffer *sb, char *fmt, va_list ap) + { + stringbuffer_avprintf_align(sb, 0, 0, fmt, ap); } Index: dhcp-stringbuffer.h =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/dhcp-stringbuffer.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** dhcp-stringbuffer.h 11 Jun 2002 02:10:32 -0000 1.1 --- dhcp-stringbuffer.h 15 Jun 2002 14:59:20 -0000 1.2 *************** *** 33,43 **** } stringbuffer; ! extern stringbuffer *make_stringbuffer(void); extern void destroy_stringbuffer(stringbuffer *sb); ! extern void stringbuffer_append(stringbuffer *sb, char *s); extern stringbuffer *stringbuffer_trim_whitespace(stringbuffer *sb); extern char *stringbuffer_get_last_occurance(stringbuffer *sb, char c); extern void stringbuffer_trim_newline(stringbuffer *sb); extern const char *stringbuffer_getstring(stringbuffer *sb); #endif /* DHCP_STRINGBUFFER_H */ --- 33,46 ---- } stringbuffer; ! extern stringbuffer *create_stringbuffer(void); extern void destroy_stringbuffer(stringbuffer *sb); ! extern void stringbuffer_append(stringbuffer *sb, const char *s); extern stringbuffer *stringbuffer_trim_whitespace(stringbuffer *sb); extern char *stringbuffer_get_last_occurance(stringbuffer *sb, char c); extern void stringbuffer_trim_newline(stringbuffer *sb); extern const char *stringbuffer_getstring(stringbuffer *sb); + extern void stringbuffer_aprintf(stringbuffer *sb, char *fmt, ...); + extern void stringbuffer_aprintf_align(stringbuffer *sb, int begin, int end, char *fmt, ...); + extern void stringbuffer_avprintf(stringbuffer *sb, char *fmt, va_list ap); #endif /* DHCP_STRINGBUFFER_H */ |