dhcp-agent-commits Mailing List for dhcp-agent (Page 19)
Status: Alpha
Brought to you by:
actmodern
You can subscribe to this list here.
2002 |
Jan
|
Feb
(33) |
Mar
|
Apr
|
May
(19) |
Jun
(61) |
Jul
(12) |
Aug
|
Sep
(5) |
Oct
(31) |
Nov
(24) |
Dec
(56) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(9) |
Feb
|
Mar
(16) |
Apr
(4) |
May
(68) |
Jun
(70) |
Jul
(100) |
Aug
(54) |
Sep
|
Oct
|
Nov
|
Dec
|
2004 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
(7) |
Jun
(12) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
(1) |
Feb
|
Mar
(1) |
Apr
(4) |
May
(1) |
Jun
|
Jul
(1) |
Aug
(1) |
Sep
(8) |
Oct
(5) |
Nov
(6) |
Dec
(4) |
2008 |
Jan
(9) |
Feb
(20) |
Mar
(32) |
Apr
(18) |
May
(19) |
Jun
(12) |
Jul
(23) |
Aug
(7) |
Sep
(15) |
Oct
(22) |
Nov
(50) |
Dec
(68) |
2009 |
Jan
(63) |
Feb
(23) |
Mar
(43) |
Apr
(50) |
May
(110) |
Jun
(103) |
Jul
(71) |
Aug
(26) |
Sep
(16) |
Oct
(31) |
Nov
(8) |
Dec
(13) |
2010 |
Jan
(6) |
Feb
(6) |
Mar
(36) |
Apr
(57) |
May
(67) |
Jun
(70) |
Jul
(44) |
Aug
(46) |
Sep
(27) |
Oct
(2) |
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
From: <act...@us...> - 2003-05-18 03:51:21
|
Update of /cvsroot/dhcp-agent/dhcp-agent/doc In directory sc8-pr-cvs1:/tmp/cvs-serv22756 Added Files: Makefile.am Log Message: added Makefile --- NEW FILE: Makefile.am --- # $Header: /cvsroot/dhcp-agent/dhcp-agent/doc/Makefile.am,v 1.1 2003/05/18 03:26:08 actmodern Exp $ # # # Documentation Makefile info_TEXINFOS = dhcp-agent.texi dhcp_agent_TEXINFOS = dhcp-client.texi dhcp-relay.texi dhcp-server.texi dhcp-server.texi introduction.texi |
From: <act...@us...> - 2003-05-18 03:26:23
|
Update of /cvsroot/dhcp-agent/dhcp-agent/doc In directory sc8-pr-cvs1:/tmp/cvs-serv22829 Added Files: .cvsignore Log Message: added cvsignore --- NEW FILE: .cvsignore --- Makefile Makefile.in dhcp-agent.info texinfo.tex |
From: <act...@us...> - 2003-05-18 03:25:46
|
Update of /cvsroot/dhcp-agent/dhcp-agent/doc In directory sc8-pr-cvs1:/tmp/cvs-serv22619 Modified Files: dhcp-agent.texi Log Message: removed @copying since it really isn't needed Index: dhcp-agent.texi =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/doc/dhcp-agent.texi,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** dhcp-agent.texi 18 May 2003 03:18:10 -0000 1.1 --- dhcp-agent.texi 18 May 2003 03:25:44 -0000 1.2 *************** *** 6,31 **** @c %** end of header - @copying - Copyright 2003 Thamer Alharbash <tm...@wh...> - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior - written permission. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - @end copying - @titlepage @title dhcp-agent --- 6,9 ---- *************** *** 51,59 **** @contents ! @include introduction.txi ! @include dhcp-client.txi ! @include dhcp-server.txi ! @include dhcp-sniff.txi ! @include dhcp-relay.txi @bye --- 29,37 ---- @contents ! @include introduction.texi ! @include dhcp-client.texi ! @include dhcp-server.texi ! @include dhcp-sniff.texi ! @include dhcp-relay.texi @bye |
Update of /cvsroot/dhcp-agent/dhcp-agent/doc In directory sc8-pr-cvs1:/tmp/cvs-serv19694 Added Files: dhcp-agent.texi dhcp-client.texi dhcp-relay.texi dhcp-server.texi dhcp-sniff.texi introduction.texi Log Message: renamed to texi --- NEW FILE: dhcp-agent.texi --- \input texinfo @c -*-texinfo-*- @c %** start of header @setfilename dhcp-agent.info @settitle dhcp-agent @c %** end of header @copying Copyright 2003 Thamer Alharbash <tm...@wh...> Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The names of the authors may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. @end copying @titlepage @title dhcp-agent @page @vskip 0pt plus 1filll @end titlepage @ifnottex @node Top @top dhcp-agent @end ifnottex @c **************** Menu list ******************* @c ** add new menu items here. @menu * Introduction:: * dhcp-client:: * dhcp-server:: * dhcp-sniff:: * dhcp-relay:: @end menu @contents @include introduction.txi @include dhcp-client.txi @include dhcp-server.txi @include dhcp-sniff.txi @include dhcp-relay.txi @bye --- NEW FILE: dhcp-client.texi --- @c ***************** list *********************** @node dhcp-client @chapter dhcp-client @cindex dhcp-client dhcp-client is a highly configurable and extendable DHCP client. Out of the box it has been built to start up and perform DHCP for a basic network setup with minimal fuss. This chapter of the manual is divided into two parts. A quickstart guide written to get things up and going with minimal fuss and absolutely no file editing, and a more in depth reference manual to making use of the other DHCP client features. @section Quickstart These instructions are for a quick no-hassle basic DHCP client setup. You don't really need to do much except know the following: @itemize bullet @item That a DHCP server is waiting and responding to any queries originating from your machine. @item That you are using an ethernet connection and know the name of the network interface you are using. Under Linux this is usually ``eth0'', and under other operating systems like FreeBSD or Solaris the interface may be called ``le0'' or ``xl0''. If you are using a system with multiple network interfaces you should probably read the rest of this manual thoroughly to make sure your system is configured correctly by the client. @item You want to setup your IP address (netmask and broadcast included), default route, and domain name system and nothing else. @item You can send an ICMP echo request to the default gateway, otherwise you need to disable icmp latency discovery which is explained further down in the manual. @item Your PATH environment variable points to the dhcp-client binary. @end itemize As the root user run the following command: @command{dhcp-client -i} @var{<interface>} Where you substitute @var{<interface>} with the name of your interface. Alternatively if the interface is down you can omit the @option{-i} and dhcp-client will automatically use the first ethernet interface which is not up. You should be greeted by copyright text and the output of the client as it queries the DHCP server and configures your system. Once the client is done, it will fork into the background and continue to renew your lease as timers expire. In the event of the lease expiring the client will down your interface and cleanup any of the system configuration it had done before. @section Client Configuration dhcp-client accepts a number of configuration directives. Some of these can be passed by the command line, and others through a configuration file. @subsection Command Line Options [ TODO ] @subsection The Configuration File dhcp-client will look for two files for a configuration information. Both these files should be located in the system configuration directory. By default this is defined as @file{/usr/local/etc} You can change this definition at build time by specifying a different prefix to the @command{configure} script. The first file that is checked for begins with the name of the interface the client is configuring. For example, if the name of our interface is ``xl0'' then the configuration file to be checked will be @file{/usr/local/etc/xl0.conf} If this file does not exist then the default configuration file is @file{/usr/local/etc/default.conf} This allows dhcp-client to accept configuration per interface, and use a default file without forcing the user to name interfaces in the actual configuration file. It is believed that configuration files are more portable this way and are not dependant on interface names. @subsection Layout of Configuration File. The configuration file is made up of directives. Each directive can take up one line or fall on multiple lines . Each directive is terminated by a ';' character. Whitespace is ignored unless it is found in a quoted sting. Newlines are always ignored. @example foobar = yada, blah; @end example And: @example foobar = yada, blah; @end example Are the same. The parser also recognizes strings in two different formats. Quoted and unquoted. @example "foobar" @end example Is parsed exactly the same as @example foobar @end example However: @example foo bar @end example Will parse as two different strings, so you should use: @example "foo bar" @end example Quoting is useful for strings which contain whitespace. Newlines in quoted strings will result in an error unless preceeded by the '\' character. There should be no need to put newlines in quoted strings and expect them to be evaluated. If you want newlines to be evaluated you need to convince the author that they should be :-) The '\' character can be used to escape double quotes too. @subsection Configuration Directives @subheading DHCP Option Handling The following directives affect DHCP option handling by the client @itemize bullet @item request : The ``request'' directive instructs the client to request a set of dhcp options. The request directive accepts a list of strings which name the options to be requested: @example request subnet-mask, ip-address-lease-time, renewal-time, rebinding-time, interface-mtu, domain-name, domain-name-servers; @end example @item require : the ``require'' directive instructs the client to require a set of dhcp options to be passed before accepting the lease. This is useful to make sure you receive a minimum of desired options. If these options are never met the client will eventually timeout. @example require subnet-mask, ip-address-lease-time, renewal-time, rebinding-time, interface-mtu; @end example @item configure : the ``configure'' directive instructs the client to only configure a set of dhcp options. This is useful if the server is passing you options you would rather not configure but implicitly claim to configure by accepting the lease. This directive does not define how options are configured [TODO write up extending the client with guile]. @example configure subnet-mask, ip-address-lease-time, renewal-time, rebinding-time, interface-mtu, domain-name, domain-name-servers; @end example @item append : the ``append'' directive instructs the client to append a value to a DHCP option prior to system configuration. If this option is a list of values, the value specified is merely appended. If this value is a string the value is appended to the string. If this option is a single datum then you should be using the override option instead. @example append domain-name-servers = 127.0.0.1, 192.168.0.1; @end example @item prepend : the ``prepend'' directive works the same as the append directive only the values are placed at the beginning of the list or string. You should not use prepend on single datum options and should use override instead. @example prepend domain-name-servers = 127.0.0.1, 192.168.0.1; @end example @item override : the ``override'' directive instructs the client to overwrite a DHCP option with a specified value prior to system configuration. This is useful to for clients that wish to use an alternate value for a DHCP option than the one passed by the DHCP server. @example override domain-name = "example.com"; @end example @end itemize @subheading Variable Settings @itemize @item set : the ``set'' directive instructs the client to set a variable to a defined value. @example set default-subnet-mask = 255.255.255.0; @end example @item enable: the ``enable'' directive instructs the client to set a boolean variable to a defined value. The boolean variable only accepts ``yes'' or ``no'' for values. @example enable do-measure-router-latency = no; @end example @end itemize @subheading Configurable Variables dhcp-client accepts a number of variables to configure default values, values passed to the server, and control some of its behaviour. @itemize @item hostname : the ``hostname'' variable can be set to a string which is passed as the hostname DHCP option to the server. This allows servers to pass configuration based on a hostname passed by the client. It will also instruct the client to set the hostname to that variable. If you want to pass a hostname to the server you should set this variable and not use the ``override'' directive because the ``override'' directive only affects system configuration. @example set hostname = "foo.example.com"; @end example @item dhcp-discovery-retries: the ``dhcp-discovery-retries'' variable can be set to an integer value which instructs the client on how many times it should retry a DHCP discover before it gives up. @example set dhcp-discovery-retries = 3; @end example @item icmp-retries: the ``icmp-retries'' variable can be set to an integer value which instructs the client on how many times it should retry an ICMP operation. This affects operations such as router latency discovery, ICMP netmask discovery etc. @example set icmp-retries = 3; @end example @item default-interface-mtu: the ``default-interface-mtu'' variable can be set to an integer value which instructs the client on what it's default interface MTU should be. This MTU is used during the initial DHCP discovery messages, and later used to configure the interface MTU if no MTU was specified by the DHCP server. @example set default-interface-mtu = 1500; @end example @item default-subnet-mask: the ``default-subnet-mask'' variable can be set to a netmask value to specify a default subnet mask in case none is provided by the DHCP operation. Unlike the ``override'' directive this provides a fallback in case no subnet-mask is provided by the server. @example set default-subnet-mask = 255.255.255.0; @end example @item do-measure-router-latency: the ``do-measure-router-latency'' variable can be set to a boolean value to indicate whether or not the client should attempt to send ICMP ECHO requests to routers passed by the DHCP server and determine which is one has the least latency to become the default route. Disabling this variable stops this operation from taking place, and the first router is used as the default route. This is useful if the routers cannot be reached by ICMP ECHO requests. @example enable do-measure-router-latency = yes; @end example @end itemize @section Writing Client Extensions dhcp-client uses guile (GNU's Ubiquitous Intelligent Language for Extensions) to extend itself. Extensions can currently be written for handling DHCP options. The rest of this section assumes you are familiar with the Scheme programming language. If you are not familiar with the Scheme programming language then you cannot extend the client to configure options it cannot handle. [ TODO ] --- NEW FILE: dhcp-relay.texi --- @c ***************** list *********************** @node dhcp-relay @chapter dhcp-relay @cindex dhcp-relay [ TODO ] --- NEW FILE: dhcp-server.texi --- @c ***************** list *********************** @node dhcp-server @chapter dhcp-server @cindex dhcp-server [ TODO ] --- NEW FILE: dhcp-sniff.texi --- @c ***************** list *********************** @node dhcp-sniff @chapter dhcp-sniff @cindex dhcp-sniff @section Quickstart --- NEW FILE: introduction.texi --- @c ***************** list *********************** @node Introduction @chapter Introduction @cindex Introduction dhcp-agent is a suite, or a set of tools, that allow a UNIX host to make use of the Dynamic Host Configuration protocol. Currently the suite is packaged with the following tools: @itemize @bullet @item dhcp-client : A highly configurable and extendable DHCP client. @item dhcp-sniff : A command line DHCP sniffer. @end itemize In good time the suite will also be packaged with: @itemize @bullet @item dhcp-server : A configurable and extendable DHCP server. @item dhcp-relay : A DHCP relay agent. @end itemize @section Building and Installing You can download a copy of dhcp-agent from: @url{http://dhcp-agent.sourceforge.net/} You will also need libdnet, libpcap, and guile from the following locations: @itemize bullet @item libdnet version 1.7 or higher: @url{http://libdnet.sourceforge.net/} @item libpcap version 0.6.2 or higher: @url{http://www.tcpdump.org/} @item guile version 1.6.4 or higher: @url{http://www.gnu.org/software/guile/guile.html} @end itemize Once these dependencies are installed use the @command{configure} script to configure the build of dhcp-agent. Then @command{make} and @command{make install} to install it on your system. The @command{configure} script accepts a number of flags and environment variables. You should use @command{configure --help} to list these. @section Default Settings The @command{configure} script will allow you to set some default paths including where dhcp-agent keeps its configuration and data files. These are the more prominent options: @itemize @item --prefix : the ``prefix'' is where all the directories are created. If you wish to install dhcp-agent in @file{/opt/dhcp-agent} then you will need to specify that directory prefix. By default dhcp-agent will use @file{/usr/local} as its prefix. @item --bindir: the directory where binaries are installed @item --sysconfdir: the directory where the configuration files are installed @item --localstatedir: the directory where data files are stored. lease information is kept here. @end itemize @section System Specific Notes @subsection Linux [ TODO ] @subsection FreeBSD [ TODO ] @subsection Solaris [ TODO ] |
Update of /cvsroot/dhcp-agent/dhcp-agent/doc In directory sc8-pr-cvs1:/tmp/cvs-serv19558 Removed Files: dhcp-agent.txi dhcp-client.txi dhcp-relay.txi dhcp-server.txi dhcp-sniff.txi introduction.txi Log Message: renaming to texi --- dhcp-agent.txi DELETED --- --- dhcp-client.txi DELETED --- --- dhcp-relay.txi DELETED --- --- dhcp-server.txi DELETED --- --- dhcp-sniff.txi DELETED --- --- introduction.txi DELETED --- |
From: <act...@us...> - 2003-05-18 02:59:03
|
Update of /cvsroot/dhcp-agent/dhcp-agent/conf In directory sc8-pr-cvs1:/tmp/cvs-serv13488/conf Modified Files: Makefile.am Log Message: now correctly adding conf files to dist Index: Makefile.am =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/conf/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile.am 15 May 2003 04:40:41 -0000 1.2 --- Makefile.am 18 May 2003 02:58:59 -0000 1.3 *************** *** 6,7 **** --- 6,8 ---- SUBDIRS = . dhcpsysconf_client_DATA = default.conf default.sysconf + EXTRA_DIST = default.conf default.sysconf |
From: <act...@us...> - 2003-05-18 02:58:43
|
Update of /cvsroot/dhcp-agent/dhcp-agent/src In directory sc8-pr-cvs1:/tmp/cvs-serv13392/src Modified Files: Makefile.am Log Message: updated with new header files Index: Makefile.am =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/Makefile.am,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** Makefile.am 15 May 2003 05:08:13 -0000 1.21 --- Makefile.am 18 May 2003 02:58:39 -0000 1.22 *************** *** 18,22 **** dhcp-client-conf.h dhcp-librawnet.h dhcp-limits.h dhcp-log.h dhcp-tokenizer.h \ dhcp-sysconf.h dhcp-conf.h dhcp-conf-var.h dhcp-option.h dhcp-option-convert.h \ ! dhcp-client-guile.h --- 18,22 ---- dhcp-client-conf.h dhcp-librawnet.h dhcp-limits.h dhcp-log.h dhcp-tokenizer.h \ dhcp-sysconf.h dhcp-conf.h dhcp-conf-var.h dhcp-option.h dhcp-option-convert.h \ ! dhcp-client-guile.h dhcp-sniff-defaults.h dhcp-client-defaults.h *************** *** 65,72 **** dhcp-client-guile.c ! dhcp_client_LDADD = -ldhcputil ${GUILE_LIB} -lefence dhcp_sniff_LDADD = -ldhcputil libdhcputil_la_LIBADD = ${PCAP_LIB} ${DNET_LIB} install-exec-am: ! mkdir -p ${dhcplocalstatedir} ${dhcplocalstate_clientdir} \ No newline at end of file --- 65,72 ---- dhcp-client-guile.c ! dhcp_client_LDADD = -ldhcputil ${GUILE_LIB} dhcp_sniff_LDADD = -ldhcputil libdhcputil_la_LIBADD = ${PCAP_LIB} ${DNET_LIB} install-exec-am: ! mkdir -p ${dhcplocalstatedir} ${dhcplocalstate_clientdir} |
From: <act...@us...> - 2003-05-18 02:58:28
|
Update of /cvsroot/dhcp-agent/dhcp-agent/src In directory sc8-pr-cvs1:/tmp/cvs-serv13305/src Modified Files: dhcp-local.h dhcp-option-convert.c Log Message: better portability for C99 inttypes macros Index: dhcp-local.h =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-local.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** dhcp-local.h 16 Nov 2002 00:23:43 -0000 1.4 --- dhcp-local.h 18 May 2003 02:58:25 -0000 1.5 *************** *** 62,67 **** ! #ifdef HAVE_PRIMACROS_H ! #include <primacros.h> #endif /* HAVE_PRIMACROS_H */ --- 62,67 ---- ! #ifdef HAVE_STDINT_MARCOS_H ! #include <stdint_marcos.h> #endif /* HAVE_PRIMACROS_H */ *************** *** 69,72 **** --- 69,76 ---- #include <inttypes.h> #endif /* HAVE_INTTYPES_H */ + + #ifdef HAVE_STDINT_H + #include <stdint.h> + #endif /* HAVE_STDINT_H */ #include <errno.h> Index: dhcp-option-convert.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-option-convert.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** dhcp-option-convert.c 6 May 2003 03:49:16 -0000 1.3 --- dhcp-option-convert.c 18 May 2003 02:58:25 -0000 1.4 *************** *** 949,955 **** if(i < list_get_len(list)) { ! stringbuffer_aprintf(sb, "%"PRId8"%s", *int8_ptr, separator); } else { ! stringbuffer_aprintf(sb, "%"PRId8, *int8_ptr); } break; --- 949,955 ---- if(i < list_get_len(list)) { ! stringbuffer_aprintf(sb, "%"PRIi8"%s", *int8_ptr, separator); } else { ! stringbuffer_aprintf(sb, "%"PRIi8, *int8_ptr); } break; *************** *** 961,967 **** if(i < list_get_len(list)) { ! stringbuffer_aprintf(sb, "%"PRId16"%s", *int16_ptr, separator); } else { ! stringbuffer_aprintf(sb, "%"PRId16, *int16_ptr); } break; --- 961,967 ---- if(i < list_get_len(list)) { ! stringbuffer_aprintf(sb, "%"PRIi16"%s", *int16_ptr, separator); } else { ! stringbuffer_aprintf(sb, "%"PRIi16, *int16_ptr); } break; *************** *** 973,979 **** if(i < list_get_len(list)) { ! stringbuffer_aprintf(sb, "%"PRId32"%s", *int32_ptr, separator); } else { ! stringbuffer_aprintf(sb, "%"PRId32, *int32_ptr); } break; --- 973,979 ---- if(i < list_get_len(list)) { ! stringbuffer_aprintf(sb, "%"PRIi32"%s", *int32_ptr, separator); } else { ! stringbuffer_aprintf(sb, "%"PRIi32, *int32_ptr); } break; |
From: <act...@us...> - 2003-05-18 02:58:28
|
Update of /cvsroot/dhcp-agent/dhcp-agent In directory sc8-pr-cvs1:/tmp/cvs-serv13305 Modified Files: Makefile.am configure.ac config.h.in acinclude.m4 Log Message: better portability for C99 inttypes macros Index: Makefile.am =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/Makefile.am,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Makefile.am 11 May 2003 17:01:45 -0000 1.4 --- Makefile.am 18 May 2003 02:58:25 -0000 1.5 *************** *** 7,8 **** --- 7,9 ---- SUBDIRS = src man tests conf EXTRA_DIST = CAVEATS LICENSE README THANKS TODO UPGRADING + CLEANFILES = stdint_marcos.h Index: configure.ac =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/configure.ac,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** configure.ac 15 May 2003 05:08:13 -0000 1.5 --- configure.ac 18 May 2003 02:58:25 -0000 1.6 *************** *** 50,57 **** AC_WF_TRY_PRI_MACROS ! if test -z "$have_primacros"; then ! echo -n "attempting to generate stdint conversion macros..." ! AC_WF_GET_PRI_MACROS ! AC_DEFINE(HAVE_PRIMACROS_H, 1, [ generated our own primacros ]) echo " done!" fi --- 50,76 ---- AC_WF_TRY_PRI_MACROS ! if test "x$have_primacros" = "x"; then ! ! dnl this ought to work -- i think :-) ! ! echo > stdint_marcos.h ! ! echo "#define PRIi8 \"i\"" >> stdint_marcos.h ! echo "#define PRIi16 \"i\"" >> stdint_marcos.h ! echo "#define PRIi32 \"i\"" >> stdint_marcos.h ! ! echo "#define PRIu8 \"u\"" >> stdint_marcos.h ! echo "#define PRIu16 \"u\"" >> stdint_marcos.h ! echo "#define PRIu32 \"u\"" >> stdint_marcos.h ! ! echo "#define SCNi8 \"hhi\"" >> stdint_marcos.h ! echo "#define SCNi16 \"hi\"" >> stdint_marcos.h ! echo "#define SCNi32 \"i\"" >> stdint_marcos.h ! ! echo "#define SCNu8 \"hhu\"" >> stdint_marcos.h ! echo "#define SCNu16 \"hu\"" >> stdint_marcos.h ! echo "#define SCNu32 \"u\"" >> stdint_marcos.h ! ! AC_DEFINE(HAVE_STDINT_MARCOS_H, 1, [ generated our own primacros ]) echo " done!" fi Index: config.h.in =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/config.h.in,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** config.h.in 15 May 2003 05:08:13 -0000 1.4 --- config.h.in 18 May 2003 02:58:25 -0000 1.5 *************** *** 31,37 **** #undef HAVE_MEMORY_H - /* generated our own primacros */ - #undef HAVE_PRIMACROS_H - /* have __progname var */ #undef HAVE_PROGNAME --- 31,34 ---- *************** *** 51,54 **** --- 48,54 ---- /* Define to 1 if you have the <stdint.h> header file. */ #undef HAVE_STDINT_H + + /* generated our own primacros */ + #undef HAVE_STDINT_MARCOS_H /* Define to 1 if you have the <stdlib.h> header file. */ Index: acinclude.m4 =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/acinclude.m4,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** acinclude.m4 29 Oct 2002 17:11:03 -0000 1.1.1.1 --- acinclude.m4 18 May 2003 02:58:25 -0000 1.2 *************** *** 45,157 **** #include <stdlib.h> #include <inttypes.h> ! ], [uint32_t t=1; printf("%"PRIu32, t)], [AC_MSG_RESULT(found) have_primacros="yes"], AC_MSG_RESULT(not found))]) - - - AC_DEFUN(AC_WF_GET_PRI_MACROS, - [AC_TRY_RUN([ - /* lack of C99 support caused me to do this. - * this code is probably hard to modify so don't - * instead contact me for help. - * - * I'm placing this in the public domain. Use it for - * your project if you want. - * - * Thamer Alharbash tm...@wh... */ - - #include <stdio.h> - #include <stdlib.h> - - #include <sys/types.h> - #include <inttypes.h> - #include <errno.h> - #include <string.h> - - #define TABLE_SIZE 4 - - /* substitutions as we know them. */ - - #define SUB_UNSIGNED_LONG "lu" - #define SUB_UNSIGNED_SHORT "hu" - #define SUB_LONG "li" - #define SUB_SHORT "hi" - #define SUB_INT "d" - #define SUB_UNSIGNED_INT "du" - #define SUB_CHAR "d" /* same -- we're assuming int is always bigger than char */ - #define SUB_UNSIGNED_CHAR "du" /* which is an OK assumption (or is it?). */ - - - - - static void output_type_substitution(FILE *fp, - char *sub_string, - size_t size, - char **sub_table, - size_t *size_table) - { - int i; - - for(i = 0;i < TABLE_SIZE; i++) { - - if(size_table[i] == size) { - fprintf(fp, "#define %s \\"%s\\"\n", sub_string, sub_table[i]); - break; - } - } - - if(i == TABLE_SIZE) { - /* blah. we couldn't find a suitable type. Issue warning and use largest size.*/ - - fprintf(stderr, "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n"); - fprintf(stderr, "* Warning! I couldn't find a suitable type that's size for a type.\n"); - fprintf(stderr, "* I'm going to go and use the largest I can and hope things work! *\n"); - fprintf(stderr, "* Please do report this bug to tm...@wh... *\n"); - fprintf(stderr, "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n"); - - fprintf(fp, "#define %s \\"%s\\"\n", sub_string, sub_table[0]); - } - - return; - } - - int main(int argc, char *argv[]) - { - FILE *fp; - char *signed_sub_table[] = { SUB_LONG, SUB_SHORT, SUB_INT, SUB_CHAR }; - char *unsigned_sub_table[] = { SUB_UNSIGNED_LONG, SUB_UNSIGNED_SHORT, SUB_UNSIGNED_INT, - SUB_UNSIGNED_CHAR }; - size_t signed_size_table[] = { sizeof(long), sizeof(short), sizeof(int), - sizeof(char) }; - size_t unsigned_size_table[] = { sizeof(unsigned long), sizeof(unsigned short), - sizeof(unsigned int), sizeof(unsigned char) }; - - fp = fopen("primacros.h", "w"); - if(fp == NULL) { - perror("fopen"); - exit(1); - } - - fprintf(fp, "/* Automatically generated PRI macros. *\n"); - fprintf(fp, " * This is because you don't have them.*/\n"); - - output_type_substitution(fp, "PRIu32", sizeof(uint32_t), - unsigned_sub_table, unsigned_size_table); - - output_type_substitution(fp, "PRIi32", sizeof(int32_t), - signed_sub_table, signed_size_table); - - - output_type_substitution(fp, "PRIu16", sizeof(uint16_t), - unsigned_sub_table, unsigned_size_table); - - output_type_substitution(fp, "PRIi16", sizeof(int16_t), - signed_sub_table, signed_size_table); - - exit(0); - } - ], [ac_have_primacros_h="1"], - AC_MSG_ERROR([I could not generate replacement C99 macros for stdint types! sorry I cannot carry on!]))]) AC_DEFUN(AC_WF_CHECK_KILL_SIGNAL_DETECT, --- 45,52 ---- #include <stdlib.h> #include <inttypes.h> ! ], [uint32_t t=1; printf("%"PRIu32, t);], [AC_MSG_RESULT(found) have_primacros="yes"], AC_MSG_RESULT(not found))]) AC_DEFUN(AC_WF_CHECK_KILL_SIGNAL_DETECT, |
Update of /cvsroot/dhcp-agent/dhcp-agent/doc In directory sc8-pr-cvs1:/tmp/cvs-serv7103 Added Files: dhcp-agent.txi dhcp-client.txi dhcp-relay.txi dhcp-server.txi dhcp-sniff.txi introduction.txi Log Message: added initial texinfo manual --- NEW FILE: dhcp-agent.txi --- \input texinfo @c -*-texinfo-*- @c %** start of header @setfilename dhcp-agent.info @settitle dhcp-agent @c %** end of header @copying Copyright 2003 Thamer Alharbash <tm...@wh...> Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The names of the authors may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. @end copying @titlepage @title dhcp-agent @page @vskip 0pt plus 1filll @end titlepage @ifnottex @node Top @top dhcp-agent @end ifnottex @c **************** Menu list ******************* @c ** add new menu items here. @menu * Introduction:: * dhcp-client:: * dhcp-server:: * dhcp-sniff:: * dhcp-relay:: @end menu @contents @include introduction.txi @include dhcp-client.txi @include dhcp-server.txi @include dhcp-sniff.txi @include dhcp-relay.txi @bye --- NEW FILE: dhcp-client.txi --- @c ***************** list *********************** @node dhcp-client @chapter dhcp-client @cindex dhcp-client dhcp-client is a highly configurable and extendable DHCP client. Out of the box it has been built to start up and perform DHCP for a basic network setup with minimal fuss. This chapter of the manual is divided into two parts. A quickstart guide written to get things up and going with minimal fuss and absolutely no file editing, and a more in depth reference manual to making use of the other DHCP client features. @section Quickstart These instructions are for a quick no-hassle basic DHCP client setup. You don't really need to do much except know the following: @itemize bullet @item That a DHCP server is waiting and responding to any queries originating from your machine. @item That you are using an ethernet connection and know the name of the network interface you are using. Under Linux this is usually ``eth0'', and under other operating systems like FreeBSD or Solaris the interface may be called ``le0'' or ``xl0''. If you are using a system with multiple network interfaces you should probably read the rest of this manual thoroughly to make sure your system is configured correctly by the client. @item You want to setup your IP address (netmask and broadcast included), default route, and domain name system and nothing else. @item You can send an ICMP echo request to the default gateway, otherwise you need to disable icmp latency discovery which is explained further down in the manual. @item Your PATH environment variable points to the dhcp-client binary. @end itemize As the root user run the following command: @command{dhcp-client -i} @var{<interface>} Where you substitute @var{<interface>} with the name of your interface. Alternatively if the interface is down you can omit the @option{-i} and dhcp-client will automatically use the first ethernet interface which is not up. You should be greeted by copyright text and the output of the client as it queries the DHCP server and configures your system. Once the client is done, it will fork into the background and continue to renew your lease as timers expire. In the event of the lease expiring the client will down your interface and cleanup any of the system configuration it had done before. @section Client Configuration dhcp-client accepts a number of configuration directives. Some of these can be passed by the command line, and others through a configuration file. @subsection Command Line Options [ TODO ] @subsection The Configuration File dhcp-client will look for two files for a configuration information. Both these files should be located in the system configuration directory. By default this is defined as @file{/usr/local/etc} You can change this definition at build time by specifying a different prefix to the @command{configure} script. The first file that is checked for begins with the name of the interface the client is configuring. For example, if the name of our interface is ``xl0'' then the configuration file to be checked will be @file{/usr/local/etc/xl0.conf} If this file does not exist then the default configuration file is @file{/usr/local/etc/default.conf} This allows dhcp-client to accept configuration per interface, and use a default file without forcing the user to name interfaces in the actual configuration file. It is believed that configuration files are more portable this way and are not dependant on interface names. @subsection Layout of Configuration File. The configuration file is made up of directives. Each directive can take up one line or fall on multiple lines . Each directive is terminated by a ';' character. Whitespace is ignored unless it is found in a quoted sting. Newlines are always ignored. @example foobar = yada, blah; @end example And: @example foobar = yada, blah; @end example Are the same. The parser also recognizes strings in two different formats. Quoted and unquoted. @example "foobar" @end example Is parsed exactly the same as @example foobar @end example However: @example foo bar @end example Will parse as two different strings, so you should use: @example "foo bar" @end example Quoting is useful for strings which contain whitespace. Newlines in quoted strings will result in an error unless preceeded by the '\' character. There should be no need to put newlines in quoted strings and expect them to be evaluated. If you want newlines to be evaluated you need to convince the author that they should be :-) The '\' character can be used to escape double quotes too. @subsection Configuration Directives @subheading DHCP Option Handling The following directives affect DHCP option handling by the client @itemize bullet @item request : The ``request'' directive instructs the client to request a set of dhcp options. The request directive accepts a list of strings which name the options to be requested: @example request subnet-mask, ip-address-lease-time, renewal-time, rebinding-time, interface-mtu, domain-name, domain-name-servers; @end example @item require : the ``require'' directive instructs the client to require a set of dhcp options to be passed before accepting the lease. This is useful to make sure you receive a minimum of desired options. If these options are never met the client will eventually timeout. @example require subnet-mask, ip-address-lease-time, renewal-time, rebinding-time, interface-mtu; @end example @item configure : the ``configure'' directive instructs the client to only configure a set of dhcp options. This is useful if the server is passing you options you would rather not configure but implicitly claim to configure by accepting the lease. This directive does not define how options are configured [TODO write up extending the client with guile]. @example configure subnet-mask, ip-address-lease-time, renewal-time, rebinding-time, interface-mtu, domain-name, domain-name-servers; @end example @item append : the ``append'' directive instructs the client to append a value to a DHCP option prior to system configuration. If this option is a list of values, the value specified is merely appended. If this value is a string the value is appended to the string. If this option is a single datum then you should be using the override option instead. @example append domain-name-servers = 127.0.0.1, 192.168.0.1; @end example @item prepend : the ``prepend'' directive works the same as the append directive only the values are placed at the beginning of the list or string. You should not use prepend on single datum options and should use override instead. @example prepend domain-name-servers = 127.0.0.1, 192.168.0.1; @end example @item override : the ``override'' directive instructs the client to overwrite a DHCP option with a specified value prior to system configuration. This is useful to for clients that wish to use an alternate value for a DHCP option than the one passed by the DHCP server. @example override domain-name = "example.com"; @end example @end itemize @subheading Variable Settings @itemize @item set : the ``set'' directive instructs the client to set a variable to a defined value. @example set default-subnet-mask = 255.255.255.0; @end example @item enable: the ``enable'' directive instructs the client to set a boolean variable to a defined value. The boolean variable only accepts ``yes'' or ``no'' for values. @example enable do-measure-router-latency = no; @end example @end itemize @subheading Configurable Variables dhcp-client accepts a number of variables to configure default values, values passed to the server, and control some of its behaviour. @itemize @item hostname : the ``hostname'' variable can be set to a string which is passed as the hostname DHCP option to the server. This allows servers to pass configuration based on a hostname passed by the client. It will also instruct the client to set the hostname to that variable. If you want to pass a hostname to the server you should set this variable and not use the ``override'' directive because the ``override'' directive only affects system configuration. @example set hostname = "foo.example.com"; @end example @item dhcp-discovery-retries: the ``dhcp-discovery-retries'' variable can be set to an integer value which instructs the client on how many times it should retry a DHCP discover before it gives up. @example set dhcp-discovery-retries = 3; @end example @item icmp-retries: the ``icmp-retries'' variable can be set to an integer value which instructs the client on how many times it should retry an ICMP operation. This affects operations such as router latency discovery, ICMP netmask discovery etc. @example set icmp-retries = 3; @end example @item default-interface-mtu: the ``default-interface-mtu'' variable can be set to an integer value which instructs the client on what it's default interface MTU should be. This MTU is used during the initial DHCP discovery messages, and later used to configure the interface MTU if no MTU was specified by the DHCP server. @example set default-interface-mtu = 1500; @end example @item default-subnet-mask: the ``default-subnet-mask'' variable can be set to a netmask value to specify a default subnet mask in case none is provided by the DHCP operation. Unlike the ``override'' directive this provides a fallback in case no subnet-mask is provided by the server. @example set default-subnet-mask = 255.255.255.0; @end example @item do-measure-router-latency: the ``do-measure-router-latency'' variable can be set to a boolean value to indicate whether or not the client should attempt to send ICMP ECHO requests to routers passed by the DHCP server and determine which is one has the least latency to become the default route. Disabling this variable stops this operation from taking place, and the first router is used as the default route. This is useful if the routers cannot be reached by ICMP ECHO requests. @example enable do-measure-router-latency = yes; @end example @end itemize @section Writing Client Extensions dhcp-client uses guile (GNU's Ubiquitous Intelligent Language for Extensions) to extend itself. Extensions can currently be written for handling DHCP options. The rest of this section assumes you are familiar with the Scheme programming language. If you are not familiar with the Scheme programming language then you cannot extend the client to configure options it cannot handle. [ TODO ] --- NEW FILE: dhcp-relay.txi --- @c ***************** list *********************** @node dhcp-relay @chapter dhcp-relay @cindex dhcp-relay [ TODO ] --- NEW FILE: dhcp-server.txi --- @c ***************** list *********************** @node dhcp-server @chapter dhcp-server @cindex dhcp-server [ TODO ] --- NEW FILE: dhcp-sniff.txi --- @c ***************** list *********************** @node dhcp-sniff @chapter dhcp-sniff @cindex dhcp-sniff @section Quickstart --- NEW FILE: introduction.txi --- @c ***************** list *********************** @node Introduction @chapter Introduction @cindex Introduction dhcp-agent is a suite, or a set of tools, that allow a UNIX host to make use of the Dynamic Host Configuration protocol. Currently the suite is packaged with the following tools: @itemize @bullet @item dhcp-client : A highly configurable and extendable DHCP client. @item dhcp-sniff : A command line DHCP sniffer. @end itemize In good time the suite will also be packaged with: @itemize @bullet @item dhcp-server : A configurable and extendable DHCP server. @item dhcp-relay : A DHCP relay agent. @end itemize @section Building and Installing You can download a copy of dhcp-agent from: @url{http://dhcp-agent.sourceforge.net/} You will also need libdnet, libpcap, and guile from the following locations: @itemize bullet @item libdnet version 1.7 or higher: @url{http://libdnet.sourceforge.net/} @item libpcap version 0.6.2 or higher: @url{http://www.tcpdump.org/} @item guile version 1.6.4 or higher: @url{http://www.gnu.org/software/guile/guile.html} @end itemize Once these dependencies are installed use the @command{configure} script to configure the build of dhcp-agent. Then @command{make} and @command{make install} to install it on your system. The @command{configure} script accepts a number of flags and environment variables. You should use @command{configure --help} to list these. @section Default Settings The @command{configure} script will allow you to set some default paths including where dhcp-agent keeps its configuration and data files. These are the more prominent options: @itemize @item --prefix : the ``prefix'' is where all the directories are created. If you wish to install dhcp-agent in @file{/opt/dhcp-agent} then you will need to specify that directory prefix. By default dhcp-agent will use @file{/usr/local} as its prefix. @item --bindir: the directory where binaries are installed @item --sysconfdir: the directory where the configuration files are installed @item --localstatedir: the directory where data files are stored. lease information is kept here. @end itemize @section System Specific Notes @subsection Linux [ TODO ] @subsection FreeBSD [ TODO ] @subsection Solaris [ TODO ] |
From: <act...@us...> - 2003-05-15 06:53:51
|
Update of /cvsroot/dhcp-agent/dhcp-agent/src In directory sc8-pr-cvs1:/tmp/cvs-serv10136/src Modified Files: dhcp-client-conf.c dhcp-client-conf.h dhcp-client-defaults.h dhcp-client-guile.c Log Message: added default subnet mask Index: dhcp-client-conf.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-client-conf.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** dhcp-client-conf.c 15 May 2003 05:08:14 -0000 1.24 --- dhcp-client-conf.c 15 May 2003 06:53:47 -0000 1.25 *************** *** 63,66 **** --- 63,67 ---- "icmp-retries", "default-interface-mtu", + "default-subnet-mask", }; *************** *** 83,86 **** --- 84,88 ---- CLIENT_VAR_ICMP_RETRIES, CLIENT_VAR_INTERFACE_MTU, + CLIENT_VAR_SUBNET_MASK, }; *************** *** 457,460 **** --- 459,463 ---- case CLIENT_VAR_HOSTNAME: + case CLIENT_VAR_SUBNET_MASK: var = dhcp_conf_var_create(var_symbol, xstrdup(var_value)); break; *************** *** 608,612 **** } ! static const char *get_conf_string_val(client_conf_params_t *params, var_type_t var_type) { conf_var_t *var; --- 611,615 ---- } ! static const char *get_conf_string_val(client_conf_params_t *params, var_type_t var_type, const char *default_val) { conf_var_t *var; *************** *** 618,622 **** string_val = dhcp_conf_var_get_val(var); ! return string_val; } --- 621,628 ---- string_val = dhcp_conf_var_get_val(var); ! if(string_val) ! return string_val; ! else ! return default_val; } *************** *** 728,732 **** const char *client_conf_get_hostname(client_conf_t *cc) { ! return get_conf_string_val(cc->params, CLIENT_VAR_HOSTNAME); } --- 734,738 ---- const char *client_conf_get_hostname(client_conf_t *cc) { ! return get_conf_string_val(cc->params, CLIENT_VAR_HOSTNAME, NULL); } *************** *** 742,745 **** --- 748,757 ---- { return get_conf_uint16_val(cc->params, CLIENT_VAR_INTERFACE_MTU, CLIENT_DEFAULT_MTU); + } + + const char *client_conf_get_default_subnet_mask(client_conf_t *cc, ip_addr_t ip_addr, eth_addr_t eth_addr) + { + client_conf_params_t *params = find_best_params_for(cc, ip_addr, eth_addr); + return get_conf_string_val(params, CLIENT_VAR_SUBNET_MASK, CLIENT_DEFAULT_SUBNET_MASK); } Index: dhcp-client-conf.h =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-client-conf.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** dhcp-client-conf.h 27 Mar 2003 01:39:16 -0000 1.14 --- dhcp-client-conf.h 15 May 2003 06:53:47 -0000 1.15 *************** *** 81,85 **** CLIENT_VAR_INTERFACE_MTU, CLIENT_VAR_DO_MEASURE_ROUTER_LATENCY_ICMP, CLIENT_VAR_REQUEST_OPTIONS, CLIENT_VAR_REQUIRE_OPTIONS, CLIENT_VAR_CONFIGURE_OPTIONS, CLIENT_VAR_APPEND_OPTIONS, ! CLIENT_VAR_PREPEND_OPTIONS, CLIENT_VAR_OVERRIDE_OPTIONS }; /* server symbol substitution. */ --- 81,85 ---- CLIENT_VAR_INTERFACE_MTU, CLIENT_VAR_DO_MEASURE_ROUTER_LATENCY_ICMP, CLIENT_VAR_REQUEST_OPTIONS, CLIENT_VAR_REQUIRE_OPTIONS, CLIENT_VAR_CONFIGURE_OPTIONS, CLIENT_VAR_APPEND_OPTIONS, ! CLIENT_VAR_PREPEND_OPTIONS, CLIENT_VAR_OVERRIDE_OPTIONS, CLIENT_VAR_SUBNET_MASK }; /* server symbol substitution. */ *************** *** 103,107 **** extern int client_conf_get_icmp_retries(client_conf_t *cc, ip_addr_t ip_addr, eth_addr_t eth_addr); extern uint8_t client_conf_get_do_measure_router_latency_icmp(client_conf_t *cc, ip_addr_t ip_addr, eth_addr_t eth_addr); ! extern int client_conf_get_default_mtu(client_conf_t *cc); #endif /* DHCP_CLIENT_CONF_H */ --- 103,107 ---- extern int client_conf_get_icmp_retries(client_conf_t *cc, ip_addr_t ip_addr, eth_addr_t eth_addr); extern uint8_t client_conf_get_do_measure_router_latency_icmp(client_conf_t *cc, ip_addr_t ip_addr, eth_addr_t eth_addr); ! extern const char *client_conf_get_default_subnet_mask(client_conf_t *cc, ip_addr_t ip_addr, eth_addr_t eth_addr); #endif /* DHCP_CLIENT_CONF_H */ Index: dhcp-client-defaults.h =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-client-defaults.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** dhcp-client-defaults.h 25 Mar 2003 03:01:53 -0000 1.2 --- dhcp-client-defaults.h 15 May 2003 06:53:48 -0000 1.3 *************** *** 68,70 **** --- 68,74 ---- #define CLIENT_DEFAULT_DO_MEASURE_LATENCY_ICMP 1 + /* The default subnet mask. Define this in string format. */ + + #define CLIENT_DEFAULT_SUBNET_MASK "255.255.255.0" + #endif /* DHCP_CLIENT_DEFAULTS_H */ Index: dhcp-client-guile.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-client-guile.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** dhcp-client-guile.c 15 May 2003 05:08:14 -0000 1.3 --- dhcp-client-guile.c 15 May 2003 06:53:48 -0000 1.4 *************** *** 155,159 **** /* fixme: implement default client subnet-mask option in client conf. */ ! subnet_mask = SCM_BOOL_F; return subnet_mask; } --- 155,162 ---- /* fixme: implement default client subnet-mask option in client conf. */ ! subnet_mask = scm_makfrom0str(client_conf_get_default_subnet_mask(dc->conf, ! dhcp_client_get_server_ip_address(dc), ! dhcp_client_get_server_hw_address(dc))); ! return subnet_mask; } |
From: <act...@us...> - 2003-05-15 05:08:17
|
Update of /cvsroot/dhcp-agent/dhcp-agent In directory sc8-pr-cvs1:/tmp/cvs-serv15092 Modified Files: config.h.in configure.ac Log Message: updated for new sysconf/conf directories Index: config.h.in =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/config.h.in,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** config.h.in 19 Dec 2002 18:00:25 -0000 1.3 --- config.h.in 15 May 2003 05:08:13 -0000 1.4 *************** *** 1,7 **** /* config.h.in. Generated from configure.ac by autoheader. */ - /* default client work directory */ - #undef CLIENT_WORK_DIR - /* have BPF_IMMEDIATE */ #undef HAVE_BPF_IMMEDIATE --- 1,4 ---- Index: configure.ac =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/configure.ac,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** configure.ac 11 May 2003 17:01:45 -0000 1.4 --- configure.ac 15 May 2003 05:08:13 -0000 1.5 *************** *** 38,42 **** dnl - AC_CHECK_TYPE(sig_atomic_t, [AC_DEFINE(HAVE_SIG_ATOMIC_T, 1, [have sigatomic_t])], [], [#include <signal.h>]) --- 38,41 ---- *************** *** 143,147 **** fi ! AC_DEFINE_UNQUOTED(CLIENT_WORK_DIR, ["/etc/dhcp-client"], [default client work directory]) AC_SUBST(PCAP_LIB) --- 142,154 ---- fi ! dnl ! dnl setup paths so they can be passed to the Makefile.in ! dnl ! ! dhcpsysconfdir="${sysconfdir}/${PACKAGE_NAME}" ! dhcplocalstatedir="${localstatedir}/${PACKAGE_NAME}" ! ! dhcpsysconf_clientdir="${dhcpsysconfdir}/dhcp-client" ! dhcplocalstate_clientdir="${dhcplocalstatedir}/dhcp-client" AC_SUBST(PCAP_LIB) *************** *** 151,154 **** --- 158,165 ---- AC_SUBST(GUILE_LIB) AC_SUBST(GUILE_INC) + AC_SUBST(dhcpsysconfdir) + AC_SUBST(dhcpsysconf_clientdir) + AC_SUBST(dhcplocalstatedir) + AC_SUBST(dhcplocalstate_clientdir) AM_CONFIG_HEADER([config.h]) |
From: <act...@us...> - 2003-05-15 05:08:17
|
Update of /cvsroot/dhcp-agent/dhcp-agent/src In directory sc8-pr-cvs1:/tmp/cvs-serv15092/src Modified Files: Makefile.am dhcp-client-conf.c dhcp-client-guile.c dhcp-client.c Log Message: updated for new sysconf/conf directories Index: Makefile.am =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/Makefile.am,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Makefile.am 11 May 2003 07:50:00 -0000 1.20 --- Makefile.am 15 May 2003 05:08:13 -0000 1.21 *************** *** 4,9 **** AM_CFLAGS = -Wall -Werror ! INCLUDES = @PCAP_INC@ @DNET_INC@ @GUILE_INC@ ! DEFS = @DEFS@ AUTOMAKE_OPTIONS = foreign --- 4,10 ---- AM_CFLAGS = -Wall -Werror ! INCLUDES = ${PCAP_INC} ${DNET_INC} ${GUILE_INC} ! CPPFLAGS = -DDHCPSYSCONFDIR=\"${dhcpsysconfdir}\" -DDHCPSYSCONF_CLIENTDIR=\"${dhcpsysconf_clientdir}\" \ ! -DDHCPLOCALSTATEDIR=\"${dhcplocalstatedir}\" -DDHCPLOCALSTATE_CLIENTDIR=\"${dhcplocalstate_clientdir}\" AUTOMAKE_OPTIONS = foreign *************** *** 64,69 **** dhcp-client-guile.c ! dhcp_client_LDADD = -ldhcputil @GUILE_LIB@ -lefence dhcp_sniff_LDADD = -ldhcputil ! libdhcputil_la_LIBADD = @PCAP_LIB@ @DNET_LIB@ --- 65,72 ---- dhcp-client-guile.c ! dhcp_client_LDADD = -ldhcputil ${GUILE_LIB} -lefence dhcp_sniff_LDADD = -ldhcputil + libdhcputil_la_LIBADD = ${PCAP_LIB} ${DNET_LIB} ! install-exec-am: ! mkdir -p ${dhcplocalstatedir} ${dhcplocalstate_clientdir} \ No newline at end of file Index: dhcp-client-conf.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-client-conf.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** dhcp-client-conf.c 4 May 2003 18:51:23 -0000 1.23 --- dhcp-client-conf.c 15 May 2003 05:08:14 -0000 1.24 *************** *** 519,528 **** sb = stringbuffer_create(); ! stringbuffer_aprintf(sb, "%s.%s", cc->interface, "conf"); ! fname = xstrdup(stringbuffer_getstring(sb)); ! stringbuffer_destroy(sb); ! return fname; } --- 519,548 ---- sb = stringbuffer_create(); ! stringbuffer_aprintf(sb, "%s/default.conf", DHCPSYSCONF_CLIENTDIR); ! if(file_exists(stringbuffer_getstring(sb))) { ! fname = xstrdup(stringbuffer_getstring(sb)); ! stringbuffer_destroy(sb); ! return fname; ! ! } ! ! stringbuffer_clear(sb); ! stringbuffer_aprintf(sb, "%s/%s.conf", DHCPSYSCONF_CLIENTDIR, cc->interface); ! ! if(file_exists(stringbuffer_getstring(sb))) { ! ! fname = xstrdup(stringbuffer_getstring(sb)); ! stringbuffer_destroy(sb); ! return fname; ! ! } ! ! /* otherwise there is no configuration file and this is ! * bad. signal a fatal error. */ ! ! FATAL_MESSAGE("configuration file missing -- looked for default.conf and <interface>.conf. exiting..."); ! exit(1); /* get rid of compiler warning. */ } Index: dhcp-client-guile.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-client-guile.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** dhcp-client-guile.c 11 May 2003 07:48:29 -0000 1.2 --- dhcp-client-guile.c 15 May 2003 05:08:14 -0000 1.3 *************** *** 544,553 **** sb = stringbuffer_create(); ! stringbuffer_aprintf(sb, "%s.sysconf", dc->interface); ! scm_c_primitive_load(stringbuffer_getstring(sb)); ! stringbuffer_destroy(sb); ! return; } --- 544,572 ---- sb = stringbuffer_create(); ! stringbuffer_aprintf(sb, "%s/default.sysconf", DHCPSYSCONF_CLIENTDIR); ! if(file_exists(stringbuffer_getstring(sb))) { ! scm_c_primitive_load(stringbuffer_getstring(sb)); ! stringbuffer_destroy(sb); ! return; ! ! } ! ! stringbuffer_clear(sb); ! stringbuffer_aprintf(sb, "%s/%s.sysconf", DHCPSYSCONF_CLIENTDIR, dc->interface); ! ! if(file_exists(stringbuffer_getstring(sb))) { ! ! scm_c_primitive_load(stringbuffer_getstring(sb)); ! stringbuffer_destroy(sb); ! return; ! } ! ! /* otherwise there is no sysconf file and this is ! * bad. signal a fatal error. */ ! ! FATAL_MESSAGE("sysconf file missing -- looked for default.sysconf and <interface>.sysconf. exiting..."); ! exit(1); /* get rid of compiler warning. */ } Index: dhcp-client.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-client.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** dhcp-client.c 11 May 2003 07:49:26 -0000 1.23 --- dhcp-client.c 15 May 2003 05:08:14 -0000 1.24 *************** *** 90,94 **** /* global vars affecting other code. */ ! char *work_dir = CLIENT_WORK_DIR; /* our default working directory */ #if !defined(HAVE_PROGNAME) --- 90,94 ---- /* global vars affecting other code. */ ! char *work_dir = DHCPLOCALSTATE_CLIENTDIR; /* our default working directory */ #if !defined(HAVE_PROGNAME) *************** *** 338,358 **** /* Switch into our work directory */ ! ! /* If it isn't there create it. ! * Since we're not setuid we ! * assume the root user knows what he's ! * doing and that it's ! * safe to create this directory. ! * ! */ ! ! if(!file_exists(work_dir)) { ! ! if(mkdir(work_dir, S_IRWXU) < 0) { ! FATAL_MESSAGE("cannot create work directory", strerror(errno)); ! } ! } ! ! if(!file_permissions_are(work_dir, S_IRWXU)) { FATAL_MESSAGE("wrong permissions on work directory: %s (use rwx only for owner)", work_dir); } --- 338,342 ---- /* Switch into our work directory */ ! if(!file_permissions_are(work_dir, S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH)) { FATAL_MESSAGE("wrong permissions on work directory: %s (use rwx only for owner)", work_dir); } |
From: <act...@us...> - 2003-05-15 04:40:44
|
Update of /cvsroot/dhcp-agent/dhcp-agent/conf In directory sc8-pr-cvs1:/tmp/cvs-serv30938 Modified Files: Makefile.am Added Files: .cvsignore Log Message: .cvsignore for conf dir --- NEW FILE: .cvsignore --- Makefile Makefile.in Index: Makefile.am =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/conf/Makefile.am,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile.am 11 May 2003 17:00:55 -0000 1.1 --- Makefile.am 15 May 2003 04:40:41 -0000 1.2 *************** *** 5,9 **** SUBDIRS = . - dhcpsysconfdir = $(sysconfdir)/dhcp-agent - dhcpsysconf_clientdir = $(dhcpsysconfdir)/dhcp-client dhcpsysconf_client_DATA = default.conf default.sysconf --- 5,7 ---- |
From: <act...@us...> - 2003-05-15 04:39:58
|
Update of /cvsroot/dhcp-agent/dhcp-agent/conf In directory sc8-pr-cvs1:/tmp/cvs-serv30392 Removed Files: networking-basic.conf networking-basic.sysconf Log Message: no longer need these --- networking-basic.conf DELETED --- --- networking-basic.sysconf DELETED --- |
From: <act...@us...> - 2003-05-11 17:02:00
|
Update of /cvsroot/dhcp-agent/dhcp-agent/conf In directory sc8-pr-cvs1:/tmp/cvs-serv5061/conf Modified Files: README Log Message: updated for new conf code Index: README =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/conf/README,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** README 19 Dec 2002 03:55:54 -0000 1.1 --- README 11 May 2003 17:01:57 -0000 1.2 *************** *** 1,17 **** $Header$ ! Example configuration files. Copy these over to ! /etc/dhcp-client/[interface-name].conf where [interface-name] is ! the name of the interface you are configuring for. If the ! interface is called "eth0" you would do, as root: ! ! > cp conf-file /etc/dhcp-client/eth0.conf ! ! In addition to this please note that the directory is whatever ! the default directory for the client is. ! ! The example configuration files: ! ! basic-networking : basic networking. ip, dns, and router setup. ! ! Thamer Alharbash <tm...@wh...> --- 1,3 ---- $Header$ ! Default configuration files, and sysconf guile script. |
From: <act...@us...> - 2003-05-11 17:01:48
|
Update of /cvsroot/dhcp-agent/dhcp-agent In directory sc8-pr-cvs1:/tmp/cvs-serv4992 Modified Files: configure.ac Makefile.am Log Message: updated for new conf code Index: configure.ac =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/configure.ac,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** configure.ac 11 May 2003 07:52:57 -0000 1.3 --- configure.ac 11 May 2003 17:01:45 -0000 1.4 *************** *** 153,157 **** AM_CONFIG_HEADER([config.h]) ! AC_CONFIG_FILES([Makefile src/Makefile man/Makefile tests/Makefile]) AC_OUTPUT --- 153,157 ---- AM_CONFIG_HEADER([config.h]) ! AC_CONFIG_FILES([Makefile src/Makefile man/Makefile tests/Makefile conf/Makefile]) AC_OUTPUT Index: Makefile.am =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile.am 30 Dec 2002 00:47:51 -0000 1.3 --- Makefile.am 11 May 2003 17:01:45 -0000 1.4 *************** *** 5,11 **** AUTOMAKE_OPTIONS = foreign ! SUBDIRS = src man tests ! EXTRA_DIST = CAVEATS LICENSE README THANKS TODO UPGRADING conf ! ! dist-hook: ! rm -rf `find $(distdir)/conf -name CVS` --- 5,8 ---- AUTOMAKE_OPTIONS = foreign ! SUBDIRS = src man tests conf ! EXTRA_DIST = CAVEATS LICENSE README THANKS TODO UPGRADING |
From: <act...@us...> - 2003-05-11 17:00:57
|
Update of /cvsroot/dhcp-agent/dhcp-agent/conf In directory sc8-pr-cvs1:/tmp/cvs-serv4670 Added Files: Makefile.am Log Message: makefile to install in conf directory --- NEW FILE: Makefile.am --- # $Header: /cvsroot/dhcp-agent/dhcp-agent/conf/Makefile.am,v 1.1 2003/05/11 17:00:55 actmodern Exp $ # # configuration Makefile.am # SUBDIRS = . dhcpsysconfdir = $(sysconfdir)/dhcp-agent dhcpsysconf_clientdir = $(dhcpsysconfdir)/dhcp-client dhcpsysconf_client_DATA = default.conf default.sysconf |
From: <act...@us...> - 2003-05-11 17:00:08
|
Update of /cvsroot/dhcp-agent/dhcp-agent/conf In directory sc8-pr-cvs1:/tmp/cvs-serv4326 Added Files: default.conf default.sysconf Log Message: moved to new names --- NEW FILE: default.conf --- # $Header: /cvsroot/dhcp-agent/dhcp-agent/conf/default.conf,v 1.1 2003/05/11 17:00:04 actmodern Exp $ # # Basic DHCP client configuration script. # We only ask for network setup parameters. # # Thamer Alharbash <tm...@wh...> # This will setup dhcp to accept the following configuration # parameters from any dhcp server: # # ip-address, subnet mask, lease time, renewal time, rebinding time, # interface mtu, domain name, dns server # # It will require all of the above. Otherwise uncomment below to be # more flexible # # IP address requests are implicit we just ask for the other options below. # request subnet-mask, ip-address-lease-time, renewal-time, rebinding-time, domain-name-servers, domain-name, interface-mtu, routers; # The require directive makes us ignore servers which do not return # all the options we ask for. Uncomment this to accept as # much as we get. # require subnet-mask, ip-address-lease-time, renewal-time, rebinding-time, domain-name-servers, domain-name; # Additional variable settings. # # Interface MTU # Set up our default interface mtu in case the server does not # give us one. set default-interface-mtu = 1500; # # DHCP -- try to discover/request three times before giving up. # set dhcp-discovery-retries = 3; # # ICMP -- when doing ICMP retry up to three times. # set icmp-retries = 3; # # Router discovery -- should we use ICMP to find the best router? # enable do-measure-router-latency = no; --- NEW FILE: default.sysconf --- ; $Header: /cvsroot/dhcp-agent/dhcp-agent/conf/default.sysconf,v 1.1 2003/05/11 17:00:05 actmodern Exp $ ; ; dhcp sysconf recipe file. ; ; XXX ; IMPORTANT: You should not need to edit the interface setup below. ; Without this the client may not function properly at all. ; (if (defined? 'dhcp-requested-ip-address) (let ; if the mtu wasn't passed by the server, get the user configured one ((mtu (if (defined? 'dhcp-interface-mtu) dhcp-interface-mtu (client-get-default-mtu client-control))) ; if the subnet mask wasn't specified, get the user configured one (subnet-mask (if (defined? 'dhcp-subnet-mask) dhcp-subnet-mask (client-get-default-subnet-mask client-control)))) ; that's it we're ready to bring up the interface (begin (client-info-message "bringing up interface...") (if (not (client-interface-up client-control dhcp-requested-ip-address subnet-mask mtu)) (client-fatal-message "could not bring up interface... exiting."))))) ; XXX ; Add option handling here. ; ; Domain and domain-name servers ; (if (and (client-configure? client-control 'dhcp-domain-name-servers) (client-configure? client-control 'dhcp-domain-name) (defined? 'dhcp-domain-name-servers) (defined? 'dhcp-domain-name)) (let ((resolv-conf-file-port (open "/etc/resolv.conf" O_WRONLY 0644))) (begin (client-info-message "configuring resolver") (map-in-order (lambda (dns-server) (simple-format resolv-conf-file-port "nameserver ~A\n" dns-server)) dhcp-domain-name-servers) (simple-format resolv-conf-file-port "search ~A\n" dhcp-domain-name) (close-port resolv-conf-file-port)))) ; Routers. We use client-set-default-route to add the route. ; (if (and (client-configure? client-control 'dhcp-routers) (defined? 'dhcp-routers)) (begin (client-info-message (string-append "adding default route to: " (car dhcp-routers))) (client-set-default-route client-control (car dhcp-routers)))) |
From: <act...@us...> - 2003-05-11 07:53:29
|
Update of /cvsroot/dhcp-agent/dhcp-agent In directory sc8-pr-cvs1:/tmp/cvs-serv7611 Modified Files: TODO Log Message: more todo Index: TODO =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/TODO,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** TODO 5 May 2003 14:21:24 -0000 1.9 --- TODO 11 May 2003 07:53:27 -0000 1.10 *************** *** 73,74 **** --- 73,80 ---- -- our configure script can handle define our own PRI C99 format definitions. We need ones for scanning -- SCN. + + -- if during a rebind or renew we received a wrong ip address we + must exit as an error and notify the user (RFC2131). Honor + NACKs on renew and rebind as well. + + -- may start using guile hooks instead of loading a guile script. |
From: <act...@us...> - 2003-05-11 07:53:00
|
Update of /cvsroot/dhcp-agent/dhcp-agent In directory sc8-pr-cvs1:/tmp/cvs-serv7424 Modified Files: configure.ac Log Message: fixed up configure.ac a bit Index: configure.ac =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/configure.ac,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** configure.ac 30 Dec 2002 00:47:51 -0000 1.2 --- configure.ac 11 May 2003 07:52:57 -0000 1.3 *************** *** 13,20 **** dnl ! AC_PREREQ(2.53) ! AC_INIT(dhcp-agent, 0.38, tm...@wh...) ! AM_INIT_AUTOMAKE(dhcp-agent, 0.38) ! AC_CONFIG_SRCDIR(src/dhcp-client.c) dnl --- 13,20 ---- dnl ! AC_PREREQ(2.57) ! AC_INIT([dhcp-agent],[0.38],[tm...@wh...]) ! AM_INIT_AUTOMAKE([dhcp-agent], [0.38]) ! AC_CONFIG_SRCDIR([src/dhcp-client.c]) dnl *************** *** 22,32 **** dnl - AC_ARG_WITH(libdnet-prefix,[ --with-libdnet-prefix=PREFIX Prefix where libdnet is installed (optional)], - dnet_prefix="$withval", dnet_prefix="") - AC_ARG_WITH(libpcap-prefix,[ --with-libpcap-prefix=PREFIX Prefix where libpcap is installed (optional)], - pcap_prefix="$withval", pcap_prefix="") - AC_ARG_WITH(libpcap-prefix,[ --client-work-dir=WORK_DIR Default dhcpclient work dir (optional)], - client_work_dir="$withval", client_work_dir="/etc/dhcp-client") - dnl check for CC, INSTALL, and sane make --- 22,25 ---- *************** *** 84,95 **** AC_MSG_CHECKING(for __progname) ! AC_TRY_LINK([ #include <stdlib.h> #include <stdio.h> extern const char *__progname; ! ], ! [ __progname = 0; ], ! [ have_progname="yes" ], ! [ have_progname="no" ]) if test $have_progname = "yes"; then --- 77,85 ---- AC_MSG_CHECKING(for __progname) ! AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <stdlib.h> #include <stdio.h> extern const char *__progname; ! ]], [[ __progname = 0; ]])],[ have_progname="yes" ],[ have_progname="no" ]) if test $have_progname = "yes"; then *************** *** 128,169 **** dnl ! if test -z "$dnet_prefix"; then ! ! AC_PATH_PROGS(DNET_PATH, dnet-config, [ "no" ]) ! if test $DNET_PATH = "no"; then ! dnl try linking by default path ! AC_CHECK_LIB(dnet, eth_open, DNET_LIB="-ldnet", ! AC_MSG_ERROR(`libdnet not found http://libdnet.sourceforge.net/ to get a copy', 1)) ! DNET_INC="" ! else DNET_LIB="`dnet-config --libs`" DNET_INC="`dnet-config --cflags`" ! fi ! else ! DNET_LIB="-L$dnet_prefix/lib -ldnet" ! DNET_INC="-I$dnet_prefix/include" ! fi AC_SUBST(PCAP_LIB) AC_SUBST(PCAP_INC) AC_SUBST(DNET_LIB) AC_SUBST(DNET_INC) ! AC_DEFINE_UNQUOTED(CLIENT_WORK_DIR, "$client_work_dir", [ default client work directory]) ! ! dnl kill defs ! DEFS="" ! AC_SUBST(DEFS) ! ! AM_CONFIG_HEADER(config.h) ! AC_OUTPUT([Makefile src/Makefile man/Makefile tests/Makefile]) echo --- 118,158 ---- dnl ! AC_PATH_PROGS(DNET_PATH, [dnet-config], [no]) ! if test $DNET_PATH = "no"; then ! AC_MSG_ERROR([libdnet not found. get a copy from http://libdnet.sourceforge.net]) ! else DNET_LIB="`dnet-config --libs`" DNET_INC="`dnet-config --cflags`" ! fi ! AC_PATH_PROGS(GUILE_PATH, [guile-config], [no]) ! if test $GUILE_PATH = "no"; then ! ! AC_MSG_ERROR([could not find guile on this system. get a copy from http://www.gnu.org/software/guile]) ! ! else ! ! GUILE_LIB="`guile-config link`" ! GUILE_INC="`guile-config compile`" fi + AC_DEFINE_UNQUOTED(CLIENT_WORK_DIR, ["/etc/dhcp-client"], [default client work directory]) + AC_SUBST(PCAP_LIB) AC_SUBST(PCAP_INC) AC_SUBST(DNET_LIB) AC_SUBST(DNET_INC) + AC_SUBST(GUILE_LIB) + AC_SUBST(GUILE_INC) ! AM_CONFIG_HEADER([config.h]) ! AC_CONFIG_FILES([Makefile src/Makefile man/Makefile tests/Makefile]) ! AC_OUTPUT echo |
From: <act...@us...> - 2003-05-11 07:51:30
|
Update of /cvsroot/dhcp-agent/dhcp-agent/conf In directory sc8-pr-cvs1:/tmp/cvs-serv6846 Added Files: networking-basic.sysconf Log Message: new scheme sysconf -- more changes needed though. |
From: <act...@us...> - 2003-05-11 07:50:38
|
Update of /cvsroot/dhcp-agent/dhcp-agent/conf In directory sc8-pr-cvs1:/tmp/cvs-serv6511 Modified Files: networking-basic.conf Removed Files: networking-basic.sysconf Log Message: no need for old sysconf recipes Index: networking-basic.conf =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/conf/networking-basic.conf,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** networking-basic.conf 3 Jan 2003 21:29:44 -0000 1.3 --- networking-basic.conf 11 May 2003 07:50:35 -0000 1.4 *************** *** 16,27 **** # - # # IP address requests are implicit we just ask for the other options below. # request subnet-mask, ip-address-lease-time, renewal-time, rebinding-time, ! domain-name-servers, domain-name, interface-mtu; - # # The require directive makes us ignore servers which do not return # all the options we ask for. Uncomment this to accept as --- 16,25 ---- # # IP address requests are implicit we just ask for the other options below. # request subnet-mask, ip-address-lease-time, renewal-time, rebinding-time, ! domain-name-servers, domain-name, interface-mtu, routers; # The require directive makes us ignore servers which do not return # all the options we ask for. Uncomment this to accept as *************** *** 32,36 **** domain-name-servers, domain-name; - # # Additional variable settings. # --- 30,33 ---- --- networking-basic.sysconf DELETED --- |
From: <act...@us...> - 2003-05-11 07:50:03
|
Update of /cvsroot/dhcp-agent/dhcp-agent/src In directory sc8-pr-cvs1:/tmp/cvs-serv6278 Modified Files: Makefile.am Log Message: added dhcp-client-guile.h Index: Makefile.am =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/Makefile.am,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Makefile.am 6 May 2003 03:49:16 -0000 1.19 --- Makefile.am 11 May 2003 07:50:00 -0000 1.20 *************** *** 16,20 **** dhcp-libutil.h dhcp-local.h dhcp-options-strings.h dhcp-print.h dhcp-cache-entry.h \ dhcp-client-conf.h dhcp-librawnet.h dhcp-limits.h dhcp-log.h dhcp-tokenizer.h \ ! dhcp-sysconf.h dhcp-conf.h dhcp-conf-var.h dhcp-option.h dhcp-option-convert.h --- 16,21 ---- dhcp-libutil.h dhcp-local.h dhcp-options-strings.h dhcp-print.h dhcp-cache-entry.h \ dhcp-client-conf.h dhcp-librawnet.h dhcp-limits.h dhcp-log.h dhcp-tokenizer.h \ ! dhcp-sysconf.h dhcp-conf.h dhcp-conf-var.h dhcp-option.h dhcp-option-convert.h \ ! dhcp-client-guile.h |
From: <act...@us...> - 2003-05-11 07:49:29
|
Update of /cvsroot/dhcp-agent/dhcp-agent/src In directory sc8-pr-cvs1:/tmp/cvs-serv6047 Modified Files: dhcp-client.c dhcp-client.h Log Message: hooked into guile now Index: dhcp-client.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-client.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** dhcp-client.c 6 May 2003 03:49:16 -0000 1.22 --- dhcp-client.c 11 May 2003 07:49:26 -0000 1.23 *************** *** 34,41 **** #include "dhcp-client-cache.h" #include "dhcp-client.h" #include "dhcp-daemon.h" - #include <libguile.h> - /* forward declarations of do_ routines. */ static void do_version(char *interface); --- 34,40 ---- #include "dhcp-client-cache.h" #include "dhcp-client.h" + #include "dhcp-client-guile.h" #include "dhcp-daemon.h" /* forward declarations of do_ routines. */ static void do_version(char *interface); *************** *** 495,498 **** --- 494,499 ---- INFO_MESSAGE("See LICENSE file for details."); INFO_MESSAGE(" "); + + dhcp_guile_init(); while((c = getopt(argc, argv, "tpcdavi:m:kwh:l:H:")) != -1) { Index: dhcp-client.h =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-client.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** dhcp-client.h 6 May 2003 03:49:16 -0000 1.13 --- dhcp-client.h 11 May 2003 07:49:26 -0000 1.14 *************** *** 133,138 **** extern void dhcp_client_control_set_context(dhcp_client_control_t *dc, dhcp_client_control_context_t *context); - /* guile interface. */ - extern void dhcp_sysconf_guile(dhcp_client_control_t *dc, list_t *options); - #endif /* DHCP_CLIENT_H */ --- 133,135 ---- |