diff -rNc2 dhcp-3.0-alpha-19990315/Makefile.conf dhcp-3.0-alpha-19990326/Makefile.conf *** dhcp-3.0-alpha-19990315/Makefile.conf Mon Mar 15 21:50:29 1999 --- dhcp-3.0-alpha-19990326/Makefile.conf Fri Mar 26 11:22:13 1999 *************** *** 46,49 **** --- 46,61 ---- # assignments, and writes the output to Makefile. + ## AIX 4.1.5.0 + ##--aix-- + #CF = cf/aix.h + #CC=cc -Daix + #INSTALL=/usr/ucb/install + #MANINSTALL=/usr/ucb/install + #ADMMANEXT = .8 + #FFMANEXT = .5 + #VARRUN = /etc + #VARDB = /etc + ##--aix-- + ## NEXTSTEP 3.x,4.x ##--nextstep-- *************** *** 116,120 **** #ADMMANEXT = .8 #FFMANEXT = .5 - #VARRUN = /etc #VARDB = /etc ##--alphaosf-- --- 128,131 ---- diff -rNc2 dhcp-3.0-alpha-19990315/README dhcp-3.0-alpha-19990326/README *** dhcp-3.0-alpha-19990315/README Mon Mar 15 16:14:28 1999 --- dhcp-3.0-alpha-19990326/README Fri Mar 26 11:19:42 1999 *************** *** 2,6 **** Dynamic Host Configuration Protocol Distribution Version 3, Alpha Snapshot ! March 15, 1998 This is an alpha test snapshot of Version 3 of the Internet Software --- 2,6 ---- Dynamic Host Configuration Protocol Distribution Version 3, Alpha Snapshot ! March 26, 1998 This is an alpha test snapshot of Version 3 of the Internet Software *************** *** 11,14 **** --- 11,59 ---- stability is your highest priority. + DOCUMENTATION + + Documentation for this software includes this README file, the + RELNOTES file, and the manual pages, which are in the server, common, + client and relay subdirectories. Internet standards relating to the + DHCP protocol are stored in the doc subdirectory. You will have the + best luck reading the manual pages if you build this software and then + install it, although you can read them directly out of the + distribution if you need to. + + DHCP server documentation is in the dhcpd man page. Information about + the DHCP server lease database is in the dhcpd.leases man page. + Server configuration documentation is in the dhcpd.conf man page as + well as the dhcp-options man page. A sample DHCP server + configuration is in the file server/dhcpd.conf. + + DHCP Client documentation is in the dhclient man page. DHCP client + configuration documentation is in the dhclient.conf man page and the + dhcp-options man page. The DHCP client configuration script is + documented in the dhclient-script man page. The format of the DHCP + client lease database is documented in the dhclient.leases man page. + + DHCP relay agent documentation is in the dhcrelay man page. + + To read installed manual pages, use the man command. Type "man page" + where page is the name of the manual page. + + If you want to read manual pages that aren't installed, you can type + ``nroff -man page |more'' where page is the filename of the + unformatted manual page. The filename of an unformatted manual page + is the name of the manual page, followed by '.', followed by some + number - 5 for documentation about files, and 8 for documentation + about programs. + + If you do not have the nroff command, you can type ``more catpage'' + where catpage is the filename of the catted man page. Catted man + pages names are the name of the manual page followed by ".cat" + followed by 5 or 8, as with unformatted manual pages. + + Please note that until you install the manual pages, the pathnames of + files to which they refer will not be correct for your operating + system. + + RELEASE STATUS + In this release, the server and relay agent currently work well on NetBSD, Linux, FreeBSD, BSD/OS, Ultrix, Digital Alpha OSF/1, and SunOS *************** *** 47,53 **** the tar utility and the gzip command - type something like: ! zcat dhcp-3.0-alpha-19990315.tar.gz |tar xvf - ! Now, cd to the dhcp-3.0-alpha-19990315 subdirectory that you've just created and configure the source tree by typing: --- 92,98 ---- the tar utility and the gzip command - type something like: ! zcat dhcp-3.0-alpha-19990326.tar.gz |tar xvf - ! Now, cd to the dhcp-3.0-alpha-19990326 subdirectory that you've just created and configure the source tree by typing: diff -rNc2 dhcp-3.0-alpha-19990315/RELNOTES dhcp-3.0-alpha-19990326/RELNOTES *** dhcp-3.0-alpha-19990315/RELNOTES Mon Mar 15 16:15:14 1999 --- dhcp-3.0-alpha-19990326/RELNOTES Fri Mar 26 13:24:20 1999 *************** *** 2,6 **** Dynamic Host Configuration Protocol Distribution Version 3, Alpha Snapshot ! March 15, 1999 Release Notes --- 2,6 ---- Dynamic Host Configuration Protocol Distribution Version 3, Alpha Snapshot ! March 26, 1999 Release Notes *************** *** 55,58 **** --- 55,121 ---- when you try to use it. Pointing out inconsistencies between the documentation and the source code will always be appreciated. + + Changes since March 15, 1999 + + - Only use min-secs parameter on DHCPDISCOVER packets. + + - Restore support for server-identifier keyword. + + - Fix dhcp-class-identifier name to be vendor-class-identifier. + + - Add support for defining new DHCP options, e.g.: + + option new-option-name code 198 = array of ip-address; + option new-option-name 10.20.30.1, 10.20.30.2; + + - Support added for AIX 4.1.5.0 (and hopefully other versions). + + - Use /var/run instead of /etc on Digital Unix. + + - Change DHCP client exponential backoff code to back off more slowly, + so that it is more robust in lossy environments, at the expense of + being a bit less polite to the server. + + - Don't request a specific lease interval in the client unless the + user says to do so. + + - Don't print DHCPXXX in wrong xxx messages unless DEBUG is defined. + + - Fix handling of secs field. + + - Fix handling of append statement. + + - Fix documentation for append and prepend statements. + + - Fix server support for parameter request list and maximum message + size. + + - Parameterize more hardware types in discover_interfaces. Check for + IFF_BROADCAST instead of !IFF_POINTOPOINT + + - Print kernel configuration warning message if we get EINVAL when + opening or configuring the Linux packet filter. + + - Fix a bug in UDP checksum code (thanks to John Nemeth for figuring + this out) and re-enable UDP checksumming. This allows the client + to work with some buggy DHCP servers that can't handle zero + checksums in the UDP header - in particular, the one John's cable + modem ISP is using. + + - Don't report packet header checksum errors unless we see a lot of + them. It's perfectly normal for some number of checksum errors to + occur. + + - Refer to the dhcpd.leases man page when printing an error message + prior to exiting because there's no lease database. + + - Add information to the README telling the reader how to get to the + manual pages. + + - Fix the server packet transmission code to unicast when it can. + + - Fix a typo in the dhcpd.conf manual page. + + CHANGES SINCE VERSION 2.0 diff -rNc2 dhcp-3.0-alpha-19990315/client/clparse.c dhcp-3.0-alpha-19990326/client/clparse.c *** dhcp-3.0-alpha-19990315/client/clparse.c Mon Mar 15 22:37:47 1999 --- dhcp-3.0-alpha-19990326/client/clparse.c Fri Mar 26 11:19:43 1999 *************** *** 23,27 **** #ifndef lint static char copyright[] = ! "$Id: clparse.c,v 1.28 1999/03/16 06:37:47 mellon Exp $ Copyright (c) 1997 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ --- 23,27 ---- #ifndef lint static char copyright[] = ! "$Id: clparse.c,v 1.30 1999/03/26 19:19:43 mellon Exp $ Copyright (c) 1997 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ *************** *** 72,81 **** top_level_config.reboot_timeout = 10; top_level_config.retry_interval = 300; ! top_level_config.backoff_cutoff = 120; ! top_level_config.initial_interval = 10; top_level_config.bootp_policy = P_ACCEPT; top_level_config.script_name = "/etc/dhclient-script"; top_level_config.requested_options = default_requested_options; - top_level_config.requested_lease = 7200; top_level_config.on_receipt = new_group ("read_client_conf"); --- 72,80 ---- top_level_config.reboot_timeout = 10; top_level_config.retry_interval = 300; ! top_level_config.backoff_cutoff = 15; ! top_level_config.initial_interval = 3; top_level_config.bootp_policy = P_ACCEPT; top_level_config.script_name = "/etc/dhclient-script"; top_level_config.requested_options = default_requested_options; top_level_config.on_receipt = new_group ("read_client_conf"); *************** *** 282,286 **** do_option: token = next_token (&val, cfile); ! option = parse_option_name (cfile); if (!option) return; --- 281,285 ---- do_option: token = next_token (&val, cfile); ! option = parse_option_name (cfile, 0); if (!option) return; *************** *** 292,295 **** --- 291,317 ---- return; + case OPTION: + token = next_token (&val, cfile); + option = parse_option_name (cfile, 1); + if (!option) + return; + + token = next_token (&val, cfile); + if (token != CODE) { + parse_warn ("expecting \"code\" keyword."); + skip_to_semi (cfile); + return; + } + if (ip) { + parse_warn ("option definitions may only appear in %s", + "the outermost scope."); + skip_to_semi (cfile); + free_option (option, "parse_statement"); + return; + } + if (!parse_option_code_definition (cfile, option)) + free_option (option, "parse_statement"); + return; + case DEFAULT: p = &config -> on_receipt -> statements; *************** *** 919,923 **** struct buffer *bp; ! option = parse_option_name (cfile); if (!option) return 0; --- 941,945 ---- struct buffer *bp; ! option = parse_option_name (cfile, 0); if (!option) return 0; diff -rNc2 dhcp-3.0-alpha-19990315/client/dhclient.c dhcp-3.0-alpha-19990326/client/dhclient.c *** dhcp-3.0-alpha-19990315/client/dhclient.c Mon Mar 15 21:50:30 1999 --- dhcp-3.0-alpha-19990326/client/dhclient.c Fri Mar 26 13:27:23 1999 *************** *** 23,27 **** #ifndef lint static char ocopyright[] = ! "$Id: dhclient.c,v 1.62 1999/03/16 05:50:30 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ --- 23,27 ---- #ifndef lint static char ocopyright[] = ! "$Id: dhclient.c,v 1.65 1999/03/26 21:27:23 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ *************** *** 55,59 **** "Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium."; static char arr [] = "All rights reserved."; ! static char message [] = "Internet Software Consortium DHCP Client V3.0-alpha-990315"; static char contrib [] = "\nPlease contribute if you find this software useful."; static char url [] = "For info, please visit http://www.isc.org/dhcp-contrib.html\n"; --- 55,59 ---- "Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium."; static char arr [] = "All rights reserved."; ! static char message [] = "Internet Software Consortium DHCP Client V3.0-alpha-990326"; static char contrib [] = "\nPlease contribute if you find this software useful."; static char url [] = "For info, please visit http://www.isc.org/dhcp-contrib.html\n"; *************** *** 476,480 **** --- 476,482 ---- (memcmp (packet -> interface -> hw_address.haddr, packet -> raw -> chaddr, packet -> raw -> hlen))) { + #if defined (DEBUG) log_debug ("DHCPACK in wrong transaction."); + #endif return; } *************** *** 484,488 **** --- 486,492 ---- client -> state != S_RENEWING && client -> state != S_REBINDING) { + #if defined (DEBUG) log_debug ("DHCPACK in wrong state."); + #endif return; } *************** *** 787,791 **** --- 791,797 ---- (memcmp (packet -> interface -> hw_address.haddr, packet -> raw -> chaddr, packet -> raw -> hlen))) { + #if defined (DEBUG) log_debug ("%s in wrong transaction.", name); + #endif return; } *************** *** 967,971 **** --- 973,979 ---- (memcmp (packet -> interface -> hw_address.haddr, packet -> raw -> chaddr, packet -> raw -> hlen))) { + #if defined (DEBUG) log_debug ("DHCPNAK in wrong transaction."); + #endif return; } *************** *** 975,979 **** --- 983,989 ---- client -> state != S_RENEWING && client -> state != S_REBINDING) { + #if defined (DEBUG) log_debug ("DHCPNAK in wrong state."); + #endif return; } *************** *** 982,986 **** --- 992,998 ---- if (!client -> active) { + #if defined (DEBUG) log_info ("DHCPNAK with no active lease.\n"); + #endif return; } *************** *** 1081,1088 **** /* Record the number of seconds since we started sending. */ ! if (interval < 255) ! client -> packet.secs = interval; else ! client -> packet.secs = 255; log_info ("DHCPDISCOVER on %s to %s port %d interval %ld", --- 1093,1101 ---- /* Record the number of seconds since we started sending. */ ! if (interval < 65536) ! client -> packet.secs = htons (interval); else ! client -> packet.secs = htons (65535); ! client -> secs = client -> packet.secs; log_info ("DHCPDISCOVER on %s to %s port %d interval %ld", *************** *** 1321,1328 **** /* Record the number of seconds since we started sending. */ ! if (interval < 255) ! client -> packet.secs = interval; ! else ! client -> packet.secs = 255; log_info ("DHCPREQUEST on %s to %s port %d", --- 1334,1345 ---- /* Record the number of seconds since we started sending. */ ! if (client -> state == S_REQUESTING) ! client -> packet.secs = client -> secs; ! else { ! if (interval < 65536) ! client -> packet.secs = htons (interval); ! else ! client -> packet.secs = htons (65535); ! } log_info ("DHCPREQUEST on %s to %s port %d", *************** *** 1461,1487 **** } } - - if (!(oc = lookup_option (options -> dhcp_hash, - DHO_DHCP_LEASE_TIME))) { - if (!buffer_allocate (&bp, sizeof (u_int32_t), - "make_client_options")) - log_error ("can't make buffer for requested lease time."); - else { - putULong (bp -> data, - client -> config -> requested_lease); - if (!(make_const_option_cache - (&oc, &bp, (u_int8_t *)0, sizeof (u_int32_t), - &dhcp_options [DHO_DHCP_LEASE_TIME], - "make_client_options"))) - log_error ("can't make option cache"); - else { - save_option (options -> dhcp_hash, oc); - option_cache_dereference - (&oc, "make_client_options"); - } - } - } - /* oc = (struct option_cache *)0; (we'd need this if we were - going to use oc again */ /* Run statements that need to be run on transmission. */ --- 1478,1481 ---- diff -rNc2 dhcp-3.0-alpha-19990315/client/dhclient.conf.5 dhcp-3.0-alpha-19990326/client/dhclient.conf.5 *** dhcp-3.0-alpha-19990315/client/dhclient.conf.5 Mon Mar 15 21:50:31 1999 --- dhcp-3.0-alpha-19990326/client/dhclient.conf.5 Thu Mar 25 13:54:33 1999 *************** *** 237,248 **** \fBprepend [ \fIoption declaration\fR ] \fB;\fR .PP ! If for some option the client should use both a value it ! supplies, and then any values supplied by ! the server, these values can be defined in the .B prepend statement. The .B prepend statement can only be used for options which ! allow more than one value to be given. .PP .I The --- 237,249 ---- \fBprepend [ \fIoption declaration\fR ] \fB;\fR .PP ! If for some set of options the client should use a value you ! supply, and then use the values supplied by ! the server, if any, these values can be defined in the .B prepend statement. The .B prepend statement can only be used for options which ! allow more than one value to be given. This restriction is not ! enforced - if you ignore it, the behaviour will be unpredictable. .PP .I The *************** *** 252,263 **** \fBappend [ \fIoption declaration\fR ] \fB;\fR .PP ! If for some option the client should first any values supplied ! to it by the server, and then some values it supplies, those values ! should be defined in the .B append statement. The .B append statement can only be used for options which ! allow more than one value to be given. .SH LEASE DECLARATIONS .PP --- 253,265 ---- \fBappend [ \fIoption declaration\fR ] \fB;\fR .PP ! If for some set of options the client should first use the values ! supplied by the server, if any, and then use values you supply, these ! values can be defined in the .B append statement. The .B append statement can only be used for options which ! allow more than one value to be given. This restriction is not ! enforced - if you ignore it, the behaviour will be unpredictable. .SH LEASE DECLARATIONS .PP diff -rNc2 dhcp-3.0-alpha-19990315/common/alloc.c dhcp-3.0-alpha-19990326/common/alloc.c *** dhcp-3.0-alpha-19990315/common/alloc.c Mon Mar 15 21:50:31 1999 --- dhcp-3.0-alpha-19990326/common/alloc.c Thu Mar 25 13:55:14 1999 *************** *** 23,27 **** #ifndef lint static char copyright[] = ! "$Id: alloc.c,v 1.25 1999/03/16 05:50:31 mellon Exp $ Copyright (c) 1995, 1996, 1998 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ --- 23,27 ---- #ifndef lint static char copyright[] = ! "$Id: alloc.c,v 1.26 1999/03/25 21:55:14 mellon Exp $ Copyright (c) 1995, 1996, 1998 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ *************** *** 185,188 **** --- 185,210 ---- { dfree ((VOIDPTR)ptr, name); + } + + struct option *new_option (name) + char *name; + { + struct option *rval = + dmalloc (sizeof (struct option), name); + if (rval) + memset (rval, 0, sizeof *rval); + return rval; + } + + void free_option (ptr, name) + struct option *ptr; + char *name; + { + /* XXX have to put all options on heap before this is possible. */ + #if 0 + if (ptr -> name) + dfree ((VOIDPTR)option -> name, name); + dfree ((VOIDPTR)ptr, name); + #endif } diff -rNc2 dhcp-3.0-alpha-19990315/common/conflex.c dhcp-3.0-alpha-19990326/common/conflex.c *** dhcp-3.0-alpha-19990315/common/conflex.c Mon Mar 15 21:50:32 1999 --- dhcp-3.0-alpha-19990326/common/conflex.c Thu Mar 25 13:56:28 1999 *************** *** 23,27 **** #ifndef lint static char copyright[] = ! "$Id: conflex.c,v 1.40 1999/03/16 05:50:32 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ --- 23,27 ---- #ifndef lint static char copyright[] = ! "$Id: conflex.c,v 1.41 1999/03/25 21:56:28 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ *************** *** 363,366 **** --- 363,368 ---- if (!strcasecmp (atom + 1, "ll")) return ALL; + if (!strcasecmp (atom + 1, "rray")) + return ARRAY; break; case 'b': *************** *** 377,382 **** --- 379,388 ---- if (!strcasecmp (atom + 1, "illing")) return BILLING; + if (!strcasecmp (atom + 1, "oolean")) + return BOOLEAN; break; case 'c': + if (!strcasecmp (atom + 1, "ode")) + return CODE; if (!strcasecmp (atom + 1, "heck")) return CHECK; *************** *** 468,471 **** --- 474,481 ---- break; case 'i': + if (!strcasecmp (atom + 1, "nteger")) + return INTEGER; + if (!strcasecmp (atom + 1, "p-address")) + return IP_ADDRESS; if (!strcasecmp (atom + 1, "nitial-interval")) return INITIAL_INTERVAL; *************** *** 588,591 **** --- 598,605 ---- break; case 's': + if (!strcasecmp (atom + 1, "igned")) + return SIGNED; + if (!strcasecmp (atom + 1, "tring")) + return STRING; if (!strcasecmp (atom + 1, "uffix")) return SUFFIX; *************** *** 631,636 **** --- 645,654 ---- if (!strcasecmp (atom + 1, "oken-ring")) return TOKEN_RING; + if (!strcasecmp (atom + 1, "ext")) + return TEXT; break; case 'u': + if (!strcasecmp (atom + 1, "nsigned")) + return UNSIGNED; if (!strcasecmp (atom + 1, "id")) return UID; diff -rNc2 dhcp-3.0-alpha-19990315/common/dhcp-contrib.5 dhcp-3.0-alpha-19990326/common/dhcp-contrib.5 *** dhcp-3.0-alpha-19990315/common/dhcp-contrib.5 Wed Dec 31 16:00:00 1969 --- dhcp-3.0-alpha-19990326/common/dhcp-contrib.5 Fri Mar 26 13:38:42 1999 *************** *** 0 **** --- 1,214 ---- + .\" dhcp-contrib.5 + .\" + .\" Copyright (c) 1996-1999 Internet Software Consortium. + .\" Use is subject to license terms which appear in the file named + .\" ISC-LICENSE that should have accompanied this file when you + .\" received it. If a file named ISC-LICENSE did not accompany this + .\" file, or you are not sure the one you have is correct, you may + .\" obtain an applicable copy of the license at: + .\" + .\" http://www.isc.org/isc-license-1.0.html. + .\" + .\" This file is part of the ISC DHCP distribution. The documentation + .\" associated with this file is listed in the file DOCUMENTATION, + .\" included in the top-level directory of this release. + .\" + .\" Support and other services are available for ISC products - see + .\" http://www.isc.org for more information. + .TH dhcp-contrib 5 + .SH NAME + Contributing to the Internet Software Consortium DHCP Distribution + .SH EXHORTATION + .PP + The Internet Software Consortium DHCP Distribution has historically + been funded through the donation of various charitable and + non-charitable organizations, as well as by individual contributions. + To some degree, support for the distribution has been done on a + volunteer basis, but by and large the reason that you have this + distribution in your hands right now is because people like you have + provided funding for it. + .PP + We would like to encourage you to continue to provide such support, or + to begin providing it if you have not in the past. You are in no way + obliged to provide us with any support at all, and this message is not + intended to guilt-trip you about providing support. If you choose + not to provide support, for whatever reason, you aren't going to be + treated differently on the mailing lists, and your requests for + features aren't going to be prioritized any differently. If you want + to be treated differently, you can buy a formal support contract, of + course, but this document is about contributions, not support + contracts. + .SH FREQUENTLY ASKED QUESTIONS + .PP + Q: So if I won't be treated differently, why contribute? + .PP + A: The obvious + answer is self-interest. If you contribute, it means that the author + will have time to work on stuff that's not of the utmost high + priority. People are constantly asking for things that we would + really like to provide, but for which we have no time. By + contributing, you are literally giving us time to do these things. + The amount of time varies with the contribution, of course, but if + everybody contributes a little bit, it can add up to a lot. + .PP + Q: But everybody isn't required to contribute. If I contribute and + nobody else does, doesn't that make me kind of a sucker? + .PP + A: Obviously, we don't think so, but think about this: if you contribute, + then we can point out to others that we've received contributions, and + this will make the idea of contributing seem more legitimate to them, + making it more likely that they will contribute. So your + contribution has more value than just the money you provide - it also + helps us to raise funds from others. + .PP + Q: If I contribute, I want a say in what work gets done. + .PP + A: We do sell support contracts, and we will also do development work + on specification if we feel it is relevant (although you won't get to + own it). This can be quite expensive, though - much more than even + the maximum we'd expect you to donate. So no, contributing doesn't + buy you a say in what work gets done. + .PP + Q: I work for a charity that feeds the homeless. Should my charity + contribute? + .PP + A: Absolutely not! The idea here is not to take food out of the mouths + of poor people. If donating to us would mean that somebody in need + that you could have helped will go without help, keep the money. + It's not worth it to us. This goes for providing shelter, + psychiatric aid, legal assistance, and any other similar charity work. + .PP + Q: Cool! I work for a university, helping students who are in need of + an education, so we shouldn't contribute, right? + .PP + A: No, that's not quite what we mean. Sure, if you work for an + organization that provides free education to needy people, at whatever + level, then we'd rather you did that than support us. But if your + university has a big budget for running the computer center, can + afford to plant nice gardens and maintain nice lawns, and maybe has + all its dorms wired for ethernet, then even if you qualify as a + nonprofit under federal law (or the law in your own country) you + should still contribute. DHCP is just as much a part of your + infrastructure as your campus wiring. + .PP + Q: This software came on a CD that I bought. Haven't I already + contributed? + .PP + A: If you're seeing this notice, and you didn't see a notice saying + that the people who sold you your CD contributed to us, then no, you + haven't already contributed. In general, we encourage people to + include this software on their distributions if they feel it would be + useful, and we do not require them to contribute in exchange for that + privilege. + .PP + Q: I've contributed to the development of this software by submitting bug + reports and patches. Why should I also contribute money? + .PP + A: When you contributed these bug reports and patches, was there zero + effort involved on our part in integrating the patches or figuring out + what was wrong? Probably not. Bug reports and patches can be + extremely valuable, and we can't say that in no event do they qualify + you to get out of contributing - after all, we're leaving that up to + your judgement anyway, aren't we? But unless your contribution was + pretty massive, and is actually in this distribution, we aren't likely + to agree with you about this. + .PP + Q: Software should be free. You have no right to ask for money to + support this effort. + .PP + A: You are entitled to that opinion, but please don't raise it on the + mailing list, as it will tend to get people excited. Please remember + that while copying software is generally a very cheap process, + creating it is not. The amount of work that's gone into this software + package is quite significant, and there's plenty more work to do. If + you happen to be in college, working toward your degree, and have no + social life (and yes, I've been there and done that) then it can seem + like there's no additional cost to hacking on software - after all, + it's fun, isn't it? While this is true, it is also true that you're a + lot better off with this software than you would have been with the + software I wrote in college. Enough said? + .PP + Q: Can't I contribute work instead of software? + .PP + A: We'd like to encourage that to some extent, and are indeed trying to + bring some developers into the fold, but you shouldn't expect that + your willingness to do this translates directly into an opportunity. + For example, you may want very much to work for [insert the name of + your favorite commercial Linux vendor here], but unless you have the + appropriate skills, they like you, they're willing to pay what you + need, and they have work that's appropriate to your skills, you're not + going to get hired there. + .PP + Q: I don't contribute to the Free Software Foundation - why do you rate? + .PP + A: You should contribute to the Free Software Foundation too! + .PP + Q: I don't contribute to [insert name of your local food bank here]. + Why do you rate? + .PP + A: If you feel bad about not contributing to the local food bank, this is + a very easy problem to solve, and we encourage you to do so. + .PP + Q: Once I've contributed once, am I done? + .PP + A: We'd like to encourage you to contribute once a year. If you want, + we can send you a reminder notice on the year anniversary of your + original contribution. If you don't specifically ask for this, we + won't force it on you. No salesperson will call. No spam will be + sent. We definitely won't try to convince you that it's been a year + since you last contributed when it hasn't been a year yet. + .PP + Q: I don't have you in my budget this year. + .PP + A: Fine, put us in your budget for next year! + .PP + Q: It's really hard to do charitable contributions at my organization. + .PP + A: We'd be happy to sell you a product instead. If you choose to go + down this route, what we'l sell you is a license for some number of + clients and a CD. Just let us know how many DHCP clients you have, + and we'll use the following schedule to figure out how much to invoice + you (shipping is included on orders of $100 or more). Even if you can + do charitable contributions, you might want to use this schedule as a + guideline for figuring out how much to donate. It is only a + guideline, of course - if the amounts listed feel like too much or too + little to you, do what seems appropriate. + .PP + .nf + $10k for businesses supporting >10k nodes + $5k for charities supporting >10k nodes + $2.5k for businesses supporting >1k nodes + $1k for charities supporting >1k nodes + $500 for businesses with >500 nodes + $250 for charities with >500 nodes + $200 for businesses with >150 nodes + $100 for charities with >150 nodes + $100 for businesses with <150 nodes + $50 for charities with <150 nodes + $25 for home use, client or server + $0.10 to $1 per client for businesses that are reselling the + client, depending on volume. + .fi + .PP + Q: Are you nuts? I live in [insert your country name here] and the + typical annual salary for a programmer is less than what you're asking + me to contribute! + .PP + A: We leave the choice of how much to contribute up to you. Really. + We aren't kidding. + .PP + Q: Can I contribute with my credit card? + .PP + A: Yes. The details haven't been ironed out at this writing, but if you + send mail to dhcp-contributions@isc.org, we'll work it out. By the + time you read this, we may have a web interface set up - if so, it + will be linked in at http://www.isc.org/dhcp-contrib.html. + .SH SEE ALSO + dhcpd.conf(5), dhcpd.leases(5), dhclient.conf(5), dhcpd(8), + dhclient(8), RFC2132, RFC2131. + .SH AUTHOR + The Internet Software Consortium DHCP Distribution was written by Ted + Lemon under a contract with Vixie Labs. Funding for + this project was provided through the Internet Software Consortium. + Information about the Internet Software Consortium can be found at + .B http://www.isc.org/isc. diff -rNc2 dhcp-3.0-alpha-19990315/common/discover.c dhcp-3.0-alpha-19990326/common/discover.c *** dhcp-3.0-alpha-19990315/common/discover.c Mon Mar 15 21:50:33 1999 --- dhcp-3.0-alpha-19990326/common/discover.c Fri Mar 26 11:19:44 1999 *************** *** 23,27 **** #ifndef lint static char copyright[] = ! "$Id: discover.c,v 1.6 1999/03/16 05:50:33 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ --- 23,27 ---- #ifndef lint static char copyright[] = ! "$Id: discover.c,v 1.8 1999/03/26 19:19:44 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ *************** *** 122,130 **** except don't skip down interfaces if we're trying to get a list of configurable interfaces. */ ! if ((((ifr.ifr_flags & IFF_LOOPBACK) || ! #ifdef HAVE_IFF_POINTOPOINT ! (ifr.ifr_flags & IFF_POINTOPOINT)) ! && !tmp) || ! #endif (!(ifr.ifr_flags & IFF_UP) && state != DISCOVER_UNCONFIGURED)) --- 122,126 ---- except don't skip down interfaces if we're trying to get a list of configurable interfaces. */ ! if ((!(ifr.ifr_flags & IFF_BROADCAST) && !tmp) || (!(ifr.ifr_flags & IFF_UP) && state != DISCOVER_UNCONFIGURED)) *************** *** 343,346 **** --- 339,345 ---- /* ignore tunnel interfaces. */ #endif + #ifdef HAVE_ARPHRD_ROSE + case ARPHRD_ROSE: + #endif #ifdef HAVE_ARPHRD_LOOPBACK case ARPHRD_LOOPBACK: *************** *** 355,359 **** break; ! #ifndef ARPHRD_IEEE802 # define ARPHRD_IEEE802 HTYPE_IEEE802 #endif --- 354,358 ---- break; ! #ifndef HAVE_ARPHRD_IEEE802 # define ARPHRD_IEEE802 HTYPE_IEEE802 #endif *************** *** 364,368 **** break; ! #ifndef ARPHRD_FDDI # define ARPHRD_FDDI HTYPE_FDDI #endif --- 363,367 ---- break; ! #ifndef HAVE_ARPHRD_FDDI # define ARPHRD_FDDI HTYPE_FDDI #endif *************** *** 381,387 **** #endif default: ! log_fatal ("%s: unknown hardware address type %d", ! ifr.ifr_name, sa.sa_family); } } --- 380,403 ---- #endif + #ifdef HAVE_ARPHRD_AX25 + case ARPHRD_AX25: + tmp -> hw_address.hlen = 6; + tmp -> hw_address.htype = ARPHRD_AX25; + memcpy (tmp -> hw_address.haddr, sa.sa_data, 6); + break; + #endif + + #ifdef HAVE_ARPHRD_NETROM + case ARPHRD_NETROM: + tmp -> hw_address.hlen = 6; + tmp -> hw_address.htype = ARPHRD_NETROM; + memcpy (tmp -> hw_address.haddr, sa.sa_data, 6); + break; + #endif + default: ! log_error ("%s: unknown hardware address type %d", ! ifr.ifr_name, sa.sa_family); ! break; } } diff -rNc2 dhcp-3.0-alpha-19990315/common/lpf.c dhcp-3.0-alpha-19990326/common/lpf.c *** dhcp-3.0-alpha-19990315/common/lpf.c Mon Mar 15 22:37:49 1999 --- dhcp-3.0-alpha-19990326/common/lpf.c Fri Mar 26 11:19:44 1999 *************** *** 24,28 **** #ifndef lint static char copyright[] = ! "$Id: lpf.c,v 1.8 1999/03/16 06:37:49 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ --- 24,28 ---- #ifndef lint static char copyright[] = ! "$Id: lpf.c,v 1.9 1999/03/26 19:19:44 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ *************** *** 73,77 **** if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT || errno == ESOCKTNOSUPPORT || errno == EPFNOSUPPORT || ! errno == EAFNOSUPPORT) log_fatal ("socket: %m - make sure %s %s!", "CONFIG_PACKET and CONFIG_FILTER are defined", --- 73,77 ---- if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT || errno == ESOCKTNOSUPPORT || errno == EPFNOSUPPORT || ! errno == EAFNOSUPPORT || errno == EINVAL) log_fatal ("socket: %m - make sure %s %s!", "CONFIG_PACKET and CONFIG_FILTER are defined", *************** *** 87,91 **** if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT || errno == ESOCKTNOSUPPORT || errno == EPFNOSUPPORT || ! errno == EAFNOSUPPORT) log_fatal ("socket: %m - make sure %s %s!", "CONFIG_PACKET and CONFIG_FILTER are defined", --- 87,91 ---- if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT || errno == ESOCKTNOSUPPORT || errno == EPFNOSUPPORT || ! errno == EAFNOSUPPORT || errno = EINVAL) log_fatal ("socket: %m - make sure %s %s!", "CONFIG_PACKET and CONFIG_FILTER are defined", diff -rNc2 dhcp-3.0-alpha-19990315/common/packet.c dhcp-3.0-alpha-19990326/common/packet.c *** dhcp-3.0-alpha-19990315/common/packet.c Mon Mar 15 21:50:36 1999 --- dhcp-3.0-alpha-19990326/common/packet.c Fri Mar 26 11:19:44 1999 *************** *** 23,27 **** #ifndef lint static char copyright[] = ! "$Id: packet.c,v 1.21 1999/03/16 05:50:36 mellon Exp $ Copyright (c) 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ --- 23,27 ---- #ifndef lint static char copyright[] = ! "$Id: packet.c,v 1.23 1999/03/26 19:19:44 mellon Exp $ Copyright (c) 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ *************** *** 175,179 **** header and the data. */ - #if 0 udp.uh_sum = wrapsum (checksum ((unsigned char *)&udp, sizeof udp, --- 175,178 ---- *************** *** 181,189 **** checksum ((unsigned char *) &ip.ip_src, ! sizeof ip.ip_src, IPPROTO_UDP + (u_int32_t) ntohs (udp.uh_ulen))))); - #endif /* Copy the udp header into the buffer... */ --- 180,187 ---- checksum ((unsigned char *) &ip.ip_src, ! 2 * sizeof ip.ip_src, IPPROTO_UDP + (u_int32_t) ntohs (udp.uh_ulen))))); /* Copy the udp header into the buffer... */ *************** *** 248,253 **** /* Check the IP header checksum - it should be zero. */ if (wrapsum (checksum (buf + bufix, ip_len, 0))) { ! log_info ("Bad IP checksum: %x", ! wrapsum (checksum (buf + bufix, sizeof *ip, 0))); return -1; } --- 246,256 ---- /* Check the IP header checksum - it should be zero. */ if (wrapsum (checksum (buf + bufix, ip_len, 0))) { ! static int packets_seen; ! static int packets_bad_checksum; ! ! if (packets_seen && ! (++packets_seen / ++packets_bad_checksum) < 2) ! log_info ("Bad IP checksum: %x", ! wrapsum (checksum (buf + bufix, sizeof *ip, 0))); return -1; } *************** *** 265,269 **** } - #if 0 usum = udp -> uh_sum; udp -> uh_sum = 0; --- 268,271 ---- *************** *** 273,277 **** checksum ((unsigned char *) &ip -> ip_src, ! sizeof ip -> ip_src, IPPROTO_UDP + (u_int32_t) --- 275,279 ---- checksum ((unsigned char *) &ip -> ip_src, ! 2 * sizeof ip -> ip_src, IPPROTO_UDP + (u_int32_t) *************** *** 279,286 **** if (usum && usum != sum) { ! log_info ("Bad udp checksum: %x %x", usum, sum); return -1; } - #endif /* Copy out the port... */ --- 281,291 ---- if (usum && usum != sum) { ! static int packets_seen; ! static int packets_bad_checksum; ! if (packets_seen && ! (++packets_seen / ++packets_bad_checksum) < 2) ! log_info ("Bad udp checksum: %x %x", usum, sum); return -1; } /* Copy out the port... */ diff -rNc2 dhcp-3.0-alpha-19990315/common/parse.c dhcp-3.0-alpha-19990326/common/parse.c *** dhcp-3.0-alpha-19990315/common/parse.c Mon Mar 15 22:37:49 1999 --- dhcp-3.0-alpha-19990326/common/parse.c Thu Mar 25 13:59:36 1999 *************** *** 23,27 **** #ifndef lint static char copyright[] = ! "$Id: parse.c,v 1.17 1999/03/16 06:37:49 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ --- 23,27 ---- #ifndef lint static char copyright[] = ! "$Id: parse.c,v 1.18 1999/03/25 21:59:36 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ *************** *** 701,710 **** */ ! struct option *parse_option_name (cfile) FILE *cfile; { char *val; enum dhcp_token token; ! char *vendor; struct universe *universe; struct option *option; --- 701,711 ---- */ ! struct option *parse_option_name (cfile, allocate) FILE *cfile; + int allocate; { char *val; enum dhcp_token token; ! char *uname; struct universe *universe; struct option *option; *************** *** 717,724 **** return (struct option *)0; } ! vendor = malloc (strlen (val) + 1); ! if (!vendor) ! log_fatal ("no memory for vendor information."); ! strcpy (vendor, val); token = peek_token (&val, cfile); if (token == DOT) { --- 718,725 ---- return (struct option *)0; } ! uname = malloc (strlen (val) + 1); ! if (!uname) ! log_fatal ("no memory for uname information."); ! strcpy (uname, val); token = peek_token (&val, cfile); if (token == DOT) { *************** *** 736,747 **** /* Look up the option name hash table for the specified ! vendor. */ universe = ((struct universe *) hash_lookup (&universe_hash, ! (unsigned char *)vendor, 0)); /* If it's not there, we can't parse the rest of the declaration. */ if (!universe) { ! parse_warn ("no vendor named %s.", vendor); skip_to_semi (cfile); return (struct option *)0; --- 737,748 ---- /* Look up the option name hash table for the specified ! uname. */ universe = ((struct universe *) hash_lookup (&universe_hash, ! (unsigned char *)uname, 0)); /* If it's not there, we can't parse the rest of the declaration. */ if (!universe) { ! parse_warn ("no option space named %s.", uname); skip_to_semi (cfile); return (struct option *)0; *************** *** 750,754 **** /* Use the default hash table, which contains all the standard dhcp option names. */ ! val = vendor; universe = &dhcp_universe; } --- 751,755 ---- /* Use the default hash table, which contains all the standard dhcp option names. */ ! val = uname; universe = &dhcp_universe; } *************** *** 760,768 **** /* If we didn't get an option structure, it's an undefined option. */ if (!option) { ! if (val == vendor) parse_warn ("no option named %s", val); else ! parse_warn ("no option named %s for vendor %s", ! val, vendor); skip_to_semi (cfile); return (struct option *)0; --- 761,789 ---- /* If we didn't get an option structure, it's an undefined option. */ if (!option) { ! /* If we've been told to allocate, that means that this ! (might) be an option code definition, so we'll create ! an option structure just in case. */ ! if (allocate) { ! option = new_option ("parse_option_name"); ! if (val == uname) ! option -> name = val; ! else { ! free (uname); ! option -> name = dmalloc (strlen (val) + 1, ! "parse_option_name"); ! if (!option -> name) ! log_fatal ("no memory for option %s.%s", ! universe -> name, val); ! strcpy (option -> name, val); ! } ! option -> universe = universe; ! option -> code = -1; ! return option; ! } ! if (val == uname) parse_warn ("no option named %s", val); else ! parse_warn ("no option named %s in space %s", ! val, uname); skip_to_semi (cfile); return (struct option *)0; *************** *** 770,777 **** /* Free the initial identifier token. */ ! free (vendor); return option; } /* * colon-seperated-hex-list :== NUMBER | --- 791,1007 ---- /* Free the initial identifier token. */ ! free (uname); return option; } + /* This is faked up to look good right now. Ideally, this should do a + recursive parse and allow arbitrary data structure definitions, but for + now it just allows you to specify a single type, an array of single types, + a sequence of types, or an array of sequences of types. + + ocd :== NUMBER EQUALS ocsd SEMI + + ocsd :== ocsd_type | + ocsd_type_sequence | + ARRAY OF ocsd_type | + ARRAY OF ocsd_type_sequence + + ocsd_type :== BOOLEAN | + INTEGER NUMBER | + SIGNED INTEGER NUMBER | + UNSIGNED INTEGER NUMBER | + IP-ADDRESS | + TEXT | + STRING + + ocsd_type_sequence :== LBRACE ocsd_types RBRACE + + ocsd_type :== ocsd_type | + ocsd_types ocsd_type */ + + int parse_option_code_definition (cfile, option) + FILE *cfile; + struct option *option; + { + char *val; + enum dhcp_token token; + int arrayp = 0; + int recordp = 0; + int no_more_in_record = 0; + char tokbuf [128]; + int tokix = 0; + char type; + int code; + int is_signed; + + /* Parse the option code. */ + token = next_token (&val, cfile); + if (token != NUMBER) { + parse_warn ("expecting option code number."); + skip_to_semi (cfile); + return 0; + } + option -> code = atoi (val); + + token = next_token (&val, cfile); + if (token != EQUAL) { + parse_warn ("expecting \"=\""); + skip_to_semi (cfile); + return 0; + } + + /* See if this is an array. */ + token = next_token (&val, cfile); + if (token == ARRAY) { + token = next_token (&val, cfile); + if (token != OF) { + parse_warn ("expecting \"of\"."); + skip_to_semi (cfile); + return 0; + } + arrayp = 1; + token = next_token (&val, cfile); + } + + if (token == LBRACE) { + recordp = 1; + token = next_token (&val, cfile); + } + + /* At this point we're expecting a data type. */ + next_type: + switch (token) { + case BOOLEAN: + type = 'f'; + break; + case INTEGER: + is_signed = 1; + parse_integer: + token = next_token (&val, cfile); + if (token != NUMBER) { + parse_warn ("expecting number."); + skip_to_rbrace (cfile, recordp); + if (recordp) + skip_to_semi (cfile); + return 0; + } + switch (atoi (val)) { + case 8: + type = is_signed ? 'b' : 'B'; + break; + case 16: + type = is_signed ? 's' : 'S'; + break; + case 32: + type = is_signed ? 'l' : 'L'; + break; + default: + parse_warn ("%s bit precision is not supported.", val); + skip_to_rbrace (cfile, recordp); + if (recordp) + skip_to_semi (cfile); + return 0; + } + break; + case SIGNED: + is_signed = 1; + parse_signed: + token = next_token (&val, cfile); + if (token != INTEGER) { + parse_warn ("expecting \"integer\" keyword."); + skip_to_rbrace (cfile, recordp); + if (recordp) + skip_to_semi (cfile); + return 0; + } + goto parse_integer; + case UNSIGNED: + is_signed = 0; + goto parse_signed; + + case IP_ADDRESS: + type = 'I'; + break; + case TEXT: + type = 't'; + no_arrays: + if (arrayp) { + parse_warn ("arrays of text strings not %s", + "yet supported."); + skip_to_rbrace (cfile, recordp); + if (recordp) + skip_to_semi (cfile); + return 0; + } + no_more_in_record = 1; + break; + case STRING: + type = 'X'; + goto no_arrays; + + default: + parse_warn ("unknown data type %s", val); + skip_to_rbrace (cfile, recordp); + if (recordp) + skip_to_semi (cfile); + return 0; + } + + if (tokix == sizeof tokbuf) { + parse_warn ("too many types in record."); + skip_to_rbrace (cfile, recordp); + if (recordp) + skip_to_semi (cfile); + return 0; + } + tokbuf [tokix++] = type; + + if (recordp) { + token = next_token (&val, cfile); + if (token == COMMA) { + if (no_more_in_record) { + parse_warn ("%s must be at end of record.", + type == 't' ? "text" : "string"); + skip_to_rbrace (cfile, 1); + if (recordp) + skip_to_semi (cfile); + return 0; + } + token = next_token (&val, cfile); + goto next_type; + } + if (token != RBRACE) { + parse_warn ("expecting right brace."); + skip_to_rbrace (cfile, 1); + if (recordp) + skip_to_semi (cfile); + return 0; + } + } + if (!parse_semi (cfile)) { + parse_warn ("semicolon expected."); + skip_to_semi (cfile); + if (recordp) + skip_to_semi (cfile); + return 0; + } + option -> format = dmalloc (tokix + arrayp + 1, + "parse_option_code_definition"); + if (!option -> format) + log_fatal ("no memory for option format."); + memcpy (option -> format, tokbuf, tokix); + if (arrayp) + option -> format [tokix++] = 'A'; + option -> format [tokix] = 0; + if (option -> universe -> options [option -> code]) { + /* XXX Free the option, but we can't do that now because they + XXX may start out static. */ + } + option -> universe -> options [option -> code] = option; + add_hash (option -> universe -> hash, + (unsigned char *)option -> name, 0, (unsigned char *)option); + return 1; + } + /* * colon-seperated-hex-list :== NUMBER | *************** *** 930,934 **** case OPTION: token = next_token (&val, cfile); ! option = parse_option_name (cfile); if (!option) { *lose = 1; --- 1160,1164 ---- case OPTION: token = next_token (&val, cfile); ! option = parse_option_name (cfile, 0); if (!option) { *lose = 1; *************** *** 940,944 **** case DEFAULT: token = next_token (&val, cfile); ! option = parse_option_name (cfile); if (!option) { *lose = 1; --- 1170,1174 ---- case DEFAULT: token = next_token (&val, cfile); ! option = parse_option_name (cfile, 0); if (!option) { *lose = 1; *************** *** 950,954 **** case PREPEND: token = next_token (&val, cfile); ! option = parse_option_name (cfile); if (!option) { *lose = 1; --- 1180,1184 ---- case PREPEND: token = next_token (&val, cfile); ! option = parse_option_name (cfile, 0); if (!option) { *lose = 1; *************** *** 960,964 **** case APPEND: token = next_token (&val, cfile); ! option = parse_option_name (cfile); if (!option) { *lose = 1; --- 1190,1194 ---- case APPEND: token = next_token (&val, cfile); ! option = parse_option_name (cfile, 0); if (!option) { *lose = 1; *************** *** 1226,1230 **** log_fatal ("can't allocate expression"); (*expr) -> op = expr_exists; ! (*expr) -> data.option = parse_option_name (cfile); if (!(*expr) -> data.option) { *lose = 1; --- 1456,1460 ---- log_fatal ("can't allocate expression"); (*expr) -> op = expr_exists; ! (*expr) -> data.option = parse_option_name (cfile, 0); if (!(*expr) -> data.option) { *lose = 1; *************** *** 1337,1341 **** log_fatal ("can't allocate expression"); (*expr) -> op = expr_option; ! (*expr) -> data.option = parse_option_name (cfile); if (!(*expr) -> data.option) { *lose = 1; --- 1567,1571 ---- log_fatal ("can't allocate expression"); (*expr) -> op = expr_option; ! (*expr) -> data.option = parse_option_name (cfile, 0); if (!(*expr) -> data.option) { *lose = 1; diff -rNc2 dhcp-3.0-alpha-19990315/common/tables.c dhcp-3.0-alpha-19990326/common/tables.c *** dhcp-3.0-alpha-19990315/common/tables.c Mon Mar 15 21:50:37 1999 --- dhcp-3.0-alpha-19990326/common/tables.c Thu Mar 25 14:01:03 1999 *************** *** 23,27 **** #ifndef lint static char copyright[] = ! "$Id: tables.c,v 1.22 1999/03/16 05:50:37 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ --- 23,27 ---- #ifndef lint static char copyright[] = ! "$Id: tables.c,v 1.23 1999/03/25 22:01:03 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ *************** *** 107,111 **** { "dhcp-renewal-time", "L", &dhcp_universe, 58 }, { "dhcp-rebinding-time", "L", &dhcp_universe, 59 }, ! { "vendor-class-identifier", "t", &dhcp_universe, 60 }, { "dhcp-client-identifier", "X", &dhcp_universe, 61 }, { "option-62", "X", &dhcp_universe, 62 }, --- 107,111 ---- { "dhcp-renewal-time", "L", &dhcp_universe, 58 }, { "dhcp-rebinding-time", "L", &dhcp_universe, 59 }, ! { "vendor-class-identifier", "X", &dhcp_universe, 60 }, { "dhcp-client-identifier", "X", &dhcp_universe, 61 }, { "option-62", "X", &dhcp_universe, 62 }, diff -rNc2 dhcp-3.0-alpha-19990315/common/upf.c dhcp-3.0-alpha-19990326/common/upf.c *** dhcp-3.0-alpha-19990315/common/upf.c Mon Mar 15 22:37:50 1999 --- dhcp-3.0-alpha-19990326/common/upf.c Fri Mar 26 11:19:44 1999 *************** *** 1,5 **** /* upf.c ! Ultrix PacketFilter interface code. /* --- 1,5 ---- /* upf.c ! Ultrix PacketFilter interface code. */ /* *************** *** 23,27 **** #ifndef lint static char copyright[] = ! "$Id: upf.c,v 1.10 1999/03/16 06:37:50 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ --- 23,27 ---- #ifndef lint static char copyright[] = ! "$Id: upf.c,v 1.11 1999/03/26 19:19:44 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ diff -rNc2 dhcp-3.0-alpha-19990315/configure dhcp-3.0-alpha-19990326/configure *** dhcp-3.0-alpha-19990315/configure Mon Mar 15 21:52:58 1999 --- dhcp-3.0-alpha-19990326/configure Fri Mar 26 11:19:42 1999 *************** *** 8,11 **** --- 8,13 ---- if [ "$sysname" = "" ]; then case $uname in + AIX) + sysname=aix;; Rhapsody) sysname=rhapsody;; *************** *** 59,62 **** --- 61,65 ---- echo echo "Supported configurations are:" + echo " aix AIX 4.1.5.0" echo " ultrix ULTRIX 4.2A or higher" echo " bsdos BSDI BSD/OS 2.1" diff -rNc2 dhcp-3.0-alpha-19990315/includes/cf/aix.h dhcp-3.0-alpha-19990326/includes/cf/aix.h *** dhcp-3.0-alpha-19990315/includes/cf/aix.h Wed Dec 31 16:00:00 1969 --- dhcp-3.0-alpha-19990326/includes/cf/aix.h Fri Mar 26 11:19:45 1999 *************** *** 0 **** --- 1,89 ---- + /* aix.h */ + /* + * Copyright (c) 1996 The Internet Software Consortium. All rights reserved. + * + * 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. Neither the name of The Internet Software Consortium nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND + * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * INTERNET SOFTWARE CONSORTIUM OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + #define int8_t char + #define int16_t short + #define int32_t long + + #define u_int8_t unsigned char + #define u_int16_t unsigned short + #define u_int32_t unsigned long + + #include + + #include + + #include + #include + #include + #include + #include + #include + #include + #include + + extern int h_errno; + + #include + #include + #include + + #ifndef _PATH_DHCPD_PID + #define _PATH_DHCPD_PID "/etc/dhcpd.pid" + #endif + #ifndef _PATH_DHCLIENT_PID + #define _PATH_DHCLIENT_PID "/etc/dhclient.pid" + #endif + #ifndef _PATH_DHCRELAY_PID + #define _PATH_DHCRELAY_PID "/etc/dhcrelay.pid" + #endif + + #include + #define VA_DOTDOTDOT va_alist + #define VA_start(list, last) va_start (list) + + #define vsnprintf(buf, size, fmt, list) vsprintf (buf, fmt, list) + #define NO_SNPRINTF + + #define EOL '\n' + #define VOIDPTR void * + + #include + + #define TIME time_t + #define GET_TIME(x) time ((x)) + + #define random rand + + #define USE_SOCKETS 1 + #define HAVE_SA_LEN 1 + #undef FDDI diff -rNc2 dhcp-3.0-alpha-19990315/includes/dhcpd.h dhcp-3.0-alpha-19990326/includes/dhcpd.h *** dhcp-3.0-alpha-19990315/includes/dhcpd.h Mon Mar 15 22:37:50 1999 --- dhcp-3.0-alpha-19990326/includes/dhcpd.h Thu Mar 25 14:02:36 1999 *************** *** 521,525 **** struct group *on_transmission; - u_int32_t *required_options; /* Options server must supply. */ u_int32_t *requested_options; /* Options to request from server. */ --- 521,524 ---- *************** *** 576,579 **** --- 575,579 ---- struct iaddr destination; /* Where to send packet. */ u_int32_t xid; /* Transaction ID. */ + u_int16_t secs; /* secs value from DHCPDISCOVER. */ TIME first_sending; /* When was first copy sent? */ TIME interval; /* What's the current resend interval? */ *************** *** 849,853 **** void convert_num PROTO ((unsigned char *, char *, int, int)); TIME parse_date PROTO ((FILE *)); ! struct option *parse_option_name PROTO ((FILE *)); int parse_cshl PROTO ((struct data_string *, FILE *)); struct executable_statement *parse_executable_statement PROTO ((FILE *, --- 849,854 ---- void convert_num PROTO ((unsigned char *, char *, int, int)); TIME parse_date PROTO ((FILE *)); ! struct option *parse_option_name PROTO ((FILE *, int)); ! int parse_option_code_definition PROTO ((FILE *, struct option *)); int parse_cshl PROTO ((struct data_string *, FILE *)); struct executable_statement *parse_executable_statement PROTO ((FILE *, *************** *** 992,995 **** --- 993,998 ---- struct name_server *new_name_server PROTO ((char *)); void free_name_server PROTO ((struct name_server *, char *)); + struct option *new_option PROTO ((char *)); + void free_option PROTO ((struct option *, char *)); void free_domain_search_list PROTO ((struct domain_search_list *, char *)); void free_lease_state PROTO ((struct lease_state *, char *)); diff -rNc2 dhcp-3.0-alpha-19990315/includes/dhctoken.h dhcp-3.0-alpha-19990326/includes/dhctoken.h *** dhcp-3.0-alpha-19990315/includes/dhctoken.h Mon Mar 15 21:50:39 1999 --- dhcp-3.0-alpha-19990326/includes/dhctoken.h Thu Mar 25 14:03:07 1999 *************** *** 166,169 **** --- 166,178 ---- PREFER = 386, DONT = 387, + CODE = 388, + ARRAY = 389, + BOOLEAN = 390, + INTEGER = 391, + SIGNED = 392, + UNSIGNED = 393, + IP_ADDRESS = 394, + TEXT = 395, + STRING_TOKEN = 396, }; diff -rNc2 dhcp-3.0-alpha-19990315/includes/osdep.h dhcp-3.0-alpha-19990326/includes/osdep.h *** dhcp-3.0-alpha-19990315/includes/osdep.h Mon Mar 15 21:50:39 1999 --- dhcp-3.0-alpha-19990326/includes/osdep.h Fri Mar 26 11:19:45 1999 *************** *** 63,66 **** --- 63,70 ---- #endif + #ifdef aix + # include "cf/aix.h" + #endif + #ifdef bsdi # include "cf/bsdos.h" *************** *** 229,232 **** --- 233,256 ---- #if defined (ARPHRD_LOOPBACK) && !defined (HAVE_ARPHRD_LOOPBACK) # define HAVE_ARPHRD_LOOPBACK + #endif + + #if defined (ARPHRD_ROSE) && !defined (HAVE_ARPHRD_ROSE) + # define HAVE_ARPHRD_ROSE + #endif + + #if defined (ARPHRD_IEEE802) && !defined (HAVE_ARPHRD_IEEE802) + # define HAVE_ARPHRD_IEEE802 + #endif + + #if defined (ARPHRD_FDDI) && !defined (HAVE_ARPHRD_FDDI) + # define HAVE_ARPHRD_FDDI + #endif + + #if defined (ARPHRD_AX25) && !defined (HAVE_ARPHRD_AX25) + # define HAVE_ARPHRD_AX25 + #endif + + #if defined (ARPHRD_NETROM) && !defined (HAVE_ARPHRD_NETROM) + # define HAVE_ARPHRD_NETROM #endif diff -rNc2 dhcp-3.0-alpha-19990315/includes/tree.h dhcp-3.0-alpha-19990326/includes/tree.h *** dhcp-3.0-alpha-19990315/includes/tree.h Mon Mar 15 22:37:51 1999 --- dhcp-3.0-alpha-19990326/includes/tree.h Thu Mar 25 14:03:44 1999 *************** *** 143,147 **** char *format; struct universe *universe; ! unsigned char code; }; --- 143,147 ---- char *format; struct universe *universe; ! int code; }; diff -rNc2 dhcp-3.0-alpha-19990315/relay/dhcrelay.c dhcp-3.0-alpha-19990326/relay/dhcrelay.c *** dhcp-3.0-alpha-19990315/relay/dhcrelay.c Mon Mar 15 21:50:41 1999 --- dhcp-3.0-alpha-19990326/relay/dhcrelay.c Fri Mar 26 13:27:24 1999 *************** *** 23,27 **** #ifndef lint static char ocopyright[] = ! "$Id: dhcrelay.c,v 1.23 1999/03/16 05:50:41 mellon Exp $ Copyright (c) 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ --- 23,27 ---- #ifndef lint static char ocopyright[] = ! "$Id: dhcrelay.c,v 1.24 1999/03/26 21:27:24 mellon Exp $ Copyright (c) 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ *************** *** 92,96 **** "Copyright 1997, 1998, 1999 The Internet Software Consortium."; static char arr [] = "All rights reserved."; ! static char message [] = "Internet Software Consortium DHCP Relay Agent V3.0-alpha 19990315"; static char contrib [] = "\nPlease contribute if you find this software useful."; static char url [] = "For info, please visit http://www.isc.org/dhcp-contrib.html\n"; --- 92,96 ---- "Copyright 1997, 1998, 1999 The Internet Software Consortium."; static char arr [] = "All rights reserved."; ! static char message [] = "Internet Software Consortium DHCP Relay Agent V3.0-alpha 19990326"; static char contrib [] = "\nPlease contribute if you find this software useful."; static char url [] = "For info, please visit http://www.isc.org/dhcp-contrib.html\n"; diff -rNc2 dhcp-3.0-alpha-19990315/server/confpars.c dhcp-3.0-alpha-19990326/server/confpars.c *** dhcp-3.0-alpha-19990315/server/confpars.c Mon Mar 15 22:37:51 1999 --- dhcp-3.0-alpha-19990326/server/confpars.c Fri Mar 26 11:19:45 1999 *************** *** 23,27 **** #ifndef lint static char copyright[] = ! "$Id: confpars.c,v 1.65 1999/03/16 06:37:51 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ --- 23,27 ---- #ifndef lint static char copyright[] = ! "$Id: confpars.c,v 1.67 1999/03/26 19:19:45 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ *************** *** 87,94 **** thinking that no leases have been assigned to anybody, which could create severe network chaos. */ ! if ((cfile = fopen (path_dhcpd_db, "r")) == NULL) ! log_fatal ("Can't open lease database %s: %m -- %s", ! path_dhcpd_db, ! "check for failed database rewrite attempt!"); do { token = next_token (&val, cfile); --- 87,98 ---- thinking that no leases have been assigned to anybody, which could create severe network chaos. */ ! if ((cfile = fopen (path_dhcpd_db, "r")) == NULL) { ! log_error ("Can't open lease database %s: %m -- %s", ! path_dhcpd_db, ! "check for failed database rewrite attempt!"); ! log_error ("Please read the dhcpd.leases manual page if you"); ! log_fatal ("don't know what to do about this."); ! } ! do { token = next_token (&val, cfile); *************** *** 384,391 **** break; case OPTION: token = next_token (&val, cfile); ! option = parse_option_name (cfile); if (option) { et = parse_option_statement (cfile, 1, option, --- 388,433 ---- break; + /* "server-identifier" is a special hack, equivalent to + "option dhcp-server-identifier". */ + case SERVER_IDENTIFIER: + option = dhcp_universe.options [DHO_DHCP_SERVER_IDENTIFIER]; + token = next_token (&val, cfile); + goto finish_option; + case OPTION: token = next_token (&val, cfile); ! option = parse_option_name (cfile, 1); if (option) { + token = peek_token (&val, cfile); + if (token == CODE) { + if (type != ROOT_GROUP) { + parse_warn ("option definitions%s%s", + " may not currently be", + " scoped."); + skip_to_semi (cfile); + free_option (option, + "parse_statement"); + break; + } + next_token (&val, cfile); + if (!parse_option_code_definition (cfile, + option)) + free_option (option, + "parse_statement"); + return declaration; + } + + /* If this wasn't an option code definition, don't + allow an unknown option. */ + if (option -> code == -1) { + parse_warn ("unknown option %s.%s", + option -> universe -> name, + option -> name); + skip_to_semi (cfile); + free_option (option, "parse_statement"); + return declaration; + } + + finish_option: et = parse_option_statement (cfile, 1, option, diff -rNc2 dhcp-3.0-alpha-19990315/server/dhcp.c dhcp-3.0-alpha-19990326/server/dhcp.c *** dhcp-3.0-alpha-19990315/server/dhcp.c Mon Mar 15 22:37:52 1999 --- dhcp-3.0-alpha-19990326/server/dhcp.c Thu Mar 25 14:07:54 1999 *************** *** 23,27 **** #ifndef lint static char copyright[] = ! "$Id: dhcp.c,v 1.83 1999/03/16 06:37:52 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ --- 23,27 ---- #ifndef lint static char copyright[] = ! "$Id: dhcp.c,v 1.84 1999/03/25 22:07:54 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ *************** *** 239,243 **** we can't send this lease to the client. */ if (lease) { - log_info ("%s", msgbuf); ack_lease (packet, lease, DHCPACK, 0, msgbuf); } else --- 239,242 ---- *************** *** 590,594 **** /* Make sure this packet satisfies the configured minimum number of seconds. */ ! if ((oc = lookup_option (state -> options.server_hash, SV_MIN_SECS))) { if (evaluate_option_cache (&d1, packet, --- 589,594 ---- /* Make sure this packet satisfies the configured minimum number of seconds. */ ! if (offer == DHCPOFFER && ! (oc = lookup_option (state -> options.server_hash, SV_MIN_SECS))) { if (evaluate_option_cache (&d1, packet, diff -rNc2 dhcp-3.0-alpha-19990315/server/dhcpd.c dhcp-3.0-alpha-19990326/server/dhcpd.c *** dhcp-3.0-alpha-19990315/server/dhcpd.c Mon Mar 15 21:55:40 1999 --- dhcp-3.0-alpha-19990326/server/dhcpd.c Fri Mar 26 13:27:22 1999 *************** *** 23,27 **** #ifndef lint static char ocopyright[] = ! "$Id: dhcpd.c,v 1.60 1999/03/16 05:55:40 mellon Exp $ Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium."; #endif --- 23,27 ---- #ifndef lint static char ocopyright[] = ! "$Id: dhcpd.c,v 1.61 1999/03/26 21:27:22 mellon Exp $ Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium."; #endif *************** *** 29,33 **** "Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium."; static char arr [] = "All rights reserved."; ! static char message [] = "Internet Software Consortium DHCP Server V3.0-alpha 980315"; static char contrib [] = "\nPlease contribute if you find this software useful."; static char url [] = "For info, please visit http://www.isc.org/dhcp-contrib.html\n"; --- 29,33 ---- "Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium."; static char arr [] = "All rights reserved."; ! static char message [] = "Internet Software Consortium DHCP Server V3.0-alpha 980326"; static char contrib [] = "\nPlease contribute if you find this software useful."; static char url [] = "For info, please visit http://www.isc.org/dhcp-contrib.html\n"; diff -rNc2 dhcp-3.0-alpha-19990315/server/dhcpd.conf.5 dhcp-3.0-alpha-19990326/server/dhcpd.conf.5 *** dhcp-3.0-alpha-19990315/server/dhcpd.conf.5 Mon Mar 15 21:50:45 1999 --- dhcp-3.0-alpha-19990326/server/dhcpd.conf.5 Fri Mar 26 11:19:46 1999 *************** *** 672,676 **** .I hardware-address should be a set of hexadecimal octets (numbers from 0 through ff) ! seperated by colons. The \fIhardwarefR statement may also be used for DHCP clients. .PP --- 672,676 ---- .I hardware-address should be a set of hexadecimal octets (numbers from 0 through ff) ! seperated by colons. The \fIhardware\fR statement may also be used for DHCP clients. .PP