dhcp-agent-commits Mailing List for dhcp-agent (Page 15)
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-07-05 19:17:04
|
Update of /cvsroot/dhcp-agent/dhcp-agent/src In directory sc8-pr-cvs1:/tmp/cvs-serv19891/src Modified Files: .cvsignore Makefile.am Log Message: added dhcp-server Index: .cvsignore =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/.cvsignore,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** .cvsignore 30 Oct 2002 04:56:05 -0000 1.4 --- .cvsignore 5 Jul 2003 19:17:01 -0000 1.5 *************** *** 4,7 **** --- 4,8 ---- dhcp-client dhcp-sniff + dhcp-server .libs *.la *.lo Index: Makefile.am =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/Makefile.am,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** Makefile.am 2 Jul 2003 15:24:02 -0000 1.26 --- Makefile.am 5 Jul 2003 19:17:01 -0000 1.27 *************** *** 22,26 **** 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 dhcp-lease.h \ ! dhcp-server.h dhcp-server-guile.h libdhcputil_la_SOURCES = dhcp-util.c \ --- 22,26 ---- 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 dhcp-lease.h \ ! dhcp-server.h dhcp-server-guile.h dhcp-server-conf.h libdhcputil_la_SOURCES = dhcp-util.c \ *************** *** 69,73 **** dhcp_server_SOURCES = dhcp-server.c \ ! dhcp-lease.c dhcp_client_LDADD = -ldhcputil ${GUILE_LIB} --- 69,75 ---- dhcp_server_SOURCES = dhcp-server.c \ ! dhcp-lease.c \ ! dhcp-server-conf.c \ ! dhcp-server-control.c dhcp_client_LDADD = -ldhcputil ${GUILE_LIB} |
From: <act...@us...> - 2003-07-05 19:16:48
|
Update of /cvsroot/dhcp-agent/dhcp-agent In directory sc8-pr-cvs1:/tmp/cvs-serv19792 Modified Files: configure.ac Makefile.am Log Message: added dhcp-server; added contrib Index: configure.ac =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/configure.ac,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** configure.ac 28 Jun 2003 17:54:49 -0000 1.11 --- configure.ac 5 Jul 2003 19:16:46 -0000 1.12 *************** *** 15,19 **** AC_PREREQ(2.57) AC_INIT([dhcp-agent],[0.39],[tm...@wh...]) ! AM_INIT_AUTOMAKE([dhcp-agent], [0.39]) AC_CONFIG_SRCDIR([src/dhcp-client.c]) --- 15,19 ---- AC_PREREQ(2.57) AC_INIT([dhcp-agent],[0.39],[tm...@wh...]) ! AM_INIT_AUTOMAKE([dhcp-agent], [0.40]) AC_CONFIG_SRCDIR([src/dhcp-client.c]) *************** *** 228,231 **** --- 228,233 ---- dhcpsysconf_clientdir="${dhcpsysconfdir}/dhcp-client" dhcplocalstate_clientdir="${dhcplocalstatedir}/dhcp-client" + dhcpsysconf_serverdir="${dhcpsysconfdir}/dhcp-server" + dhcplocalstate_serverdir="${dhcplocalstatedir}/dhcp-server" dhcpdocdir="/doc/dhcp-agent" *************** *** 239,244 **** --- 241,248 ---- AC_SUBST(dhcpsysconfdir) AC_SUBST(dhcpsysconf_clientdir) + AC_SUBST(dhcpsysconf_serverdir) AC_SUBST(dhcplocalstatedir) AC_SUBST(dhcplocalstate_clientdir) + AC_SUBST(dhcplocalstate_serverdir) AC_SUBST(infodir) AC_SUBST(dhcpdocdir) *************** *** 249,253 **** AC_CONFIG_HEADERS([config.h]) ! AC_CONFIG_FILES([Makefile src/Makefile man/Makefile tests/Makefile conf/Makefile doc/Makefile]) AC_OUTPUT --- 253,257 ---- AC_CONFIG_HEADERS([config.h]) ! AC_CONFIG_FILES([Makefile src/Makefile man/Makefile tests/Makefile conf/Makefile doc/Makefile contrib/Makefile]) AC_OUTPUT Index: Makefile.am =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/Makefile.am,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Makefile.am 20 May 2003 00:34:29 -0000 1.6 --- Makefile.am 5 Jul 2003 19:16:46 -0000 1.7 *************** *** 5,9 **** AUTOMAKE_OPTIONS = foreign ! SUBDIRS = src man tests conf doc EXTRA_DIST = CAVEATS LICENSE README THANKS TODO UPGRADING INSTALL CLEANFILES = stdint_marcos.h --- 5,10 ---- AUTOMAKE_OPTIONS = foreign ! SUBDIRS = src man tests conf doc contrib EXTRA_DIST = CAVEATS LICENSE README THANKS TODO UPGRADING INSTALL CLEANFILES = stdint_marcos.h + MOSTLYCLEANFILES = *~ config.h src/*~ contrib/*~ doc/*~ man/*~ tests/*~ |
From: <act...@us...> - 2003-07-05 19:16:26
|
Update of /cvsroot/dhcp-agent/dhcp-agent/doc In directory sc8-pr-cvs1:/tmp/cvs-serv19735/doc Modified Files: Makefile.am Log Message: fixed double slash in doc makefile Index: Makefile.am =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/doc/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile.am 27 Jun 2003 16:46:46 -0000 1.3 --- Makefile.am 5 Jul 2003 19:16:23 -0000 1.4 *************** *** 9,13 **** if HTMLDOC ! htmldir = $(prefix)/${dhcpdocdir} html_DATA = index.html $(shell ls dhcp-agent_*.html 2>/dev/null) --- 9,13 ---- if HTMLDOC ! htmldir = $(prefix)${dhcpdocdir} html_DATA = index.html $(shell ls dhcp-agent_*.html 2>/dev/null) |
From: <act...@us...> - 2003-07-05 18:53:40
|
Update of /cvsroot/dhcp-agent/dhcp-agent/doc In directory sc8-pr-cvs1:/tmp/cvs-serv16932/doc Modified Files: introduction.texi Log Message: added information on timeout-threshold and retries Index: introduction.texi =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/doc/introduction.texi,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** introduction.texi 5 Jul 2003 08:15:18 -0000 1.4 --- introduction.texi 5 Jul 2003 18:53:37 -0000 1.5 *************** *** 172,173 **** --- 172,200 ---- server notifying it that the lease is no longer in use. The client, also, unconfigures the host system its running on. + + @section Other Information Worth Noting. + + @subsection On Timeout Thresholds And Retries + + The dhcp-agent suite never allows the user to specify exact timeout + and retries for any of its operations. This is intentional. Instead, + the user can specify an upper timeout period called a threshold and a + retry counter which is decremented per amount of times the threshold + is reached. + + For example, in the client configuration you can specify the + @var{arp-retries} and @var{arp-timeout-threshold}. If you set the + retries to two, and the threshold to fifteen the client, when + performing an ARP operation will begin by transmitting the first + datagram, and then wait up to four seconds (default hard coded + setting: see dhcp-libutil.h). Then if this timeout is reached it will + double the timeout, add a small random amount to it, and try + again. When the timeout has reached fifteen seconds, it will consider + the operation to have timed out completely, and decrement its retry + counter. Then it starts again. + + A setting of one for retries, and ten for a timeout threshold will not + cause the client to just try once, but keep trying for up to ten + seconds using the back-off algorithm mentioned above. This algorithm + is mentioned in RFC2131 and implemented for compliance. It also makes + good sense for ethernet networks with high collisions. |
From: <act...@us...> - 2003-07-05 08:15:21
|
Update of /cvsroot/dhcp-agent/dhcp-agent/doc In directory sc8-pr-cvs1:/tmp/cvs-serv8853/doc Modified Files: introduction.texi Log Message: added write up on DHCP Index: introduction.texi =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/doc/introduction.texi,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** introduction.texi 28 Jun 2003 02:18:40 -0000 1.3 --- introduction.texi 5 Jul 2003 08:15:18 -0000 1.4 *************** *** 123,124 **** --- 123,173 ---- inaccuracy when calculating timeouts. Lobby your OpenBSD developers to stop the brain damage. + + @section Overview of DHCP + + DHCP (Dynamic Host Configuration Protocol) is a protocol designed to + assign host configuration parameters from a DHCP server to a DHCP + client. The parameters are passed as a lease to the client. The term + lease is used because the parameters usually have a finite + lifetime. This allows the network administrator to update the + configuration parameters, and later propogate the configuration + changes to the client hosts. + + DHCP is a convenient method of maintaining configuration across + multiple machines from a central configuration repository. + + @subsection Lease Acquisition + + The client begins by broadcasting a DHCP DISCOVER message, which + solicits DHCP leases from servers. + + DHCP OFFER messages are sent from DHCP servers to the client. + + The client picks one of the lease offers and responds with a DHCP + REQUEST. The server responds with a DHCP ACK to acknowledge, or + DHCP NACK to refuse assigning the lease. + + Once the client receives the acknowledgement it checks to see if the + IP address is currently active. If no address collision is detected, + the client performs its configuration based on the address passed from + the server and additional options provided in the lease. + + If address collision is detected, the client transmits a DHCP DECLINE + message informing the server that the lease is no good. + + @subsection Lease Renewal + + Each lease comes with three timers, a rebind, renew, and an expiry + timer. If no rebind or renew time is specified the client can create + default rebind and renew timers from the expiry time. + + When these timers are reached the client attempts to renew the lease + by transmitting a DHCP REQUEST and awaiting an acknowledgement. If the + timer expires and the lease is not renewed, the client undoes the + system configuration and revers to its lease acquisition stage. + + @subsection Lease Release + + When the client is shut down it sends a DHCP RELEASE message to the + server notifying it that the lease is no longer in use. The client, + also, unconfigures the host system its running on. |
From: <act...@us...> - 2003-07-02 15:24:11
|
Update of /cvsroot/dhcp-agent/dhcp-agent/src In directory sc8-pr-cvs1:/tmp/cvs-serv9182 Modified Files: Makefile.am Log Message: added initial server code Index: Makefile.am =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/Makefile.am,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** Makefile.am 25 Jun 2003 01:53:36 -0000 1.25 --- Makefile.am 2 Jul 2003 15:24:02 -0000 1.26 *************** *** 6,14 **** INCLUDES = ${PCAP_INC} ${DNET_INC} ${GUILE_INC} CPPFLAGS = -DDHCPSYSCONFDIR=\"${dhcpsysconfdir}\" -DDHCPSYSCONF_CLIENTDIR=\"${dhcpsysconf_clientdir}\" \ ! -DDHCPLOCALSTATEDIR=\"${dhcplocalstatedir}\" -DDHCPLOCALSTATE_CLIENTDIR=\"${dhcplocalstate_clientdir}\" AUTOMAKE_OPTIONS = foreign # Programs we are compiling. ! sbin_PROGRAMS = dhcp-sniff dhcp-client lib_LTLIBRARIES = libdhcputil.la --- 6,17 ---- INCLUDES = ${PCAP_INC} ${DNET_INC} ${GUILE_INC} CPPFLAGS = -DDHCPSYSCONFDIR=\"${dhcpsysconfdir}\" -DDHCPSYSCONF_CLIENTDIR=\"${dhcpsysconf_clientdir}\" \ ! -DDHCPSYSCONF_SERVERDIR=\"${dhcpsysconf_clientdir}\" \ ! -DDHCPLOCALSTATEDIR=\"${dhcplocalstatedir}\" -DDHCPLOCALSTATE_CLIENTDIR=\"${dhcplocalstate_clientdir}\" \ ! -DDHCPLOCALSTATE_SERVERDIR=\"${dhcplocalstate_clientdir}\" ! AUTOMAKE_OPTIONS = foreign # Programs we are compiling. ! sbin_PROGRAMS = dhcp-sniff dhcp-client dhcp-server lib_LTLIBRARIES = libdhcputil.la *************** *** 18,23 **** 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 ! libdhcputil_la_SOURCES = dhcp-util.c \ --- 21,26 ---- 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 dhcp-lease.h \ ! dhcp-server.h dhcp-server-guile.h libdhcputil_la_SOURCES = dhcp-util.c \ *************** *** 65,70 **** --- 68,77 ---- dhcp-client-guile.c + dhcp_server_SOURCES = dhcp-server.c \ + dhcp-lease.c + dhcp_client_LDADD = -ldhcputil ${GUILE_LIB} dhcp_sniff_LDADD = -ldhcputil + dhcp_server_LDADD = -ldhcputil ${GUILE_LIB} libdhcputil_la_LIBADD = ${PCAP_LIB} ${DNET_LIB} |
From: <act...@us...> - 2003-07-02 15:23:44
|
Update of /cvsroot/dhcp-agent/dhcp-agent/src In directory sc8-pr-cvs1:/tmp/cvs-serv9106 Added Files: dhcp-lease.c dhcp-lease.h dhcp-server.c dhcp-server.h dhcp-server-guile.h Log Message: initial server/lease management code --- NEW FILE: dhcp-lease.c --- /* $Header: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-lease.c,v 1.1 2003/07/02 15:23:30 actmodern Exp $ * * Copyright 2002 Thamer Alharbash * * 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. * */ #define MODULE_NAME "dhcp-lease" #include "dhcp-local.h" #include "dhcp-libutil.h" #include "dhcp-librawnet.h" #include "dhcp-lease.h" #include "dhcp-option.h" /* * * * * * * * * * * * public interface. * * * * * * * * * * * */ lease_constraint_t *lease_constraint_create(int constraint_type, void *data) { lease_constraint_t *constraint = xcalloc(sizeof(lease_constraint_t)); char *hostname; constraint->constraint_type = constraint_type; switch(constraint_type) { case LEASE_CONSTRAINT_HARDWARE_ADDRESS: memcpy(&constraint->data.hw_address.data, data, ETH_ADDR_LEN); break; case LEASE_CONSTRAINT_HOSTNAME: hostname = data; constraint->data.hostname = xstrdup(hostname); break; default: FATAL_MESSAGE("illegal constraint type passed. this is a bug report me."); } return constraint; } void lease_constraint_destroy(lease_constraint_t *constraint) { switch(constraint->constraint_type) { case LEASE_CONSTRAINT_HOSTNAME: xfree(constraint->data.hostname); break; case LEASE_CONSTRAINT_HARDWARE_ADDRESS: /* fall through. */ case LEASE_CONSTRAINT_NONE: /* fall through. */ default: break; } xfree(constraint); return; } lease_definition_t *lease_definition_create(lease_constraint_t *constraint, ip_addr_t ip_addr_range, list_t *options, uint32_t lease_expiry, uint32_t renew_time, uint32_t rebind_time) { dhcp_opt_t *opt, *opt_copy; lease_definition_t *lease_def; lease_def = xcalloc(sizeof(lease_definition_t)); lease_def->constraint = constraint; lease_def->addr_range = ip_addr_range; /* copy our dhcp options we'll pass. */ lease_def->options = list_create(); list_rewind(options); while((opt = list_next(options)) != NULL) { opt_copy = dhcp_option_copy(opt); list_add_to_end(lease_def->options, opt_copy); } /* FIXME: set renew/rebind to defaults if they are passed as zero. */ lease_def->lease_expiry = lease_expiry; lease_def->renew_time = lease_expiry; lease_def->rebind_time = lease_expiry; return lease_def; } void lease_definition_destroy(lease_definition_t *lease_def) { if(lease_def->constraint != NULL) lease_constraint_destroy(lease_def->constraint); dhcp_opt_destroy_option_list(lease_def->options); xfree(lease_def); return; } --- NEW FILE: dhcp-lease.h --- /* $Header: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-lease.h,v 1.1 2003/07/02 15:23:30 actmodern Exp $ * * Copyright 2002 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. * * DHCP lease data structures and routines. */ #ifndef DHCP_LEASE_H #define DHCP_LEASE_H /* constraints placed on a lease. */ typedef struct { int constraint_type; /* constraint type. */ union { eth_addr_t hw_address; /* hardware address. */ char *hostname; /* hostname. */ } data; } lease_constraint_t; /* lease defintion. */ typedef struct { lease_constraint_t *constraint; /* constraints if any. */ ip_addr_t addr_range; /* address range. */ list_t *options; /* options to be passed. */ uint32_t lease_expiry; /* lease expiry time. */ uint32_t renew_time; /* renewal time. */ uint32_t rebind_time; /* rebind time. */ } lease_definition_t; /* assigned lease data. */ typedef struct { lease_definition_t *defintion; /* lease definition. */ time_t ini_assigned; /* initially assigned timestamp. */ time_t last_assigned; /* last assigned timestamp. */ } assigned_lease_data_t; /* constants. */ enum lease_constraint_type { LEASE_CONSTRAINT_NONE = 0, LEASE_CONSTRAINT_HARDWARE_ADDRESS, LEASE_CONSTRAINT_HOSTNAME }; /* prototypes. */ extern lease_constraint_t *lease_constraint_create(int constraint_type, void *data); extern void lease_constraint_destroy(lease_constraint_t *lease_constraint); extern lease_definition_t *lease_definition_create(lease_constraint_t *constraint, ip_addr_t ip_addr_range, list_t *options, uint32_t lease_expiry, uint32_t renew_time, uint32_t rebind_time); extern void lease_definition_destroy(lease_definition_t *lease_def); #endif /* DHCP_LEASE_H */ --- NEW FILE: dhcp-server.c --- /* $Header: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-server.c,v 1.1 2003/07/02 15:23:30 actmodern Exp $ * * Copyright 2002 Thamer Alharbash * * 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. * */ #include "dhcp-local.h" #include "dhcp-libutil.h" #include "dhcp-librawnet.h" #include "dhcp-lease.h" #include "dhcp-server.h" #include "dhcp-server-guile.h" /* global vars affecting other code. */ char *work_dir = DHCPLOCALSTATE_SERVERDIR; /* our default working directory */ #if !defined(HAVE_PROGNAME) const char *__progname; #endif /* HAVE_PROGNAME */ static unsigned char want_background = 1; /* whether we should go into the background. */ static void do_version(char *interface); static void do_status(char *interface_name); static void do_kill(char *interface_name); static void do_server(char *interface_name); static const char *command_string[] = { "version", "kill", "status", "do server" }; /* table of functions indexed by command codes. */ server_command commands[] = { do_version, /* print out version information. */ do_kill, /* kill server. */ do_status, /* do status. */ do_server, /* do server. */ }; /* print usage info. */ static void usage(char *s) { printf("usage: %s [-aks]\n", s); exit(0); } /* print out version information and exit. */ static void do_version(char *interface) { INFO_MESSAGE("%s version: %s\n", getprogname(), VERSION); } static void do_status(char *interface_name) { INFO_MESSAGE("not implemented yet."); return; } static void do_kill(char *interface_name) { INFO_MESSAGE("not implemented yet."); return; } static void do_server(char *interface_name) { INFO_MESSAGE("not implemented yet."); return; } /* main function: called from scm_boot_guile */ static void real_main(void *closure, int argc, char *argv[]) { int c, command_code = DO_SERVER; char *interface_name = NULL; list_t *interface_list; INFO_MESSAGE("(C) 2003 Thamer Al-Harbash <tm...@wh...>"); INFO_MESSAGE("See LICENSE file for details."); INFO_MESSAGE(" "); while((c = getopt(argc, argv, "vskai:")) != -1) { switch(c) { case 'k': /* kill server. */ command_code = DO_KILL; break; case 's': command_code = DO_STATUS; break; case 'v': command_code = DO_VERSION; break; case 'i': interface_name = xstrdup(optarg); break; case 'a': /* don't fork into the background. */ want_background = 0; break; default: usage(argv[0]); } } /* if all the user wants is version information, give it to him. */ if(command_code == DO_VERSION) { do_version(NULL); exit(0); } /* otherwise anything else requires an up interface. */ if(interface_name == NULL) { interface_list = rawnet_list_active_interfaces(); if(list_get_len(interface_list) == 0) { ERROR_MESSAGE("could not find suitable interface to use while running command: %s", command_string[command_code]); } interface_name = xstrdup(list_first(interface_list)); list_destroy(interface_list, xfree); } /* now that we have an active interface name, go ahead * and run the server command. */ commands[command_code](interface_name); exit(0); } /* actual main: boot guile up so it knows where the bottom of the stack is. */ int main(int argc, char *argv[]) { scm_boot_guile(argc, argv, real_main, NULL); /* get rid of compiler warning. */ exit(1); } --- NEW FILE: dhcp-server.h --- /* $Header: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-server.h,v 1.1 2003/07/02 15:23:30 actmodern Exp $ * * Copyright 2002 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. * */ #ifndef DHCP_SERVER_H #define DHCP_SERVER_H enum command_codes { DO_VERSION = 0, DO_KILL, DO_STATUS, DO_SERVER }; typedef void (*server_command) (char *interface); typedef struct { rawnet_t *rawnet; /* raw network handle * / char *interface_name; /* name of interface */ } dhcp_server_control_t; #endif /* DHCP_SERVER_H */ --- NEW FILE: dhcp-server-guile.h --- /* $Header: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-server-guile.h,v 1.1 2003/07/02 15:23:30 actmodern Exp $ * * 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. * */ #ifndef DHCP_SERVER_GUILE_H #define DHCP_SERVER_GUILE_H #include <libguile.h> #endif /* DHCP_SERVER_GUILE_H */ |
From: <act...@us...> - 2003-07-02 15:18:28
|
Update of /cvsroot/dhcp-agent/dhcp-agent/src In directory sc8-pr-cvs1:/tmp/cvs-serv7991 Modified Files: dhcp-client.c dhcp-libutil.h dhcp-util.c Log Message: moved change_dir to utility code Index: dhcp-client.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-client.c,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** dhcp-client.c 26 Jun 2003 23:56:42 -0000 1.31 --- dhcp-client.c 2 Jul 2003 15:18:22 -0000 1.32 *************** *** 337,355 **** } - /* change int our working directory. */ - static void do_change_work_dir(void) - { - /* 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); - } - - if(chdir(work_dir) < 0) - FATAL_MESSAGE("cannot enter work directory", work_dir); - - return; - } - /* do client: perform dhcp client proper functions. */ static void do_client(char *interface) --- 337,340 ---- *************** *** 482,486 **** #endif /* HAVE_PROGNAME */ ! INFO_MESSAGE("(C) 2002 Thamer Al-Harbash <tm...@wh...>"); INFO_MESSAGE("See LICENSE file for details."); INFO_MESSAGE(" "); --- 467,471 ---- #endif /* HAVE_PROGNAME */ ! INFO_MESSAGE("(C) 2003 Thamer Al-Harbash <tm...@wh...>"); INFO_MESSAGE("See LICENSE file for details."); INFO_MESSAGE(" "); *************** *** 541,545 **** } ! do_change_work_dir(); /* get interface if not specified. */ --- 526,536 ---- } ! /* if all the user wants is version information, give it to him. */ ! if(command_code == DO_VERSION) { ! do_version(NULL); ! exit(0); ! } ! ! do_change_work_dir(work_dir); /* get interface if not specified. */ Index: dhcp-libutil.h =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-libutil.h,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** dhcp-libutil.h 26 Jun 2003 23:56:42 -0000 1.27 --- dhcp-libutil.h 2 Jul 2003 15:18:22 -0000 1.28 *************** *** 196,199 **** --- 196,200 ---- extern char *ip_addr_to_string(ip_addr_t ip_addr); extern void sleep_random(uint16_t max_sleep); + extern void do_change_work_dir(const char *dir); /* type check routines */ Index: dhcp-util.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-util.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** dhcp-util.c 26 Jun 2003 23:56:42 -0000 1.16 --- dhcp-util.c 2 Jul 2003 15:18:22 -0000 1.17 *************** *** 587,588 **** --- 587,603 ---- sleep((get_random_uint16()%(max_sleep + 1)) + 1); } + + /* change int our working directory. */ + void do_change_work_dir(const char *work_dir) + { + /* 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); + } + + if(chdir(work_dir) < 0) + FATAL_MESSAGE("cannot enter work directory", work_dir); + + return; + } |
From: <act...@us...> - 2003-06-29 01:33:37
|
Update of /cvsroot/dhcp-agent/dhcp-agent/man In directory sc8-pr-cvs1:/tmp/cvs-serv23937/man Modified Files: dhcp-client.1.in Log Message: fixed typo Index: dhcp-client.1.in =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/man/dhcp-client.1.in,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** dhcp-client.1.in 19 May 2003 23:38:50 -0000 1.1 --- dhcp-client.1.in 29 Jun 2003 01:33:34 -0000 1.2 *************** *** 48,52 **** installed as info pages in .B @-infodir-@ ! or and optionally as HTML pages in .B @-dhcpdocdir-@ The accompanying manual is more expository than the man pages --- 48,52 ---- installed as info pages in .B @-infodir-@ ! and optionally as HTML pages in .B @-dhcpdocdir-@ The accompanying manual is more expository than the man pages |
From: <act...@us...> - 2003-06-29 01:33:22
|
Update of /cvsroot/dhcp-agent/dhcp-agent/doc In directory sc8-pr-cvs1:/tmp/cvs-serv23913/doc Modified Files: dhcp-client.texi Log Message: added client-do-measure-icmp-latency Index: dhcp-client.texi =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/doc/dhcp-client.texi,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** dhcp-client.texi 28 Jun 2003 17:53:13 -0000 1.5 --- dhcp-client.texi 29 Jun 2003 01:33:19 -0000 1.6 *************** *** 667,673 **** @deffn {Client Sysconf Routine} client-discover-icmp-latency client-control address-list ! Accepts an @var{address-list} and performs ICMP ECHO latency tests to ! determine which host is responding fastest. A list is returned with ! the quickest responders first. @end deffn --- 667,680 ---- @deffn {Client Sysconf Routine} client-discover-icmp-latency client-control address-list ! Accepts a list of addresses @var{address-list} and performs ICMP ECHO ! latency tests to determine which host is responding fastest. A list of ! address/average-latency pairs is returned. ! ! @end deffn ! ! @deffn {Client Sysconf Routine} client-do-discover-icmp-latency client-control ! ! Returns #t if the user enabled ``do-measure-router-latency'' or #f if ! not. @end deffn |
From: <act...@us...> - 2003-06-28 17:54:52
|
Update of /cvsroot/dhcp-agent/dhcp-agent In directory sc8-pr-cvs1:/tmp/cvs-serv31330 Modified Files: THANKS configure.ac Log Message: update to 0.39 Index: THANKS =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/THANKS,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** THANKS 30 Dec 2002 00:43:57 -0000 1.2 --- THANKS 28 Jun 2003 17:54:49 -0000 1.3 *************** *** 21,22 **** --- 21,24 ---- -- Marco Rodrigues for building me a serial console to my sparc5 box. + + -- Jon Nistor, for helpful bug reports and patience during testing. Index: configure.ac =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/configure.ac,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** configure.ac 25 Jun 2003 01:53:36 -0000 1.10 --- configure.ac 28 Jun 2003 17:54:49 -0000 1.11 *************** *** 14,19 **** 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]) --- 14,19 ---- AC_PREREQ(2.57) ! AC_INIT([dhcp-agent],[0.39],[tm...@wh...]) ! AM_INIT_AUTOMAKE([dhcp-agent], [0.39]) AC_CONFIG_SRCDIR([src/dhcp-client.c]) |
From: <act...@us...> - 2003-06-28 17:53:16
|
Update of /cvsroot/dhcp-agent/dhcp-agent/doc In directory sc8-pr-cvs1:/tmp/cvs-serv31158/doc Modified Files: dhcp-client.texi Log Message: updated documentation to reflect absence of require rule Index: dhcp-client.texi =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/doc/dhcp-client.texi,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** dhcp-client.texi 28 Jun 2003 02:18:40 -0000 1.4 --- dhcp-client.texi 28 Jun 2003 17:53:13 -0000 1.5 *************** *** 249,256 **** @deffn {Client Configuration Directive} require ! This 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 --- 249,257 ---- @deffn {Client Configuration Directive} require ! This 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. If this directive is not set, ! the first DHCP lease offer will be accepted. @example |
From: <act...@us...> - 2003-06-28 17:50:10
|
Update of /cvsroot/dhcp-agent/dhcp-agent/src In directory sc8-pr-cvs1:/tmp/cvs-serv30890/src Modified Files: dhcp-client-states.c Log Message: lack of required directive now means we accept everything Index: dhcp-client-states.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-client-states.c,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** dhcp-client-states.c 27 Jun 2003 20:59:17 -0000 1.43 --- dhcp-client-states.c 28 Jun 2003 17:50:06 -0000 1.44 *************** *** 459,467 **** if(required_options == NULL) { ! /* if not we ask for our requested options and pick from there. */ ! /* FIXME: it should be configurable that we accept any response. */ ! WARN_MESSAGE("requiring all requested options since no required options have been configured explicity."); ! required_options = client_conf_get_request_opt_bit_array(dc->conf); ! } /* build our received options array. */ --- 459,465 ---- if(required_options == NULL) { ! WARN_MESSAGE("no required options set. accepting first response."); ! return 1; ! } /* build our received options array. */ |
From: <act...@us...> - 2003-06-28 17:50:09
|
Update of /cvsroot/dhcp-agent/dhcp-agent/conf In directory sc8-pr-cvs1:/tmp/cvs-serv30890/conf Modified Files: default.conf Log Message: lack of required directive now means we accept everything Index: default.conf =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/conf/default.conf,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** default.conf 27 Jun 2003 03:18:45 -0000 1.3 --- default.conf 28 Jun 2003 17:50:06 -0000 1.4 *************** *** 22,33 **** 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. # --- 22,25 ---- |
From: <act...@us...> - 2003-06-28 17:40:13
|
Update of /cvsroot/dhcp-agent/dhcp-agent/src In directory sc8-pr-cvs1:/tmp/cvs-serv29703/src Modified Files: dhcp-client-guile.c Log Message: code clean up Index: dhcp-client-guile.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-client-guile.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** dhcp-client-guile.c 28 Jun 2003 17:33:55 -0000 1.10 --- dhcp-client-guile.c 28 Jun 2003 17:40:10 -0000 1.11 *************** *** 160,166 **** /* do assertions */ SCM_ASSERT(SCM_SMOB_PREDICATE(client_control_tag, scm_dc), ! scm_dc, SCM_ARG1, "client-interface-up"); ! SCM_ASSERT(SCM_SYMBOLP(scm_option), scm_option, SCM_ARG2, "client-interface-up"); client_control_smob = (client_control_smob_t *)SCM_SMOB_DATA(scm_dc); --- 160,166 ---- /* do assertions */ SCM_ASSERT(SCM_SMOB_PREDICATE(client_control_tag, scm_dc), ! scm_dc, SCM_ARG1, "client-configure?"); ! SCM_ASSERT(SCM_SYMBOLP(scm_option), scm_option, SCM_ARG2, "client-configure?"); client_control_smob = (client_control_smob_t *)SCM_SMOB_DATA(scm_dc); *************** *** 200,204 **** /* do assertions */ SCM_ASSERT(SCM_SMOB_PREDICATE(client_control_tag, scm_dc), ! scm_dc, SCM_ARG1, "client-interface-up"); client_control_smob = (client_control_smob_t *)SCM_SMOB_DATA(scm_dc); --- 200,204 ---- /* do assertions */ SCM_ASSERT(SCM_SMOB_PREDICATE(client_control_tag, scm_dc), ! scm_dc, SCM_ARG1, "client-get-default-mtu"); client_control_smob = (client_control_smob_t *)SCM_SMOB_DATA(scm_dc); *************** *** 219,223 **** /* do assertions */ SCM_ASSERT(SCM_SMOB_PREDICATE(client_control_tag, scm_dc), ! scm_dc, SCM_ARG1, "client-interface-up"); client_control_smob = (client_control_smob_t *)SCM_SMOB_DATA(scm_dc); --- 219,223 ---- /* do assertions */ SCM_ASSERT(SCM_SMOB_PREDICATE(client_control_tag, scm_dc), ! scm_dc, SCM_ARG1, "client-get-default-subnet-mask"); client_control_smob = (client_control_smob_t *)SCM_SMOB_DATA(scm_dc); *************** *** 372,376 **** } ! SCM scm_client_shutdown(SCM scm_dc) { client_control_smob_t *client_control_smob; --- 372,376 ---- } ! SCM dhcp_scm_client_shutdown(SCM scm_dc) { client_control_smob_t *client_control_smob; *************** *** 391,395 **** } ! SCM scm_client_do_discover_icmp_latency(SCM scm_dc) { client_control_smob_t *client_control_smob; --- 391,395 ---- } ! SCM dhcp_scm_client_do_discover_icmp_latency(SCM scm_dc) { client_control_smob_t *client_control_smob; *************** *** 414,418 **** } ! SCM scm_client_discover_icmp_latency(SCM scm_dc, SCM scm_address_list) { client_control_smob_t *client_control_smob; --- 414,418 ---- } ! SCM dhcp_scm_client_discover_icmp_latency(SCM scm_dc, SCM scm_address_list) { client_control_smob_t *client_control_smob; *************** *** 468,472 **** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ ! static SCM scm_client_info_message(SCM string) { char *str; --- 468,472 ---- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ ! static SCM dhcp_scm_client_info_message(SCM string) { char *str; *************** *** 479,483 **** } ! static SCM scm_client_error_message(SCM string) { char *str; --- 479,483 ---- } ! static SCM dhcp_scm_client_error_message(SCM string) { char *str; *************** *** 490,494 **** } ! static SCM scm_client_fatal_error_message(SCM string) { char *str; --- 490,494 ---- } ! static SCM dhcp_scm_client_fatal_error_message(SCM string) { char *str; *************** *** 785,795 **** scm_c_define_gsubr("client-get-default-mtu", 1, 0, 0, dhcp_scm_get_default_mtu); scm_c_define_gsubr("client-get-default-subnet-mask", 1, 0, 0, dhcp_scm_get_default_subnet_mask); ! scm_c_define_gsubr("client-do-discover-icmp-latency?", 1, 0, 0, scm_client_do_discover_icmp_latency); scm_c_define_gsubr("client-configure?", 2, 0, 0, dhcp_scm_configurep); ! scm_c_define_gsubr("client-info-message", 1, 0, 0, scm_client_info_message); ! scm_c_define_gsubr("client-error-message", 1, 0, 0, scm_client_error_message); ! scm_c_define_gsubr("client-fatal-error-message", 1, 0, 0, scm_client_fatal_error_message); ! scm_c_define_gsubr("client-shutdown", 1, 0, 0, scm_client_shutdown); ! scm_c_define_gsubr("client-discover-icmp-latency", 2, 0, 0, scm_client_discover_icmp_latency); /* create hooks. */ --- 785,795 ---- scm_c_define_gsubr("client-get-default-mtu", 1, 0, 0, dhcp_scm_get_default_mtu); scm_c_define_gsubr("client-get-default-subnet-mask", 1, 0, 0, dhcp_scm_get_default_subnet_mask); ! scm_c_define_gsubr("client-do-discover-icmp-latency?", 1, 0, 0, dhcp_scm_client_do_discover_icmp_latency); scm_c_define_gsubr("client-configure?", 2, 0, 0, dhcp_scm_configurep); ! scm_c_define_gsubr("client-info-message", 1, 0, 0, dhcp_scm_client_info_message); ! scm_c_define_gsubr("client-error-message", 1, 0, 0, dhcp_scm_client_error_message); ! scm_c_define_gsubr("client-fatal-error-message", 1, 0, 0, dhcp_scm_client_fatal_error_message); ! scm_c_define_gsubr("client-shutdown", 1, 0, 0, dhcp_scm_client_shutdown); ! scm_c_define_gsubr("client-discover-icmp-latency", 2, 0, 0, dhcp_scm_client_discover_icmp_latency); /* create hooks. */ |
From: <act...@us...> - 2003-06-28 17:33:58
|
Update of /cvsroot/dhcp-agent/dhcp-agent/conf In directory sc8-pr-cvs1:/tmp/cvs-serv28928/conf Modified Files: default.sysconf Log Message: now correctly checking do-measure-router-latency Index: default.sysconf =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/conf/default.sysconf,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** default.sysconf 25 Jun 2003 02:31:43 -0000 1.8 --- default.sysconf 28 Jun 2003 17:33:55 -0000 1.9 *************** *** 107,113 **** (lambda() (if (do-configure) ! (let ((routers (sort (client-discover-icmp-latency client-control dhcp-routers) ! (lambda (x y) (< (car x) (car y)))))) ! (if (null? routers) (begin --- 107,114 ---- (lambda() (if (do-configure) ! (let ((routers (if (client-do-discover-icmp-latency? client-control) ! (sort (client-discover-icmp-latency client-control dhcp-routers) ! (lambda (x y) (< (car x) (car y)))) ! (list (list 1 (car dhcp-routers)))))) (if (null? routers) (begin |
From: <act...@us...> - 2003-06-28 17:33:58
|
Update of /cvsroot/dhcp-agent/dhcp-agent/src In directory sc8-pr-cvs1:/tmp/cvs-serv28928/src Modified Files: dhcp-client-guile.c Log Message: now correctly checking do-measure-router-latency Index: dhcp-client-guile.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-client-guile.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** dhcp-client-guile.c 25 Jun 2003 02:20:44 -0000 1.9 --- dhcp-client-guile.c 28 Jun 2003 17:33:55 -0000 1.10 *************** *** 391,394 **** --- 391,417 ---- } + SCM scm_client_do_discover_icmp_latency(SCM scm_dc) + { + client_control_smob_t *client_control_smob; + dhcp_client_control_t *dc; + + /* do assertions */ + SCM_ASSERT(SCM_SMOB_PREDICATE(client_control_tag, scm_dc), + scm_dc, SCM_ARG1, "client-do-discover-icmp-latency"); + + /* client control. */ + client_control_smob = (client_control_smob_t *)SCM_SMOB_DATA(scm_dc); + dc = client_control_smob->dc; + + if(client_conf_get_do_measure_router_latency_icmp(dc->conf, + dhcp_client_get_server_ip_address(dc), + dhcp_client_get_server_hw_address(dc))) { + return SCM_BOOL_T; + } else { + return SCM_BOOL_F; + } + + } + SCM scm_client_discover_icmp_latency(SCM scm_dc, SCM scm_address_list) { *************** *** 762,765 **** --- 785,789 ---- scm_c_define_gsubr("client-get-default-mtu", 1, 0, 0, dhcp_scm_get_default_mtu); scm_c_define_gsubr("client-get-default-subnet-mask", 1, 0, 0, dhcp_scm_get_default_subnet_mask); + scm_c_define_gsubr("client-do-discover-icmp-latency?", 1, 0, 0, scm_client_do_discover_icmp_latency); scm_c_define_gsubr("client-configure?", 2, 0, 0, dhcp_scm_configurep); scm_c_define_gsubr("client-info-message", 1, 0, 0, scm_client_info_message); |
From: <act...@us...> - 2003-06-28 16:44:16
|
Update of /cvsroot/dhcp-agent/dhcp-agent/src In directory sc8-pr-cvs1:/tmp/cvs-serv17653/src Modified Files: dhcp-sniff.c Log Message: fixed usage info on dhcp-sniff Index: dhcp-sniff.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-sniff.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** dhcp-sniff.c 3 Jan 2003 21:29:22 -0000 1.7 --- dhcp-sniff.c 28 Jun 2003 16:30:01 -0000 1.8 *************** *** 43,47 **** static void usage(char *n) { ! fprintf(stderr, "usage: %s [-p] [-i interface_name ]\n", n); exit(1); } --- 43,47 ---- static void usage(char *n) { ! fprintf(stderr, "usage: %s [-bv] [-i interface_name ]\n", n); exit(1); } |
From: <act...@us...> - 2003-06-28 15:20:29
|
Update of /cvsroot/dhcp-agent/dhcp-agent/man In directory sc8-pr-cvs1:/tmp/cvs-serv8655 Modified Files: dhcp-sniff.1.in Log Message: fixed typo, thanks Jon Nistor <ni...@sn...> Index: dhcp-sniff.1.in =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/man/dhcp-sniff.1.in,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** dhcp-sniff.1.in 19 May 2003 23:38:50 -0000 1.1 --- dhcp-sniff.1.in 28 Jun 2003 15:12:04 -0000 1.2 *************** *** 56,60 **** .TP .B -b ! Run dhcp-sniff in brief mode. This mode prints everything on on line. .TP .B -i interface --- 56,60 ---- .TP .B -b ! Run dhcp-sniff in brief mode. This mode prints everything on line. .TP .B -i interface |
From: <act...@us...> - 2003-06-28 04:41:05
|
Update of /cvsroot/dhcp-agent/dhcp-agent/contrib In directory sc8-pr-cvs1:/tmp/cvs-serv10693/contrib Added Files: default.conf.rogers-toronto Log Message: added rogers configuration file for toronto cable modem users -- thanks Jon Nistor <ni...@sn...> --- NEW FILE: default.conf.rogers-toronto --- # $Header: /cvsroot/dhcp-agent/dhcp-agent/contrib/default.conf.rogers-toronto,v 1.1 2003/06/28 04:13:08 actmodern Exp $ # # CONTRIB: Jon Nistor <ni...@sn...> # # CONF: defaults.conf configured for Rogers Cable # # OPTIONS: # ip-address, subnet mask, lease time, renewal time, rebinding time, # interface mtu, domain name, domain name server # # IP address requests are implicit we just ask for the other options below. request subnet-mask, ip-address-lease-time, renewal-time, domain-name, routers; # For the time being it fails on getting interface-mtu and domain-name-servers # even though they do show up in /etc/resolv.conf; however they do now show up # when dhcp-sniff is run. require subnet-mask, ip-address-lease-time, renewal-time, domain-name, routers; set default-interface-mtu = 1500; # Router discovery -- should we use ICMP to find the best router? # answer: no, because they'll only be one on Rogers. enable do-measure-router-latency = no; # Default ARP settings are pretty generous. Unless you experience # problems this should suffice for most networks which don't have # excessive packet loss set arp-retries = 1; set arp-timeout-threshold = 10; # EOF |
From: <act...@us...> - 2003-06-28 04:12:18
|
Update of /cvsroot/dhcp-agent/dhcp-agent/contrib In directory sc8-pr-cvs1:/tmp/cvs-serv10621/contrib Log Message: Directory /cvsroot/dhcp-agent/dhcp-agent/contrib added to the repository |
From: <act...@us...> - 2003-06-28 02:21:32
|
Update of /cvsroot/dhcp-agent/dhcp-agent In directory sc8-pr-cvs1:/tmp/cvs-serv427 Modified Files: README INSTALL Log Message: more to the top level documentation Index: README =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/README,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** README 28 Jun 2003 02:19:15 -0000 1.8 --- README 28 Jun 2003 02:21:29 -0000 1.9 *************** *** 77,80 **** --- 77,87 ---- a warm fuzzy feeling. + Contributing + ------------ + + dhcp-agent is free software. If you find it useful consider + contributing back patches, comments, bug reports, or becoming + involved with its development. + -- Thamer Alharbash <tm...@wh...> Index: INSTALL =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/INSTALL,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** INSTALL 9 Jun 2003 02:02:50 -0000 1.2 --- INSTALL 28 Jun 2003 02:21:29 -0000 1.3 *************** *** 71,74 **** --- 71,80 ---- http://www.mathematik.uni-kl.de/~obachman/Texi2html + --enable-fail-on-warning + + Passes -Werror to the compiler. The GCC compiler will + fail on any warning. Other compilers may not like the + option. + -- Thamer Alharbash <tm...@wh...> |
From: <act...@us...> - 2003-06-28 02:19:17
|
Update of /cvsroot/dhcp-agent/dhcp-agent In directory sc8-pr-cvs1:/tmp/cvs-serv32633 Modified Files: README Log Message: added note about documentation in README Index: README =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/README,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** README 17 Jun 2003 07:35:03 -0000 1.7 --- README 28 Jun 2003 02:19:15 -0000 1.8 *************** *** 55,58 **** --- 55,70 ---- am slower than a greater collective of users. + Documentation + ------------- + + dhcp-agent ships with man pages, which contain some brief + reference documentation, and a texinfo manual. The texinfo manual + is installed in your systems info directory and can be read with + info reads such as "info" or "emacs." + + See the INSTALL file to find which "configure" option you should + pass to convert the info manual into HTML if you prefer it in + that format. + About the license ----------------- *************** *** 66,68 **** -- ! Thamer Alharbash <sh...@wh...> --- 78,80 ---- -- ! Thamer Alharbash <tm...@wh...> |
From: <act...@us...> - 2003-06-28 02:18:43
|
Update of /cvsroot/dhcp-agent/dhcp-agent/doc In directory sc8-pr-cvs1:/tmp/cvs-serv32569/doc Modified Files: dhcp-sniff.texi dhcp-client.texi introduction.texi Log Message: more documentation Index: dhcp-sniff.texi =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/doc/dhcp-sniff.texi,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** dhcp-sniff.texi 18 May 2003 03:18:10 -0000 1.1 --- dhcp-sniff.texi 28 Jun 2003 02:18:40 -0000 1.2 *************** *** 4,8 **** @cindex dhcp-sniff ! @section Quickstart ! --- 4,7 ---- @cindex dhcp-sniff ! [ TODO ] Index: dhcp-client.texi =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/doc/dhcp-client.texi,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** dhcp-client.texi 27 Jun 2003 16:46:46 -0000 1.3 --- dhcp-client.texi 28 Jun 2003 02:18:40 -0000 1.4 *************** *** 80,84 **** @subsection Command Line Options ! [ TODO ] @subsection The Configuration File --- 80,153 ---- @subsection Command Line Options ! @itemize ! ! @item ! -h Print out usage. ! ! ! @item ! -v Print out version information ! ! ! @item ! -a ! ! Always run in the foreground and do not go into the background. ! ! ! ! @item ! -c ! ! Clear the cache. This is useful in case a stale cache is left behind ! by an earlier invocation. ! ! @item ! ! -k ! ! Kill a dhcp-client instance. Coupled with the -i option this will kill ! a specific instance of dhcp-client. Otherwise the first dhcp-client ! found on an active ethernet interface is terminated. ! ! @item ! -p ! ! Forces dhcp-client to use promiscious mode. This is only useful on ! systems which are sufficiently broken that require promiscious mode ! to receive broadcast messages. ! ! @item ! -w ! ! Wake a dhcp-client instance. Coupled with the -i option this will wake ! up a client on a specified interface and cause it to either rebind, or ! renew earlier depending on which timer is next. Use this to force the ! client to reacquire a lease. ! ! @item ! -i @dfn{interface} ! ! Force dhcp-client to use the interface specified. This is useful to ! make sure dhcp-client uses a specific interface if the host is ! multi-homed. ! ! @item ! -l @dfn{level} ! ! Generate messages at the level specified. The level should be an ! integer between 0 - 4. The levels are no messages, error messages, ! info messages (default), warnings, diagnostic-messages, respectively. ! Each level includes all messages below it. The default is info ! messages which also include error messages. ! ! @item ! -m @dfn{mac address} ! ! Fake a mac address during the DHCP operation. This will only affect ! the DHCP operations and no others. This is useful for debugging a ! DHCP server that is not behaving itself. ! ! @end itemize @subsection The Configuration File Index: introduction.texi =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/doc/introduction.texi,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** introduction.texi 27 Jun 2003 16:46:46 -0000 1.2 --- introduction.texi 28 Jun 2003 02:18:40 -0000 1.3 *************** *** 98,101 **** --- 98,106 ---- should proceed OK. + @subsection Solaris + + No major issues so far. Building the package may become + ``interesting'' if you have not setup your build environment properly. + @subsection FreeBSD *************** *** 104,112 **** need to compile a kernel with more bpf devices. - @subsection Solaris - - No major issues so far. Building the package may become - ``interesting'' if you have not setup your build environment properly. - @subsection NetBSD --- 109,112 ---- *************** *** 123,130 **** inaccuracy when calculating timeouts. Lobby your OpenBSD developers to stop the brain damage. - - - - - - --- 123,124 ---- |
From: <act...@us...> - 2003-06-28 02:08:27
|
Update of /cvsroot/dhcp-agent/dhcp-agent/src In directory sc8-pr-cvs1:/tmp/cvs-serv31610/src Modified Files: dhcp-print.c Log Message: fixed up dhcp-sniff to work around new dhcp object Index: dhcp-print.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-print.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** dhcp-print.c 27 Jun 2003 23:11:29 -0000 1.7 --- dhcp-print.c 28 Jun 2003 02:08:24 -0000 1.8 *************** *** 508,512 **** memcpy(&val, data, 4); ! printf("%d", val); return; --- 508,512 ---- memcpy(&val, data, 4); ! val = ntohl(val); printf("%d", val); return; *************** *** 524,528 **** --- 524,530 ---- } + memcpy(&val, data, 4); + val = ntohl(val); printf("%u", val); *************** *** 542,545 **** --- 544,548 ---- memcpy(&val, data, 2); + val = ntohs(val); printf("%u", val); *************** *** 673,676 **** --- 676,680 ---- uint8_t tag; int print_val; + uint8_t *val; dhcp_reset_option_seek(dhcp); *************** *** 681,690 **** * we can assume that the code will always be valid. */ tag = dhcp_opt_get_tag(option); print_val = printf("%s", option_handlers[tag].prefix); print_val += printf(": "); ! option_handlers[tag].handle_option(dhcp_opt_get_host_data(option), dhcp_opt_get_total_len(option), print_val); printf("\n"); } --- 685,701 ---- * we can assume that the code will always be valid. */ + /* FIXME: eventually this will have to be rewritten. the + * sniffer, prior to the new dhcp object, expected data + * in network form. just ask for it here. */ + tag = dhcp_opt_get_tag(option); print_val = printf("%s", option_handlers[tag].prefix); print_val += printf(": "); ! ! val = dhcp_opt_get_network_data(option); ! option_handlers[tag].handle_option(val, dhcp_opt_get_total_len(option), print_val); + xfree(val); printf("\n"); } |