Documentation/Installation/DHCP: dhcp-3.0.5-ldap.20070318.patch

File dhcp-3.0.5-ldap.20070318.patch, 188.7 kB (added by alex, 11 months ago)

newer patch from Brian Masney that he has not yet released publically

  • dhcp-3.0.5/Changelog-LDAP

    old new  
     12007-3-18 Brian Masney <masneyb@ntelos.net> 
     2        * server/ldap.c - added more debug statements and updated some of the 
     3        existing statements. Fixed a bug where some LDAP entries could be 
     4        ignored on startup. 
     5 
     6        * README.ldap - fixed problem in the example LDIF file. 
     7 
     82007-2-23 Brian Masney <masneyb@ntelos.net> 
     9        * contrib/dhcpd-conf-to-ldap.pl - fixed a parsing bug in which 
     10        didn't handle correctly quoted string containing spaces. 
     11        (Rapha?l Luta <raphael.luta@aptiwan.com>) 
     12 
     13        * dst/Makefile.dist server/Makefile.dist site.conf - updated build 
     14        method when using -lssl. 
     15        (from Marius Tomaschewski <mt@suse.de>) 
     16 
     17        * server/ldap.c - fix for ldap_read_function to avoid returning 
     18        empty strings (skipped host declaration from ldap) that are causing 
     19        parsing errors in ldap-dynamic mode. 
     20        (from Marius Tomaschewski <mt@suse.de>) 
     21 
     22        * includes/dhcpd.h README.ldap server/dhcpd.c server/ldap.c 
     23        server/stables.c - added ldap-ssl <off|start_tls|ldaps|on> option and 
     24        several ldap-tls* options, that are described in the "man ldap.conf". 
     25        (from Marius Tomaschewski <mt@suse.de>) 
     26 
     27        * includes/dhcpd.h server/ldap.c server/stables.c - added ldap-referrals 
     28        <on|off> option. Also implemented a LDAP rebuind function 
     29        (from Kalyan <skalyanasundaram@novell.com>) 
     30 
     31        * includes/dhcpd.h server/ldap.c server/stables.c - renamed dhcpd.conf 
     32        option ldap-server-cn to ldap-dhcp-server-cn 
     33        (from Marius Tomaschewski <mt@suse.de>) 
     34 
     35        * contrib/dhcp.schema - schema updates  
     36        (from Kalyan <skalyanasundaram@novell.com>) 
     37 
     38        * server/ldap.c server/ldap_casa.c - CASA support fixes 
     39        (from Marius Tomaschewski <mt@suse.de>) 
     40 
     41        * server/ldap.c - added strncat() fix 
     42        (from Marius Tomaschewski <mt@suse.de>) 
     43 
     442006-12-15 Brian Masney <masneyb@ntelos.net> 
     45        * server/ldap.c (ldap_read_config) - unbind from the LDAP server after 
     46        the config file has been ran if the server is being ran in static mode 
     47        (from Tomas Hoger <thoger@pobox.sk>) 
     48 
     49        * server/ldap.c (ldap_read_function) - fixed bug where the entire 
     50        configuration was not being processed in the LDAP directory. 
     51 
     52        * server/ldap.c - added the following functions for reading values 
     53        from the config file: _do_lookup_dhcp_string_option(), 
     54        _do_lookup_dhcp_int_option() and _do_lookup_dhcp_enum_option(). This 
     55        helped to clean up ldap_start() start a bit. Also, various small 
     56        formatting changes to the code. 
     57 
     582006-12-15 Marius Tomaschewski <mt@suse.de> 
     59        * Changelog-LDAP - Added / changed some of entries in 
     60        Changelog-LDAP, e.g.  changes to the dhcpServer and 
     61        dhcpService objectclasses in schema file was not mentioned. 
     62 
     63        * server/ldap.c Some a little bit paranoid checks to strchr results 
     64        in the group patch, avoided allocation of groupname using snprintf 
     65        with a "%.*s" format. 
     66 
     67        * server/ldap.c - Readded FIXME comment about one space in 
     68        dhcpHWAddress. 
     69 
     70        * server/ldap.c Changed "dhcpdnsZone" and "dhcpdnszoneServer" into 
     71        "dhcpDnsZone" and "dhcpDnsZoneServer". 
     72 
     73        * Fixed memory leak in ldap_parse_zone (dfree of keyCn), added checks 
     74        for dmalloc and strchr results. 
     75 
     76        * ldap_casa.c, ldap_casa.h - surrounded content of ldap_casa.h and 
     77        ldap_casa.c with if defined(LDAP_CASA_AUTH). 
     78 
     79        * contrib/dhcp.schema  - Reverted the equality change for dhcpOption. 
     80        The dhcp options are case-insensitive in dhcpd.conf. 
     81 
     82        * Changed "dhcpdnsZone" and "dhcpdnszoneServer" into "dhcpDnsZone" 
     83        and "dhcpDnsZoneServer". 
     84 
     85        * Changed "FQDNs" into "DNs" in dhcpLocatorDN description (DN is already 
     86        absolute, RDN is relative DN, FQDN means a full qualified domain name). 
     87 
     882006-12-15 Kalyan <skalyanasundaram@novell.com> 
     89        * includes/ldap_casa.h server/ldap_casa.c - updated to support CASA 
     90        1.7 
     91 
     922006-8-15 Kalyan <skalyanasundaram@novell.com> 
     93        * server/ldap.c (ldap_parse_options) - fetch option from the group 
     94        if the host belongs to that group in the dynamic method. 
     95 
     96        * contrib/dhcp.schema - modified dhcpServiceDN attribute in dhcpServer 
     97        objectclasses to be optional instead of mandatory 
     98 
     99        * contrib/dhcp.schema - modified dhcpPrimaryDN attribute in dhcpService 
     100        objectclasses to be optional instead of mandatory 
     101 
     102        * contrib/dhcp.schema - schema has been updated with 
     103        new objectclasses dhcpLocator,dhcpTsigKey,dhcpdnsZone,dhcpFailOver and 
     104        many attributes. 
     105 
     106        * contrib/dhcp.schema - dhcpHWAddress's equality has been modified to 
     107        caseIgnoreIA5Match. 
     108 
     109        * server/ldap.c - added support for reading the dhcpTsigKey and 
     110        dhcpdnsZone objects.  
     111 
     112        * server/ldap.c (ldap_parse_options) Fetch option from the group if 
     113        the host belongs to that group in the dynamic method. 
     114 
     115        * server/ldap.c - CASA authentication is enabled. 
     116 
     117        * server/ldap.c - introduced new attribute ldap-server-cn to mention 
     118        the dhcpServer object name in configuration. 
     119 
     1202006-7-17 Brian Masney <masneyb@ntelos.net> 
     121        * server/ldap.c (ldap_read_function) - fixes for reading the data 
     122        from the LDAP tree in some cases (patch from 
     123        Darrin Smith <beldin@beldin.org>) 
     124 
     1252006-3-17 Brian Masney <masneyb@ntelos.net> 
     126        * server/ldap.c (ldap_read_function) - added patch from  
     127        Dmitriy Bogun <kabanyura@gmail.com>. This patch fixes a bug when 
     128        EOF wasn't returned in some cases. 
     129 
     1302005-9-26 Brian Masney <masneyb@ntelos.net> 
     131        * server/ldap.c (ldap_start) - added support for reading the 
     132        ldap-port option. This option was not being used. 
     133 
     1342005-5-24 Brian Masney <masneyb@ntelos.net> 
     135        * server/ldap.c (ldap_parse_host) - allow dhcpHost entries that do 
     136        not have a hardware address associated with them 
     137 
     1382005-4-11 Brian Masney <masneyb@ntelos.net> 
     139        * README.ldap - updated directions on how to use LDAP over SSL on 
     140        non-Linux machines 
     141 
     1422005-2-23 Brian Masney <masneyb@ntelos.net> 
     143        * server/ldap.c (ldap_generate_config_string) - do a case insensitive 
     144        string comparsion when comparing the object classes 
     145 
     1462004-11-8 Brian Masney <masneyb@ntelos.net> 
     147        * debian/control - updated the depends and build-depends line 
     148        (from Andrew Pollock <me@andrew.net.au>) 
     149 
     1502004-10-13 Brian Masney <masneyb@ntelos.net> 
     151        * server/ldap.c (ldap_start) - allow doing an anonymous bind to the 
     152        LDAP server 
     153 
     1542004-9-27 Brian Masney <masneyb@ntelos.net> 
     155        * contrib/dhcpd-conf-to-ldap.pl - make sure the DHCP hardware address 
     156        is always lowercased 
     157 
     1582004-7-30 Brian Masney <masneyb@ntelos.net> 
     159        * server/ldap.c - added more debbuging statements. Fixed possible crash 
     160        that could occur whenever more than 1 external DN is added to an LDAP 
     161        entry. Fixed possible infinite loop when reading the external DNs. 
     162        (from Sebastian Hetze <s.hetze@linux-ag.de>) 
     163 
     1642004-7-1 Brian Masney <masneyb@ntelos.net> 
     165        * README.ldap - updated build instructions paragraph 
     166        (from Mason Schmitt <sysadmin@sunwave.net>) 
     167 
     1682004-6-29 Brian Masney <masneyb@ntelos.net> 
     169        * debian/control - set the minimum required version of the DHCP server 
     170        to be 3.0.1rc9 
     171 
     172        * configure - fix for sed when configure was run from an older shell 
     173 
     1742004-6-22 Brian Masney <masneyb@ntelos.net> 
     175        * Updated patch to use ISC DHCP 3.0.1rc14 
     176 
     1772004-5-24 Brian Masney <masneyb@ntelos.net> 
     178        * server/ldap.c - don't append a ; to the end of a dhcpStatement if it 
     179        ends in } 
     180 
     181        * server/ldap.c contrib/dhcpd-conf-to-ldap.pl - support having multiple 
     182        dhcpRange statements (from Marco D'Ettorre <marco.dettorre@sys-net.it>) 
     183 
     1842004-5-5 Brian Masney <masneyb@ntelos.net> 
     185        * server/ldap.c - added more debugging statements when 
     186        it is compiled in to help troubleshoot parsing errors. Don't free 
     187        a LDAP connection prematurely when there is a reference to another 
     188        LDAP tree. If the config entry ends in }, make sure a ; gets tacked 
     189        on 
     190 
     191        * debian/* - Updated version number. Renamed package from 
     192        dhcp3-ldap-ntelos to dhcp3-server-ldap. 
     193 
     194        * server/ldap.c - enclose the shared-network name in quotes so 
     195        that there can be shared network statements in LDAP that have spaces 
     196        in them 
     197 
     198        * configure - after the work directory is setup, add -lldap -llber 
     199        to the server Makefile 
     200 
     201Wed Apr 21 15:09:08 CEST 2004 - mt@suse.de 
     202        * contrib/dhcpd-conf-to-ldap.pl: 
     203          - added "--conf=file" option usable instead of stdin 
     204          - added "--ldif=file" option usable instead of stdout 
     205          - added "--second=host|dn" option usefull for failover 
     206          - added "--use=feature" option to enable extended features; 
     207            currently used to enable failover (default is disabled). 
     208          - extended remaining_line() to support block statements 
     209          - fixed / improved failover support, added notes about 
     210 
     211        * server/ldap.c: 
     212          - moved code checking statement ends to check_statement_end() 
     213          - moved parsing of entry options/statements to 
     214            ldap_parse_entry_options() 
     215          - moved code closing debug fd into ldap_close_debug_fd() 
     216          - moved code writing to debug fd into ldap_write_debug() 
     217          - added support for full hostname in dhcpServer search filter 
     218          - added support for multiple dhcpService entries in dhcpServer object 
     219          - added parsing of options and statements for dhcpServer object 
     220          - added verify if dhcpService contains server dn as primary or 
     221            secondary 
     222          - changed to search for dhcpHost,dhcpSubClass bellow of all 
     223            dhcpService trees instead of base-dn (avoids finding of hosts in 
     224            foreign configs) 
     225          - fixes to free all dn's fetched by ldap_get_dn (e.g. debug output) 
     226          - fixes to free ldap results, mainly in cases where no LDAP_SUCCESS 
     227            returned or other error conditions happened 
     228          - fixed/improved some log messages 
     229 
     2302004-3-30 Brian Masney <masneyb@ntelos.net> 
     231        * contrib/dhcpd-conf-to-ldap.pl - added option to control the 
     232        DHCP Config DN. Wrap the DHCP Statements in { } 
     233        This patch was contributed by Marius Tomaschewski <mt@suse.de> 
     234 
     235        * server/ldap.c - changed ldap_username and ldap_password to 
     236        be optional (anonymous bind is used then). Added {} block support 
     237        to dhcpStatements. (no ";" at end if statement ends with a "}"). 
     238        Fixed writing to ldap-debug-file. Changed find_haddr_in_ldap() to 
     239        use dhcpHost objectClass in its filter 
     240        This patch was contributed by Marius Tomaschewski <mt@suse.de> 
     241 
     2422004-3-23 Brian Masney <masneyb@ntelos.net> 
     243        * contrib/dhcpd-conf-to-ldap.pl - added options for server, basedn 
     244        options and usage message (Net::Domain instead of SYS::Hostname). 
     245        Added handling of zone, authoritative and failover (config and 
     246        pool-refs) statements. Added numbering of groups and pools per 
     247        subnet. This patch was contributed by Marius Tomaschewski <mt@suse.de> 
     248 
     2492004-2-26 Brian Masney <masneyb@ntelos.net> 
     250        * fixed an instance where the LDAP server would restart, but the DHCP 
     251        server would not reconnect 
     252 
     2532004-2-18 Brian Masney <masneyb@ntelos.net> 
     254        * allow multiple dhcp*DN entries in the LDAP entry. 
     255 
     2562003-9-11 Brian Masney <masneyb@ntelos.net> 
     257        * updated patch to work with 3.0.1rc12 
     258 
  • dhcp-3.0.5/README.ldap

    old new  
     1LDAP Support in DHCP 
     2Brian Masney <masneyb@ntelos.net> 
     3Last updated 3/23/2003 
     4 
     5This document describes setting up the DHCP server to read it's configuration  
     6from LDAP. This work is based on the IETF document  
     7draft-ietf-dhc-ldap-schema-01.txt included in the doc directory. For the latest 
     8version of this document, please see http://home.ntelos.net/~masneyb. 
     9 
     10First question on most people's mind is "Why do I want to store my  
     11configuration in LDAP?" If you run a small DHCP server, and the configuration 
     12on it rarely changes, then you won't need to store your configuration in LDAP. 
     13But, if you have several DHCP servers, and you want an easy way to manage your  
     14configuration, this can be a solution.  
     15 
     16The first step will be to setup your LDAP server. I am using OpenLDAP from 
     17www.openldap.org. Building and installing OpenLDAP is beyond the scope of this  
     18document. There is plenty of documentation out there about this. Once you have  
     19OpenLDAP installed, you will have to edit your slapd.conf file. I added the  
     20following 2 lines to my configuration file: 
     21 
     22include         /etc/ldap/schema/dhcp.schema 
     23index           dhcpHWAddress   eq 
     24index           dhcpClassData   eq 
     25 
     26The first line tells it to include the dhcp schema file. You will find this  
     27file under the contrib directory in this distribution. You will need to copy  
     28this file to where your other schema files are (maybe 
     29/usr/local/openldap/etc/openldap/schema/). The second line sets up 
     30an index for the dhcpHWAddress parameter. The third parameter is for reading  
     31subclasses from LDAP every time a DHCP request comes in. Make sure you run the  
     32slapindex command and restart slapd to have these changes to into effect. 
     33 
     34Now that you have LDAP setup, you should be able to use gq (http://biot.com/gq/) 
     35to verify that the dhcp schema file is loaded into LDAP. Pull up gq, and click 
     36on the Schema tab. Go under objectClasses, and you should see at least the  
     37following object classes listed: dhcpClass, dhcpGroup, dhcpHost, dhcpOptions,  
     38dhcpPool, dhcpServer, dhcpService, dhcpSharedNetwork, dhcpSubClass, and  
     39dhcpSubnet. If you do not see these, you need to check over your LDAP  
     40configuration before you go any further. 
     41 
     42You should now be ready to build DHCP. If you would like to enable LDAP over 
     43SSL, you will need to perform the following steps: 
     44 
     45  * Edit the includes/site.h file and uncomment the USE_SSL line 
     46    or specify "-DUSE_SSL" via CFLAGS. 
     47  * Edit the dst/Makefile.dist file and remove md5_dgst.c and md5_dgst.o 
     48    from the SRC= and OBJ= lines (around line 24) 
     49  * Now run configure in the base source directory. If you chose to enable 
     50    LDAP over SSL, you must append -lcrypto -lssl to the LIBS= line in the file 
     51    work.os/server/Makefile (replace os with your operating system, linux-2.2 on 
     52    my machine).  You should now be able to type make to build your DHCP server. 
     53 
     54If you choose to not enable LDAP over SSL, then you only need to run configure 
     55and make in the toplevel source directory. 
     56 
     57Once you have DHCP installed, you will need to setup your initial plaintext  
     58config file. In my /etc/dhcpd.conf file, I have: 
     59 
     60ldap-server "localhost"; 
     61ldap-port 389; 
     62ldap-username "cn=DHCP User, dc=ntelos, dc=net"; 
     63ldap-password "blah"; 
     64ldap-base-dn "dc=ntelos, dc=net"; 
     65ldap-method dynamic; 
     66ldap-debug-file "/var/log/dhcp-ldap-startup.log"; 
     67 
     68If SSL has been enabled at compile time using the USE_SSL flag, the dhcp 
     69server trys to use TLS if possible, but continues without TLS if not. 
     70 
     71You can modify this behaviour using following option in /etc/dhcpd.conf: 
     72 
     73ldap-ssl <off | ldaps | start_tls | on> 
     74   off:       disables TLS/LDAPS. 
     75   ldaps:     enables LDAPS -- don't forget to set ldap-port to 636. 
     76   start_tls: enables TLS using START_TLS command 
     77   on:        enables LDAPS if ldap-port is set to 636 or TLS in  
     78              other cases. 
     79 
     80See also "man 5 ldap.conf" for description the following TLS related  
     81options: 
     82   ldap-tls-reqcert, ldap-tls-ca-file, ldap-tls-ca-dir, ldap-tls-cert 
     83   ldap-tls-key, ldap-tls-crlcheck, ldap-tls-ciphers, ldap-tls-randfile 
     84 
     85All of these parameters should be self explanatory except for the ldap-method. 
     86You can set this to static or dynamic. If you set it to static, the  
     87configuration is read once on startup, and LDAP isn't used anymore. But, if you 
     88set this to dynamic, the configuration is read once on startup, and the  
     89hosts that are stored in LDAP are looked up every time a DHCP request comes in. 
     90 
     91When the optional statement ldap-debug-file is specified, on startup the DHCP 
     92server will write out the configuration that it generated from LDAP. If you are 
     93getting errors about your LDAP configuration, this is a good place to start 
     94looking. 
     95 
     96The next step is to set up your LDAP tree. Here is an example config that will 
     97give a 10.100.0.x address to machines that have a host entry in LDAP.  
     98Otherwise, it will give a 10.200.0.x address to them. (NOTE: replace  
     99dc=ntelos, dc=net with your base dn). If you would like to convert your  
     100existing dhcpd.conf file to LDIF format, there is a script  
     101contrib/dhcpd-conf-to-ldap.pl that will convert it for you. Type 
     102dhcpd-conf-to-ldap.pl --help to see the usage information for this script. 
     103 
     104# You must specify the server's host name in LDAP that you are going to run 
     105# DHCP on and point it to which config tree you want to use. Whenever DHCP  
     106# first starts up, it will do a search for this entry to find out which  
     107# config to use 
     108dn: cn=brian.ntelos.net, dc=ntelos, dc=net 
     109objectClass: top 
     110objectClass: dhcpServer 
     111cn: brian.ntelos.net 
     112dhcpServiceDN: cn=DHCP Service Config, dc=ntelos, dc=net 
     113 
     114# Here is the config tree that brian.ntelos.net points to.  
     115dn: cn=DHCP Service Config, dc=ntelos, dc=net 
     116cn: DHCP Service Config 
     117objectClass: top 
     118objectClass: dhcpService 
     119dhcpPrimaryDN: dc=ntelos, dc=net 
     120dhcpStatements: ddns-update-style none 
     121dhcpStatements: default-lease-time 600 
     122dhcpStatements: max-lease-time 7200 
     123 
     124# Set up a shared network segment 
     125dn: cn=WV Test, cn=DHCP Service Config, dc=ntelos, dc=net 
     126cn: WV Test 
     127objectClass: top 
     128objectClass: dhcpSharedNetwork 
     129 
     130# Set up a subnet declaration with a pool statement. Also note that we have 
     131# a dhcpOptions object with this entry 
     132dn: cn=10.100.0.0, cn=WV Test, cn=DHCP Service Config, dc=ntelos, dc=net 
     133cn: 10.100.0.0 
     134objectClass: top 
     135objectClass: dhcpSubnet 
     136objectClass: dhcpOptions 
     137dhcpOption: domain-name-servers 10.100.0.2 
     138dhcpOption: routers 10.100.0.1 
     139dhcpOption: subnet-mask 255.255.255.0 
     140dhcpOption: broadcast-address 10.100.0.255 
     141dhcpNetMask: 24 
     142 
     143# Set up a pool for this subnet. Only known hosts will get these IPs 
     144dn: cn=Known Pool, cn=10.100.0.0, cn=WV Test, cn=DHCP Service Config, dc=ntelos, dc=net 
     145cn: Known Pool 
     146objectClass: top 
     147objectClass: dhcpPool 
     148dhcpRange: 10.100.0.3 10.100.0.254 
     149dhcpPermitList: deny unknown-clients 
     150 
     151# Set up another subnet declaration with a pool statement 
     152dn: cn=10.200.0.0, cn=WV Test, cn=DHCP Service Config, dc=ntelos, dc=net 
     153cn: 10.200.0.0 
     154objectClass: top 
     155objectClass: dhcpSubnet 
     156objectClass: dhcpOptions 
     157dhcpOption: domain-name-servers 10.200.0.2 
     158dhcpOption: routers 10.200.0.1 
     159dhcpOption: subnet-mask 255.255.255.0 
     160dhcpOption: broadcast-address 10.200.0.255 
     161dhcpNetMask: 24 
     162 
     163# Set up a pool for this subnet. Only unknown hosts will get these IPs 
     164dn: cn=Known Pool, cn=10.200.0.0, cn=WV Test, cn=DHCP Service Config, dc=ntelos, dc=net 
     165cn: Known Pool 
     166objectClass: top 
     167objectClass: dhcpPool 
     168dhcpRange: 10.200.0.3 10.200.0.254 
     169dhcpPermitList: deny known clients 
     170 
     171# Set aside a group for all of our known MAC addresses 
     172dn: cn=Customers, cn=DHCP Service Config, dc=ntelos, dc=net 
     173objectClass: top 
     174objectClass: dhcpGroup 
     175cn: Customers 
     176 
     177# Host entry for my laptop 
     178dn: cn=brianlaptop, cn=Customers, cn=DHCP Service Config, dc=ntelos, dc=net 
     179objectClass: top 
     180objectClass: dhcpHost 
     181cn: brianlaptop 
     182dhcpHWAddress: ethernet 00:00:00:00:00:00 
     183 
     184You can use the command slapadd to load all of these entries into your LDAP  
     185server. After you load this, you should be able to start up DHCP. If you run 
     186into problems reading the configuration, try running dhcpd with the -d flag.  
     187If you still have problems, edit the site.conf file in the DHCP source and 
     188add the line: COPTS= -DDEBUG_LDAP and recompile DHCP. (make sure you run make  
     189clean and rerun configure before you rebuild). 
     190 
  • dhcp-3.0.5/common/conflex.c

    old new  
    4747static enum dhcp_token read_number PROTO ((int, struct parse *)); 
    4848static enum dhcp_token read_num_or_name PROTO ((int, struct parse *)); 
    4949static enum dhcp_token intern PROTO ((char *, enum dhcp_token)); 
     50static int read_function PROTO ((struct parse *)); 
    5051 
    5152isc_result_t new_parse (cfile, file, inbuf, buflen, name, eolp) 
    5253        struct parse **cfile; 
     
    7475        tmp -> file = file; 
    7576        tmp -> eol_token = eolp; 
    7677 
     78        if (file != -1) { 
     79                tmp -> read_function = read_function;; 
     80        } 
     81 
    7782        tmp -> bufix = 0; 
    7883        tmp -> buflen = buflen; 
    7984        if (inbuf) { 
     
    113118        int c; 
    114119 
    115120        if (cfile -> bufix == cfile -> buflen) { 
    116                 if (cfile -> file != -1) { 
    117                         cfile -> buflen = 
    118                                 read (cfile -> file, 
    119                                       cfile -> inbuf, cfile -> bufsiz); 
    120                         if (cfile -> buflen == 0) { 
    121                                 c = EOF; 
    122                                 cfile -> bufix = 0; 
    123                         } else if (cfile -> buflen < 0) { 
    124                                 c = EOF; 
    125                                 cfile -> bufix = cfile -> buflen = 0; 
    126                         } else { 
    127                                 c = cfile -> inbuf [0]; 
    128                                 cfile -> bufix = 1; 
    129                         } 
    130                 } else 
     121                if (cfile -> read_function) { 
     122                        c = cfile -> read_function (cfile); 
     123                } else { 
    131124                        c = EOF; 
     125                } 
    132126        } else { 
    133127                c = cfile -> inbuf [cfile -> bufix]; 
    134128                cfile -> bufix++; 
     
    11281122        } 
    11291123        return dfv; 
    11301124} 
     1125 
     1126 
     1127static int 
     1128read_function (struct parse * cfile) 
     1129{ 
     1130  int c; 
     1131 
     1132        cfile -> buflen = read (cfile -> file, cfile -> inbuf, cfile -> bufsiz); 
     1133        if (cfile -> buflen == 0) { 
     1134                c = EOF; 
     1135                cfile -> bufix = 0; 
     1136        } else if (cfile -> buflen < 0) { 
     1137                c = EOF; 
     1138                cfile -> bufix = cfile -> buflen = 0; 
     1139        } else { 
     1140                c = cfile -> inbuf [0]; 
     1141                cfile -> bufix = 1; 
     1142        } 
     1143 
     1144        return c; 
     1145} 
     1146 
  • dhcp-3.0.5/common/print.c

    old new  
    166166} 
    167167 
    168168char *print_hw_addr (htype, hlen, data) 
    169         int htype; 
    170         int hlen; 
    171         unsigned char *data; 
     169        const int htype; 
     170        const int hlen; 
     171        const unsigned char *data; 
    172172{ 
    173173        static char habuf [49]; 
    174174        char *s; 
  • dhcp-3.0.5/contrib/dhcp.schema

    old new  
     1attributetype ( 2.16.840.1.113719.1.203.4.1  
     2        NAME 'dhcpPrimaryDN'  
     3        EQUALITY distinguishedNameMatch 
     4        DESC 'The DN of the dhcpServer which is the primary server for the configuration.'  
     5        SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE ) 
     6 
     7attributetype ( 2.16.840.1.113719.1.203.4.2  
     8        NAME 'dhcpSecondaryDN'  
     9        EQUALITY distinguishedNameMatch 
     10        DESC 'The DN of dhcpServer(s) which provide backup service for the configuration.' 
     11        SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 ) 
     12 
     13attributetype ( 2.16.840.1.113719.1.203.4.3  
     14        NAME 'dhcpStatements'  
     15        EQUALITY caseIgnoreIA5Match 
     16        DESC 'Flexible storage for specific data depending on what object this exists in. Like conditional statements, server parameters, etc. This allows the standard to evolve without needing to adjust the schema.'  
     17        SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) 
     18 
     19attributetype ( 2.16.840.1.113719.1.203.4.4  
     20        NAME 'dhcpRange'  
     21        EQUALITY caseIgnoreIA5Match 
     22        DESC 'The starting & ending IP Addresses in the range (inclusive), separated by a hyphen; if the range only contains one address, then just the address can be specified with no hyphen.  Each range is defined as a separate value.' 
     23        SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) 
     24 
     25attributetype ( 2.16.840.1.113719.1.203.4.5  
     26        NAME 'dhcpPermitList'  
     27        EQUALITY caseIgnoreIA5Match 
     28        DESC 'This attribute contains the permit lists associated with a pool. Each permit list is defined as a separate value.'  
     29        SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) 
     30 
     31attributetype ( 2.16.840.1.113719.1.203.4.6  
     32        NAME 'dhcpNetMask'  
     33        EQUALITY integerMatch 
     34        DESC 'The subnet mask length for the subnet.  The mask can be easily computed from this length.'  
     35        SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) 
     36 
     37attributetype ( 2.16.840.1.113719.1.203.4.7  
     38        NAME 'dhcpOption'  
     39        EQUALITY caseIgnoreIA5Match 
     40        DESC 'Encoded option values to be sent to clients.  Each value represents a single option and contains (OptionTag, Length, OptionValue) encoded in the format used by DHCP.'  
     41        SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) 
     42 
     43attributetype ( 2.16.840.1.113719.1.203.4.8  
     44        NAME 'dhcpClassData'  
     45        EQUALITY caseIgnoreIA5Match 
     46        DESC 'Encoded text string or list of bytes expressed in hexadecimal, separated by colons.  Clients match subclasses based on matching the class data with the results of match or spawn with statements in the class name declarations.'  
     47        SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) 
     48 
     49attributetype ( 2.16.840.1.113719.1.203.4.9  
     50        NAME 'dhcpOptionsDN'  
     51        EQUALITY distinguishedNameMatch 
     52        DESC 'The distinguished name(s) of the dhcpOption objects containing the configuration options provided by the server.'  
     53        SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 ) 
     54 
     55attributetype ( 2.16.840.1.113719.1.203.4.10  
     56        NAME 'dhcpHostDN'  
     57        EQUALITY distinguishedNameMatch 
     58        DESC 'the distinguished name(s) of the dhcpHost objects.'  
     59        SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 )  
     60 
     61attributetype ( 2.16.840.1.113719.1.203.4.11  
     62        NAME 'dhcpPoolDN'  
     63        EQUALITY distinguishedNameMatch 
     64        DESC 'The distinguished name(s) of pools.'  
     65        SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 ) 
     66 
     67attributetype ( 2.16.840.1.113719.1.203.4.12  
     68        NAME 'dhcpGroupDN'  
     69        EQUALITY distinguishedNameMatch 
     70        DESC 'The distinguished name(s)   of the groups.'  
     71        SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 ) 
     72 
     73attributetype ( 2.16.840.1.113719.1.203.4.13  
     74        NAME 'dhcpSubnetDN'  
     75        EQUALITY distinguishedNameMatch 
     76        DESC 'The distinguished name(s) of the subnets.'  
     77        SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 ) 
     78 
     79attributetype ( 2.16.840.1.113719.1.203.4.14  
     80        NAME 'dhcpLeaseDN'  
     81        EQUALITY distinguishedNameMatch 
     82        DESC 'The distinguished name of a client address.'  
     83        SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE) 
     84 
     85attributetype ( 2.16.840.1.113719.1.203.4.15  
     86        NAME 'dhcpLeasesDN'  
     87        DESC 'The distinguished name(s) client addresses.'  
     88        EQUALITY distinguishedNameMatch 
     89        SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 ) 
     90 
     91attributetype ( 2.16.840.1.113719.1.203.4.16  
     92        NAME 'dhcpClassesDN'  
     93        EQUALITY distinguishedNameMatch 
     94        DESC 'The distinguished name(s) of a class(es) in a subclass.'  
     95        SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 ) 
     96 
     97attributetype ( 2.16.840.1.113719.1.203.4.17  
     98        NAME 'dhcpSubclassesDN'  
     99        EQUALITY distinguishedNameMatch 
     100        DESC 'The distinguished name(s) of subclass(es).'  
     101        SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 ) 
     102 
     103attributetype ( 2.16.840.1.113719.1.203.4.18  
     104        NAME 'dhcpSharedNetworkDN'  
     105        EQUALITY distinguishedNameMatch 
     106        DESC 'The distinguished name(s) of sharedNetworks.'  
     107        SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 ) 
     108 
     109attributetype ( 2.16.840.1.113719.1.203.4.19  
     110        NAME 'dhcpServiceDN'  
     111        EQUALITY distinguishedNameMatch 
     112        DESC 'The DN of dhcpService object(s)which contain the configuration information. Each dhcpServer object has this attribute identifying the DHCP configuration(s) that the server is associated with.'  
     113        SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 ) 
     114 
     115attributetype ( 2.16.840.1.113719.1.203.4.20  
     116        NAME 'dhcpVersion' 
     117        DESC 'The version attribute of this object.' 
     118        EQUALITY caseIgnoreIA5Match 
     119        SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) 
     120 
     121attributetype ( 2.16.840.1.113719.1.203.4.21  
     122        NAME 'dhcpImplementation'  
     123        EQUALITY caseIgnoreIA5Match 
     124        DESC 'Description of the DHCP Server implementation e.g. DHCP Servers vendor.'  
     125        SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) 
     126 
     127attributetype ( 2.16.840.1.113719.1.203.4.22  
     128        NAME 'dhcpAddressState'  
     129        EQUALITY caseIgnoreIA5Match 
     130        DESC 'This stores information about the current binding-status of an address.  For dynamic addresses managed by DHCP, the values should be restricted to the following: "FREE", "ACTIVE", "EXPIRED", "RELEASED", "RESET", "ABANDONED", "BACKUP".  For other addresses, it SHOULD be one of the following: "UNKNOWN", "RESERVED" (an address that is managed by DHCP that is reserved for a specific client), "RESERVED-ACTIVE" (same as reserved, but address is currently in use), "ASSIGNED" (assigned manually or by some other mechanism), "UNASSIGNED", "NOTASSIGNABLE".' 
     131        SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) 
     132 
     133attributetype ( 2.16.840.1.113719.1.203.4.23  
     134        NAME 'dhcpExpirationTime'  
     135        EQUALITY generalizedTimeMatch  
     136        DESC 'This is the time the current lease for an address expires.'  
     137        SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 SINGLE-VALUE ) 
     138 
     139attributetype ( 2.16.840.1.113719.1.203.4.24  
     140        NAME 'dhcpStartTimeOfState'  
     141        EQUALITY generalizedTimeMatch  
     142        DESC 'This is the time of the last state change for a leased address.'  
     143        SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 SINGLE-VALUE ) 
     144 
     145attributetype ( 2.16.840.1.113719.1.203.4.25  
     146        NAME 'dhcpLastTransactionTime'  
     147        EQUALITY generalizedTimeMatch  
     148        DESC 'This is the last time a valid DHCP packet was received from the client.' 
     149        SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 SINGLE-VALUE ) 
     150 
     151attributetype ( 2.16.840.1.113719.1.203.4.26  
     152        NAME 'dhcpBootpFlag'  
     153        EQUALITY booleanMatch  
     154        DESC 'This indicates whether the address was assigned via BOOTP.'  
     155        SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE ) 
     156 
     157attributetype ( 2.16.840.1.113719.1.203.4.27  
     158        NAME 'dhcpDomainName'  
     159        EQUALITY caseIgnoreIA5Match 
     160        DESC 'This is the name of the domain sent to the client by the server.  It is essentially the same as the value for DHCP option 15 sent to the client, and represents only the domain - not the full FQDN.  To obtain the full FQDN assigned to the client you must prepend the "dhcpAssignedHostName" to this value with a ".".'  
     161        SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) 
     162 
     163attributetype ( 2.16.840.1.113719.1.203.4.28  
     164        NAME 'dhcpDnsStatus'  
     165        EQUALITY integerMatch 
     166        DESC 'This indicates the status of updating DNS resource records on behalf of the client by the DHCP server for this address.  The value is a 16-bit bitmask.' 
     167        SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) 
     168 
     169attributetype ( 2.16.840.1.113719.1.203.4.29  
     170        NAME 'dhcpRequestedHostName'  
     171        EQUALITY caseIgnoreIA5Match 
     172        DESC 'This is the hostname that was requested by the client.'  
     173        SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) 
     174 
     175attributetype ( 2.16.840.1.113719.1.203.4.30  
     176        NAME 'dhcpAssignedHostName'  
     177        EQUALITY caseIgnoreIA5Match 
     178        DESC 'This is the actual hostname that was assigned to a client. It may not be the name that was requested by the client.  The fully qualified domain name can be determined by appending the value of "dhcpDomainName" (with a dot separator) to this name.'  
     179        SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) 
     180 
     181attributetype ( 2.16.840.1.113719.1.203.4.31  
     182        NAME 'dhcpReservedForClient'  
     183        EQUALITY distinguishedNameMatch 
     184        DESC 'The distinguished name of a "dhcpClient" that an address is reserved for.  This may not be the same as the "dhcpAssignedToClient" attribute if the address is being reassigned but the current lease has not yet expired.' 
     185        SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE ) 
     186 
     187attributetype ( 2.16.840.1.113719.1.203.4.32  
     188        NAME 'dhcpAssignedToClient'  
     189        EQUALITY distinguishedNameMatch 
     190        DESC 'This is the distinguished name of a "dhcpClient" that an address is currently assigned to.  This attribute is only present in the class when the address is leased.'  
     191        SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE ) 
     192 
     193attributetype ( 2.16.840.1.113719.1.203.4.33  
     194        NAME 'dhcpRelayAgentInfo'  
     195        EQUALITY octetStringMatch 
     196        DESC 'If the client request was received via a relay agent, this contains information about the relay agent that was available from the DHCP request.  This is a hex-encoded option value.'  
     197        SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 SINGLE-VALUE ) 
     198 
     199attributetype ( 2.16.840.1.113719.1.203.4.34  
     200        NAME 'dhcpHWAddress'  
     201        EQUALITY caseIgnoreIA5Match 
     202        DESC 'The clients hardware address that requested this IP address.'  
     203        SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) 
     204 
     205attributetype ( 2.16.840.1.113719.1.203.4.35  
     206        NAME 'dhcpHashBucketAssignment'  
     207        EQUALITY octetStringMatch 
     208        DESC 'HashBucketAssignment bit map for the DHCP Server, as defined in DHC Load Balancing Algorithm [RFC 3074].'  
     209        SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 SINGLE-VALUE ) 
     210 
     211attributetype ( 2.16.840.1.113719.1.203.4.36  
     212        NAME 'dhcpDelayedServiceParameter'  
     213        EQUALITY integerMatch 
     214        DESC 'Delay in seconds corresponding to Delayed Service Parameter configuration, as defined in  DHC Load Balancing Algorithm [RFC 3074]. ' 
     215        SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) 
     216 
     217attributetype ( 2.16.840.1.113719.1.203.4.37  
     218        NAME 'dhcpMaxClientLeadTime'  
     219        EQUALITY integerMatch 
     220        DESC 'Maximum Client Lead Time configuration in seconds, as defined in DHCP Failover Protocol [FAILOVR]'  
     221        SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE ) 
     222 
     223attributetype ( 2.16.840.1.113719.1.203.4.38  
     224        NAME 'dhcpFailOverEndpointState'  
     225        EQUALITY caseIgnoreIA5Match 
     226        DESC 'Server (Failover Endpoint) state, as defined in DHCP Failover Protocol [FAILOVR]'  
     227        SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) 
     228 
     229attributetype ( 2.16.840.1.113719.1.203.4.39  
     230        NAME 'dhcpErrorLog'  
     231        EQUALITY caseIgnoreIA5Match 
     232        DESC 'Generic error log attribute that allows logging error conditions within a dhcpService or a dhcpSubnet, like no IP addresses available for lease.' 
     233        SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) 
     234 
     235attributetype ( 2.16.840.1.113719.1.203.4.40  
     236        NAME 'dhcpLocatorDN'  
     237        EQUALITY distinguishedNameMatch  
     238        DESC 'The DN of dhcpLocator object which contain the DNs of all DHCP configuration objects. There will be a single dhcpLocator object in the tree with links to all the DHCP objects in the tree'  
     239        SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 ) 
     240 
     241attributetype  ( 2.16.840.1.113719.1.203.4.41  
     242        NAME 'dhcpKeyAlgorithm'  
     243        EQUALITY caseIgnoreIA5Match  
     244        DESC 'Algorithm to generate TSIG Key'  
     245        SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) 
     246 
     247attributetype  ( 2.16.840.1.113719.1.203.4.42  
     248        NAME 'dhcpKeySecret'  
     249        EQUALITY octetStringMatch  
     250        DESC 'Secret to generate TSIG Key' SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 SINGLE-VALUE ) 
     251 
     252attributetype ( 2.16.840.1.113719.1.203.4.43  
     253        NAME 'dhcpDnsZoneServer'  
     254        EQUALITY caseIgnoreIA5Match  
     255        DESC 'Master server of the DNS Zone'  
     256        SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) 
     257 
     258attributetype ( 2.16.840.1.113719.1.203.4.44  
     259        NAME 'dhcpKeyDN'  
     260        EQUALITY distinguishedNameMatch  
     261        DESC 'The DNs of TSIG Key to use in secure dynamic updates. In case of locator object, this will be list of TSIG keys.  In case of DHCP Service, Shared Network, Subnet and DNS Zone, it will be a single key.'  
     262        SYNTAX 1.3.6.1.4.1.1466.115.121.1.12) 
     263 
     264attributetype ( 2.16.840.1.113719.1.203.4.45  
     265        NAME 'dhcpZoneDN'  
     266        EQUALITY distinguishedNameMatch  
     267        DESC 'The DNs of DNS Zone. In case of locator object, this will be list of DNS Zones in the tree. In case of DHCP Service, Shared Network and Subnet, it will be a single DNS Zone.'  
     268        SYNTAX 1.3.6.1.4.1.1466.115.121.1.12) 
     269 
     270attributetype ( 2.16.840.1.113719.1.203.4.46  
     271        NAME 'dhcpFailOverPrimaryServer'  
     272        EQUALITY caseIgnoreIA5Match  
     273        DESC 'IP address or DNS name of the server playing primary role in DHC Load Balancing and Fail over.'  
     274        SYNTAX 1.3.6.1.4.1.1466.115.121.1.26  ) 
     275 
     276attributetype ( 2.16.840.1.113719.1.203.4.47  
     277        NAME 'dhcpFailOverSecondaryServer'  
     278        EQUALITY caseIgnoreIA5Match  
     279        DESC 'IP address or DNS name of the server playing secondary role in DHC Load Balancing and Fail over.'  
     280        SYNTAX 1.3.6.1.4.1.1466.115.121.1.26  ) 
     281 
     282attributetype ( 2.16.840.1.113719.1.203.4.48 
     283        NAME 'dhcpFailOverPrimaryPort'  
     284        EQUALITY integerMatch  
     285        DESC 'Port on which primary server listens for connections from its fail over peer (secondary server)'  
     286        SYNTAX 1.3.6.1.4.1.1466.115.121.1.27  ) 
     287         
     288attributetype ( 2.16.840.1.113719.1.203.4.49 
     289        NAME 'dhcpFailOverSecondaryPort'  
     290        EQUALITY integerMatch  
     291        DESC 'Port on which secondary server listens for connections from its fail over peer (primary server)'  
     292        SYNTAX 1.3.6.1.4.1.1466.115.121.1.27  ) 
     293 
     294attributetype ( 2.16.840.1.113719.1.203.4.50 
     295        NAME 'dhcpFailOverResponseDelay'  
     296        EQUALITY integerMatch  
     297        DESC 'Maximum response time in seconds, before Server assumes that connection to fail over peer has failed'  
     298        SYNTAX 1.3.6.1.4.1.1466.115.121.1.27  ) 
     299 
     300attributetype ( 2.16.840.1.113719.1.203.4.51 
     301        NAME 'dhcpFailOverUnackedUpdates'  
     302        EQUALITY integerMatch  
     303        DESC 'Number of BNDUPD messages that server can send before it receives BNDACK from its fail over peer'  
     304        SYNTAX 1.3.6.1.4.1.1466.115.121.1.27  ) 
     305 
     306attributetype ( 2.16.840.1.113719.1.203.4.52 
     307        NAME 'dhcpFailOverSplit'  
     308        EQUALITY integerMatch  
     309        DESC 'Split between the primary and secondary servers for fail over purpose'  
     310        SYNTAX 1.3.6.1.4.1.1466.115.121.1.27  ) 
     311 
     312attributetype ( 2.16.840.1.113719.1.203.4.53 
     313        NAME 'dhcpFailOverLoadBalanceTime'  
     314        EQUALITY integerMatch  
     315        DESC 'Cutoff time in seconds, after which load balance is disabled'  
     316        SYNTAX 1.3.6.1.4.1.1466.115.121.1.27  ) 
     317 
     318attributetype ( 2.16.840.1.113719.1.203.4.54 
     319        NAME 'dhcpFailOverPeerDN'  
     320        EQUALITY distinguishedNameMatch  
     321        DESC 'The DNs of Fail over peers. In case of locator object, this will be list of fail over peers in the tree. In case of Subnet and pool, it will be a single Fail Over Peer'  
     322        SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 )  
     323 
     324#List of all servers in the tree 
     325attributetype ( 2.16.840.1.113719.1.203.4.55 
     326        NAME 'dhcpServerDN'  
     327        EQUALITY distinguishedNameMatch  
     328        DESC 'List of all  DHCP Servers in the tree. Used by dhcpLocatorObject'  
     329        SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 ) 
     330 
     331attributetype ( 2.16.840.1.113719.1.203.4.56 
     332        NAME 'dhcpComments'  
     333        EQUALITY caseIgnoreIA5Match  
     334        DESC 'Generic attribute that allows coments  within any DHCP object'  
     335        SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) 
     336 
     337# Classes 
     338 
     339objectclass ( 2.16.840.1.113719.1.203.6.1  
     340        NAME 'dhcpService'  
     341        DESC 'Service object that represents the actual DHCP Service configuration. This is a container object.'  
     342        SUP top  
     343        MUST (cn)  
     344        MAY ( dhcpPrimaryDN $ dhcpSecondaryDN $ dhcpServerDN $ dhcpSharedNetworkDN $ dhcpSubnetDN $ dhcpGroupDN $ dhcpHostDN $  dhcpClassesDN $ dhcpOptionsDN $ dhcpZoneDN $ dhcpKeyDN $ dhcpFailOverPeerDN $ dhcpStatements $dhcpComments $ dhcpOption) ) 
     345 
     346objectclass ( 2.16.840.1.113719.1.203.6.2  
     347        NAME 'dhcpSharedNetwork'  
     348        DESC 'This stores configuration information for a shared network.'  
     349        SUP top  
     350        MUST cn  
     351        MAY ( dhcpSubnetDN $ dhcpPoolDN $ dhcpOptionsDN $ dhcpZoneDN $ dhcpStatements $dhcpComments $ dhcpOption) X-NDS_CONTAINMENT ('dhcpService' ) ) 
     352 
     353objectclass ( 2.16.840.1.113719.1.203.6.3  
     354        NAME 'dhcpSubnet'  
     355        DESC 'This class defines a subnet. This is a container object.'  
     356        SUP top  
     357        MUST ( cn $ dhcpNetMask )  
     358        MAY ( dhcpRange $ dhcpPoolDN $ dhcpGroupDN $ dhcpHostDN $ dhcpClassesDN $ dhcpLeasesDN $ dhcpOptionsDN $ dhcpZoneDN $ dhcpKeyDN $ dhcpFailOverPeerDN $ dhcpStatements $ dhcpComments $ dhcpOption ) X-NDS_CONTAINMENT ('dhcpService' 'dhcpSharedNetwork') ) 
     359 
     360objectclass ( 2.16.840.1.113719.1.203.6.4  
     361        NAME 'dhcpPool'  
     362        DESC 'This stores configuration information about a pool.'  
     363        SUP top  
     364        MUST ( cn $ dhcpRange )  
     365        MAY ( dhcpClassesDN $ dhcpPermitList $ dhcpLeasesDN $ dhcpOptionsDN $ dhcpZoneDN $dhcpKeyDN $ dhcpStatements $ dhcpComments $ dhcpOption )  
     366        X-NDS_CONTAINMENT ('dhcpSubnet' 'dhcpSharedNetwork') ) 
     367 
     368objectclass ( 2.16.840.1.113719.1.203.6.5  
     369        NAME 'dhcpGroup'  
     370        DESC 'Group object that lists host DNs and parameters. This is a container object.'  
     371        SUP top  
     372        MUST cn  
     373        MAY ( dhcpHostDN $ dhcpOptionsDN $ dhcpStatements $ dhcpComments $ dhcpOption ) 
     374        X-NDS_CONTAINMENT ('dhcpSubnet' 'dhcpService' ) ) 
     375 
     376objectclass ( 2.16.840.1.113719.1.203.6.6  
     377        NAME 'dhcpHost'  
     378        DESC 'This represents information about a particular client'  
     379        SUP top  
     380        MUST cn  
     381        MAY  (dhcpLeaseDN $ dhcpHWAddress $ dhcpOptionsDN $ dhcpStatements $ dhcpComments $ dhcpOption)  
     382        X-NDS_CONTAINMENT ('dhcpService' 'dhcpSubnet' 'dhcpGroup') ) 
     383 
     384objectclass ( 2.16.840.1.113719.1.203.6.7  
     385        NAME 'dhcpClass'  
     386        DESC 'Represents information about a collection of related clients.'  
     387        SUP top  
     388        MUST cn  
     389        MAY (dhcpSubClassesDN $ dhcpOptionsDN $ dhcpStatements $ dhcpComments $ dhcpOption)  
     390        X-NDS_CONTAINMENT ('dhcpService' 'dhcpSubnet' ) ) 
     391 
     392objectclass ( 2.16.840.1.113719.1.203.6.8  
     393        NAME 'dhcpSubClass'  
     394        DESC 'Represents information about a collection of related classes.'  
     395        SUP top  
     396        MUST cn  
     397        MAY (dhcpClassData $ dhcpOptionsDN $ dhcpStatements $ dhcpComments $ dhcpOption) X-NDS_CONTAINMENT 'dhcpClass' ) 
     398 
     399objectclass ( 2.16.840.1.113719.1.203.6.9  
     400        NAME 'dhcpOptions'  
     401        DESC 'Represents information about a collection of options defined.'  
     402        SUP top AUXILIARY 
     403        MUST cn  
     404        MAY ( dhcpOption $ dhcpComments )  
     405        X-NDS_CONTAINMENT  ('dhcpService' 'dhcpSharedNetwork' 'dhcpSubnet' 'dhcpPool' 'dhcpGroup' 'dhcpHost' 'dhcpClass' ) ) 
     406 
     407objectclass ( 2.16.840.1.113719.1.203.6.10  
     408        NAME 'dhcpLeases'  
     409        DESC 'This class represents an IP Address, which may or may not have been leased.'  
     410        SUP top  
     411        MUST ( cn $ dhcpAddressState )  
     412        MAY ( dhcpExpirationTime $ dhcpStartTimeOfState $ dhcpLastTransactionTime $ dhcpBootpFlag $ dhcpDomainName $ dhcpDnsStatus $ dhcpRequestedHostName $ dhcpAssignedHostName $ dhcpReservedForClient $ dhcpAssignedToClient $ dhcpRelayAgentInfo $ dhcpHWAddress )  
     413        X-NDS_CONTAINMENT ( 'dhcpService' 'dhcpSubnet' 'dhcpPool') ) 
     414 
     415objectclass ( 2.16.840.1.113719.1.203.6.11  
     416        NAME 'dhcpLog'  
     417        DESC 'This is the object that holds past information about the IP address. The cn is the time/date stamp when the address was assigned or released, the address state at the time, if the address was assigned or released.'  
     418        SUP top  
     419        MUST ( cn )  
     420        MAY ( dhcpAddressState $ dhcpExpirationTime $ dhcpStartTimeOfState $ dhcpLastTransactionTime $ dhcpBootpFlag $ dhcpDomainName $ dhcpDnsStatus $ dhcpRequestedHostName $ dhcpAssignedHostName $ dhcpReservedForClient $ dhcpAssignedToClient $ dhcpRelayAgentInfo $ dhcpHWAddress $ dhcpErrorLog)  
     421        X-NDS_CONTAINMENT ('dhcpLeases' 'dhcpPool' 'dhcpSubnet' 'dhcpSharedNetwork' 'dhcpService' ) ) 
     422 
     423objectclass ( 2.16.840.1.113719.1.203.6.12  
     424        NAME 'dhcpServer'  
     425        DESC 'DHCP Server Object'  
     426        SUP top  
     427        MUST ( cn )  
     428        MAY (dhcpServiceDN  $ dhcpLocatorDN $ dhcpVersion $ dhcpImplementation $ dhcpHashBucketAssignment $ dhcpDelayedServiceParameter $ dhcpMaxClientLeadTime $ dhcpFailOverEndpointState $ dhcpStatements $ dhcpComments $ dhcpOption)  
     429        X-NDS_CONTAINMENT ('organization' 'organizationalunit' 'domain') ) 
     430 
     431objectclass ( 2.16.840.1.113719.1.203.6.13  
     432        NAME 'dhcpTSigKey'  
     433        DESC 'TSIG key for secure dynamic updates'  
     434        SUP top