[389-commits] include/base ldap/servers lib/base

Mark Reynolds mreynolds at fedoraproject.org
Mon Jun 15 19:50:33 UTC 2015


 include/base/eventhandler.h                           |  110 -
 include/base/eventlog.h                               |   57 
 include/base/nterr.h                                  |   58 
 include/base/nterrors.h                               |  104 -
 ldap/servers/plugins/acl/acldllmain.c                 |   80 
 ldap/servers/plugins/acl/libacl.def                   |   48 
 ldap/servers/plugins/chainingdb/cbdllmain.c           |   78 
 ldap/servers/plugins/chainingdb/libcb.def             |   47 
 ldap/servers/plugins/collation/collation.def          |   42 
 ldap/servers/plugins/collation/dllmain.c              |   84 
 ldap/servers/plugins/cos/cos.def                      |   43 
 ldap/servers/plugins/cos/dllmain.c                    |   56 
 ldap/servers/plugins/distrib/Makefile                 |   55 
 ldap/servers/plugins/distrib/Makefile.WINNT           |   76 
 ldap/servers/plugins/distrib/distrib.dsp              |  153 -
 ldap/servers/plugins/distrib/dllmain.c                |   54 
 ldap/servers/plugins/distrib/libdistrib.def           |   41 
 ldap/servers/plugins/http/dllmain.c                   |   56 
 ldap/servers/plugins/http/http.def                    |   45 
 ldap/servers/plugins/pam_passthru/libpam_passthru.def |   45 
 ldap/servers/plugins/pam_passthru/pam_ptdllmain.c     |   81 
 ldap/servers/plugins/passthru/libpassthru.def         |   46 
 ldap/servers/plugins/passthru/ptdllmain.c             |   83 
 ldap/servers/plugins/presence/dllmain.c               |   55 
 ldap/servers/plugins/presence/presence.def            |   43 
 ldap/servers/plugins/pwdstorage/dllmain.c             |   55 
 ldap/servers/plugins/pwdstorage/libpwdstorage.def     |   56 
 ldap/servers/plugins/referint/dllmain.c               |   55 
 ldap/servers/plugins/referint/referint.def            |   44 
 ldap/servers/plugins/replication/dllmain.c            |  128 -
 ldap/servers/plugins/replication/replication.def      |   48 
 ldap/servers/plugins/retrocl/dllmain.c                |   55 
 ldap/servers/plugins/retrocl/retrocl.def              |   47 
 ldap/servers/plugins/rever/dllmain.c                  |   55 
 ldap/servers/plugins/rever/libdes.def                 |   45 
 ldap/servers/plugins/roles/dllmain.c                  |   54 
 ldap/servers/plugins/roles/roles.def                  |   42 
 ldap/servers/plugins/statechange/dllmain.c            |   56 
 ldap/servers/plugins/statechange/statechange.def      |   42 
 ldap/servers/plugins/syntaxes/dllmain.c               |   84 
 ldap/servers/plugins/syntaxes/libsyntax.def           |   56 
 ldap/servers/plugins/uiduniq/libuiduniq.def           |   47 
 ldap/servers/plugins/vattrsp_template/dllmain.c       |   55 
 ldap/servers/plugins/vattrsp_template/vattrsp.def     |   42 
 ldap/servers/plugins/views/dllmain.c                  |   55 
 ldap/servers/plugins/views/views.def                  |   42 
 ldap/servers/slapd/back-ldbm/dllmain.c                |   86 
 ldap/servers/slapd/back-ldbm/libback-ldbm.def         |   45 
 ldap/servers/slapd/back-ldif/dllmain.c                |   65 
 ldap/servers/slapd/back-ldif/libback-ldif.def         |   44 
 ldap/servers/slapd/libslapd.def                       | 1204 ------------
 ldap/servers/slapd/ntmsgdll/ntslapdmessages.c         |   53 
 ldap/servers/slapd/ntmsgdll/ntslapdmessages.mc        |  315 ---
 ldap/servers/slapd/ntperfdll/exports.def              |   41 
 ldap/servers/slapd/ntperfdll/nsldapctr.cpp            | 1054 ----------
 ldap/servers/slapd/ntperfdll/nsldapctrdef.h           |   72 
 ldap/servers/slapd/ntperfdll/nsldapctrmc.h            |  159 -
 ldap/servers/slapd/ntperfdll/nsldapctrmc.mc           |  106 -
 ldap/servers/slapd/ntperfdll/nsldapctrmsg.h           |   97 
 ldap/servers/slapd/ntperfdll/nsldapctrs.h             |  108 -
 ldap/servers/slapd/ntperfdll/nsldapctrs.ini           |   89 
 ldap/servers/slapd/ntperfdll/nsldapctrutil.cpp        |  401 ----
 ldap/servers/slapd/ntperfdll/nsldapctrutil.h          |  157 -
 ldap/servers/slapd/ntperfdll/nsldapreg.ini            |   50 
 ldap/servers/slapd/ntwdog/cron_conf.c                 |  691 ------
 ldap/servers/slapd/ntwdog/cron_conf.h                 |  122 -
 ldap/servers/slapd/ntwdog/ntcron.c                    |  193 -
 ldap/servers/slapd/ntwdog/ntwatchdog.c                | 1194 ------------
 ldap/servers/slapd/snmp_collator.c                    |    1 
 ldap/servers/slapd/test-plugins/Makefile.WINNT        |   77 
 ldap/servers/slapd/test-plugins/Makefile.server       |   54 
 ldap/servers/slapd/test-plugins/dllmain.c             |   66 
 ldap/servers/slapd/test-plugins/testplugin.def        |   48 
 ldap/servers/slapd/test-plugins/testplugin.dsp        |  175 -
 ldap/servers/slapd/test-plugins/testplugin.mak        |  463 ----
 ldap/servers/snmp/ntagt/msrvdefs.mak                  |  523 -----
 ldap/servers/snmp/ntagt/nslagtcom_nt.h                |   69 
 ldap/servers/snmp/ntagt/nsldapagt_nt.c                | 1778 ------------------
 ldap/servers/snmp/ntagt/nsldapagt_nt.def              |   56 
 ldap/servers/snmp/ntagt/nsldapagt_nt.h                |  268 --
 ldap/servers/snmp/ntagt/nsldapmib_nt.c                | 1078 ----------
 ldap/servers/snmp/ntagt/nsldapmib_nt.h                |  167 -
 lib/base/eventlog.cpp                                 |  106 -
 lib/base/nterrors.cpp                                 |  120 -
 84 files changed, 4 insertions(+), 14194 deletions(-)

New commits:
commit 3c0d3c5d08635430a68693b9d44a586843b01793
Author: Mark Reynolds <mreynolds at redhat.com>
Date:   Mon Jun 15 13:20:50 2015 -0400

    Ticket 47998 - remove "windows" files
    
    Description:  Remove windows definition and dll files, etc.
    
    https://fedorahosted.org/389/ticket/47998
    
    Reviewed by: nhosoi(Thanks!)

diff --git a/include/base/eventhandler.h b/include/base/eventhandler.h
deleted file mode 100644
index f4de0c2..0000000
--- a/include/base/eventhandler.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-/*
- * eventhandler.h: Handle registration of event handlers
- *
- * This is a facility in the NT server to provide a way to register event
- * handling functions. Often there is a need to send a control signal of some
- * kind to the server. This could be a signal for the server to rotate its
- * logs, or a signal to collect and return statistical information of some kind
- * such as perfmon stats.
- * 
- * This file specifies the structures and functions necessary to set up this
- * kind of asynchronous special event handling.
- * 
- * Aruna Victor 2/21/96
- */
-
-#ifndef EVENTHANDLER_H
-#define EVENTHANDLER_H
-
-#include "netsite.h"
-
-/* ------------------------------ Structures ------------------------------ */
-
-/* EVENT_HANDLER specifies
-    1. The name of the event. This is the event that the event handler will
-       create and wait on for a signal.
-    2. The name of the function should be called to handle the event.
-    3. The argument that should be passed to this function.
-    4. The next EVENT_HANDLER on the list this structure is on. */
-
-typedef struct event_handler {
-	int event_number;
-    char *event_name;
-    void (*_event_handler)(void *);
-    void *argument;
-    struct event_handler *next;
-} EVENT_HANDLER;
-
-/* ------------------------------ Prototypes ------------------------------ */
-
-NSPR_BEGIN_EXTERN_C
-
-char *initialize_event_handler(char *serverid);
-
-char *terminate_event_handler();
-
-char *add_handler(char *event, void (*fn)(void *), void *arg);
-
-char *delete_handler(char *event);
-
-char *add_rotation_handler(char *event, void (*fn)(void *), void *arg);
-
-NSPR_END_EXTERN_C
-
-#endif /* !EVENTHANDLER	 */
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/include/base/eventlog.h b/include/base/eventlog.h
deleted file mode 100644
index bd75eb8..0000000
--- a/include/base/eventlog.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-// EVENTLOG.H
-//
-// This file contains the defines that make NT an installable service.
-//
-// 1/12/95 aruna
-//
-
-// Functions in eventlog.c
-
-#ifndef _EVENTLOG_H_
-#define _EVENTLOG_H_
-
-#include "netsite.h"
-
-#endif
diff --git a/include/base/nterr.h b/include/base/nterr.h
deleted file mode 100644
index 90446e7..0000000
--- a/include/base/nterr.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-/*
- * Added function prototypes for nterror stuff.
- *
- * Robin Maxwell
- */
-
-#ifndef _NTERR_H
-#define _NTERR_H
-NSPR_BEGIN_EXTERN_C
-
-char * FindError(int error);
-NSAPI_PUBLIC void HashNtErrors();
-
-NSPR_END_EXTERN_C
-
-#endif /* _NTERR_H */
diff --git a/include/base/nterrors.h b/include/base/nterrors.h
deleted file mode 100644
index 895e26c..0000000
--- a/include/base/nterrors.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-/* DO NOT EDIT THIS FILE - it is automatically generated */
-
-typedef struct _NtError {
-	int ErrorNumber;
-	char *ErrorString;
-	struct _NtError *next;
-} NtError;
-
-NtError NtErrorStrings[] = {
-{ 10004 , "WSAEINTR" },
-{ 10009 , "WSAEBADF" },
-{ 10013 , "WSAEACCES" },
-{ 10014 , "WSAEFAULT" },
-{ 10022 , "WSAEINVAL" },
-{ 10024 , "WSAEMFILE" },
-{ 10035 , "WSAEWOULDBLOCK" },
-{ 10036 , "WSAEINPROGRESS" },
-{ 10037 , "WSAEALREADY" },
-{ 10038 , "WSAENOTSOCK" },
-{ 10039 , "WSAEDESTADDRREQ" },
-{ 10040 , "WSAEMSGSIZE" },
-{ 10041 , "WSAEPROTOTYPE" },
-{ 10042 , "WSAENOPROTOOPT" },
-{ 10043 , "WSAEPROTONOSUPPORT" },
-{ 10044 , "WSAESOCKTNOSUPPORT" },
-{ 10045 , "WSAEOPNOTSUPP" },
-{ 10046 , "WSAEPFNOSUPPORT" },
-{ 10047 , "WSAEAFNOSUPPORT" },
-{ 10048 , "WSAEADDRINUSE" },
-{ 10049 , "WSAEADDRNOTAVAIL" },
-{ 10050 , "WSAENETDOWN" },
-{ 10051 , "WSAENETUNREACH" },
-{ 10052 , "WSAENETRESET" },
-{ 10053 , "WSAECONNABORTED" },
-{ 10054 , "WSAECONNRESET" },
-{ 10055 , "WSAENOBUFS" },
-{ 10056 , "WSAEISCONN" },
-{ 10057 , "WSAENOTCONN" },
-{ 10058 , "WSAESHUTDOWN" },
-{ 10059 , "WSAETOOMANYREFS" },
-{ 10060 , "WSAETIMEDOUT" },
-{ 10061 , "WSAECONNREFUSED" },
-{ 10062 , "WSAELOOP" },
-{ 10063 , "WSAENAMETOOLONG" },
-{ 10064 , "WSAEHOSTDOWN" },
-{ 10065 , "WSAEHOSTUNREACH" },
-{ 10066 , "WSAENOTEMPTY" },
-{ 10067 , "WSAEPROCLIM" },
-{ 10068 , "WSAEUSERS" },
-{ 10069 , "WSAEDQUOT" },
-{ 10070 , "WSAESTALE" },
-{ 10071 , "WSAEREMOTE" },
-{ 10101 , "WSAEDISCON" },
-{ 10091 , "WSASYSNOTREADY" },
-{ 10092 , "WSAVERNOTSUPPORTED" },
-{ 10093 , "WSANOTINITIALISED" },
-{ 11001 , "WSAHOST_NOT_FOUND" },
-{ 11002 , "WSATRY_AGAIN" },
-{ 11003 , "WSANO_RECOVERY" },
-{ 11004 , "WSANO_DATA" },
-{ 0, NULL }
-};
diff --git a/ldap/servers/plugins/acl/acldllmain.c b/ldap/servers/plugins/acl/acldllmain.c
deleted file mode 100644
index ac219ad..0000000
--- a/ldap/servers/plugins/acl/acldllmain.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-#include "acl.h"
-#include <stdio.h>
-
-int CALLBACK
-LibMain( HINSTANCE hinst, WORD wDataSeg, WORD cbHeapSize, LPSTR lpszCmdLine )
-{
-	/*UnlockData( 0 );*/
- 	return( 1 );
-}
-
-#ifdef LDAP_DEBUG
-#include <stdarg.h>
-
-void LDAPDebug( int level, char* fmt, ... )
-{
-	static char debugBuf[1024];
-
-	if (module_ldap_debug && (*module_ldap_debug & level))
-	{
-		va_list ap;
-		va_start (ap, fmt);
-		_snprintf (debugBuf, sizeof(debugBuf), fmt, ap);
-		debugBuf[sizeof(debugBuf)-1] = 0;
-		va_end (ap);
-
-		OutputDebugString (debugBuf);
-	}
-}
-#endif
-
-
-void perror( const char *msg )
-{
-	char buf[128];
-	wsprintf( buf, "%s: error %d\n", msg, WSAGetLastError()) ;
-	OutputDebugString( buf );
-}
-
diff --git a/ldap/servers/plugins/acl/libacl.def b/ldap/servers/plugins/acl/libacl.def
deleted file mode 100644
index e9eefc3..0000000
--- a/ldap/servers/plugins/acl/libacl.def
+++ /dev/null
@@ -1,48 +0,0 @@
-; BEGIN COPYRIGHT BLOCK
-; This Program is free software; you can redistribute it and/or modify it under
-; the terms of the GNU General Public License as published by the Free Software
-; Foundation; version 2 of the License.
-; 
-; This Program is distributed in the hope that it will be useful, but WITHOUT
-; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-; 
-; You should have received a copy of the GNU General Public License along with
-; this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-; Place, Suite 330, Boston, MA 02111-1307 USA.
-; 
-; In addition, as a special exception, Red Hat, Inc. gives You the additional
-; right to link the code of this Program with code not covered under the GNU
-; General Public License ("Non-GPL Code") and to distribute linked combinations
-; including the two, subject to the limitations in this paragraph. Non-GPL Code
-; permitted under this exception must only link to the code of this Program
-; through those well defined interfaces identified in the file named EXCEPTION
-; found in the source code files (the "Approved Interfaces"). The files of
-; Non-GPL Code may instantiate templates or use macros or inline functions from
-; the Approved Interfaces without causing the resulting work to be covered by
-; the GNU General Public License. Only Red Hat, Inc. may make changes or
-; additions to the list of Approved Interfaces. You must obey the GNU General
-; Public License in all respects for all of the Program code and other code used
-; in conjunction with the Program except the Non-GPL Code covered by this
-; exception. If you modify this file, you may extend this exception to your
-; version of the file, but you are not obligated to do so. If you do not wish to
-; provide this exception without modification, you must delete this exception
-; statement from your version and license this file solely under the GPL without
-; exception. 
-; 
-; 
-; Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-; Copyright (C) 2005 Red Hat, Inc.
-; All rights reserved.
-; END COPYRIGHT BLOCK
-;
-;
-;
-DESCRIPTION     'Dirsrv 1.0 ACL Plugin'
-;CODE		SHARED READ EXECUTE
-;DATA		SHARED READ WRITE
-EXPORTS
-	acl_preopInit			@1
-;	unused					@2
-	acl_init				@3
-	plugin_init_debug_level @4
diff --git a/ldap/servers/plugins/chainingdb/cbdllmain.c b/ldap/servers/plugins/chainingdb/cbdllmain.c
deleted file mode 100644
index 16ccc5c..0000000
--- a/ldap/servers/plugins/chainingdb/cbdllmain.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-#include "cb.h"
-#include <stdio.h>
-
-int CALLBACK
-LibMain( HINSTANCE hinst, WORD wDataSeg, WORD cbHeapSize, LPSTR lpszCmdLine )
-{
-	/*UnlockData( 0 );*/
- 	return( 1 );
-}
-
-
-#ifdef LDAP_DEBUG
-#include <stdarg.h>
-
-void LDAPDebug( int level, char* fmt, ... )
-{
-	static char debugBuf[1024];
-
-	if (module_ldap_debug && (*module_ldap_debug & level))
-	{
-		va_list ap;
-		va_start (ap, fmt);
-		_snprintf (debugBuf, sizeof(debugBuf), fmt, ap);
-		va_end (ap);
-
-		OutputDebugString (debugBuf);
-	}
-}
-#endif
-
-void perror( const char *msg )
-{
-	char buf[128];
-	wsprintf( buf, "%s: error %d\n", msg, WSAGetLastError()) ;
-	OutputDebugString( buf );
-}
diff --git a/ldap/servers/plugins/chainingdb/libcb.def b/ldap/servers/plugins/chainingdb/libcb.def
deleted file mode 100644
index b38527b..0000000
--- a/ldap/servers/plugins/chainingdb/libcb.def
+++ /dev/null
@@ -1,47 +0,0 @@
-; BEGIN COPYRIGHT BLOCK
-; This Program is free software; you can redistribute it and/or modify it under
-; the terms of the GNU General Public License as published by the Free Software
-; Foundation; version 2 of the License.
-; 
-; This Program is distributed in the hope that it will be useful, but WITHOUT
-; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-; 
-; You should have received a copy of the GNU General Public License along with
-; this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-; Place, Suite 330, Boston, MA 02111-1307 USA.
-; 
-; In addition, as a special exception, Red Hat, Inc. gives You the additional
-; right to link the code of this Program with code not covered under the GNU
-; General Public License ("Non-GPL Code") and to distribute linked combinations
-; including the two, subject to the limitations in this paragraph. Non-GPL Code
-; permitted under this exception must only link to the code of this Program
-; through those well defined interfaces identified in the file named EXCEPTION
-; found in the source code files (the "Approved Interfaces"). The files of
-; Non-GPL Code may instantiate templates or use macros or inline functions from
-; the Approved Interfaces without causing the resulting work to be covered by
-; the GNU General Public License. Only Red Hat, Inc. may make changes or
-; additions to the list of Approved Interfaces. You must obey the GNU General
-; Public License in all respects for all of the Program code and other code used
-; in conjunction with the Program except the Non-GPL Code covered by this
-; exception. If you modify this file, you may extend this exception to your
-; version of the file, but you are not obligated to do so. If you do not wish to
-; provide this exception without modification, you must delete this exception
-; statement from your version and license this file solely under the GPL without
-; exception. 
-; 
-; 
-; Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-; Copyright (C) 2005 Red Hat, Inc.
-; All rights reserved.
-; END COPYRIGHT BLOCK
-;
-;
-;
-DESCRIPTION     'Dirsrv 1.0 Chaining Database Plugin'
-;CODE		SHARED READ EXECUTE
-;DATA		SHARED READ WRITE
-EXPORTS
-	chaining_back_init		@1
-	plugin_init_debug_level		@2
-	cb_be_state_change	@3
diff --git a/ldap/servers/plugins/collation/collation.def b/ldap/servers/plugins/collation/collation.def
deleted file mode 100644
index e62011b..0000000
--- a/ldap/servers/plugins/collation/collation.def
+++ /dev/null
@@ -1,42 +0,0 @@
-; BEGIN COPYRIGHT BLOCK
-; This Program is free software; you can redistribute it and/or modify it under
-; the terms of the GNU General Public License as published by the Free Software
-; Foundation; version 2 of the License.
-; 
-; This Program is distributed in the hope that it will be useful, but WITHOUT
-; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-; 
-; You should have received a copy of the GNU General Public License along with
-; this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-; Place, Suite 330, Boston, MA 02111-1307 USA.
-; 
-; In addition, as a special exception, Red Hat, Inc. gives You the additional
-; right to link the code of this Program with code not covered under the GNU
-; General Public License ("Non-GPL Code") and to distribute linked combinations
-; including the two, subject to the limitations in this paragraph. Non-GPL Code
-; permitted under this exception must only link to the code of this Program
-; through those well defined interfaces identified in the file named EXCEPTION
-; found in the source code files (the "Approved Interfaces"). The files of
-; Non-GPL Code may instantiate templates or use macros or inline functions from
-; the Approved Interfaces without causing the resulting work to be covered by
-; the GNU General Public License. Only Red Hat, Inc. may make changes or
-; additions to the list of Approved Interfaces. You must obey the GNU General
-; Public License in all respects for all of the Program code and other code used
-; in conjunction with the Program except the Non-GPL Code covered by this
-; exception. If you modify this file, you may extend this exception to your
-; version of the file, but you are not obligated to do so. If you do not wish to
-; provide this exception without modification, you must delete this exception
-; statement from your version and license this file solely under the GPL without
-; exception. 
-; 
-; 
-; Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-; Copyright (C) 2005 Red Hat, Inc.
-; All rights reserved.
-; END COPYRIGHT BLOCK
-;
-DESCRIPTION     'Dirsrv 1.0 Collation Plugin'
-EXPORTS
-	orderingRule_init	@2
-	plugin_init_debug_level	@3
diff --git a/ldap/servers/plugins/collation/dllmain.c b/ldap/servers/plugins/collation/dllmain.c
deleted file mode 100644
index f8cca09..0000000
--- a/ldap/servers/plugins/collation/dllmain.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-/*
- * Microsoft Windows specifics for collation DLL
- */
-#include "ldap.h"
-#include <stdio.h>
-
-int CALLBACK
-LibMain( HINSTANCE hinst, WORD wDataSeg, WORD cbHeapSize, LPSTR lpszCmdLine )
-{
-	/*UnlockData( 0 );*/
- 	return( 1 );
-}
-
-#ifdef LDAP_DEBUG
-
-#include <stdarg.h>
-
-void LDAPDebug( int level, char* fmt, ... )
-{
-	static char debugBuf[1024];
-
-	if (module_ldap_debug && (*module_ldap_debug & level))
-	{
-		va_list ap;
-		va_start (ap, fmt);
-		_snprintf (debugBuf, sizeof(debugBuf), fmt, ap);
-		debugBuf[sizeof(debugBuf)-1] = 0;
-		va_end (ap);
-
-		OutputDebugString (debugBuf);
-	}
-}
-#endif
-
-
-void perror( const char *msg )
-{
-	char buf[128];
-	wsprintf( buf, "%s: error %d\n", msg, WSAGetLastError()) ;
-	OutputDebugString( buf );
-}
-
diff --git a/ldap/servers/plugins/cos/cos.def b/ldap/servers/plugins/cos/cos.def
deleted file mode 100644
index 6e285a9..0000000
--- a/ldap/servers/plugins/cos/cos.def
+++ /dev/null
@@ -1,43 +0,0 @@
-; BEGIN COPYRIGHT BLOCK
-; This Program is free software; you can redistribute it and/or modify it under
-; the terms of the GNU General Public License as published by the Free Software
-; Foundation; version 2 of the License.
-; 
-; This Program is distributed in the hope that it will be useful, but WITHOUT
-; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-; 
-; You should have received a copy of the GNU General Public License along with
-; this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-; Place, Suite 330, Boston, MA 02111-1307 USA.
-; 
-; In addition, as a special exception, Red Hat, Inc. gives You the additional
-; right to link the code of this Program with code not covered under the GNU
-; General Public License ("Non-GPL Code") and to distribute linked combinations
-; including the two, subject to the limitations in this paragraph. Non-GPL Code
-; permitted under this exception must only link to the code of this Program
-; through those well defined interfaces identified in the file named EXCEPTION
-; found in the source code files (the "Approved Interfaces"). The files of
-; Non-GPL Code may instantiate templates or use macros or inline functions from
-; the Approved Interfaces without causing the resulting work to be covered by
-; the GNU General Public License. Only Red Hat, Inc. may make changes or
-; additions to the list of Approved Interfaces. You must obey the GNU General
-; Public License in all respects for all of the Program code and other code used
-; in conjunction with the Program except the Non-GPL Code covered by this
-; exception. If you modify this file, you may extend this exception to your
-; version of the file, but you are not obligated to do so. If you do not wish to
-; provide this exception without modification, you must delete this exception
-; statement from your version and license this file solely under the GPL without
-; exception. 
-; 
-; 
-; Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-; Copyright (C) 2005 Red Hat, Inc.
-; All rights reserved.
-; END COPYRIGHT BLOCK
-;
-DESCRIPTION     'Dirsrv 1.0 Class Of Service Plugin'
-EXPORTS
-	cos_init        @2
-	plugin_init_debug_level	@3
-	cos_version		@4
diff --git a/ldap/servers/plugins/cos/dllmain.c b/ldap/servers/plugins/cos/dllmain.c
deleted file mode 100644
index d23057a..0000000
--- a/ldap/servers/plugins/cos/dllmain.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-/*
- * Microsoft Windows specifics for BACK-LDBM DLL
- */
-#include "ldap.h"
-#include "lber.h"
-
-
-int CALLBACK
-LibMain( HINSTANCE hinst, WORD wDataSeg, WORD cbHeapSize, LPSTR lpszCmdLine )
-{
-	/*UnlockData( 0 );*/
- 	return( 1 );
-}
-
diff --git a/ldap/servers/plugins/distrib/Makefile b/ldap/servers/plugins/distrib/Makefile
index 60e9ad6..c2ad31f 100644
--- a/ldap/servers/plugins/distrib/Makefile
+++ b/ldap/servers/plugins/distrib/Makefile
@@ -52,10 +52,6 @@ LIBDIR = $(LDAP_PLUGIN_RELDIR)
 include $(BUILD_ROOT)/nsconfig.mk
 include $(LDAP_SRC)/nsldap.mk
 
-ifeq ($(ARCH), WINNT)
-DEF_FILE:=./libdistrib.def
-endif
-
 CFLAGS+=$(SLCFLAGS)
 
 INCLUDES += -I$(LDAP_SRC)/servers/slapd
@@ -66,74 +62,27 @@ DIS_OBJS= \
 
 OBJS = $(addprefix $(OBJDEST)/, $(DIS_OBJS)) 
 
-ifeq ($(ARCH), WINNT)
-LIBDIS_DLL_OBJ = $(addprefix $(OBJDEST)/, dllmain.o)
-endif
-
 # The sample distribution plugin is not part of DS.
 # So we generate the shared library outside of $(LIBDIR)
 # so that it's not retrieved by the packaging makefiles.
 #LIBDIS =	$(addprefix $(LIBDIR)/, $(DIS_DLL).$(DLL_SUFFIX))
 LIBDIS =	$(addprefix $(OBJDEST)/, $(DIS_DLL).$(DLL_SUFFIX))
 
-ifeq ($(ARCH), WINNT)
-EXTRA_LIBS_DEP += \
-	$(LIBSLAPD_DEP) \
-	$(LDAP_LIBUTIL_DEP) \
-	$(LDAP_COMMON_LIBS_DEP)
-EXTRA_LIBS_DEP += \
-	$(LDAPSDK_DEP) \
-	$(SECURITY_DEP)
-EXTRA_LIBS += \
-	$(LIBSLAPD) \
-	$(LDAP_SDK_LIBLDAP_DLL) \
-	$(LIBUTIL) \
-	$(NSPRLINK) \
-	$(LDAP_COMMON_LIBS)
-endif
-ifeq ($(ARCH), AIX)
-EXTRA_LIBS_DEP += \
-	$(LIBSLAPD_DEP) \
-	$(LDAP_LIBUTIL_DEP) \
-	$(LDAP_COMMON_LIBS_DEP)
-EXTRA_LIBS_DEP += \
-	$(LDAPSDK_DEP)
-EXTRA_LIBS += \
-	$(LIBSLAPDLINK) \
-	$(LDAP_SDK_LIBLDAP_DLL) \
-	$(LIBUTIL) \
-	$(NSPRLINK) \
-	$(LDAP_COMMON_LIBS)
-endif
-
 ifeq ($(ARCH), HPUX)
 EXTRA_LIBS_DEP += $(LIBSLAPD_DEP) $(LDAPSDK_DEP) $(NSPR_DEP)
 EXTRA_LIBS += $(LDAPLINK) $(NSPRLINK) $(ICULINK)
 endif
 
-ifeq ($(ARCH), WINNT)
-DLL_LDFLAGS += -def:"./libdistrib.def"
-CFLAGS+= /WX 
-endif # WINNT
-
-ifeq ($(ARCH), AIX)
-LD=ld
-endif
-
-clientSDK: 
 
 all:	$(OBJDEST) $(LIBDIR) $(LIBDIS)
 
-$(LIBDIS): $(OBJS) $(LIBDIS_DLL_OBJ) $(DEF_FILE)
-	$(LINK_DLL) $(LIBDIS_DLL_OBJ) $(EXTRA_LIBS) 
+$(LIBDIS): $(OBJS) $(DEF_FILE)
+	$(LINK_DLL) $(EXTRA_LIBS) 
 
 veryclean: clean
 
 clean:
 	$(RM) $(OBJS)
-ifeq ($(ARCH), WINNT)
-	$(RM) $(LIBDIS_DLL_OBJ)
-endif
 	$(RM) $(LIBDIS)
 
 $(OBJDEST):
diff --git a/ldap/servers/plugins/distrib/Makefile.WINNT b/ldap/servers/plugins/distrib/Makefile.WINNT
deleted file mode 100644
index 4b873dd..0000000
--- a/ldap/servers/plugins/distrib/Makefile.WINNT
+++ /dev/null
@@ -1,76 +0,0 @@
-# --- BEGIN COPYRIGHT BLOCK ---
-# This Program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; version 2 of the License.
-# 
-# This Program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-# 
-# You should have received a copy of the GNU General Public License along with
-# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place, Suite 330, Boston, MA 02111-1307 USA.
-# 
-# In addition, as a special exception, Red Hat, Inc. gives You the additional
-# right to link the code of this Program with code not covered under the GNU
-# General Public License ("Non-GPL Code") and to distribute linked combinations
-# including the two, subject to the limitations in this paragraph. Non-GPL Code
-# permitted under this exception must only link to the code of this Program
-# through those well defined interfaces identified in the file named EXCEPTION
-# found in the source code files (the "Approved Interfaces"). The files of
-# Non-GPL Code may instantiate templates or use macros or inline functions from
-# the Approved Interfaces without causing the resulting work to be covered by
-# the GNU General Public License. Only Red Hat, Inc. may make changes or
-# additions to the list of Approved Interfaces. You must obey the GNU General
-# Public License in all respects for all of the Program code and other code used
-# in conjunction with the Program except the Non-GPL Code covered by this
-# exception. If you modify this file, you may extend this exception to your
-# version of the file, but you are not obligated to do so. If you do not wish to
-# provide this exception without modification, you must delete this exception
-# statement from your version and license this file solely under the GPL without
-# exception. 
-# 
-# 
-# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-# Copyright (C) 2005 Red Hat, Inc.
-# All rights reserved.
-# --- END COPYRIGHT BLOCK ---
-#
-# Makefile for Directory Server plug-in
-#
-
-CC = cl
-LD = link
-
-
-TARGET=libdistrib
-
-OBJS=distrib.obj
-
-
-INC = ..\..\include
-CFLAGS = /nologo -I $(INC) /c
-LDFLAGS = /dll /nologo
-LIBS=/DEFAULTLIB:kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ..\..\lib\libslapd.lib ..\..\lib\libnspr4.lib
-
-
-all:						\
-	init					\
-	$(TARGET).dll
-
-init:
-	"c:\program files\microsoft visual studio\vc98\bin\vcvars32.bat"
-
-
-$(TARGET).dll: $(OBJS)
-	$(LD) $(LDFLAGS) /def:$(TARGET).def /out:$(TARGET).dll $(LIBS) $(OBJS)
-	-rm -f $(OBJS2) *~
-
-.c.obj:
-	$(CC) $(CFLAGS) $<
-
-clean:
-	del -f $(OBJS) $(TARGET).dll *~
-
-
-
diff --git a/ldap/servers/plugins/distrib/distrib.dsp b/ldap/servers/plugins/distrib/distrib.dsp
deleted file mode 100644
index e2ffa39..0000000
--- a/ldap/servers/plugins/distrib/distrib.dsp
+++ /dev/null
@@ -1,153 +0,0 @@
-# --- BEGIN COPYRIGHT BLOCK ---
-# This Program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; version 2 of the License.
-# 
-# This Program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-# 
-# You should have received a copy of the GNU General Public License along with
-# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place, Suite 330, Boston, MA 02111-1307 USA.
-# 
-# In addition, as a special exception, Red Hat, Inc. gives You the additional
-# right to link the code of this Program with code not covered under the GNU
-# General Public License ("Non-GPL Code") and to distribute linked combinations
-# including the two, subject to the limitations in this paragraph. Non-GPL Code
-# permitted under this exception must only link to the code of this Program
-# through those well defined interfaces identified in the file named EXCEPTION
-# found in the source code files (the "Approved Interfaces"). The files of
-# Non-GPL Code may instantiate templates or use macros or inline functions from
-# the Approved Interfaces without causing the resulting work to be covered by
-# the GNU General Public License. Only Red Hat, Inc. may make changes or
-# additions to the list of Approved Interfaces. You must obey the GNU General
-# Public License in all respects for all of the Program code and other code used
-# in conjunction with the Program except the Non-GPL Code covered by this
-# exception. If you modify this file, you may extend this exception to your
-# version of the file, but you are not obligated to do so. If you do not wish to
-# provide this exception without modification, you must delete this exception
-# statement from your version and license this file solely under the GPL without
-# exception. 
-# 
-# 
-# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-# Copyright (C) 2005 Red Hat, Inc.
-# All rights reserved.
-# --- END COPYRIGHT BLOCK ---
-# Microsoft Developer Studio Project File - Name="distrib" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=distrib - Win32 Release
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "distrib.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "distrib.mak" CFG="distrib - Win32 Release"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "distrib - Win32 Release" (based on\
- "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "distrib - Win32 Debug" (based on\
- "Win32 (x86) Dynamic-Link Library")
-!MESSAGE 
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "distrib - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir ".\Release"
-# PROP BASE Intermediate_Dir ".\Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ".\Release"
-# PROP Intermediate_Dir ".\Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WIN32" /YX /FD /c
-# ADD BASE MTL /nologo /D "NDEBUG" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ..\..\lib\libslapd.lib /nologo /subsystem:windows /dll /machine:I386
-
-!ELSEIF  "$(CFG)" == "distrib - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir ".\Debug"
-# PROP BASE Intermediate_Dir ".\Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ".\Debug"
-# PROP Intermediate_Dir ".\Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MD /W3 /Gm /GX /Zi /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_WIN32" /YX /FD /c
-# ADD BASE MTL /nologo /D "_DEBUG" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ..\..\lib\libslapd.lib /nologo /subsystem:windows /dll /debug /machine:I386
-
-!ENDIF 
-
-# Begin Target
-
-# Name "distrib - Win32 Release"
-# Name "distrib - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
-# Begin Source File
-
-SOURCE=.\dllmain.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\distrib.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\libdistrib.def
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/ldap/servers/plugins/distrib/dllmain.c b/ldap/servers/plugins/distrib/dllmain.c
deleted file mode 100644
index 3e072ff..0000000
--- a/ldap/servers/plugins/distrib/dllmain.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/* --- BEGIN COPYRIGHT BLOCK ---
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * --- END COPYRIGHT BLOCK --- */
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
- /*
- * Microsoft Windows specifics 
- */
-#include "ldap.h"
-
-
-int CALLBACK
-LibMain( HINSTANCE hinst, WORD wDataSeg, WORD cbHeapSize, LPSTR lpszCmdLine )
-{
-	/*UnlockData( 0 );*/
- 	return( 1 );
-}
diff --git a/ldap/servers/plugins/distrib/libdistrib.def b/ldap/servers/plugins/distrib/libdistrib.def
deleted file mode 100644
index f3c4cd5..0000000
--- a/ldap/servers/plugins/distrib/libdistrib.def
+++ /dev/null
@@ -1,41 +0,0 @@
-; --- BEGIN COPYRIGHT BLOCK ---
-; This Program is free software; you can redistribute it and/or modify it under
-; the terms of the GNU General Public License as published by the Free Software
-; Foundation; version 2 of the License.
-; 
-; This Program is distributed in the hope that it will be useful, but WITHOUT
-; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-; 
-; You should have received a copy of the GNU General Public License along with
-; this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-; Place, Suite 330, Boston, MA 02111-1307 USA.
-; 
-; In addition, as a special exception, Red Hat, Inc. gives You the additional
-; right to link the code of this Program with code not covered under the GNU
-; General Public License ("Non-GPL Code") and to distribute linked combinations
-; including the two, subject to the limitations in this paragraph. Non-GPL Code
-; permitted under this exception must only link to the code of this Program
-; through those well defined interfaces identified in the file named EXCEPTION
-; found in the source code files (the "Approved Interfaces"). The files of
-; Non-GPL Code may instantiate templates or use macros or inline functions from
-; the Approved Interfaces without causing the resulting work to be covered by
-; the GNU General Public License. Only Red Hat, Inc. may make changes or
-; additions to the list of Approved Interfaces. You must obey the GNU General
-; Public License in all respects for all of the Program code and other code used
-; in conjunction with the Program except the Non-GPL Code covered by this
-; exception. If you modify this file, you may extend this exception to your
-; version of the file, but you are not obligated to do so. If you do not wish to
-; provide this exception without modification, you must delete this exception
-; statement from your version and license this file solely under the GPL without
-; exception. 
-; 
-; 
-; Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-; Copyright (C) 2005 Red Hat, Inc.
-; All rights reserved.
-; --- END COPYRIGHT BLOCK ---
-DESCRIPTION 	'Dirsrv 1.0 distribution logic example'
-EXPORTS
-	alpha_distribution @1
-	hash_distribution @2
diff --git a/ldap/servers/plugins/http/dllmain.c b/ldap/servers/plugins/http/dllmain.c
deleted file mode 100644
index 86418cb..0000000
--- a/ldap/servers/plugins/http/dllmain.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/* --- BEGIN COPYRIGHT BLOCK ---
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * --- END COPYRIGHT BLOCK --- */
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-
-/*
- * Microsoft Windows specifics for BACK-LDBM DLL
- */
-#include "ldap.h"
-#include "lber.h"
-
-
-int CALLBACK
-LibMain( HINSTANCE hinst, WORD wDataSeg, WORD cbHeapSize, LPSTR lpszCmdLine )
-{
-	/*UnlockData( 0 );*/
- 	return( 1 );
-}
diff --git a/ldap/servers/plugins/http/http.def b/ldap/servers/plugins/http/http.def
deleted file mode 100644
index c586cf7..0000000
--- a/ldap/servers/plugins/http/http.def
+++ /dev/null
@@ -1,45 +0,0 @@
-; --- BEGIN COPYRIGHT BLOCK ---
-; This Program is free software; you can redistribute it and/or modify it under
-; the terms of the GNU General Public License as published by the Free Software
-; Foundation; version 2 of the License.
-; 
-; This Program is distributed in the hope that it will be useful, but WITHOUT
-; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-; 
-; You should have received a copy of the GNU General Public License along with
-; this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-; Place, Suite 330, Boston, MA 02111-1307 USA.
-; 
-; In addition, as a special exception, Red Hat, Inc. gives You the additional
-; right to link the code of this Program with code not covered under the GNU
-; General Public License ("Non-GPL Code") and to distribute linked combinations
-; including the two, subject to the limitations in this paragraph. Non-GPL Code
-; permitted under this exception must only link to the code of this Program
-; through those well defined interfaces identified in the file named EXCEPTION
-; found in the source code files (the "Approved Interfaces"). The files of
-; Non-GPL Code may instantiate templates or use macros or inline functions from
-; the Approved Interfaces without causing the resulting work to be covered by
-; the GNU General Public License. Only Red Hat, Inc. may make changes or
-; additions to the list of Approved Interfaces. You must obey the GNU General
-; Public License in all respects for all of the Program code and other code used
-; in conjunction with the Program except the Non-GPL Code covered by this
-; exception. If you modify this file, you may extend this exception to your
-; version of the file, but you are not obligated to do so. If you do not wish to
-; provide this exception without modification, you must delete this exception
-; statement from your version and license this file solely under the GPL without
-; exception. 
-; 
-; 
-; Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-; Copyright (C) 2005 Red Hat, Inc.
-; All rights reserved.
-; --- END COPYRIGHT BLOCK ---
-
-DESCRIPTION     'Netscape Directory Server Http Client'
-EXPORTS
-	http_client_init        @2
-	plugin_init_debug_level	@3
-	http_client_version		@4
-
-
diff --git a/ldap/servers/plugins/pam_passthru/libpam_passthru.def b/ldap/servers/plugins/pam_passthru/libpam_passthru.def
deleted file mode 100644
index e78e1e2..0000000
--- a/ldap/servers/plugins/pam_passthru/libpam_passthru.def
+++ /dev/null
@@ -1,45 +0,0 @@
-; BEGIN COPYRIGHT BLOCK
-; This Program is free software; you can redistribute it and/or modify it under
-; the terms of the GNU General Public License as published by the Free Software
-; Foundation; version 2 of the License.
-; 
-; This Program is distributed in the hope that it will be useful, but WITHOUT
-; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-; 
-; You should have received a copy of the GNU General Public License along with
-; this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-; Place, Suite 330, Boston, MA 02111-1307 USA.
-; 
-; In addition, as a special exception, Red Hat, Inc. gives You the additional
-; right to link the code of this Program with code not covered under the GNU
-; General Public License ("Non-GPL Code") and to distribute linked combinations
-; including the two, subject to the limitations in this paragraph. Non-GPL Code
-; permitted under this exception must only link to the code of this Program
-; through those well defined interfaces identified in the file named EXCEPTION
-; found in the source code files (the "Approved Interfaces"). The files of
-; Non-GPL Code may instantiate templates or use macros or inline functions from
-; the Approved Interfaces without causing the resulting work to be covered by
-; the GNU General Public License. Only Red Hat, Inc. may make changes or
-; additions to the list of Approved Interfaces. You must obey the GNU General
-; Public License in all respects for all of the Program code and other code used
-; in conjunction with the Program except the Non-GPL Code covered by this
-; exception. If you modify this file, you may extend this exception to your
-; version of the file, but you are not obligated to do so. If you do not wish to
-; provide this exception without modification, you must delete this exception
-; statement from your version and license this file solely under the GPL without
-; exception. 
-;
-;
-; Copyright (C) 2005 Red Hat, Inc.
-; All rights reserved.
-; END COPYRIGHT BLOCK
-;
-;
-;
-DESCRIPTION     'Directory Server Pass Through Authentication Plugin'
-;CODE		SHARED READ EXECUTE
-;DATA		SHARED READ WRITE
-EXPORTS
-	passthruauth_init		@1
-	plugin_init_debug_level		@2
diff --git a/ldap/servers/plugins/pam_passthru/pam_ptdllmain.c b/ldap/servers/plugins/pam_passthru/pam_ptdllmain.c
deleted file mode 100644
index a17bc1b..0000000
--- a/ldap/servers/plugins/pam_passthru/pam_ptdllmain.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-#include "ldap.h"
-#include "lber.h"
-#include "passthru.h"
-#include <stdio.h>
-
-
-int CALLBACK
-LibMain( HINSTANCE hinst, WORD wDataSeg, WORD cbHeapSize, LPSTR lpszCmdLine )
-{
-	/*UnlockData( 0 );*/
- 	return( 1 );
-}
-
-
-#ifdef LDAP_DEBUG
-#include <stdarg.h>
-
-void LDAPDebug( int level, char* fmt, ... )
-{
-	static char debugBuf[1024];
-
-	if (module_ldap_debug && (*module_ldap_debug & level))
-	{
-		va_list ap;
-		va_start (ap, fmt);
-		_snprintf (debugBuf, sizeof(debugBuf), fmt, ap);
-		debugBuf[sizeof(debugBuf)-1] = 0;
-		va_end (ap);
-
-		OutputDebugString (debugBuf);
-	}
-}
-#endif
-
-void perror( const char *msg )
-{
-	char buf[128];
-	wsprintf( buf, "%s: error %d\n", msg, WSAGetLastError()) ;
-	OutputDebugString( buf );
-}
diff --git a/ldap/servers/plugins/passthru/libpassthru.def b/ldap/servers/plugins/passthru/libpassthru.def
deleted file mode 100644
index ac54494..0000000
--- a/ldap/servers/plugins/passthru/libpassthru.def
+++ /dev/null
@@ -1,46 +0,0 @@
-; BEGIN COPYRIGHT BLOCK
-; This Program is free software; you can redistribute it and/or modify it under
-; the terms of the GNU General Public License as published by the Free Software
-; Foundation; version 2 of the License.
-; 
-; This Program is distributed in the hope that it will be useful, but WITHOUT
-; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-; 
-; You should have received a copy of the GNU General Public License along with
-; this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-; Place, Suite 330, Boston, MA 02111-1307 USA.
-; 
-; In addition, as a special exception, Red Hat, Inc. gives You the additional
-; right to link the code of this Program with code not covered under the GNU
-; General Public License ("Non-GPL Code") and to distribute linked combinations
-; including the two, subject to the limitations in this paragraph. Non-GPL Code
-; permitted under this exception must only link to the code of this Program
-; through those well defined interfaces identified in the file named EXCEPTION
-; found in the source code files (the "Approved Interfaces"). The files of
-; Non-GPL Code may instantiate templates or use macros or inline functions from
-; the Approved Interfaces without causing the resulting work to be covered by
-; the GNU General Public License. Only Red Hat, Inc. may make changes or
-; additions to the list of Approved Interfaces. You must obey the GNU General
-; Public License in all respects for all of the Program code and other code used
-; in conjunction with the Program except the Non-GPL Code covered by this
-; exception. If you modify this file, you may extend this exception to your
-; version of the file, but you are not obligated to do so. If you do not wish to
-; provide this exception without modification, you must delete this exception
-; statement from your version and license this file solely under the GPL without
-; exception. 
-; 
-; 
-; Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-; Copyright (C) 2005 Red Hat, Inc.
-; All rights reserved.
-; END COPYRIGHT BLOCK
-;
-;
-;
-DESCRIPTION     'Dirsrv 1.0 Pass Through Authentication Plugin'
-;CODE		SHARED READ EXECUTE
-;DATA		SHARED READ WRITE
-EXPORTS
-	passthruauth_init		@1
-	plugin_init_debug_level		@2
diff --git a/ldap/servers/plugins/passthru/ptdllmain.c b/ldap/servers/plugins/passthru/ptdllmain.c
deleted file mode 100644
index ef471bc..0000000
--- a/ldap/servers/plugins/passthru/ptdllmain.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-#include "ldap.h"
-#include "lber.h"
-#include "passthru.h"
-#include <stdio.h>
-
-int CALLBACK
-LibMain( HINSTANCE hinst, WORD wDataSeg, WORD cbHeapSize, LPSTR lpszCmdLine )
-{
-	/*UnlockData( 0 );*/
- 	return( 1 );
-}
-
-#ifdef LDAP_DEBUG
-#include <stdarg.h>
-
-void LDAPDebug( int level, char* fmt, ... )
-{
-	static char debugBuf[1024];
-
-	if (module_ldap_debug && (*module_ldap_debug & level))
-	{
-		va_list ap;
-		va_start (ap, fmt);
-		_snprintf (debugBuf, sizeof(debugBuf), fmt, ap);
-		debugBuf[sizeof(debugBuf)-1] = 0;
-		va_end (ap);
-
-		OutputDebugString (debugBuf);
-	}
-}
-#endif
-
-
-/* The 16-bit version of the RTL does not implement perror() */
-void perror( const char *msg )
-{
-	char buf[128];
-	wsprintf( buf, "%s: error %d\n", msg, WSAGetLastError()) ;
-	OutputDebugString( buf );
-}
-
diff --git a/ldap/servers/plugins/presence/dllmain.c b/ldap/servers/plugins/presence/dllmain.c
deleted file mode 100644
index 21b45cc..0000000
--- a/ldap/servers/plugins/presence/dllmain.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-/*
- * Microsoft Windows specifics for BACK-LDBM DLL
- */
-#include "ldap.h"
-#include "lber.h"
-
-
-int CALLBACK
-LibMain( HINSTANCE hinst, WORD wDataSeg, WORD cbHeapSize, LPSTR lpszCmdLine )
-{
-	/*UnlockData( 0 );*/
- 	return( 1 );
-}
diff --git a/ldap/servers/plugins/presence/presence.def b/ldap/servers/plugins/presence/presence.def
deleted file mode 100644
index e40b64d..0000000
--- a/ldap/servers/plugins/presence/presence.def
+++ /dev/null
@@ -1,43 +0,0 @@
-; BEGIN COPYRIGHT BLOCK
-; This Program is free software; you can redistribute it and/or modify it under
-; the terms of the GNU General Public License as published by the Free Software
-; Foundation; version 2 of the License.
-; 
-; This Program is distributed in the hope that it will be useful, but WITHOUT
-; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-; 
-; You should have received a copy of the GNU General Public License along with
-; this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-; Place, Suite 330, Boston, MA 02111-1307 USA.
-; 
-; In addition, as a special exception, Red Hat, Inc. gives You the additional
-; right to link the code of this Program with code not covered under the GNU
-; General Public License ("Non-GPL Code") and to distribute linked combinations
-; including the two, subject to the limitations in this paragraph. Non-GPL Code
-; permitted under this exception must only link to the code of this Program
-; through those well defined interfaces identified in the file named EXCEPTION
-; found in the source code files (the "Approved Interfaces"). The files of
-; Non-GPL Code may instantiate templates or use macros or inline functions from
-; the Approved Interfaces without causing the resulting work to be covered by
-; the GNU General Public License. Only Red Hat, Inc. may make changes or
-; additions to the list of Approved Interfaces. You must obey the GNU General
-; Public License in all respects for all of the Program code and other code used
-; in conjunction with the Program except the Non-GPL Code covered by this
-; exception. If you modify this file, you may extend this exception to your
-; version of the file, but you are not obligated to do so. If you do not wish to
-; provide this exception without modification, you must delete this exception
-; statement from your version and license this file solely under the GPL without
-; exception. 
-; 
-; 
-; Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-; Copyright (C) 2005 Red Hat, Inc.
-; All rights reserved.
-; END COPYRIGHT BLOCK
-;
-DESCRIPTION     'Dirsrv 1.0 Presence Plugin'
-EXPORTS
-	presence_init        @2
-	plugin_init_debug_level	@3
-	presence_version		@4
diff --git a/ldap/servers/plugins/pwdstorage/dllmain.c b/ldap/servers/plugins/pwdstorage/dllmain.c
deleted file mode 100644
index 892c41f..0000000
--- a/ldap/servers/plugins/pwdstorage/dllmain.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
- 
- /*
- * Microsoft Windows specifics for LIBPWDSTORAGE DLL
- */
-#include "ldap.h"
-
-
-int CALLBACK
-LibMain( HINSTANCE hinst, WORD wDataSeg, WORD cbHeapSize, LPSTR lpszCmdLine )
-{
-	/*UnlockData( 0 );*/
- 	return( 1 );
-}
diff --git a/ldap/servers/plugins/pwdstorage/libpwdstorage.def b/ldap/servers/plugins/pwdstorage/libpwdstorage.def
deleted file mode 100644
index 5493586..0000000
--- a/ldap/servers/plugins/pwdstorage/libpwdstorage.def
+++ /dev/null
@@ -1,56 +0,0 @@
-; BEGIN COPYRIGHT BLOCK
-; This Program is free software; you can redistribute it and/or modify it under
-; the terms of the GNU General Public License as published by the Free Software
-; Foundation; version 2 of the License.
-; 
-; This Program is distributed in the hope that it will be useful, but WITHOUT
-; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-; 
-; You should have received a copy of the GNU General Public License along with
-; this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-; Place, Suite 330, Boston, MA 02111-1307 USA.
-; 
-; In addition, as a special exception, Red Hat, Inc. gives You the additional
-; right to link the code of this Program with code not covered under the GNU
-; General Public License ("Non-GPL Code") and to distribute linked combinations
-; including the two, subject to the limitations in this paragraph. Non-GPL Code
-; permitted under this exception must only link to the code of this Program
-; through those well defined interfaces identified in the file named EXCEPTION
-; found in the source code files (the "Approved Interfaces"). The files of
-; Non-GPL Code may instantiate templates or use macros or inline functions from
-; the Approved Interfaces without causing the resulting work to be covered by
-; the GNU General Public License. Only Red Hat, Inc. may make changes or
-; additions to the list of Approved Interfaces. You must obey the GNU General
-; Public License in all respects for all of the Program code and other code used
-; in conjunction with the Program except the Non-GPL Code covered by this
-; exception. If you modify this file, you may extend this exception to your
-; version of the file, but you are not obligated to do so. If you do not wish to
-; provide this exception without modification, you must delete this exception
-; statement from your version and license this file solely under the GPL without
-; exception. 
-; 
-; 
-; Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-; Copyright (C) 2005 Red Hat, Inc.
-; All rights reserved.
-; END COPYRIGHT BLOCK
-;
-DESCRIPTION		'Dirsrv 1.0 password storage scheme Plugin'
-EXPORTS
-	sha_pwd_storage_scheme_init @2
-	ssha_pwd_storage_scheme_init @3
-;	crypt_pwd_storage_scheme_init @4
-	clear_pwd_storage_scheme_init @5
-	ns_mta_md5_pwd_storage_scheme_init @6
-	clear_pw_cmp @7
-;	crypt_pw_cmp @8
-	ns_mta_md5_pw_cmp @9
-	sha1_pw_cmp @10 
-	sha1_pw_enc @11
-	salted_sha1_pw_enc @12
-;	crypt_pw_enc @13
-	clear_pw_enc @14
-	mta_MD5Init @15
-	mta_MD5Update @16
-	mta_MD5Final @17
diff --git a/ldap/servers/plugins/referint/dllmain.c b/ldap/servers/plugins/referint/dllmain.c
deleted file mode 100644
index 4474511..0000000
--- a/ldap/servers/plugins/referint/dllmain.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-/*
- * Microsoft Windows specifics for BACK-LDBM DLL
- */
-#include "ldap.h"
-
-
-int CALLBACK
-LibMain( HINSTANCE hinst, WORD wDataSeg, WORD cbHeapSize, LPSTR lpszCmdLine )
-{
-	/*UnlockData( 0 );*/
- 	return( 1 );
-}
-#endif
diff --git a/ldap/servers/plugins/referint/referint.def b/ldap/servers/plugins/referint/referint.def
deleted file mode 100644
index 3c7558d..0000000
--- a/ldap/servers/plugins/referint/referint.def
+++ /dev/null
@@ -1,44 +0,0 @@
-; BEGIN COPYRIGHT BLOCK
-; This Program is free software; you can redistribute it and/or modify it under
-; the terms of the GNU General Public License as published by the Free Software
-; Foundation; version 2 of the License.
-; 
-; This Program is distributed in the hope that it will be useful, but WITHOUT
-; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-; 
-; You should have received a copy of the GNU General Public License along with
-; this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-; Place, Suite 330, Boston, MA 02111-1307 USA.
-; 
-; In addition, as a special exception, Red Hat, Inc. gives You the additional
-; right to link the code of this Program with code not covered under the GNU
-; General Public License ("Non-GPL Code") and to distribute linked combinations
-; including the two, subject to the limitations in this paragraph. Non-GPL Code
-; permitted under this exception must only link to the code of this Program
-; through those well defined interfaces identified in the file named EXCEPTION
-; found in the source code files (the "Approved Interfaces"). The files of
-; Non-GPL Code may instantiate templates or use macros or inline functions from
-; the Approved Interfaces without causing the resulting work to be covered by
-; the GNU General Public License. Only Red Hat, Inc. may make changes or
-; additions to the list of Approved Interfaces. You must obey the GNU General
-; Public License in all respects for all of the Program code and other code used
-; in conjunction with the Program except the Non-GPL Code covered by this
-; exception. If you modify this file, you may extend this exception to your
-; version of the file, but you are not obligated to do so. If you do not wish to
-; provide this exception without modification, you must delete this exception
-; statement from your version and license this file solely under the GPL without
-; exception. 
-; 
-; 
-; Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-; Copyright (C) 2005 Red Hat, Inc.
-; All rights reserved.
-; END COPYRIGHT BLOCK
-;
-DESCRIPTION     'Dirsrv 1.0 Referint Plugin'
-CODE            SHARED READ EXECUTE
-DATA            SHARED READ WRITE
-EXPORTS
-	referint_postop_init        @2
-	plugin_init_debug_level	@3
diff --git a/ldap/servers/plugins/replication/dllmain.c b/ldap/servers/plugins/replication/dllmain.c
deleted file mode 100644
index 940b3e9..0000000
--- a/ldap/servers/plugins/replication/dllmain.c
+++ /dev/null
@@ -1,128 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
- 
- /*
- * Microsoft Windows specifics for LIBREPLICATION DLL
- */
-#include "ldap.h"
-
-
-#ifdef _WIN32
-/* Lifted from Q125688
- * How to Port a 16-bit DLL to a Win32 DLL
- * on the MSVC 4.0 CD
- */
-BOOL WINAPI DllMain (HANDLE hModule, DWORD fdwReason, LPVOID lpReserved)
-{
-
-	switch (fdwReason)
-	{
-	case DLL_PROCESS_ATTACH:
-		 /* Code from LibMain inserted here.  Return TRUE to keep the
-		    DLL loaded or return FALSE to fail loading the DLL.
-
-		    You may have to modify the code in your original LibMain to
-		    account for the fact that it may be called more than once.
-		    You will get one DLL_PROCESS_ATTACH for each process that
-		    loads the DLL. This is different from LibMain which gets
-		    called only once when the DLL is loaded. The only time this
-		    is critical is when you are using shared data sections.
-		    If you are using shared data sections for statically
-		    allocated data, you will need to be careful to initialize it
-		    only once. Check your code carefully.
-
-		    Certain one-time initializations may now need to be done for
-		    each process that attaches. You may also not need code from
-		    your original LibMain because the operating system may now
-		    be doing it for you.
-		 */
-		/*
-		 * 16 bit code calls UnlockData()
-		 * which is mapped to UnlockSegment in windows.h
-		 * in 32 bit world UnlockData is not defined anywhere
-		 * UnlockSegment is mapped to GlobalUnfix in winbase.h
-		 * and the docs for both UnlockSegment and GlobalUnfix say 
-		 * ".. function is oboslete.  Segments have no meaning 
-		 *  in the 32-bit environment".  So we do nothing here.
-		 */
-
-		break;
-
-	case DLL_THREAD_ATTACH:
-		/* Called each time a thread is created in a process that has
-		   already loaded (attached to) this DLL. Does not get called
-		   for each thread that exists in the process before it loaded
-		   the DLL.
-
-		   Do thread-specific initialization here.
-		*/
-		break;
-
-	case DLL_THREAD_DETACH:
-		/* Same as above, but called when a thread in the process
-		   exits.
-
-		   Do thread-specific cleanup here.
-		*/
-		break;
-
-	case DLL_PROCESS_DETACH:
-		/* Code from _WEP inserted here.  This code may (like the
-		   LibMain) not be necessary.  Check to make certain that the
-		   operating system is not doing it for you.
-		*/
-
-		break;
-	}
-	/* The return value is only used for DLL_PROCESS_ATTACH; all other
-	conditions are ignored.  */
-	return TRUE;   /* successful DLL_PROCESS_ATTACH */
-}
-#else
-int CALLBACK
-LibMain( HINSTANCE hinst, WORD wDataSeg, WORD cbHeapSize, LPSTR lpszCmdLine )
-{
-	/*UnlockData( 0 );*/
- 	return( 1 );
-}
-#endif
diff --git a/ldap/servers/plugins/replication/replication.def b/ldap/servers/plugins/replication/replication.def
deleted file mode 100644
index 94b0da7..0000000
--- a/ldap/servers/plugins/replication/replication.def
+++ /dev/null
@@ -1,48 +0,0 @@
-; BEGIN COPYRIGHT BLOCK
-; This Program is free software; you can redistribute it and/or modify it under
-; the terms of the GNU General Public License as published by the Free Software
-; Foundation; version 2 of the License.
-; 
-; This Program is distributed in the hope that it will be useful, but WITHOUT
-; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-; 
-; You should have received a copy of the GNU General Public License along with
-; this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-; Place, Suite 330, Boston, MA 02111-1307 USA.
-; 
-; In addition, as a special exception, Red Hat, Inc. gives You the additional
-; right to link the code of this Program with code not covered under the GNU
-; General Public License ("Non-GPL Code") and to distribute linked combinations
-; including the two, subject to the limitations in this paragraph. Non-GPL Code
-; permitted under this exception must only link to the code of this Program
-; through those well defined interfaces identified in the file named EXCEPTION
-; found in the source code files (the "Approved Interfaces"). The files of
-; Non-GPL Code may instantiate templates or use macros or inline functions from
-; the Approved Interfaces without causing the resulting work to be covered by
-; the GNU General Public License. Only Red Hat, Inc. may make changes or
-; additions to the list of Approved Interfaces. You must obey the GNU General
-; Public License in all respects for all of the Program code and other code used
-; in conjunction with the Program except the Non-GPL Code covered by this
-; exception. If you modify this file, you may extend this exception to your
-; version of the file, but you are not obligated to do so. If you do not wish to
-; provide this exception without modification, you must delete this exception
-; statement from your version and license this file solely under the GPL without
-; exception. 
-; 
-; 
-; Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-; Copyright (C) 2005 Red Hat, Inc.
-; All rights reserved.
-; END COPYRIGHT BLOCK
-;
-;
-;
-DESCRIPTION     'Dirsrv 1.0 Replication Plugin'
-;CODE		SHARED READ EXECUTE
-;DATA		SHARED READ WRITE
-EXPORTS
-    plugin_init_debug_level @1
-	replication_legacy_plugin_init @2
-	replication_multimaster_plugin_init @3
-	repl_chain_on_update @4
diff --git a/ldap/servers/plugins/retrocl/dllmain.c b/ldap/servers/plugins/retrocl/dllmain.c
deleted file mode 100644
index c460cd5..0000000
--- a/ldap/servers/plugins/retrocl/dllmain.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
- /*
- * Microsoft Windows specifics for LIBRETROCL DLL
- */
-#include "ldap.h"
-
-
-int CALLBACK
-LibMain( HINSTANCE hinst, WORD wDataSeg, WORD cbHeapSize, LPSTR lpszCmdLine )
-{
-	/*UnlockData( 0 );*/
- 	return( 1 );
-}
-
diff --git a/ldap/servers/plugins/retrocl/retrocl.def b/ldap/servers/plugins/retrocl/retrocl.def
deleted file mode 100644
index fffebea..0000000
--- a/ldap/servers/plugins/retrocl/retrocl.def
+++ /dev/null
@@ -1,47 +0,0 @@
-; BEGIN COPYRIGHT BLOCK
-; This Program is free software; you can redistribute it and/or modify it under
-; the terms of the GNU General Public License as published by the Free Software
-; Foundation; version 2 of the License.
-; 
-; This Program is distributed in the hope that it will be useful, but WITHOUT
-; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-; 
-; You should have received a copy of the GNU General Public License along with
-; this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-; Place, Suite 330, Boston, MA 02111-1307 USA.
-; 
-; In addition, as a special exception, Red Hat, Inc. gives You the additional
-; right to link the code of this Program with code not covered under the GNU
-; General Public License ("Non-GPL Code") and to distribute linked combinations
-; including the two, subject to the limitations in this paragraph. Non-GPL Code
-; permitted under this exception must only link to the code of this Program
-; through those well defined interfaces identified in the file named EXCEPTION
-; found in the source code files (the "Approved Interfaces"). The files of
-; Non-GPL Code may instantiate templates or use macros or inline functions from
-; the Approved Interfaces without causing the resulting work to be covered by
-; the GNU General Public License. Only Red Hat, Inc. may make changes or
-; additions to the list of Approved Interfaces. You must obey the GNU General
-; Public License in all respects for all of the Program code and other code used
-; in conjunction with the Program except the Non-GPL Code covered by this
-; exception. If you modify this file, you may extend this exception to your
-; version of the file, but you are not obligated to do so. If you do not wish to
-; provide this exception without modification, you must delete this exception
-; statement from your version and license this file solely under the GPL without
-; exception. 
-; 
-; 
-; Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-; Copyright (C) 2005 Red Hat, Inc.
-; All rights reserved.
-; END COPYRIGHT BLOCK
-;
-;
-
-DESCRIPTION     'Dirsrv 1.0 Retro-Changelog Plugin'
-;CODE		SHARED READ EXECUTE
-;DATA		SHARED READ WRITE
-EXPORTS
-    plugin_init_debug_level @1
-    retrocl_plugin_init @2
-
diff --git a/ldap/servers/plugins/rever/dllmain.c b/ldap/servers/plugins/rever/dllmain.c
deleted file mode 100644
index f107648..0000000
--- a/ldap/servers/plugins/rever/dllmain.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
- 
- /*
- * Microsoft Windows specifics for LIBPWDSTORAGE DLL
- */
-#include "rever.h"
-
-
-int CALLBACK
-LibMain( HINSTANCE hinst, WORD wDataSeg, WORD cbHeapSize, LPSTR lpszCmdLine )
-{
-	/*UnlockData( 0 );*/
- 	return( 1 );
-}
diff --git a/ldap/servers/plugins/rever/libdes.def b/ldap/servers/plugins/rever/libdes.def
deleted file mode 100644
index 081eac0..0000000
--- a/ldap/servers/plugins/rever/libdes.def
+++ /dev/null
@@ -1,45 +0,0 @@
-; BEGIN COPYRIGHT BLOCK
-; This Program is free software; you can redistribute it and/or modify it under
-; the terms of the GNU General Public License as published by the Free Software
-; Foundation; version 2 of the License.
-; 
-; This Program is distributed in the hope that it will be useful, but WITHOUT
-; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-; 
-; You should have received a copy of the GNU General Public License along with
-; this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-; Place, Suite 330, Boston, MA 02111-1307 USA.
-; 
-; In addition, as a special exception, Red Hat, Inc. gives You the additional
-; right to link the code of this Program with code not covered under the GNU
-; General Public License ("Non-GPL Code") and to distribute linked combinations
-; including the two, subject to the limitations in this paragraph. Non-GPL Code
-; permitted under this exception must only link to the code of this Program
-; through those well defined interfaces identified in the file named EXCEPTION
-; found in the source code files (the "Approved Interfaces"). The files of
-; Non-GPL Code may instantiate templates or use macros or inline functions from
-; the Approved Interfaces without causing the resulting work to be covered by
-; the GNU General Public License. Only Red Hat, Inc. may make changes or
-; additions to the list of Approved Interfaces. You must obey the GNU General
-; Public License in all respects for all of the Program code and other code used
-; in conjunction with the Program except the Non-GPL Code covered by this
-; exception. If you modify this file, you may extend this exception to your
-; version of the file, but you are not obligated to do so. If you do not wish to
-; provide this exception without modification, you must delete this exception
-; statement from your version and license this file solely under the GPL without
-; exception. 
-; 
-; 
-; Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-; Copyright (C) 2005 Red Hat, Inc.
-; All rights reserved.
-; END COPYRIGHT BLOCK
-;
-DESCRIPTION		'Directory Server 6.2.1 Local Credentials Reversible Encryption Plugin'
-EXPORTS
-	des_cmp @2
-	des_enc @3
-	des_dec @4
-	des_init @5
-	migrateCredentials @6
diff --git a/ldap/servers/plugins/roles/dllmain.c b/ldap/servers/plugins/roles/dllmain.c
deleted file mode 100644
index de55d26..0000000
--- a/ldap/servers/plugins/roles/dllmain.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-/*
- * Microsoft Windows specifics for BACK-LDBM DLL
- */
-#include "ldap.h"
-#include "lber.h"
-
-int CALLBACK
-LibMain( HINSTANCE hinst, WORD wDataSeg, WORD cbHeapSize, LPSTR lpszCmdLine )
-{
-	/*UnlockData( 0 );*/
- 	return( 1 );
-}
diff --git a/ldap/servers/plugins/roles/roles.def b/ldap/servers/plugins/roles/roles.def
deleted file mode 100644
index 9a8c1c7..0000000
--- a/ldap/servers/plugins/roles/roles.def
+++ /dev/null
@@ -1,42 +0,0 @@
-; BEGIN COPYRIGHT BLOCK
-; This Program is free software; you can redistribute it and/or modify it under
-; the terms of the GNU General Public License as published by the Free Software
-; Foundation; version 2 of the License.
-; 
-; This Program is distributed in the hope that it will be useful, but WITHOUT
-; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-; 
-; You should have received a copy of the GNU General Public License along with
-; this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-; Place, Suite 330, Boston, MA 02111-1307 USA.
-; 
-; In addition, as a special exception, Red Hat, Inc. gives You the additional
-; right to link the code of this Program with code not covered under the GNU
-; General Public License ("Non-GPL Code") and to distribute linked combinations
-; including the two, subject to the limitations in this paragraph. Non-GPL Code
-; permitted under this exception must only link to the code of this Program
-; through those well defined interfaces identified in the file named EXCEPTION
-; found in the source code files (the "Approved Interfaces"). The files of
-; Non-GPL Code may instantiate templates or use macros or inline functions from
-; the Approved Interfaces without causing the resulting work to be covered by
-; the GNU General Public License. Only Red Hat, Inc. may make changes or
-; additions to the list of Approved Interfaces. You must obey the GNU General
-; Public License in all respects for all of the Program code and other code used
-; in conjunction with the Program except the Non-GPL Code covered by this
-; exception. If you modify this file, you may extend this exception to your
-; version of the file, but you are not obligated to do so. If you do not wish to
-; provide this exception without modification, you must delete this exception
-; statement from your version and license this file solely under the GPL without
-; exception. 
-; 
-; 
-; Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-; Copyright (C) 2005 Red Hat, Inc.
-; All rights reserved.
-; END COPYRIGHT BLOCK
-;
-DESCRIPTION     'Dirsrv 1.0 Roles Plugin'
-EXPORTS
-	roles_init        @2
-	plugin_init_debug_level	@3
diff --git a/ldap/servers/plugins/statechange/dllmain.c b/ldap/servers/plugins/statechange/dllmain.c
deleted file mode 100644
index d23057a..0000000
--- a/ldap/servers/plugins/statechange/dllmain.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-/*
- * Microsoft Windows specifics for BACK-LDBM DLL
- */
-#include "ldap.h"
-#include "lber.h"
-
-
-int CALLBACK
-LibMain( HINSTANCE hinst, WORD wDataSeg, WORD cbHeapSize, LPSTR lpszCmdLine )
-{
-	/*UnlockData( 0 );*/
- 	return( 1 );
-}
-
diff --git a/ldap/servers/plugins/statechange/statechange.def b/ldap/servers/plugins/statechange/statechange.def
deleted file mode 100644
index 4a0daf6..0000000
--- a/ldap/servers/plugins/statechange/statechange.def
+++ /dev/null
@@ -1,42 +0,0 @@
-; BEGIN COPYRIGHT BLOCK
-; This Program is free software; you can redistribute it and/or modify it under
-; the terms of the GNU General Public License as published by the Free Software
-; Foundation; version 2 of the License.
-; 
-; This Program is distributed in the hope that it will be useful, but WITHOUT
-; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-; 
-; You should have received a copy of the GNU General Public License along with
-; this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-; Place, Suite 330, Boston, MA 02111-1307 USA.
-; 
-; In addition, as a special exception, Red Hat, Inc. gives You the additional
-; right to link the code of this Program with code not covered under the GNU
-; General Public License ("Non-GPL Code") and to distribute linked combinations
-; including the two, subject to the limitations in this paragraph. Non-GPL Code
-; permitted under this exception must only link to the code of this Program
-; through those well defined interfaces identified in the file named EXCEPTION
-; found in the source code files (the "Approved Interfaces"). The files of
-; Non-GPL Code may instantiate templates or use macros or inline functions from
-; the Approved Interfaces without causing the resulting work to be covered by
-; the GNU General Public License. Only Red Hat, Inc. may make changes or
-; additions to the list of Approved Interfaces. You must obey the GNU General
-; Public License in all respects for all of the Program code and other code used
-; in conjunction with the Program except the Non-GPL Code covered by this
-; exception. If you modify this file, you may extend this exception to your
-; version of the file, but you are not obligated to do so. If you do not wish to
-; provide this exception without modification, you must delete this exception
-; statement from your version and license this file solely under the GPL without
-; exception. 
-; 
-; 
-; Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-; Copyright (C) 2005 Red Hat, Inc.
-; All rights reserved.
-; END COPYRIGHT BLOCK
-;
-DESCRIPTION     'Dirsrv 1.0 State Change Plugin'
-EXPORTS
-	statechange_init        @2
-	plugin_init_debug_level	@3
diff --git a/ldap/servers/plugins/syntaxes/dllmain.c b/ldap/servers/plugins/syntaxes/dllmain.c
deleted file mode 100644
index 0dd3ff0..0000000
--- a/ldap/servers/plugins/syntaxes/dllmain.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-/*
- * Microsoft Windows specifics for syntax-plugin DLL
- */
-#include "ldap.h"
-#include "syntax.h"
-#include <stdio.h>
-
-
-int CALLBACK
-LibMain( HINSTANCE hinst, WORD wDataSeg, WORD cbHeapSize, LPSTR lpszCmdLine )
-{
-	/*UnlockData( 0 );*/
- 	return( 1 );
-}
-
-#ifdef LDAP_DEBUG
-#include <stdarg.h>
-
-void LDAPDebug( int level, char* fmt, ... )
-{
-	static char debugBuf[1024];
-
-	if (module_ldap_debug && (*module_ldap_debug & level))
-	{
-		va_list ap;
-		va_start (ap, fmt);
-		_snprintf (debugBuf, sizeof(debugBuf), fmt, ap);
-		debugBuf[sizeof(debugBuf)-1] = 0;
-		va_end (ap);
-
-		OutputDebugString (debugBuf);
-	}
-}
-#endif
-
-
-void perror( const char *msg )
-{
-	char buf[128];
-	wsprintf( buf, "%s: error %d\n", msg, WSAGetLastError()) ;
-	OutputDebugString( buf );
-}
diff --git a/ldap/servers/plugins/syntaxes/libsyntax.def b/ldap/servers/plugins/syntaxes/libsyntax.def
deleted file mode 100644
index 23dc0b7..0000000
--- a/ldap/servers/plugins/syntaxes/libsyntax.def
+++ /dev/null
@@ -1,56 +0,0 @@
-; BEGIN COPYRIGHT BLOCK
-; This Program is free software; you can redistribute it and/or modify it under
-; the terms of the GNU General Public License as published by the Free Software
-; Foundation; version 2 of the License.
-; 
-; This Program is distributed in the hope that it will be useful, but WITHOUT
-; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-; 
-; You should have received a copy of the GNU General Public License along with
-; this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-; Place, Suite 330, Boston, MA 02111-1307 USA.
-; 
-; In addition, as a special exception, Red Hat, Inc. gives You the additional
-; right to link the code of this Program with code not covered under the GNU
-; General Public License ("Non-GPL Code") and to distribute linked combinations
-; including the two, subject to the limitations in this paragraph. Non-GPL Code
-; permitted under this exception must only link to the code of this Program
-; through those well defined interfaces identified in the file named EXCEPTION
-; found in the source code files (the "Approved Interfaces"). The files of
-; Non-GPL Code may instantiate templates or use macros or inline functions from
-; the Approved Interfaces without causing the resulting work to be covered by
-; the GNU General Public License. Only Red Hat, Inc. may make changes or
-; additions to the list of Approved Interfaces. You must obey the GNU General
-; Public License in all respects for all of the Program code and other code used
-; in conjunction with the Program except the Non-GPL Code covered by this
-; exception. If you modify this file, you may extend this exception to your
-; version of the file, but you are not obligated to do so. If you do not wish to
-; provide this exception without modification, you must delete this exception
-; statement from your version and license this file solely under the GPL without
-; exception. 
-; 
-; 
-; Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-; Copyright (C) 2005 Red Hat, Inc.
-; All rights reserved.
-; END COPYRIGHT BLOCK
-;
-DESCRIPTION     'Dirsrv 1.0 syntaxes Plugin'
-EXPORTS
-	cis_init				@2
-	ces_init				@3
-	tel_init				@4
-	dn_init					@5
-	bin_init				@6
-	int_init				@7
-	plugin_init_debug_level	@8
-	octetstring_init		@9
-	boolean_init			@10
-	time_init				@11
-	uri_init				@12
-	country_init			@13
-	postal_init				@14
-	jpeg_init				@15
-	oid_init				@16
-	sicis_init				@17
diff --git a/ldap/servers/plugins/uiduniq/libuiduniq.def b/ldap/servers/plugins/uiduniq/libuiduniq.def
deleted file mode 100644
index a687de0..0000000
--- a/ldap/servers/plugins/uiduniq/libuiduniq.def
+++ /dev/null
@@ -1,47 +0,0 @@
-; BEGIN COPYRIGHT BLOCK
-; This Program is free software; you can redistribute it and/or modify it under
-; the terms of the GNU General Public License as published by the Free Software
-; Foundation; version 2 of the License.
-; 
-; This Program is distributed in the hope that it will be useful, but WITHOUT
-; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-; 
-; You should have received a copy of the GNU General Public License along with
-; this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-; Place, Suite 330, Boston, MA 02111-1307 USA.
-; 
-; In addition, as a special exception, Red Hat, Inc. gives You the additional
-; right to link the code of this Program with code not covered under the GNU
-; General Public License ("Non-GPL Code") and to distribute linked combinations
-; including the two, subject to the limitations in this paragraph. Non-GPL Code
-; permitted under this exception must only link to the code of this Program
-; through those well defined interfaces identified in the file named EXCEPTION
-; found in the source code files (the "Approved Interfaces"). The files of
-; Non-GPL Code may instantiate templates or use macros or inline functions from
-; the Approved Interfaces without causing the resulting work to be covered by
-; the GNU General Public License. Only Red Hat, Inc. may make changes or
-; additions to the list of Approved Interfaces. You must obey the GNU General
-; Public License in all respects for all of the Program code and other code used
-; in conjunction with the Program except the Non-GPL Code covered by this
-; exception. If you modify this file, you may extend this exception to your
-; version of the file, but you are not obligated to do so. If you do not wish to
-; provide this exception without modification, you must delete this exception
-; statement from your version and license this file solely under the GPL without
-; exception. 
-; 
-; 
-; Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-; Copyright (C) 2005 Red Hat, Inc.
-; All rights reserved.
-; END COPYRIGHT BLOCK
-;
-;
-;
-DESCRIPTION     'Dirsrv 1.0 Unique Attribute Checking Plugin'
-;CODE		SHARED READ EXECUTE
-;DATA		SHARED READ WRITE
-EXPORTS
-	uidunique_init		@1
-	NSUniqueAttr_Init	@2
-	NS7bitAttr_Init		@3
diff --git a/ldap/servers/plugins/vattrsp_template/dllmain.c b/ldap/servers/plugins/vattrsp_template/dllmain.c
deleted file mode 100644
index 21b45cc..0000000
--- a/ldap/servers/plugins/vattrsp_template/dllmain.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-/*
- * Microsoft Windows specifics for BACK-LDBM DLL
- */
-#include "ldap.h"
-#include "lber.h"
-
-
-int CALLBACK
-LibMain( HINSTANCE hinst, WORD wDataSeg, WORD cbHeapSize, LPSTR lpszCmdLine )
-{
-	/*UnlockData( 0 );*/
- 	return( 1 );
-}
diff --git a/ldap/servers/plugins/vattrsp_template/vattrsp.def b/ldap/servers/plugins/vattrsp_template/vattrsp.def
deleted file mode 100644
index e5734b6..0000000
--- a/ldap/servers/plugins/vattrsp_template/vattrsp.def
+++ /dev/null
@@ -1,42 +0,0 @@
-; BEGIN COPYRIGHT BLOCK
-; This Program is free software; you can redistribute it and/or modify it under
-; the terms of the GNU General Public License as published by the Free Software
-; Foundation; version 2 of the License.
-; 
-; This Program is distributed in the hope that it will be useful, but WITHOUT
-; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-; 
-; You should have received a copy of the GNU General Public License along with
-; this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-; Place, Suite 330, Boston, MA 02111-1307 USA.
-; 
-; In addition, as a special exception, Red Hat, Inc. gives You the additional
-; right to link the code of this Program with code not covered under the GNU
-; General Public License ("Non-GPL Code") and to distribute linked combinations
-; including the two, subject to the limitations in this paragraph. Non-GPL Code
-; permitted under this exception must only link to the code of this Program
-; through those well defined interfaces identified in the file named EXCEPTION
-; found in the source code files (the "Approved Interfaces"). The files of
-; Non-GPL Code may instantiate templates or use macros or inline functions from
-; the Approved Interfaces without causing the resulting work to be covered by
-; the GNU General Public License. Only Red Hat, Inc. may make changes or
-; additions to the list of Approved Interfaces. You must obey the GNU General
-; Public License in all respects for all of the Program code and other code used
-; in conjunction with the Program except the Non-GPL Code covered by this
-; exception. If you modify this file, you may extend this exception to your
-; version of the file, but you are not obligated to do so. If you do not wish to
-; provide this exception without modification, you must delete this exception
-; statement from your version and license this file solely under the GPL without
-; exception. 
-; 
-; 
-; Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-; Copyright (C) 2005 Red Hat, Inc.
-; All rights reserved.
-; END COPYRIGHT BLOCK
-;
-DESCRIPTION     'Netscape Directory Server 6.2.1 Virtual Attribute Service Provider Template Plugin'
-EXPORTS
-	vattrsp_init        @2
-	plugin_init_debug_level	@3
diff --git a/ldap/servers/plugins/views/dllmain.c b/ldap/servers/plugins/views/dllmain.c
deleted file mode 100644
index 21b45cc..0000000
--- a/ldap/servers/plugins/views/dllmain.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-/*
- * Microsoft Windows specifics for BACK-LDBM DLL
- */
-#include "ldap.h"
-#include "lber.h"
-
-
-int CALLBACK
-LibMain( HINSTANCE hinst, WORD wDataSeg, WORD cbHeapSize, LPSTR lpszCmdLine )
-{
-	/*UnlockData( 0 );*/
- 	return( 1 );
-}
diff --git a/ldap/servers/plugins/views/views.def b/ldap/servers/plugins/views/views.def
deleted file mode 100644
index 71dd5d0..0000000
--- a/ldap/servers/plugins/views/views.def
+++ /dev/null
@@ -1,42 +0,0 @@
-; BEGIN COPYRIGHT BLOCK
-; This Program is free software; you can redistribute it and/or modify it under
-; the terms of the GNU General Public License as published by the Free Software
-; Foundation; version 2 of the License.
-; 
-; This Program is distributed in the hope that it will be useful, but WITHOUT
-; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-; 
-; You should have received a copy of the GNU General Public License along with
-; this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-; Place, Suite 330, Boston, MA 02111-1307 USA.
-; 
-; In addition, as a special exception, Red Hat, Inc. gives You the additional
-; right to link the code of this Program with code not covered under the GNU
-; General Public License ("Non-GPL Code") and to distribute linked combinations
-; including the two, subject to the limitations in this paragraph. Non-GPL Code
-; permitted under this exception must only link to the code of this Program
-; through those well defined interfaces identified in the file named EXCEPTION
-; found in the source code files (the "Approved Interfaces"). The files of
-; Non-GPL Code may instantiate templates or use macros or inline functions from
-; the Approved Interfaces without causing the resulting work to be covered by
-; the GNU General Public License. Only Red Hat, Inc. may make changes or
-; additions to the list of Approved Interfaces. You must obey the GNU General
-; Public License in all respects for all of the Program code and other code used
-; in conjunction with the Program except the Non-GPL Code covered by this
-; exception. If you modify this file, you may extend this exception to your
-; version of the file, but you are not obligated to do so. If you do not wish to
-; provide this exception without modification, you must delete this exception
-; statement from your version and license this file solely under the GPL without
-; exception. 
-; 
-; 
-; Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-; Copyright (C) 2005 Red Hat, Inc.
-; All rights reserved.
-; END COPYRIGHT BLOCK
-;
-DESCRIPTION     'Dirsrv 1.0 State Change Plugin'
-EXPORTS
-	views_init        @2
-	plugin_init_debug_level	@3
diff --git a/ldap/servers/slapd/back-ldbm/dllmain.c b/ldap/servers/slapd/back-ldbm/dllmain.c
deleted file mode 100644
index b0e49dc..0000000
--- a/ldap/servers/slapd/back-ldbm/dllmain.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-/*
- * Microsoft Windows specifics for BACK-LDBM DLL
- */
-#include "back-ldbm.h"
-#include <stdio.h>
-
-int CALLBACK
-LibMain( HINSTANCE hinst, WORD wDataSeg, WORD cbHeapSize, LPSTR lpszCmdLine )
-{
-	/*UnlockData( 0 );*/
- 	return( 1 );
-}
-
-#ifdef LDAP_DEBUG
-#ifndef _WIN32
-#include <stdarg.h>
-#include <stdio.h>
-
-void LDAPDebug( int level, char* fmt, ... )
-{
-	static char debugBuf[1024];
-
-	if (slapd_ldap_debug & level)
-	{
-		va_list ap;
-		va_start (ap, fmt);
-		_snprintf (debugBuf, sizeof(debugBuf), fmt, ap);
-		debugBuf[sizeof(debugBuf)-1] = 0;
-		va_end (ap);
-
-		OutputDebugString (debugBuf);
-	}
-}
-#endif
-#endif
-
-/* The 16-bit version of the RTL does not implement perror() */
-void perror( const char *msg )
-{
-	char buf[128];
-	wsprintf( buf, "%s: error %d\n", msg, WSAGetLastError()) ;
-	OutputDebugString( buf );
-}
-
diff --git a/ldap/servers/slapd/back-ldbm/libback-ldbm.def b/ldap/servers/slapd/back-ldbm/libback-ldbm.def
deleted file mode 100644
index 661973d..0000000
--- a/ldap/servers/slapd/back-ldbm/libback-ldbm.def
+++ /dev/null
@@ -1,45 +0,0 @@
-; BEGIN COPYRIGHT BLOCK
-; This Program is free software; you can redistribute it and/or modify it under
-; the terms of the GNU General Public License as published by the Free Software
-; Foundation; version 2 of the License.
-; 
-; This Program is distributed in the hope that it will be useful, but WITHOUT
-; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-; 
-; You should have received a copy of the GNU General Public License along with
-; this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-; Place, Suite 330, Boston, MA 02111-1307 USA.
-; 
-; In addition, as a special exception, Red Hat, Inc. gives You the additional
-; right to link the code of this Program with code not covered under the GNU
-; General Public License ("Non-GPL Code") and to distribute linked combinations
-; including the two, subject to the limitations in this paragraph. Non-GPL Code
-; permitted under this exception must only link to the code of this Program
-; through those well defined interfaces identified in the file named EXCEPTION
-; found in the source code files (the "Approved Interfaces"). The files of
-; Non-GPL Code may instantiate templates or use macros or inline functions from
-; the Approved Interfaces without causing the resulting work to be covered by
-; the GNU General Public License. Only Red Hat, Inc. may make changes or
-; additions to the list of Approved Interfaces. You must obey the GNU General
-; Public License in all respects for all of the Program code and other code used
-; in conjunction with the Program except the Non-GPL Code covered by this
-; exception. If you modify this file, you may extend this exception to your
-; version of the file, but you are not obligated to do so. If you do not wish to
-; provide this exception without modification, you must delete this exception
-; statement from your version and license this file solely under the GPL without
-; exception. 
-; 
-; 
-; Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-; Copyright (C) 2005 Red Hat, Inc.
-; All rights reserved.
-; END COPYRIGHT BLOCK
-;
-DESCRIPTION     'Directory Server 2.0 DB Backend Plugin'
-EXPORTS
-	ldbm_back_init			@2
-	plugin_init_debug_level		@3
-;	ldbm_back_changelog_init	@4
-
-
diff --git a/ldap/servers/slapd/back-ldif/dllmain.c b/ldap/servers/slapd/back-ldif/dllmain.c
deleted file mode 100644
index 282dce9..0000000
--- a/ldap/servers/slapd/back-ldif/dllmain.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-/*
- * Microsoft Windows specifics for LIBLDAP DLL
- */
-#include "ldap.h"
-#include <stdio.h>
-
-
-int CALLBACK
-LibMain( HINSTANCE hinst, WORD wDataSeg, WORD cbHeapSize, LPSTR lpszCmdLine )
-{
-	/*UnlockData( 0 );*/
- 	return( 1 );
-}
-
-/* The 16-bit version of the RTL does not implement perror() */
-
-void perror( const char *msg )
-{
-	char buf[128];
-	wsprintf( buf, "%s: error %d\n", msg, WSAGetLastError()) ;
-	OutputDebugString( buf );
-}
-
diff --git a/ldap/servers/slapd/back-ldif/libback-ldif.def b/ldap/servers/slapd/back-ldif/libback-ldif.def
deleted file mode 100644
index 6665d0b..0000000
--- a/ldap/servers/slapd/back-ldif/libback-ldif.def
+++ /dev/null
@@ -1,44 +0,0 @@
-; BEGIN COPYRIGHT BLOCK
-; This Program is free software; you can redistribute it and/or modify it under
-; the terms of the GNU General Public License as published by the Free Software
-; Foundation; version 2 of the License.
-; 
-; This Program is distributed in the hope that it will be useful, but WITHOUT
-; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-; 
-; You should have received a copy of the GNU General Public License along with
-; this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-; Place, Suite 330, Boston, MA 02111-1307 USA.
-; 
-; In addition, as a special exception, Red Hat, Inc. gives You the additional
-; right to link the code of this Program with code not covered under the GNU
-; General Public License ("Non-GPL Code") and to distribute linked combinations
-; including the two, subject to the limitations in this paragraph. Non-GPL Code
-; permitted under this exception must only link to the code of this Program
-; through those well defined interfaces identified in the file named EXCEPTION
-; found in the source code files (the "Approved Interfaces"). The files of
-; Non-GPL Code may instantiate templates or use macros or inline functions from
-; the Approved Interfaces without causing the resulting work to be covered by
-; the GNU General Public License. Only Red Hat, Inc. may make changes or
-; additions to the list of Approved Interfaces. You must obey the GNU General
-; Public License in all respects for all of the Program code and other code used
-; in conjunction with the Program except the Non-GPL Code covered by this
-; exception. If you modify this file, you may extend this exception to your
-; version of the file, but you are not obligated to do so. If you do not wish to
-; provide this exception without modification, you must delete this exception
-; statement from your version and license this file solely under the GPL without
-; exception. 
-; 
-; 
-; Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-; Copyright (C) 2005 Red Hat, Inc.
-; All rights reserved.
-; END COPYRIGHT BLOCK
-;
-DESCRIPTION     'Directory Server LDIF Backend Plugin'
-EXPORTS
-	ldif_back_init			@2
-	plugin_init_debug_level		@3
-
-
diff --git a/ldap/servers/slapd/libslapd.def b/ldap/servers/slapd/libslapd.def
deleted file mode 100644
index 7e3c942..0000000
--- a/ldap/servers/slapd/libslapd.def
+++ /dev/null
@@ -1,1204 +0,0 @@
-; BEGIN COPYRIGHT BLOCK
-; This Program is free software; you can redistribute it and/or modify it under
-; the terms of the GNU General Public License as published by the Free Software
-; Foundation; version 2 of the License.
-; 
-; This Program is distributed in the hope that it will be useful, but WITHOUT
-; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-; 
-; You should have received a copy of the GNU General Public License along with
-; this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-; Place, Suite 330, Boston, MA 02111-1307 USA.
-; 
-; In addition, as a special exception, Red Hat, Inc. gives You the additional
-; right to link the code of this Program with code not covered under the GNU
-; General Public License ("Non-GPL Code") and to distribute linked combinations
-; including the two, subject to the limitations in this paragraph. Non-GPL Code
-; permitted under this exception must only link to the code of this Program
-; through those well defined interfaces identified in the file named EXCEPTION
-; found in the source code files (the "Approved Interfaces"). The files of
-; Non-GPL Code may instantiate templates or use macros or inline functions from
-; the Approved Interfaces without causing the resulting work to be covered by
-; the GNU General Public License. Only Red Hat, Inc. may make changes or
-; additions to the list of Approved Interfaces. You must obey the GNU General
-; Public License in all respects for all of the Program code and other code used
-; in conjunction with the Program except the Non-GPL Code covered by this
-; exception. If you modify this file, you may extend this exception to your
-; version of the file, but you are not obligated to do so. If you do not wish to
-; provide this exception without modification, you must delete this exception
-; statement from your version and license this file solely under the GPL without
-; exception. 
-; 
-; 
-; Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-; Copyright (C) 2005 Red Hat, Inc.
-; All rights reserved.
-; END COPYRIGHT BLOCK
-;
-DESCRIPTION     'Dirsrv 1.0 Plug-in Utility Library'
-EXPORTS
-	slapd_log_error_proc		@2
-	slapd_log_audit_proc		@3
-	ldapi_init_extended_ops		@4
-	audit_log_openf			@5
-	slapi_log_error			@6
-	slapi_log_access		@7
-	g_set_detached			@8
-	access_log_openf		@9
-	error_log_openf			@10
-	slapi_ch_strdup			@11
-	slapi_ch_malloc			@12
-	slapi_ch_calloc			@13
-	slapi_ch_realloc			@14
-	slapi_ch_free				@15
-    slapi_sdn_scope_test @16
-	slapi_pblock_get		@17
-	slapi_pblock_set		@18
-	slapi_str2entry			@19
-	slapi_entry2str			@20
-	slapi_entry_alloc			@21
-	slapi_entry_free			@22
-	slapi_entry_dup			@23
-	slapi_entry_get_dn			@24
-	slapi_entry_set_dn			@25
-	slapi_entry_attr_find			@26
-	slapi_entry_first_attr		@27
-	slapi_entry_next_attr			@28
-	slapi_entry_attr_merge		@29
-	slapi_entry_schema_check		@30
-	slapi_entry_add_values		@31
-	slapi_entry_delete_values		@32
-	g_get_global_oc_nolock			@34
-    config_set_maxbersize @35
-	g_get_global_lastmod		@36
-	current_time			@37
-	slapi_attr_free			@38
-	attr_syntax_create		@39
-	valueset_get_valuearray			@40
-	attrlist_merge			@41
-	attrlist_find			@42
-	attrlist_delete			@43
-    slapi_register_plugin @44
-	csn_max		@45
-	slapi_dn_normalize			@46
-	slapi_dn_ignore_case			@47
-	slapi_dn_normalize_case		@48
-	slapi_dn_parent			@49
-	slapi_dn_issuffix			@50
-    slapi_attr_get_valueset @51
-	slapi_read_buffer               @52
-	slapi_write_buffer              @53
-	add_control				@54
-	pblock_init		@56
-	pblock_init_common	@57
-	slapi_pblock_get_common		@58
-	slapi_valueset_count @59
-	slapi_mtn_get_backend_name	@60
-	get_timestring			@61
-	free_timestring			@62
-	slapi_op_abandoned			@63		
-	slapi_filter_get_choice		@64
-	slapi_filter_get_ava			@65
-	slapi_filter_get_type			@66
-	slapi_filter_get_subfilt		@67
-	slapi_filter_list_first		@68
-	slapi_filter_list_next		@69
-	slapi_filter_join			@70
-	slapi_filter_free			@71
-	slapi_filter_test			@72
-	slapi_access_allowed			@73
-	slapi_acl_check_mods			@74
-    dse_search @75
-	slapi_pw_find				@76
-;	send_read_referrals             @77 
-;	ref_array_dup                   @78 
-;	ref_array_dup_free              @79 
-	slapi_dn_find_parent            @79
-	slapi_dn_beparent			@80
-	slapi_ldap_init			@81
-	slapi_ldap_unbind		@82
-	slapi_dn_isroot			@83
-	slapi_dn_isbesuffix			@84
-	slapi_value_new_berval @85
-	plugin_call_plugins		@86
-	slapi_mtn_be_disable @87
-	slapi_be_new				@88
-    get_operation_object_type @89
-	be_flushall			@90
-	slapi_be_select			@91
-	charray_free			@92
-	charray_dup			@93
-	slapi_str2filter			@94
-	charray_add			@95
-	value_done				@96
-	rdn2ava				@97
-	pw_encodevals			@98
-	slapi_valueset_set_from_smod @99
-	ava_done			@100
-	pw_name2scheme			@101
-	generate_componentid		@102
-	g_set_deftime			@103
-	g_set_defsize			@104
-	plugin_setup			@105
-	slapi_new_mutex			@106
-	slapi_destroy_mutex		@107
-	slapi_lock_mutex		@108
-	slapi_unlock_mutex		@109
-	slapi_valueset_set_valueset @110
-    dse_modify @111
-	plugin_call_acl_plugin		@112
-	get_filter			@113
-	be_unbindall			@114
-	plugin_call_exop_plugins	@115
-	filter_normalize		@116
-	plugin_call_acl_mods_access	@117
-	normalize_oc			@118
-	ref_adjust			@119
-    config_get_maxbersize @120
-	entry_replace_values		@121
-	filter_strcpy_special		@122
-	be_addsuffix    @123
-	slapi_be_getsuffix    @124
-    slapi_entry_attr_hasvalue @125
-	sym_load			@126
-	str2charray			@127
-	charray_merge			@128
-	libldap_init_debug_level	@129
-    slapi_seq_callback @130
-    slapi_be_getentrypoint @131
-    write_audit_log_entry @132
-	rwl_new				@133
-	slapi_send_ldap_search_entry	@134
-	slapi_send_ldap_result			@135
-	slapi_send_ldap_referral		@136
-	g_log_init		@137
-    slapi_get_first_backend @138
-    slapi_get_next_backend @139
-    be_cleanupall			@140
-	slapi_attr_new @141
-	slapi_acl_verify_aci_syntax	@142
-	plugin_call_acl_mods_update	@143
-	plugin_call_acl_verify_syntax	@144
-	poll_current_time	@145
-	slapi_dn_isparent		@146
-	freepmods		@147
-	get_ldapmessage_controls	@148
-	init_controls			@149
-	slapi_control_present	@150
-	plugin_closeall	@151
-	plugin_startall	@152
-	internal_res_callback	@153
-	internal_srch_entry_callback	@154
-	internal_ref_entry_callback	@155
-	slapi_search_internal_callback	@156
-	slapi_search_internal	@157
-	slapi_modify_internal	@158
-	normalize_mods2bvals	@159
-	slapi_add_internal	@160
-	slapi_delete_internal	@161
-	slapi_modrdn_internal	@162
-	slapi_compare_internal	@163
-	slapi_free_search_results_internal	@164
-	send_ldap_result	@165
-	send_ldapv3_referral	@166
-	send_ldap_referral 	@167
-	send_ldap_search_entry	@168
-    slapi_mtn_be_enable @169
-	slapi_attr_get_oid_copy	@170
-	set_db_default_result_handlers	@171
-	g_get_num_bytes_sent	@172
-	g_set_num_bytes_sent	@173
-	g_get_num_entries_sent	@174
-	g_set_num_entries_sent	@175
-	g_get_default_referral	@178
-	g_set_default_referral	@179
-	slapi_ch_bvdup		@180
-    rwl_free                @181
-    get_server_dataversion  @182
-    get_localhost_DNS @183
-    get_localhost_DN   	@184
-	slapi_pblock_new	@185
-	slapi_pblock_destroy	@186
-	slapi_ch_bvecdup		@187
-	slapi_mr_filter_index	@188
-	slapi_mr_indexer_create @189
-	slapi_berval_cmp	@190
-	filter_print		@191
-	write_controls		@192
-	modify_schema_dse   @193
-	read_schema_dse	    @194
-	attr_syntax_add      @195
-    addlenstr @196
-	config_set_versionstring   @197
-    slapi_entry_attr_replace @198
-	slapi_be_select_by_instance_name @199
-    slapd_ssl_init @200
-    slapd_SSL_client_init @201
-	format_localTime    @202
-	parse_localTime     @203
-	strntoul	    @204
-	time_plus_sec	    @205
-	read_localTime      @206
-	get_entry           @207
-	slapi_get_supported_controls_copy       @208
-    attrlist_replace        @209
-	update_pw_retry     @210
-	g_get_global_snmp_vars @211
-	snmp_collator_start @212
-	snmp_collator_stop  @213
-    config_set_schema_ignore_trailing_spaces	@214
-    send_nobackend_ldap_result	@215
-	set_dll_entry_points	@216
-	slapi_add_entry_internal	@217
-    dse_register_callback @218
-    slapi_entry_init @219
-	slapd_ldap_debug @220 DATA
-    slapd_ssl_init2 @221
-    slapd_SSL_client_bind_s @222
-    slapd_ssl_getCipherSuiteInfo	@223
-    slapi_mods_dump @224
-	g_get_slapd_security_on	@225
-	slapi_register_supported_control	@226
-	slapi_get_supported_controls		@227
-	slapi_register_supported_saslmechanism	@228
-	slapi_get_supported_saslmechanisms_copy	@229
-	slapi_get_supported_saslmechanisms	@230
-    bervalarray_add_berval_fast    @231
-	slapi_get_supported_extended_ops_copy	@232
-	slapi_get_supported_extended_ops	@233
-	slapi_be_logchanges				@234
-	slapi_rdn_remove_attr				@235
-    slapd_security_library_is_initialized @236
-	slapi_ch_bvfree		@237
-    slapi_config_register_callback @238
-    slapi_entry_has_children @239
-    slapi_config_remove_callback @240
-	entry_apply_mods		@241
-	slapi_entry_set_flag		@242
-	slapi_entry_clear_flag		@243
-    write_localTime @244
-    get_entry_object_type @245
-    factory_create_extension @246
-    factory_destroy_extension @247
-    factory_register_type @248
-	g_get_access_log        @249
-	g_get_error_log         @250
-	get_entry_point			@251
-	set_snmp_interaction_row @252
-	slapi_attr_get_type	@254
-	slapi_attr_get_oid	@255
-	slapi_attr_get_values	@256
-	slapi_attr_get_flags	@257
-	slapi_attr_flag_is_set	@258
-	slapi_attr_value_cmp	@259
-	plugin_syntax_find	@260
-	plugin_syntax2oid	@261
-	plugin_call_syntax_filter_ava	@262
-	plugin_call_syntax_filter_sub	@263
-	slapi_call_syntax_values2keys	@264
-	slapi_call_syntax_assertion2keys_ava	@265
-	slapi_call_syntax_assertion2keys_sub	@266
-	slapi_attr_value_find	@267
-	slapi_attr_type2plugin	@268
-	slapd_re_comp	@269
-	slapd_re_exec	@270
-	slapd_re_modw	@271
-	slapd_re_subs	@272
-	FrontendConfig_init @273
-    slapi_entry_get_dn_const @274
-    slapi_register_object_extension @275
-    slapi_get_object_extension @276
-	slapi_be_delete_onexit @277
-	slapi_be_exist @278
-    slapi_sdn_add_rdn @279
-    slapi_mods_add_string @280
-    lenstr_free @281
-    lenstr_new @282
-	plugin_call_syntax_get_compare_fn @283
-	slapi_attr_type_cmp @284
-	slapi_attr_basetype @285
-	snmp_collator_update @286
-	escape_string @287
-	eq_start @288
-	eq_stop @289
-	slapi_rdn2typeval @290
-	slapi_entry_rdn_values_present @291
-    slapi_entry_attr_get_long @292
-    slapi_dn_plus_rdn @293
-;	ref_array_replace @294
-    slapi_setbit_uchar @295
-    slapi_unsetbit_uchar @296
-    slapi_isbitset_uchar @297
-    slapi_setbit_int @298
-    slapi_unsetbit_int @299
-	referrals_free @300 
-    slapi_isbitset_int @301
-	slapi_be_private @302
-;	ref_array_moddn @304
-	g_set_current_conn_count_mutex @305
-	g_get_current_conn_count_mutex @306
-	g_get_current_conn_count @307
-	g_increment_current_conn_count @308
-	g_decrement_current_conn_count @309
-	g_set_accesslog_level @310
-	slapi_entry_add_rdn_values	@311
-	slapd_re_init @312
-	slapd_re_lock @313
-	slapd_re_unlock @314
-	escape_string_with_punctuation @315
-	getFrontendConfig @316
-	log_set_numlogsperdir	@317
-	log_set_logsize @318
-	log_set_rotationtime @319
-	log_set_rotationtimeunit @320
-	log_set_maxdiskspace @321
-	log_set_mindiskspace @322
-	log_set_expirationtime @323
-	log_set_expirationtimeunit @324
-	log_update_accesslogdir @325
-	log_update_errorlogdir @326
-    dse_remove_callback @327
-	log_get_loglist @328
-	log_update_auditlogdir @329
-	g_get_audit_log	 @330
-	dse_new @331
-	dse_deletedse @332
-	dse_read_file @333
-	slapi_attr_get_bervals_copy @334
-	strarray2str @335
-    operation_out_of_disk_space @336
-	dse_delete @337
-	oc_lock_read	@338
-	oc_lock_write	@339
-	oc_unlock		@340
-	slapi_entry_attr_set_long @341
-	slapi_entry_attr_delete @342
-	slapi_entry_attr_get_charptr @343
-	slapi_entry_attr_set_charptr @344
-	slapi_entry_attr_get_int @345
-	slapi_get_global_syntax_plugins @346
-	slapi_get_global_mr_plugins @347
-	slapi_new_condvar			@348
-	slapi_destroy_condvar			@349
-	slapi_wait_condvar			@350
-	slapi_notify_condvar			@351
-	defbackend_init				@352
-	defbackend_get_backend			@353
-	log_set_logging				@354
-	slapi_pwpolicy_make_response_control		@355
-	delete_passwdPolicy			@356
-	g_get_user_backend			@357
-	new_passwdPolicy			@358
-    slapi_dn_normalize_to_end @359
-	slapi_ch_free_string			@360
-	send_ldap_search_entry_ext		@361
-	send_ldap_result_ext			@362
-	slapd_pr_strerror			@363
-	slapd_system_strerror			@364
- 	cool_charray_free			@365
- 	cool_charray_dup			@366
-	ldapi_register_extended_op		@367
-	config_set_attrname_exceptions	@368
-	g_get_deftime				@369
-	g_get_defsize				@370
-	pw_val2scheme				@371
-	slapi_attr_add_value   			@372
-	be_getconfigdn				@373
-	be_getmonitordn				@374
-	be_nbackends_public			@375
-    entry_add_rdn_csn @376
-	slapd_versatile_strerror		@377
-	config_set_enquote_sup_oc		@378
-	config_get_enquote_sup_oc		@379
-	log_access_flush			@380
-	be_writeconfig                 		@381
-    plugin_extended_op_oid2string			@382
-    slapi_eq_get_arg			@383
-    g_set_shutdown @384
-    g_get_shutdown @385
-	compute_init					@386
-	compute_terminate				@387
-	slapi_compute_add_evaluator		@388
-    be_new_internal @389
-	slapi_schema_expand_objectclasses	@390
-	slapi_compute_add_search_rewriter	@391
-    g_get_global_mrl                        @392
-    g_set_global_mrl                        @393
-    slapi_matchingrule_new                  @394
-    slapi_matchingrule_free                 @395
-    slapi_matchingrule_register             @396
-    slapi_matchingrule_unregister           @397
-    slapi_matchingrule_get                  @398
-    slapi_matchingrule_set                  @399
-	config_set_port 	@400
-	slapi_ch_smprintf 	@401
-	config_set_secureport 	@402
-	config_set_SSLclientAuth 	@403
-	config_set_workingdir	@404
-	config_set_localhost 	@405
-	config_set_listenhost 	@406
-	config_set_securelistenhost 	@407
-	config_set_srvtab 	@408
-	config_set_sizelimit 	@409
-	config_set_pw_storagescheme 	@410
-	slapi_filter_test_ext			@411
-	config_set_pw_change 	@412
-	config_set_pw_history 	@413
-	config_set_pw_must_change 	@414
-	config_set_pw_syntax 	@415
-	config_set_pw_minlength 	@416
-	config_set_pw_maxfailure 	@417
-	config_set_pw_inhistory 	@418
-	config_set_pw_lockduration 	@419
-	config_set_pw_resetfailurecount 	@420
-	config_set_pw_exp 	@421
-	config_set_pw_unlock 	@422
-	config_set_pw_lockout 	@423
-	config_set_lastmod 	@424
-	config_set_nagle 	@425
-	config_set_accesscontrol 	@426
-	config_set_result_tweak 	@427
-	config_set_pw_gracelimit	@428
-	config_get_auditlog_logging_enabled 	@429
-	config_set_security 	@430
-	config_set_pwpolicy_local	@431
-	config_set_readonly 	@432
-	config_set_schemacheck 	@433
-	config_set_rootdn 	@434
-	config_set_rootpw 	@435
-	config_set_rootpwstoragescheme 	@436
-	slapi_build_control @437
-	slapi_entry_get_ndn		@438
-	dse_unset_dont_ever_write_dse_files		@439
-;	config_set_instancedir 	@440
-	config_set_encryptionalias 	@441
-	config_set_threadnumber 	@442
-	config_set_maxthreadsperconn 	@443
-	slapi_eq_repeat 	@444
-	config_set_reservedescriptors 	@445
-	config_set_ioblocktimeout 	@446
-	config_set_idletimeout 	@447
-	config_set_groupevalnestlevel 	@448
-	config_set_defaultreferral 	@449
-	config_set_userat 	@450
-	config_set_timelimit 	@451
-	config_set_useroc 	@452
-	config_set_accesslog 	@453
-	config_set_errorlog 	@454
-	config_set_auditlog 	@455
-	config_set_pw_maxage	@456
-	config_set_pw_minage	@457
-	config_set_pw_warning	@458
-	config_set_errorlog_level	@459
-	config_set_accesslog_level	@460
-	compute_rewrite_search_filter	@461
-    slapi_entry_get_sdn_const @462
-	dse_set_dont_ever_write_dse_files	@463
-	slapi_eq_once 	@464
-	config_get_port	@465
-	config_get_pw_is_global_policy	@466
-	config_get_secureport	@467
-	config_get_SSLclientAuth	@468
-	config_get_workingdir	@469
-	config_get_localhost	@470
-	config_get_listenhost	@471
-	config_get_securelistenhost	@472
-	config_get_srvtab	@473
-	config_get_sizelimit	@474
-	config_get_pw_storagescheme	@475
-	slapi_eq_cancel		@476
-	config_get_pw_change	@477
-	config_get_pw_history	@478
-	config_get_pw_must_change	@479
-	config_get_pw_syntax	@480
-	config_get_pw_minlength	@481
-	config_get_pw_maxfailure	@482
-	config_get_pw_inhistory	@483
-	config_get_pw_lockduration	@484
-	config_get_pw_resetfailurecount	@485
-	config_get_pw_exp	@486
-	config_get_pw_unlock	@487
-	config_get_pw_lockout	@488
-	config_get_lastmod	@489
-	config_get_nagle	@490
-	config_get_accesscontrol	@491
-	config_get_result_tweak	@492
-	config_get_conntablesize	@493
-	config_get_pw_gracelimit	@494
-	config_get_security	@495
-	slapi_config_get_readonly	@496
-	config_get_schemacheck	@497
-	config_get_rootdn	@498
-	config_get_rootpw	@499
-	config_get_rootpwstoragescheme	@500
-    slapi_entry_set_sdn @501
-    slapi_sdn_copy @502
-	config_set_basedn	@503
-;	config_get_instancedir	@504
-	config_get_encryptionalias	@505
-	config_get_threadnumber	@506
-	config_get_maxthreadsperconn	@507
-	config_get_basedn	@508
-	config_get_reservedescriptors	@509
-	config_get_ioblocktimeout	@510
-	config_get_idletimeout	@511
-	config_get_groupevalnestlevel	@512
-	config_get_defaultreferral	@513
-	config_get_userat 	@514
-	config_get_timelimit	@515
-	config_get_useroc	@516
-	config_get_accesslog	@517
-	config_get_errorlog	@518
-	config_get_auditlog	@519
-	config_get_pw_maxage	@520
-	config_get_pw_minage	@521
-	config_get_pw_warning	@522
-	config_get_errorlog_level	@523
-	config_get_accesslog_level	@524
-    slapi_sdn_compare @525
-    slapi_sdn_dup @526
-    slapi_sdn_set_dn_passin @527
-    slapi_entry_get_sdn @528
-    slapi_sdn_get_ndn_len @529
-	charray_inlist				@530
-	config_set_referral_mode	@531
-	config_get_referral_mode	@532
-	config_check_referral_mode	@533
-	attr_set_deletion_csn @534
-    slapi_mod_dump @535
-;	config_is_slapd_lite		@536
-;	config_set_slapd_type		@537
-	config_get_versionstring	@538
-	slapi_is_rootdse			@539
-	slapi_find_matching_paren		@540
-	str2simple			@541
-	substr_dn_normalize		@542
-    get_data_source @543
-    slapi_sdn_get_backend_parent @544
-    slapi_sdn_new_dn_passin @545
-    slapi_sdn_isempty @546
-    slapi_sdn_isparent @547
-	attr_value_find_wsi @548
-    entry_computed_attr_init @549
-	slapi_attr_init			@550
-	slapi_value_init			@551
-	valueset_isempty			@552
-	valueset_add_string		@553
-	attr_done			@554
-	operation_clear_flag @555
-	operation_set_flag @556
-	slapi_sdn_get_rdn @557
-	slapi_sdn_set_rdn @558
-	slapi_sdn_set_parent @559
-	slapi_entry_delete_string @560
-	attr_get_deletion_csn			@561
-	entry_add_present_attribute_wsi			@562
-	slapi_value_get_length @563
-	operation_parameters_dup @564
-	operation_parameters_free @565
-	operation_is_flag_set @566
-	counters_as_entry @567
-	counters_to_errors_log @568
-	counters_as_entry @567
-	counters_to_errors_log @568
-	slapi_value_new_string @569
-	charray_utf8_inlist				@570
-	charray_get_index				@571
-; LDAPU	ENTRY POINTS 
-	ldapu_member_certificate_match	@580
-;	ref_register_callback	@581
-;	ref_remove_callback	@582
-    slapi_is_encoded @583
-    slapi_encode @584
-; UniqueID ENTRY POINTS
-    slapi_uniqueIDNew @585
-    slapi_uniqueIDDestroy @586
-    slapi_uniqueIDCompare @587
-    slapi_uniqueIDFormat @588
-    slapi_uniqueIDScan @589
-    slapi_uniqueIDIsUUID @590
-    slapi_uniqueIDSize @591
-    slapi_uniqueIDDup @592
-    uniqueIDGenInit @593
-    uniqueIDGenCleanup @594
-	slapi_uniqueIDCompareString @595
-    slapi_uniqueIDGenerate @596
-    slapi_uniqueIDGenerateString @597    
-    slapi_uniqueIDGenerateFromName @600
-    slapi_uniqueIDGenerateFromNameString @601
-; MORE ENTRY ENTRY POINTS
-    slapi_entry_get_uniqueid @602
-    slapi_entry_set_uniqueid @603
-    slapi_entry_merge_values_sv @604
-; Slapi_DN entry points
-    slapi_sdn_new @605
-    slapi_sdn_init @606
-    slapi_sdn_new_dn_byval @607
-    slapi_sdn_new_ndn_byval @608
-;    slapi_sdn_new_cndn_byval @609
-    slapi_sdn_new_dn_byref @610
-    slapi_sdn_new_ndn_byref @611
-;    slapi_sdn_new_cndn_byref @612
-    slapi_sdn_set_dn_byval @613
-    slapi_sdn_set_dn_byref @614
-    slapi_sdn_set_ndn_byval @615
-    slapi_sdn_set_ndn_byref @616
-;    slapi_sdn_set_cndn_byval @617
-;    slapi_sdn_set_cndn_byref @618
-    slapi_sdn_done @619
-    slapi_sdn_free @620
-    slapi_sdn_get_dn @621
-    slapi_sdn_get_ndn @622
-;    slapi_sdn_get_cndn @623
-    slapi_sdn_get_parent @624
-; Slapi_Mod & Slapi_Mods entry points
-    slapi_mods_init @625
-    slapi_mods_insert_at @626
-    slapi_mods_insert_before @627
-    slapi_mods_insert_after @628
-    slapi_mods_add @629
-    slapi_mods_add_ldapmod @630
-    slapi_mods_add_modbvps @631
-    slapi_mods_remove @632
-    slapi_mods_get_first_mod @633
-    slapi_mods_get_next_mod @634
-    slapi_mods_iterator_backone @635
-    slapi_mods_get_ldapmods_byref @636
-    slapi_mods_get_num_mods @637
-    slapi_mod_init @638
-    slapi_mod_add_value @639
-    slapi_mod_remove_value @640
-    slapi_mod_get_first_value @641
-    slapi_mod_get_next_value @642
-    slapi_mod_get_num_values @643
-	entry_purge_state_information	@644
-	attr_set_csn	@645
-	entry_get_dncsn	@646
-	entry_get_dncsnset @647
-	entry_add_dncsn	@648
-    value_contains_csn @649
-	csnset_get_previous_csn @650
-	task_init @651
-	attrlist_merge_valuearray @652
-	slapi_value_new_value @653
-	entry_get_maxcsn	@654
-	entry_set_maxcsn	@655
-	entry_assign_operation_csn	@656
-	slapi_operation_set_csngen_handler	@657
-	slapi_operation_set_replica_attr_handler @658
-	slapi_operation_get_replica_attr @659
-	plugin_call_syntax_filter_sub_sv @664
-	plugin_call_syntax_filter_ava_sv @665
-	slapi_pw_find_sv @666
-	csn_new_by_string @667
-	csn_set_replicaid @668
-	valuearray_get_bervalarray @670
-	slapi_call_syntax_values2keys_sv @671
-	valuearray_init_bervalarray @672
-	slapi_valueset_free @673
-	slapi_entry_add_values_sv @674
-	entry_set_csn @675
-	csn_as_string @676
-	entry_attr_find_wsi @678
-	csn_get_time @679
-	csn_new @680
-	csn_set_time @681
-	csn_get_seqnum @682
-	csn_free @683
-	slapi_search_internal_get_entry @684
-	csn_compare @685
-	csn_set_seqnum @686
-	csn_dup @687
-	slapi_valueset_first_value @688
-	slapi_valueset_next_value @689
-	slapi_valueset_done @690
-	slapi_utf8StrToLower		@691
-	slapi_utf8ToLower		@692
-	slapi_utf8isUpper		@693
-	slapi_utf8StrToUpper		@694
-	slapi_utf8ToUpper		@695
-	slapi_utf8isLower		@696
-	slapi_utf8casecmp		@697
-	slapi_utf8ncasecmp		@698
-	slapi_has8thBit			@699
-    slapi_sdn_init_dn_byref @700
-    slapi_sdn_init_dn_byval @701
-    slapi_sdn_init_dn_passin @702
-	slapi_attr_first_value @703
-	slapi_attr_next_value @704
-	slapi_value_get_berval @705
-	slapi_attr_get_numvalues @706
-	value_get_csn @707
-	value_update_csn @708
-	slapi_value_set_berval @709
-    slapi_mods_init_byref @711
-    slapi_mods_init_passin @712
-	slapi_value_new @713
-	slapi_value_free @714
-	value_add_csn @715
-	value_remove_csn @716
-	slapi_sdn_issuffix @717
-    slapi_mods_new @718
-    slapi_mods_free @719
-    slapi_mods_insert_smod_at @720
-    slapi_mods_insert_smod_before @721
-    slapi_mods_insert_smod_after @722
-    slapi_mods_add_smod @723 
-    slapi_mods_get_first_smod @724
-    slapi_mods_get_next_smod @725
-    slapi_mod_new @726
-    slapi_mod_init_byref @727
-    slapi_mod_init_passin @728
-	slapi_value_init_string @729
-    slapi_mod_get_ldapmod_passout @730
-    slapi_mod_get_type @731
-    slapi_mod_get_operation @732
-    slapi_mod_set_type @733
-    slapi_mod_set_operation @734
-    slapi_mod_get_ldapmod_byref @735
-    slapi_mod_free @736
-    csn_time_difference @737
-    slapi_mod_isvalid @738
-    slapi_entry_size @739
-	attr_first_deleted_value @740
-	attr_next_deleted_value @741
-    slapi_mods_get_ldapmods_passout @742
-	slapi_value_init_berval @743
-	entry_add_dncsn_ext @744
-	slapi_value_set @745
-	operation_get_csn @750
-	entry_apply_mods_wsi @751
-	slapi_mod_done @752
-	slapi_mods_done @753
-	operation_set_csn @754
-	valueset_add_valuearray @755
-	entry_first_deleted_attribute @756
-	entry_next_deleted_attribute @757
-	valuearray_remove_value @758
-;	config_set_storestateinfo @759
-    slapi_value_set_string @760
-	slapi_is_loglevel_set @761
-	operation_set_target_spec @762
-	operation_set_target_spec_str @763
-	operation_get_target_spec @764
-    operation_set_abandoned_op @765
-    operation_get_abandoned_op @766
-    slapi_value_get_string @767
-    slapi_value_get_int @768
-    slapi_value_set_int @769
-    slapi_add_internal_pb @770
-    slapi_add_internal_set_pb @771
-    slapi_modify_internal_set_pb @772
-    slapi_modify_internal_pb @773
-    slapi_modrdn_internal_pb @774
-    slapi_rename_internal_set_pb @775
-    slapi_delete_internal_set_pb @776
-    slapi_delete_internal_pb @777
-    slapi_search_internal_pb @778
-    slapi_search_internal_set_pb @779
-    slapi_search_internal_callback_pb @780
-    plugin_build_operation_action_bitmap @781	
-    plugin_get_server_plg @782
-    slapi_add_pwd_control @783
-    pw_mod_allowchange_aci @784
-    do_add @785
-    do_modify @786
-    do_delete @787
-    do_modrdn @788
-    op_shared_search @789
-    slapi_mod_init_byval @790
-    slapi_add_entry_internal_set_pb @792
-	config_set_return_exact_case	@793
-	slapi_rdn_new @794
-	slapi_rdn_new_dn @795
-	slapi_rdn_new_sdn @796
-	slapi_rdn_new_rdn @797
-	slapi_rdn_init @798
-	slapi_rdn_init_dn @799
-	slapi_rdn_init_sdn @800
-	slapi_rdn_init_rdn @801
-	slapi_rdn_set_dn @802
-	slapi_rdn_set_sdn @803
-	slapi_rdn_set_rdn @804
-	slapi_rdn_free @805
-	slapi_rdn_done @806
-	slapi_rdn_get_first @807
-	slapi_rdn_get_next @808
-	slapi_rdn_get_index @809
-	slapi_rdn_contains @810
-	slapi_rdn_add @811
-	slapi_rdn_remove_index @812
-	slapi_rdn_remove @813
-	slapi_rdn_isempty @814
-	slapi_rdn_get_num_components @815
-	slapi_rdn_compare @816
-	slapi_rdn_get_rdn @817
-	slapi_rdn_get_nrdn @819
-	slapi_value_dup @820
-	slapi_value_set_value @821
-	rel2abspath @822
-	slapi_value_compare @823
-	attr_get_present_values @824
-    dl_get @825
-    dl_new @826
-    dl_free @827
-    dl_init @828
-    dl_cleanup @829
-    dl_add @830
-    dl_get_first @831
-    dl_get_next @832
-    dl_delete @833
-    dl_get_count @834
-    slapi_entry2mods @837
-    slapi_mods2entry @838
-	operation_parameters_new @839
-	operation_parameters_done @840
-	snmp_as_entry @843
-	slapi_filter_compare @844
-; probably temporary:
-	set_hash_filters @845
-	operation_new @846
-	operation_free @847
-	operation_set_type @848
-	slapi_mods_add_mod_values @849
-    slapi_sdn_init_ndn_byref @850
-    slapi_sdn_init_ndn_byval @851
-	objset_new @852
-	objset_delete @853
-	objset_add_obj @854
-	objset_remove_obj @855
-	objset_find @856
-	objset_first_obj @857
-	objset_next_obj @858
-	objset_is_empty @859
-	object_new @860
-	object_acquire @861
-	object_release @862
-	object_get_data @863
-	slapi_UTF8STRTOLOWER		@864
-	slapi_UTF8TOLOWER		@865
-	slapi_UTF8ISUPPER		@866
-	slapi_UTF8STRTOUPPER		@867
-	slapi_UTF8TOUPPER		@868
-	slapi_UTF8ISLOWER		@869
-	slapi_UTF8CASECMP		@870
-	slapi_UTF8NCASECMP		@871
-	slapi_apib_get_interface @872
-	slapi_apib_unregister @873
-	slapi_apib_register @874
-	slapi_attr_types_equivalent @875
-	dse_read_next_entry @895
-	config_set_entry @896
-	config_set	@897
-	init_schema_dse @898
-	PL_HashTableLookup_const @899
-;	dse_add_entry_pb @900
-	vattr_init @901
-	vattr_cleanup @902
-	slapi_vattrspi_register @903
-	plugin_get_by_name @904
-	objset_size @905
-	slapi_attr_dup @906
-    slapi_entry_add_value @907
-	slapi_entry_add_string @908
-;	be_create_instance @909
-;	be_remove_instance @910
-	mapping_tree_init @911
-	slapi_mapping_tree_select @912
-	slapi_sdn_isgrandparent @913
-	config_set_storagescheme @914
-	slapi_berval_get_string_copy @918
-	slapi_vattr_value_compare @919
-	slapi_vattr_value_compare_sp @920
-	slapi_vattr_values_get_sp @921
-	slapi_vattr_values_get @922
-	slapi_vattr_values_free @923
-	slapi_vattr_list_attrs @924
-	slapi_vattr_attrs_free @925
-	slapi_vattrspi_regattr @926
-	slapi_be_get_instance_info @927
-	slapi_be_set_instance_info @928
-	slapi_be_setentrypoint @929
-	plugin_get_dn @930
-	operation_get_type @931
-	slapi_be_set_flag @932
-	slapi_be_is_flag_set @933
-	free_pw_scheme @934
-	slapi_vattrspi_add_type @935
-	mapping_tree_free @936
-	slapi_get_mapping_tree_node_by_dn @937
-	slapi_get_mapping_tree_node_configdn @938
-	slapi_valueset_init @939
-	slapi_valueset_add_value @940
-	slapi_filter_get_attribute_type @941
-	slapi_filter_apply @942			
-	slapi_attr_syntax_normalize	@943
-	charray_remove @946
-;	csn_next_in_sequence @947
-	csngen_new @948
-	csngen_free @949
-	csngen_new_csn @950
-	csngen_abort_csn @951
-	csngen_adjust_time @952
-	csngen_is_local_csn @953
-	csngen_register_callbacks @954
-	csngen_unregister_callbacks @955
-	csngen_update_time @956
-	csngen_get_state @957
-	csn_init_by_csn @958
-	csn_init_by_string @959
-	csn_get_replicaid @960
-	csn_string_size @961
-	csn_as_attr_option_string @962
-	slapi_get_mapping_tree_node_root @963
-	slapi_get_mapping_tree_config_root @964
-	mapping_tree_get_extension_type @965
-	slapi_mapping_tree_node_is_set @966
-        slapi_entry_flag_is_set @967
-        slapi_task_status_changed               @968
-	slapi_valueset_new @969
-	slapi_be_issuffix @970
-	slapi_be_addsuffix @971
-	slapi_reslimit_register				@972
-	slapi_reslimit_get_integer_limit	@973
-	reslimit_cleanup					@974
-	search_register_reslimits			@975
-	bind_credentials_set				@976
-	bind_credentials_clear				@977
-	pw_add_allowchange_aci				@978
-	slapi_valueset_add_value_ext		@979
-	is_abspath							@980
-	slapi_dup_control						@981
-	slapi_get_first_suffix					@982
-	slapi_get_next_suffix					@983
-	slapi_is_root_suffix					@984
-	slapi_be_get_name						@985
-	slapi_entry2str_with_options			@986
-	slapi_destructive_rename				@987
-	slapi_moddn_get_newdn					@988
-        plugin_get_default_component_id @989
-	slapi_be_gettype		@990
-	csnset_get_first_csn @991
-        csnset_get_next_csn @992
-	value_get_csnset @993
-	entry_add_deleted_attribute_wsi @994
-	attr_add_deleted_value @995
-	slapi_disconnect_server @996
-	eq_init @997
-        slapi_set_object_extension              @998
-        task_shutdown                           @999
-	slapi_mtn_set_referral					@1000
-	slapi_mtn_set_state						@1001
-	slapi_mtn_get_referral					@1002
-	slapi_mtn_get_state						@1003
-	slapi_mtn_be_started					@1004
-	slapi_mtn_be_stopping					@1005
-	slapi_start_bulk_import @1006
-	slapi_stop_bulk_import @1007
-	slapi_import_entry @1008
-	slapi_entry_add_valueset				@1009
-	vattr_typethang_get_flags				@1010
-	vattr_typethang_get_name				@1011
-	vattr_typethang_next					@1012
-	vattr_typethang_first					@1013
-	charray_subtract					@1014
-	slapi_schema_list_attribute_names			@1015
-	config_get_ds4_compatible_schema		@1016
-	config_set_ds4_compatible_schema		@1017
-	pw_apply_mods						@1018
-	pw_set_componentID					@1019
-	pw_get_componentID					@1020
-	parse_genTime						@1021
-	format_genTime						@1022
-	be_set_sizelimit					@1023
-	be_set_timelimit					@1024
-	slapi_be_free						@1025
-	slapi_be_Unlock						@1026
-        slapi_task_log_status                   @1027
-        slapi_task_log_notice                   @1028
-	plugin_add_descriptive_attributes	@1029
-
-	slapi_get_rootdn			@1030
-        slapi_mtn_be_set_readonly               @1031
-        slapi_be_set_readonly                   @1032
-        slapi_be_get_readonly                   @1033
-	slapi_op_get_type			@1034
-	slapi_entry_attr_get_ulong		@1035
-	slapi_entry_attr_get_uint		@1036
-	slapi_entry_attr_set_int		@1037
-	slapi_entry_attr_set_ulong		@1038
-	slapi_entry_attr_set_uint		@1039
-	slapi_value_get_ulong			@1040
-	slapi_value_get_uint			@1041
-
-	config_set_rewrite_rfc1274		@1042
-	config_get_rewrite_rfc1274		@1043
-        slapi_mapping_tree_find_backend_for_sdn @1044
-	slapi_register_backend_state_change	@1045
-	slapi_unregister_backend_state_change	@1046
-
-	slapd_ssl_handshakeCallback		@1047
-	slapd_ssl_badCertHook			@1048
-	slapd_ssl_peerCertificate		@1049
-	slapd_ssl_getChannelInfo		@1050
-	pblock_done				@1051
-	pw_rever_decode			        @1052
-	slapd_ssl_listener_is_initialized       @1053
-	op_shared_log_error_access              @1054
-	slapd_ssl_importFD                      @1055
-	slapd_ssl_resetHandshake                @1056
-	slapi_build_control_from_berval			@1057	
-; MORE ENTRY ENTRY POINTS
-	slapi_entry_delete_values_sv	        @1058	
-	slapi_entry_attr_replace_sv	        @1059
-
-	valuearray_find				@1060
-	valuearray_free				@1061
-	slapd_Client_auth			@1062
-	slapi_rand_r				@1063
-	slapi_rand					@1064
-	slapi_copy					@1065
-	slapd_get_tmp_dir			@1066
-	slapi_call_syntax_assertion2keys_ava_sv	@1067
-	slapi_call_syntax_assertion2keys_sub_sv	@1068
-	slapi_value_get_long	@1069
-	valuearray_add_valuearray	@1070
-	pw_rever_encode	@1071
-
-	slapd_nss_init                       @1072	
-	slapd_pk11_configurePKCS11              @1073
-	slapd_pk11_freeSlot                     @1074
-	slapd_pk11_freeSymKey                   @1075
-	slapd_pk11_findSlotByName               @1076
-	slapd_pk11_createPBEAlgorithmID         @1077
-	slapd_pk11_pbeKeyGen                    @1078
-	slapd_pk11_algtagToMechanism            @1079
-	slapd_pk11_paramFromAlgid               @1080
-	slapd_pk11_mapPBEMechanismToCryptoMechanism     @1081
-	slapd_pk11_getBlockSize                 @1082
-	slapd_pk11_createContextBySymKey        @1083
-	slapd_pk11_cipherOp                     @1084
-	slapd_pk11_finalize                     @1085
-	slapd_pk11_getInternalKeySlot           @1086
-	slapd_pk11_getInternalSlot              @1087
-	slapd_pk11_authenticate                 @1088
-	slapd_pk11_setSlotPWValues              @1089
-	slapd_pk11_isFIPS                       @1090
-	slapd_pk11_findCertFromNickname         @1091
-	slapd_pk11_findKeyByAnyCert             @1092
-	slapd_pk11_fortezzaHasKEA               @1093
-	filter_flag_is_set			@1094
-	slapd_sasl_ext_client_bind		@1095
-	checkPrefix				@1096
-	DS_Sleep				@1097
-	slapi_mtn_get_dn			@1098
-	dl_add_index				@1099
-	dl_replace				@1100
-	send_referrals_from_entry               @1101
-	slapi_escape_filter_value		@1102
-	slapd_pk11_destroyContext		@1103
-	secoid_destroyAlgorithmID		@1104
-	op_shared_is_allowed_attr		@1105
-	get_config_DN							@1106
-    slapi_sdn_init_dn_ndn_byref             @1107
-	check_log_max_size				@1108
-	attrlist_find_ex			@1109
-	slapi_entry_vattrcache_merge_sv @1110
-	slapi_entry_vattrcache_find_values_and_type_ex @1111
-	slapi_entry_vattrcache_watermark_isvalid @1112
-	slapi_entry_vattrcache_watermark_set @1113
-	slapi_entry_vattrcache_watermark_invalidate @1114
-	slapi_entrycache_vattrcache_watermark_invalidate @1115
-	slapi_filter_test_simple @1116
-	slapi_register_role_check @1117
-	slapi_role_check	@1118
-	slapi_valueset_find @1119
-	slapi_vattr_filter_test @1120
-	slapi_attr_set_valueset	@1121
-	slapi_vattrcache_iscacheable @1122
-	slapi_value_new_string_passin @1123
-	slapi_value_init_string_passin @1124
-	slapi_value_set_string_passin @1125
-	slapi_entry_attr_has_syntax_value @1126
-	plugin_call_entryfetch_plugins @1127
-	plugin_call_entrystore_plugins @1128
-	config_get_buildnum @1129
-	plugin_print_versions @1130
-	slapi_ch_array_free @1131
-	slapi_vattrcache_cache_all @1132
-	slapi_vattrcache_cache_none @1133
-	slapi_filter_dup @1134
-	slapi_filter_to_string @1135
-	slapi_filter_join_ex @1136
-	slapi_vattr_schema_check_type @1137
-	slapi_vattr_filter_test_ext @1138
-	index_subsys_evaluate_filter @1139
-	slapi_index_entry_list_create @1140
-	slapi_index_entry_list_add @1141
-	slapi_index_register_decoder @1142
-	slapi_index_register_index @1143
-	slapi_entry_attr_get_charray @1144
-	getSupportedCiphers @1145
-	slapi_operation_set_flag @1146
-	slapi_operation_clear_flag @1147
-	slapi_operation_is_flag_set @1148
-	slapi_op_reserved @1149
-    c_set_shutdown @1150
-    c_get_shutdown @1151
-	slapi_vattr_namespace_values_get @1152
-	slapi_vattr_namespace_value_compare @1153
-	slapi_vattr_namespace_values_get_sp @1154
-	slapi_vattr_namespace_value_compare_sp @1155
-	slapi_vattrspi_register_ex @1156
-	slapi_filter_changetype @1157
-	slapi_rand_array		@1158
-	slapi_entries_diff		@1159
-	dup_global_schema_csn	@1160
-	slapd_pk11_CERT_DestroyCertificate @1161
-	slapd_CERT_ExtractPublicKey @1162
-	slapd_pk11_FindPrivateKeyFromCert @1163
-	slapd_pk11_GetInternalKeySlot @1164
-	slapd_pk11_PubWrapSymKey @1165
-	slapd_pk11_KeyGen @1166
-	slapd_pk11_FreeSlot @1167
-	slapd_pk11_FreeSymKey @1168
-	slapd_pk11_DestroyContext @1169
-	slapd_pk11_ParamFromIV @1170
-	slapd_pk11_PubUnwrapSymKey @1171
-	slapd_SECKEY_PublicKeyStrength @1172
-	slapd_pk11_Finalize @1173
-	slapd_pk11_DigestFinal @1174
-	sasl_map_config_add @1175
-	sasl_map_config_delete @1176
-	sasl_map_domap @1177
-	sasl_map_init @1178
-	sasl_map_done @1179
-	slapd_SECITEM_FreeItem @1180
-	slapi_op_type_to_string @1181
-	slapi_attr_get_syntax_oid_copy @1182
-; password syntax functions
-        config_set_pw_mindigits @1190
-        config_set_pw_minalphas @1191
-        config_set_pw_minuppers @1192
-        config_set_pw_minlowers @1193
-        config_set_pw_minspecials @1194
-	config_set_pw_min8bit @1195
-        config_set_pw_maxrepeats @1196
-	config_set_pw_mincategories @1197
-	config_set_pw_mintokenlength @1198
-        config_get_pw_mindigits @1199
-        config_get_pw_minalphas @1200
-        config_get_pw_minuppers @1201
-        config_get_pw_minlowers @1202
-        config_get_pw_minspecials @1203
-	config_get_pw_min8bit @1204
-        config_get_pw_maxrepeats @1205
-	config_get_pw_mincategories @1206
-	config_get_pw_mintokenlength @1207
-	slapi_check_account_lock @1208
-    	slapi_is_ldapi_conn @1209
-; slapi connection functions
-    	slapi_connection_acquire @1211
-    	slapi_connection_remove_operation @1212
-
diff --git a/ldap/servers/slapd/ntmsgdll/ntslapdmessages.c b/ldap/servers/slapd/ntmsgdll/ntslapdmessages.c
deleted file mode 100644
index 3a3ddc3..0000000
--- a/ldap/servers/slapd/ntmsgdll/ntslapdmessages.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-
-/* This is the required stub entry point for the message-table DLL */
-#if defined( _WIN32 )
-#include <windows.h>
-
-BOOL WINAPI DllMain(HINSTANCE hDLL, DWORD dwReason, LPVOID lpReserved)
-{
-  return(TRUE);
-}
-
-#endif /* _WIN32 */
diff --git a/ldap/servers/slapd/ntmsgdll/ntslapdmessages.mc b/ldap/servers/slapd/ntmsgdll/ntslapdmessages.mc
deleted file mode 100644
index 7f5c2d6..0000000
--- a/ldap/servers/slapd/ntmsgdll/ntslapdmessages.mc
+++ /dev/null
@@ -1,315 +0,0 @@
-; /*
-; BEGIN COPYRIGHT BLOCK
-; This Program is free software; you can redistribute it and/or modify it under
-; the terms of the GNU General Public License as published by the Free Software
-; Foundation; version 2 of the License.
-; 
-; This Program is distributed in the hope that it will be useful, but WITHOUT
-; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-; 
-; You should have received a copy of the GNU General Public License along with
-; this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-; Place, Suite 330, Boston, MA 02111-1307 USA.
-; 
-; In addition, as a special exception, Red Hat, Inc. gives You the additional
-; right to link the code of this Program with code not covered under the GNU
-; General Public License ("Non-GPL Code") and to distribute linked combinations
-; including the two, subject to the limitations in this paragraph. Non-GPL Code
-; permitted under this exception must only link to the code of this Program
-; through those well defined interfaces identified in the file named EXCEPTION
-; found in the source code files (the "Approved Interfaces"). The files of
-; Non-GPL Code may instantiate templates or use macros or inline functions from
-; the Approved Interfaces without causing the resulting work to be covered by
-; the GNU General Public License. Only Red Hat, Inc. may make changes or
-; additions to the list of Approved Interfaces. You must obey the GNU General
-; Public License in all respects for all of the Program code and other code used
-; in conjunction with the Program except the Non-GPL Code covered by this
-; exception. If you modify this file, you may extend this exception to your
-; version of the file, but you are not obligated to do so. If you do not wish to
-; provide this exception without modification, you must delete this exception
-; statement from your version and license this file solely under the GPL without
-; exception. 
-; 
-; 
-; Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-; Copyright (C) 2005 Red Hat, Inc.
-; All rights reserved.
-; END COPYRIGHT BLOCK
-;
-; Microsoft Developer Support
-; Copyright (c) 1992 Microsoft Corporation
-;
-; This file contains the message definitions for the Win32
-; messages.exe sample program.
-
-
-;-------------------------------------------------------------------------
-; HEADER SECTION
-;
-; The header section defines names and language identifiers for use
-; by the message definitions later in this file. The MessageIdTypedef,
-; SeverityNames, FacilityNames, and LanguageNames keywords are
-; optional and not required.
-;
-;
-;
-; The MessageIdTypedef keyword gives a typedef name that is used in a
-; type cast for each message code in the generated include file. Each
-; message code appears in the include file with the format: #define
-; name ((type) 0xnnnnnnnn) The default value for type is empty, and no
-; type cast is generated. It is the programmer's responsibility to
-; specify a typedef statement in the application source code to define
-; the type. The type used in the typedef must be large enough to
-; accomodate the entire 32-bit message code.
-;
-MessageIdTypedef=DWORD
-;
-; The SeverityNames keyword defines the set of names that are allowed
-; as the value of the Severity keyword in the message definition. The
-; set is delimited by left and right parentheses. Associated with each
-; severity name is a number that, when shifted left by 30, gives the
-; bit pattern to logical-OR with the Facility value and MessageId
-; value to form the full 32-bit message code. The default value of
-; this keyword is:
-;
-; SeverityNames=(
-;   Success=0x0
-;   Informational=0x1
-;   Warning=0x2
-;   Error=0x3
-;   )
-;
-; Severity values occupy the high two bits of a 32-bit message code.
-; Any severity value that does not fit in two bits is an error. The
-; severity codes can be given symbolic names by following each value
-; with :name
-;
-SeverityNames=(Success=0x0:STATUS_SEVERITY_SUCCESS
-               Informational=0x1:STATUS_SEVERITY_INFORMATIONAL
-               Warning=0x2:STATUS_SEVERITY_WARNING
-               Error=0x3:STATUS_SEVERITY_ERROR
-              )
-;
-; The FacilityNames keyword defines the set of names that are allowed
-; as the value of the Facility keyword in the message definition. The
-; set is delimited by left and right parentheses. Associated with each
-; facility name is a number that, when shift it left by 16 bits, gives
-; the bit pattern to logical-OR with the Severity value and MessageId
-; value to form the full 32-bit message code. The default value of
-; this keyword is:
-;
-; FacilityNames=(
-;   System=0x0FF
-;   Application=0xFFF
-;   )
-;
-; Facility codes occupy the low order 12 bits of the high order
-; 16-bits of a 32-bit message code. Any facility code that does not
-; fit in 12 bits is an error. This allows for 4,096 facility codes.
-; The first 256 codes are reserved for use by the system software. The
-; facility codes can be given symbolic names by following each value
-; with :name
-;
-FacilityNames=(System=0x0FF:FACILITY_SYSTEM
-               Runtime=0x200:FACILITY_RUNTIME
-			   Cgi=0x201:FACILITY_CGI
-               Slapd=0x202:FACILITY_SERVICE
-               Network=0x203:FACILITY_NETWORK
-			   Startup=0x204:FACILITY_STARTUP
-			   Filesytem=0x205:FACILITY_FILESYSTEM
-			   Registry=0x206:FACILITY_REGISTRY
-              )
-;
-; The LanguageNames keyword defines the set of names that are allowed
-; as the value of the Language keyword in the message definition. The
-; set is delimited by left and right parentheses. Associated with each
-; language name is a number and a file name that are used to name the
-; generated resource file that contains the messages for that
-; language. The number corresponds to the language identifier to use
-; in the resource table. The number is separated from the file name
-; with a colon. The initial value of LanguageNames is:
-;
-; LanguageNames=(English=1:MSG00001)
-;
-; Any new names in the source file which don't override the built-in
-; names are added to the list of valid languages. This allows an
-; application to support private languages with descriptive names.
-;
-;
-;-------------------------------------------------------------------------
-; MESSAGE DEFINITION SECTION
-;
-; Following the header section is the body of the Message Compiler
-; source file. The body consists of zero or more message definitions.
-; Each message definition begins with one or more of the following
-; statements:
-;
-; MessageId = [number|+number]
-; Severity = severity_name
-; Facility = facility_name
-; SymbolicName = name
-;
-; The MessageId statement marks the beginning of the message
-; definition. A MessageID statement is required for each message,
-; although the value is optional. If no value is specified, the value
-; used is the previous value for the facility plus one. If the value
-; is specified as +number then the value used is the previous value
-; for the facility, plus the number after the plus sign. Otherwise, if
-; a numeric value is given, that value is used. Any MessageId value
-; that does not fit in 16 bits is an error.
-;
-; The Severity and Facility statements are optional. These statements
-; specify additional bits to OR into the final 32-bit message code. If
-; not specified they default to the value last specified for a message
-; definition. The initial values prior to processing the first message
-; definition are:
-;
-; Severity=Success
-; Facility=Application
-;
-; The value associated with Severity and Facility must match one of
-; the names given in the FacilityNames and SeverityNames statements in
-; the header section. The SymbolicName statement allows you to
-; associate a C/C++ symbolic constant with the final 32-bit message
-; code.
-; */
-
-MessageId=0x1
-Severity=Success
-Facility=Startup
-SymbolicName=MSG_SERVER_STARTED
-Language=English
-Directory Server: %1.
-The directory server has successfully started.
-.
-MessageId=0x2
-Severity=Success
-Facility=Slapd
-SymbolicName=MSG_SERVER_SHUTDOWN
-Language=English
-Directory Server: %1.
-The directory server has shutdown.
-.
-MessageId=0x3
-Severity=Success
-Facility=Slapd
-SymbolicName=MSG_SERVER_STOPPED
-Language=English
-Directory Server: %1.
-The directory server has stopped.
-.
-MessageId=0x4
-Severity=Success
-Facility=Startup
-SymbolicName=MSG_SERVER_STARTING
-Language=English
-Directory Server: %1.
-The directory server is starting.
-.
-MessageId=0x5
-Severity=Error
-Facility=Startup
-SymbolicName=MSG_SERVER_START_FAILED
-Language=English
-Directory Server: %1.
-The directory server has failed on startup. %2
-.
-MessageId=0x6
-Severity=Error
-Facility=Startup
-SymbolicName=MSG_SERVER_START_FAILED_CTRL_HANDLER
-Language=English
-Directory Server: %1.
-The directory server has failed on startup. Failed to Register with Service Control handler.
-.
-MessageId=0x7
-Severity=Error
-Facility=Startup
-SymbolicName=MSG_SERVER_PASSWORD_DIALOG_FAILED
-Language=English
-Directory Server: %1.
-The directory server failed to create the Key Database Passphrase dialog.
-.
-MessageId=0x8
-Severity=Error
-Facility=Registry
-SymbolicName=MSG_WD_REGISTRY
-Language=English
-Directory Server: %1.
-Could not open registry key: %2
-.
-MessageId=0x9
-Severity=Error
-Facility=Startup
-SymbolicName=MSG_WD_BADCMDLINE
-Language=English
-Directory Server: %1
-Invalid command line specified: %2
-.
-MessageId=0xA
-Severity=Error
-Facility=Startup
-SymbolicName=MSG_WD_BADPASSWORD
-Language=English
-Directory Server: %1.
-Incorrect SSL password entered.
-.
-MessageId=0xB
-Severity=Error
-Facility=Startup
-SymbolicName=MSG_WD_STRING
-Language=English
-Directory Server: %1.
-%2
-.
-MessageId=0xC
-Severity=Error
-Facility=Startup
-SymbolicName=MSG_WD_STARTFAILED
-Language=English
-Directory Server: %1.
-The directory server could not be started.
-Command line used: %2
-.
-MessageId=0xD
-Severity=Error
-Facility=Startup
-SymbolicName=MSG_WD_RESTART
-Language=English
-Directory Server: %1.
-The directory server terminated abnormally with error code %2.
-An attempt will be made to restart it.
-.
-MessageId=0xE
-Severity=Error
-Facility=Startup
-SymbolicName=MSG_CRON_STARTFAILED
-Language=English
-Directory Server: %1.
-The scheduled job (%2) could not be started.
-.
-MessageId=0xF
-Severity=Error
-Facility=Slapd
-SymbolicName=MSG_SERVER_SHUTDOWN_STARTING
-Language=English
-Directory Server: %1.
-The directory server is shutting down.
-.
-MessageId=0x10
-Severity=Error
-Facility=Startup
-SymbolicName=MSG_SERVER_KEYDB_PASSPHRASE_WRONG
-Language=English
-Directory Server: %1.
-The specified key database passphrase is incorrect.
-.
-MessageId=0x11
-Severity=Error
-Facility=Slapd
-SymbolicName=MSG_SERVER_FAILED_TO_WRITE_LOG
-Language=English
-Directory Server: %1.
-Failed to write log: %2.
-.
diff --git a/ldap/servers/slapd/ntperfdll/exports.def b/ldap/servers/slapd/ntperfdll/exports.def
deleted file mode 100644
index 2a20e0a..0000000
--- a/ldap/servers/slapd/ntperfdll/exports.def
+++ /dev/null
@@ -1,41 +0,0 @@
-; BEGIN COPYRIGHT BLOCK
-; This Program is free software; you can redistribute it and/or modify it under
-; the terms of the GNU General Public License as published by the Free Software
-; Foundation; version 2 of the License.
-; 
-; This Program is distributed in the hope that it will be useful, but WITHOUT
-; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-; 
-; You should have received a copy of the GNU General Public License along with
-; this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-; Place, Suite 330, Boston, MA 02111-1307 USA.
-; 
-; In addition, as a special exception, Red Hat, Inc. gives You the additional
-; right to link the code of this Program with code not covered under the GNU
-; General Public License ("Non-GPL Code") and to distribute linked combinations
-; including the two, subject to the limitations in this paragraph. Non-GPL Code
-; permitted under this exception must only link to the code of this Program
-; through those well defined interfaces identified in the file named EXCEPTION
-; found in the source code files (the "Approved Interfaces"). The files of
-; Non-GPL Code may instantiate templates or use macros or inline functions from
-; the Approved Interfaces without causing the resulting work to be covered by
-; the GNU General Public License. Only Red Hat, Inc. may make changes or
-; additions to the list of Approved Interfaces. You must obey the GNU General
-; Public License in all respects for all of the Program code and other code used
-; in conjunction with the Program except the Non-GPL Code covered by this
-; exception. If you modify this file, you may extend this exception to your
-; version of the file, but you are not obligated to do so. If you do not wish to
-; provide this exception without modification, you must delete this exception
-; statement from your version and license this file solely under the GPL without
-; exception. 
-; 
-; 
-; Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-; Copyright (C) 2005 Red Hat, Inc.
-; All rights reserved.
-; END COPYRIGHT BLOCK
-;
-EXPORTS OpenNSPerformanceData
-EXPORTS CollectNSPerformanceData
-EXPORTS CloseNSPerformanceData
diff --git a/ldap/servers/slapd/ntperfdll/nsldapctr.cpp b/ldap/servers/slapd/ntperfdll/nsldapctr.cpp
deleted file mode 100644
index 8477ac4..0000000
--- a/ldap/servers/slapd/ntperfdll/nsldapctr.cpp
+++ /dev/null
@@ -1,1054 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-/*
-    nsctr.c
-
-	Netscape server performance monitor hooks.
-
-
-	***********************************************************************
-		HOW TO ADD A NEW PERFMON STATISTIC
-		1. add to StatSlot or StatHeader struct 
-		2. add new counter definition to NS_DATA_DEFINITION in nsctrs.h
-		3. define the offset of your new counter in nsctrdef.h
-		4. add your counter initialization to NSDataDefinition in nsctr.cpp
-		5. update CollectNSPerformanceData to collect your data
-		6. modify nsctrs.ini to contain the text info for your counter
-			these are keyed off the "tag" you used in step 3
-	***********************************************************************
-		HOW TO UPDATE THE REGISTRY
-		1. run regini nsreg.ini
-		2. run lodctr nsctrs.ini
-	***********************************************************************
- */
-
-#define UNICODE
-
-#include <windows.h>
-#include <string.h>
-#include <winperf.h>
-#include <stdio.h>
-#include <regstr.h>
-#include "nsldapctrs.h"
-#include "nsldapctrmsg.h"
-#include "nsldapctrutil.h"
-#include "nsldapctrmc.h"
-#include "nsldapctrdef.h"
-
-#include "nt/regparms.h"
-
-#include "../agtmmap.h"
-
-#define NUM_INSTANCES 0
-#define MAGT_MAX_LINELEN 255
-
-
-/* --- Constant Performance Counter Declaration --------------------------------------------*/
-
-NS_DATA_DEFINITION NSDataDefinition = {
-
-    {	sizeof(NS_DATA_DEFINITION) + SIZE_OF_NS_PERFORMANCE_DATA,
-		sizeof(NS_DATA_DEFINITION),
-    	sizeof(PERF_OBJECT_TYPE),
-    	NS_OBJ,
-    	0,
-		NS_OBJ,
-    	0,
-		PERF_DETAIL_NOVICE,
-		(sizeof(NS_DATA_DEFINITION)-sizeof(PERF_OBJECT_TYPE))/
-	        sizeof(PERF_COUNTER_DEFINITION),
-		4L,
-		NUM_INSTANCES,
-		0, 
-		0, 
-		0
-	},
-    {   
-    	sizeof(PERF_COUNTER_DEFINITION),
-		CONN_RATE,
-	    0,
-		CONN_RATE,
-	    0,
-	    0,
-		PERF_DETAIL_NOVICE,
-		PERF_COUNTER_COUNTER,
-	    sizeof(DWORD),
-		NUM_CONN_RATE_OFFSET
-    },
-    {   
-    	sizeof(PERF_COUNTER_DEFINITION),
-		THROUGHPUT,
-	    0,
-	  	THROUGHPUT,
-	  	0,
-	    -3,
-		PERF_DETAIL_NOVICE,
-		PERF_COUNTER_COUNTER,
-	    sizeof(DWORD),
-		NUM_THROUGHPUT_OFFSET
-    },
-    {   
-    	sizeof(PERF_COUNTER_DEFINITION),
-		TOTAL_BYTES_WRITTEN,
-	    0,
-		TOTAL_BYTES_WRITTEN,
-	    0,
-	    -3,
-		PERF_DETAIL_NOVICE,
-		PERF_COUNTER_RAWCOUNT,
-	    sizeof(DWORD),
-		NUM_TOTAL_BYTES_WRITTEN_OFFSET
-    },
-    {   
-    	sizeof(PERF_COUNTER_DEFINITION),
-		TOTAL_BYTES_READ,
-	    0,
-		TOTAL_BYTES_READ,
-	    0,
-	    -3,
-		PERF_DETAIL_NOVICE,
-		PERF_COUNTER_RAWCOUNT,
-	    sizeof(DWORD),
-		NUM_TOTAL_BYTES_READ_OFFSET
-    },
-    {   
-    	sizeof(PERF_COUNTER_DEFINITION),
-		OP_RATE,
-	    0,
-		OP_RATE,
-	    0,
-	    -1,
-		PERF_DETAIL_NOVICE,
-		PERF_COUNTER_COUNTER,
-	    sizeof(DWORD),
-		NUM_OP_RATE_OFFSET
-    },
-    {   
-    	sizeof(PERF_COUNTER_DEFINITION),
-		TOTAL_ERRORS,
-	    0,
-		TOTAL_ERRORS,
-	    0,
-	    0,
-		PERF_DETAIL_NOVICE,
-		PERF_COUNTER_RAWCOUNT,
-	    sizeof(DWORD),
-		NUM_TOTAL_ERRORS_OFFSET
-    },
-    {   
-    	sizeof(PERF_COUNTER_DEFINITION),
-		SEARCH_RATE,
-	    0,
-		SEARCH_RATE,
-	    0,
-	    -1,
-		PERF_DETAIL_NOVICE,
-		PERF_COUNTER_COUNTER,
-	    sizeof(DWORD),
-		NUM_SEARCH_RATE_OFFSET
-    } ,
-    {   
-    	sizeof(PERF_COUNTER_DEFINITION),
-		ADD_RATE,
-	    0,
-		ADD_RATE,
-	    0,
-	    0,
-		PERF_DETAIL_NOVICE,
-		PERF_COUNTER_COUNTER,
-	    sizeof(DWORD),
-		ADD_RATE_OFFSET
-    },
-    {   
-    	sizeof(PERF_COUNTER_DEFINITION),
-		DELETE_RATE,
-	    0,
-		DELETE_RATE,
-	    0,
-	    0,
-		PERF_DETAIL_NOVICE,
-		PERF_COUNTER_COUNTER,
-	    sizeof(DWORD),
-		DELETE_RATE_OFFSET
-    },
-    {   
-    	sizeof(PERF_COUNTER_DEFINITION),
-		MODIFY_RATE,
-	    0,
-		MODIFY_RATE,
-	    0,
-	    0,
-		PERF_DETAIL_NOVICE,
-		PERF_COUNTER_COUNTER,
-	    sizeof(DWORD),
-		MODIFY_RATE_OFFSET
-    },
-    {   
-    	sizeof(PERF_COUNTER_DEFINITION),
-		COMPARE_RATE,
-	    0,
-		COMPARE_RATE,
-	    0,
-	    -1,
-		PERF_DETAIL_NOVICE,
-		PERF_COUNTER_COUNTER,
-	    sizeof(DWORD),
-		COMPARE_RATE_OFFSET
-    },
-    {   
-    	sizeof(PERF_COUNTER_DEFINITION),
-		MODDN_RATE,
-	    0,
-		MODDN_RATE,
-	    0,
-	    0,
-		PERF_DETAIL_NOVICE,
-		PERF_COUNTER_COUNTER,
-	    sizeof(DWORD),
-		MODDN_RATE_OFFSET
-    },
-    {   
-    	sizeof(PERF_COUNTER_DEFINITION),
-		CONNECTIONS,
-	    0,
-		CONNECTIONS,
-	    0,
-	    0,
-		PERF_DETAIL_NOVICE,
-		PERF_COUNTER_RAWCOUNT,
-	    sizeof(DWORD),
-		CONNECTIONS_OFFSET
-    },
-    {   
-		sizeof(PERF_COUNTER_DEFINITION),
-		CONNECTIONSMAXTHREADS,
-		0,
-		CONNECTIONSMAXTHREADS,
-		0,
-		0,
-		PERF_DETAIL_NOVICE,
-		PERF_COUNTER_RAWCOUNT,
-		sizeof(DWORD),
-		CONNECTIONSMAXTHREADS_OFFSET
-    },
-    {
-		sizeof(PERF_COUNTER_DEFINITION),
-		CONNECTIONSHITMAXTHREADS,
-		0,
-		CONNECTIONSHITMAXTHREADS,
-		0,
-		0,
-		PERF_DETAIL_NOVICE,
-		PERF_COUNTER_RAWCOUNT,
-		sizeof(DWORD),
-		CONNECTIONSHITMAXTHREADS_OFFSET
-    },
-    {
-    	sizeof(PERF_COUNTER_DEFINITION),
-		BIND_RATE,
-	    0,
-		BIND_RATE,
-	    0,
-	    -1,
-		PERF_DETAIL_NOVICE,
-		PERF_COUNTER_COUNTER,
-	    sizeof(DWORD),
-		BIND_RATE_OFFSET
-    },
-    {   
-    	sizeof(PERF_COUNTER_DEFINITION),
-		ENTRIES_RETURNED,
-	    0,
-		ENTRIES_RETURNED,
-	    0,
-	    0,
-		PERF_DETAIL_NOVICE,
-		PERF_COUNTER_RAWCOUNT,
-	    sizeof(DWORD),
-		ENTRIES_RETURNED_OFFSET
-    },
-    {   
-    	sizeof(PERF_COUNTER_DEFINITION),
-		ENTRIES_RETURNED_RATE,
-	    0,
-		ENTRIES_RETURNED_RATE,
-	    0,
-	    -1,
-		PERF_DETAIL_NOVICE,
-		PERF_COUNTER_COUNTER,
-	    sizeof(DWORD),
-		ENTRIES_RETURNED_RATE_OFFSET
-    },
-    {   
-    	sizeof(PERF_COUNTER_DEFINITION),
-		REFERRALS_RETURNED,
-	    0,
-		REFERRALS_RETURNED,
-	    0,
-	    0,
-		PERF_DETAIL_NOVICE,
-		PERF_COUNTER_RAWCOUNT,
-	    sizeof(DWORD),
-		REFERRALS_RETURNED_OFFSET
-    },
-    {   
-    	sizeof(PERF_COUNTER_DEFINITION),
-		REFERRALS_RETURNED_RATE,
-	    0,
-		REFERRALS_RETURNED_RATE,
-	    0,
-	    -1,
-		PERF_DETAIL_NOVICE,
-		PERF_COUNTER_COUNTER,
-	    sizeof(DWORD),
-		REFERRALS_RETURNED_RATE_OFFSET
-    },
-    {   
-    	sizeof(PERF_COUNTER_DEFINITION),
-		BYTES_READ_RATE,
-	    0,
-		BYTES_READ_RATE,
-	    0,
-	    -3,
-		PERF_DETAIL_NOVICE,
-		PERF_COUNTER_COUNTER,
-	    sizeof(DWORD),
-		BYTES_READ_RATE_OFFSET
-    },
-    {   
-    	sizeof(PERF_COUNTER_DEFINITION),
-		BYTES_WRITTEN_RATE,
-	    0,
-		BYTES_WRITTEN_RATE,
-	    0,
-	    -3,
-		PERF_DETAIL_NOVICE,
-		PERF_COUNTER_COUNTER,
-	    sizeof(DWORD),
-		BYTES_WRITTEN_RATE_OFFSET
-    }
-
-	
-};
-
-/* --- Data structs ----------------------------------------------------------------------- */
-typedef struct instance_list_t {
-	PERF_INSTANCE_DEFINITION	instance;
-	PWSTR						pInstanceName;
-	PWSTR						pConfPath;
-	agt_stats_t *				pData;
-	struct instance_list_t *	pNext;
-} instance_list_t;
-
-
-/* --- Globals ---------------------------------------------------------------------------- */    
-static BOOL bInitialized = FALSE;
-static DWORD dwOpenCount = 0;			/* Count of threads holding DLL open */
-static DWORD dwInstanceCount = 0;
-static instance_list_t *pInstanceList = NULL;
-
-#define export extern "C"
-
-
-/*-------------------------------------------------------------------------
- *
- * MagtReadLine:  Reads one line of text (up to n chars) from specified
- *                file.
- *
- * Returns:  Len read - No error
- *           -1 - Errors
- *
- *-----------------------------------------------------------------------*/
-
-int MagtReadLine(char *buf, int n, FILE *fp)
-{
-  if (fgets(buf, n, fp) != NULL)
-  {
-    return(strlen(buf));
-  }
-  else
-  {
-    return(-1);
-  }
-}
-
-
-
-/* --- strips quotes off of a quoted string -------------------------------------- */    
-
-
-char *dequote(char *quoted_string)
-{	
-	char *return_string = (char *)malloc((strlen(quoted_string) - 2) * sizeof(char) );
-    char *pQuo = quoted_string;
-    char *pRet = return_string;
-
-	for(; *pQuo; pQuo++) {
-        if (*pQuo != '\"')
-            *(pRet++) = *pQuo;
-	}
-	*pRet = '\0';
-	
-	return return_string;
-	
-}
- 
-/* --- gets the instance dir from conf file ------------------------------------- */    
-
-
-/*
- * The body of this function is pretty much copied from
- *   ldapserver/ldap/servers/snmp/ntagt/nsldapagt_nt.c
- *
- */
-char *getRootDirFromConfFile(PWSTR confpath)
-{
-  char *rootDir      = NULL;
-  const char *config = "\\config\0" ;
-  char instanceDir[MAGT_MAX_LINELEN + 1] = "";
-  size_t len ;
-  char filename[256];
-
-  if (confpath) {
-    sprintf(filename, "%S", confpath);
-    len = strlen(filename) - strlen(config) ;
-    strncpy(instanceDir, filename, len);
-    rootDir = _strdup(instanceDir) ; // allocate memory for rootDir and set up to value pointed by instanceDir
-    return rootDir ;
-  }
-  else return NULL ;
-}
-
-static DWORD MapSharedMem(char* path, agt_stats_t **ptr)
-{
-	HANDLE	hFile = NULL;
-	HANDLE	hMapFile = NULL;
-	LPVOID	memory = NULL;
-	
-	*ptr = NULL;
-	/* Open existing disk file for read */
-	hFile = CreateFileA(path, 
-				GENERIC_READ | GENERIC_WRITE,
-				FILE_SHARE_READ | FILE_SHARE_WRITE, 
-				NULL, 
-				OPEN_EXISTING,
-				FILE_ATTRIBUTE_NORMAL, 
-				NULL);
-
-	if ( hFile == INVALID_HANDLE_VALUE || hFile == NULL ) return GetLastError();
-
-	/* Create mapped file handle for reading */
-	hMapFile = CreateFileMapping( hFile, NULL, PAGE_READONLY, 0,
-				sizeof(struct agt_stats_t),
-				NULL);
-	if ( hMapFile == NULL ) {
-		CloseHandle( hFile );
-		return GetLastError();
-	}
-
-		/* Create addr ptr to the start of the file */
-	memory = MapViewOfFileEx( hMapFile, FILE_MAP_READ, 0, 0,
-			sizeof(struct agt_stats_t), NULL );
-	CloseHandle( hMapFile );
-	CloseHandle( hFile );
-	if ( memory == NULL ) {
-		return GetLastError();
-	}
-	*ptr = (agt_stats_t *)memory;
-	return 0;
-}
-
-static DWORD UnmapSharedMem(agt_stats_t **ptr)
-{
-	return UnmapViewOfFile( (LPVOID)*ptr) ? 0 : -1;
-}
-
-/* --- Open Function --------------------------------------------------------------------- */    
-
-
-/* _FindNetscapeServers()
- * Function to loop through registry looking for netscape servers 
- * Stores them into pInstanceList as it finds them.
- */
-
-#define MAX_KEY_SIZE 128
-DWORD
-_FindNetscapeServers()
-{
-	LONG	regStatus,
-			status;
-	HKEY	hKeyNetscape = NULL,
-			hKeyNetscapeConf;
-	DWORD	dwKey, 
-			type,
-			dwServerKeySize, 
-			size,
-			dwServerCount = 0;
-	WCHAR	szServerKeyName[MAX_KEY_SIZE],
-			szConfKeyName[MAX_KEY_SIZE + sizeof(KEY_SOFTWARE_NETSCAPE)],
-			szPath[MAX_KEY_SIZE];
-	FILETIME fileTime;
-	instance_list_t *pNew;
-	DWORD	iUniqueID = 0;
-
-    regStatus = RegOpenKeyEx( 
-		HKEY_LOCAL_MACHINE,
-        TEXT(KEY_SOFTWARE_NETSCAPE) TEXT("\\") TEXT(DS_KEY_ROOT),
-		0L,
-		KEY_ALL_ACCESS,
-		&hKeyNetscape);
-
-	if (regStatus != ERROR_SUCCESS) {
-		goto ExitPoint;
-	}
-
-	dwKey = 0;
-	do {
-		dwServerKeySize = MAX_KEY_SIZE;
-		regStatus = RegEnumKeyEx(
-			hKeyNetscape,
-			dwKey,
-			szServerKeyName,
-			&dwServerKeySize,
-			NULL,
-			0,
-			0,
-			&fileTime);
-		dwKey++;
-
-		if (regStatus == ERROR_SUCCESS) {
-
-			regStatus = RegOpenKeyEx( 
-				hKeyNetscape,
-				szServerKeyName,
-				0L,
-				KEY_ALL_ACCESS,
-				&hKeyNetscapeConf);
-
-			if (regStatus != ERROR_SUCCESS) {
-				continue;
-			}
-
-			/* Now look for "ConfigurationPath" to find 3.0 netscape servers */
-			size = MAX_KEY_SIZE;
-       		status = RegQueryValueEx(
-						hKeyNetscapeConf, 
-						TEXT(VALUE_CONFIG_PATH),
-						0L,
-						&type,
-						(LPBYTE)szPath,
-						&size);
-			if ( status == ERROR_SUCCESS ) {
-				/* this is a netscape server */
-				if ( (pNew = (instance_list_t *)malloc(sizeof(instance_list_t))) == NULL) {
-					status = (unsigned long)-1;
-					RegCloseKey(hKeyNetscapeConf);
-					goto ExitPoint;
-				}
-				if ( (pNew->pInstanceName = (PWCH)malloc(sizeof(WCHAR) *(dwServerKeySize+1))) == NULL) {
-					status = (unsigned long)-1;
-					RegCloseKey(hKeyNetscapeConf);
-					goto ExitPoint;
-				}
-	
-				if ( (pNew->pConfPath = (PWCH)malloc(sizeof(WCHAR) *(size+1))) == NULL) {
-					status = (unsigned long)-1;
-					RegCloseKey(hKeyNetscapeConf);
-					goto ExitPoint;
-				}
-
-
-				pNew->pData = NULL;
-
-				pNew->instance.ParentObjectTitleIndex = 0;
-				pNew->instance.ParentObjectInstance = 0;
-				pNew->instance.UniqueID	= -1;
-				pNew->instance.NameOffset = sizeof(PERF_INSTANCE_DEFINITION);
-				lstrcpy(pNew->pInstanceName, szServerKeyName);
-				lstrcpy(pNew->pConfPath, szPath);
-
-				pNew->instance.NameLength = (dwServerKeySize+1) * sizeof(WCHAR);
-				pNew->instance.ByteLength = sizeof(PERF_INSTANCE_DEFINITION) + 
-						(((pNew->instance.NameLength + sizeof(DWORD)-1)/sizeof(DWORD))*sizeof(DWORD));
-				pNew->instance.UniqueID = iUniqueID++;
-								
-				pNew->pNext = pInstanceList;
-				pInstanceList = pNew;
-
-				dwServerCount++;
-			}
-
-			RegCloseKey(hKeyNetscapeConf);
-		}
-
-	} while ( regStatus != ERROR_NO_MORE_ITEMS );
-
-ExitPoint:
-	if (hKeyNetscape)
-		RegCloseKey (hKeyNetscape); 
-
-	return dwServerCount;
-}
-
-/* _OpenNetscapeServers()
- * Once the pInstanceList has been created, this routine will open the instances 
- * of the netscape servers; 
- */
-#define MAX_FILE_LEN 128
-DWORD
-_OpenNetscapeServers()
-{
-	LONG status;
-	DWORD dwServerCount = 0;
-	instance_list_t *pInstance;
-	char *szRootDir;
-	char tmpstatsfile[MAX_FILE_LEN];
-	int err;
-
-	for (pInstance = pInstanceList; pInstance; pInstance = pInstance->pNext) {
-
-		/* open the memory map */
-		
-		/*
-		 * Get directory for our stats file
-		 */
-
-		szRootDir = getRootDirFromConfFile(pInstance->pConfPath);
-		if( szRootDir == NULL){
-			status = GetLastError();
-			continue ;
-		}
-		wsprintfA(tmpstatsfile, "%s/logs/%s", szRootDir, AGT_STATS_FILE);
-		err = MapSharedMem(tmpstatsfile,&pInstance->pData);
-		if ( 0 != err ) {
-			REPORT_ERROR (NSPERF_UNABLE_MAP_VIEW_OF_FILE, LOG_USER);
-			status = GetLastError(); // return error
-			continue;
-		} else {
-			dwServerCount++;
-		}
-
-		if(szRootDir != NULL){
-			free(szRootDir);
-		}
-
-	}
-
-	return dwServerCount;
-}
-
-export DWORD APIENTRY
-OpenNSPerformanceData(LPWSTR lpDeviceNames)
-{
-    LONG	status;
-    TCHAR	szMappedObject[] = TEXT(SVR_ID_SERVICE) TEXT("Statistics");
-    HKEY	hKeyDriverPerf;
-    DWORD	size;
-    DWORD	type;
-    DWORD	dwFirstCounter;
-    DWORD	dwFirstHelp;
-
-    if (!dwOpenCount) {
-
-		hEventLog = MonOpenEventLog();
-
-
-		if ( !_FindNetscapeServers() ) {
-			/* No netscape servers found */
-			status = (unsigned long)-1;
-			goto OpenExitPoint;
-		}
-
-		if ( !(dwInstanceCount = _OpenNetscapeServers()) ) {
-			/* No netscape servers are active */
-			status = (unsigned long)-1;
-			goto OpenExitPoint;
-		}
-
-		/* Now load help keys from registry */
-
-        status = RegOpenKeyEx (
-            HKEY_LOCAL_MACHINE,
-			TEXT("System\\CurrentControlSet\\Services") TEXT("\\") TEXT(SVR_ID_SERVICE) TEXT(SVR_VERSION) TEXT("\\") TEXT(KEY_PERFORMANCE),
-            0L,
-			KEY_ALL_ACCESS,
-            &hKeyDriverPerf);
-
-        if (status != ERROR_SUCCESS) {
-            REPORT_ERROR_DATA (NSPERF_UNABLE_OPEN_DRIVER_KEY, LOG_USER,
-                &status, sizeof(status));
-            goto OpenExitPoint;
-        }
-
-        size = sizeof (DWORD);
-        status = RegQueryValueEx(
-                    hKeyDriverPerf, 
-		            TEXT("First Counter"),
-                    0L,
-                    &type,
-                    (LPBYTE)&dwFirstCounter,
-                    &size);
-
-        if (status != ERROR_SUCCESS) {
-            REPORT_ERROR_DATA (NSPERF_UNABLE_READ_FIRST_COUNTER, LOG_USER,
-                &status, sizeof(status));
-            goto OpenExitPoint;
-        }
-
-        size = sizeof (DWORD);
-        status = RegQueryValueEx(
-                    hKeyDriverPerf, 
-        		    TEXT("First Help"),
-                    0L,
-                    &type,
-                    (LPBYTE)&dwFirstHelp,
-		    &size);
-
-        if (status != ERROR_SUCCESS) {
-            REPORT_ERROR_DATA (NSPERF_UNABLE_READ_FIRST_HELP, LOG_USER,
-                &status, sizeof(status));
-            goto OpenExitPoint;
-        }
- 
-        NSDataDefinition.NS_ObjectType.ObjectNameTitleIndex += dwFirstCounter;
-        NSDataDefinition.NS_ObjectType.ObjectHelpTitleIndex += dwFirstHelp;
-
-        NSDataDefinition.connection_rate.CounterNameTitleIndex += dwFirstCounter;
-        NSDataDefinition.connection_rate.CounterHelpTitleIndex += dwFirstHelp;
-        NSDataDefinition.throughput.CounterNameTitleIndex += dwFirstCounter;
-        NSDataDefinition.throughput.CounterHelpTitleIndex += dwFirstHelp;
-        NSDataDefinition.total_bytes_written.CounterNameTitleIndex += dwFirstCounter;
-        NSDataDefinition.total_bytes_written.CounterHelpTitleIndex += dwFirstHelp;
-        NSDataDefinition.total_bytes_read.CounterNameTitleIndex += dwFirstCounter;
-        NSDataDefinition.total_bytes_read.CounterHelpTitleIndex += dwFirstHelp;
-        NSDataDefinition.operation_rate.CounterNameTitleIndex += dwFirstCounter;
-        NSDataDefinition.operation_rate.CounterHelpTitleIndex += dwFirstHelp;
-        NSDataDefinition.total_errors.CounterNameTitleIndex += dwFirstCounter;
-        NSDataDefinition.total_errors.CounterHelpTitleIndex += dwFirstHelp;
-        NSDataDefinition.search_rate.CounterNameTitleIndex += dwFirstCounter;
-        NSDataDefinition.search_rate.CounterHelpTitleIndex += dwFirstHelp;
-        NSDataDefinition.add_rate.CounterNameTitleIndex += dwFirstCounter;
-        NSDataDefinition.add_rate.CounterHelpTitleIndex += dwFirstHelp;
-        NSDataDefinition.delete_rate.CounterNameTitleIndex += dwFirstCounter;
-        NSDataDefinition.delete_rate.CounterHelpTitleIndex += dwFirstHelp;
-        NSDataDefinition.modify_rate.CounterNameTitleIndex += dwFirstCounter;
-        NSDataDefinition.modify_rate.CounterHelpTitleIndex += dwFirstHelp;
-        NSDataDefinition.compare_rate.CounterNameTitleIndex += dwFirstCounter;
-        NSDataDefinition.compare_rate.CounterHelpTitleIndex += dwFirstHelp;
-        NSDataDefinition.moddn_rate.CounterNameTitleIndex += dwFirstCounter;
-        NSDataDefinition.moddn_rate.CounterHelpTitleIndex += dwFirstHelp;
-        NSDataDefinition.connections.CounterNameTitleIndex += dwFirstCounter;
-        NSDataDefinition.connections.CounterHelpTitleIndex += dwFirstHelp;
-        NSDataDefinition.connectionsmaxthreads.CounterNameTitleIndex += dwFirstCounter;
-        NSDataDefinition.connectionsmaxthreads.CounterHelpTitleIndex += dwFirstHelp;
-        NSDataDefinition.connectionshitmaxthreads.CounterNameTitleIndex += dwFirstCounter;
-        NSDataDefinition.connectionshitmaxthreads.CounterHelpTitleIndex += dwFirstHelp;
-        NSDataDefinition.bind_rate.CounterNameTitleIndex += dwFirstCounter;
-        NSDataDefinition.bind_rate.CounterHelpTitleIndex += dwFirstHelp;
-        NSDataDefinition.entries_returned.CounterNameTitleIndex += dwFirstCounter;
-        NSDataDefinition.entries_returned.CounterHelpTitleIndex += dwFirstHelp;
-        NSDataDefinition.entries_returned_rate.CounterNameTitleIndex += dwFirstCounter;
-        NSDataDefinition.entries_returned_rate.CounterHelpTitleIndex += dwFirstHelp;
-        NSDataDefinition.referrals_returned.CounterNameTitleIndex += dwFirstCounter;
-        NSDataDefinition.referrals_returned.CounterHelpTitleIndex += dwFirstHelp;
-        NSDataDefinition.referrals_returned_rate.CounterNameTitleIndex += dwFirstCounter;
-        NSDataDefinition.referrals_returned_rate.CounterHelpTitleIndex += dwFirstHelp;
-        NSDataDefinition.bytes_read_rate.CounterNameTitleIndex += dwFirstCounter;
-        NSDataDefinition.bytes_read_rate.CounterHelpTitleIndex += dwFirstHelp;
-        NSDataDefinition.bytes_written_rate.CounterNameTitleIndex += dwFirstCounter;
-        NSDataDefinition.bytes_written_rate.CounterHelpTitleIndex += dwFirstHelp;
-
-        RegCloseKey (hKeyDriverPerf); 
-
-        bInitialized = TRUE;
-    }
-
-    dwOpenCount++; 
-
-    status = ERROR_SUCCESS;
-
-OpenExitPoint:
-
-    return status;
-}
-
-/* --- Close Function -------------------------------------------------------------------- */    
-export DWORD APIENTRY
-CloseNSPerformanceData()
-{	
-	instance_list_t *pInstance, *pDead;
-
-    if (!(--dwOpenCount)) { 
-
-		for (pDead = NULL, pInstance = pInstanceList; pInstance; pInstance=pInstance->pNext) {
-			if (pDead)
-				free(pDead);
-
-   /* I probably need to free stats too... make sure to add that later */
-			if (pInstance->pData)
-				UnmapSharedMem(&pInstance->pData);
-
-			free(pInstance->pInstanceName);
-			free(pInstance->pConfPath);
-			pDead = pInstance;
-		}
-		if (pDead)			/* cleanup last instance */
-			free(pDead);
-		
-		MonCloseEventLog();
-
-		bInitialized = FALSE;
-    }
-
-    return ERROR_SUCCESS;
-}
-
-struct _status_struct_s {
-	DWORD	connection_rate;
-	DWORD	throughput;
-	DWORD	tot_bytes_written;
-	DWORD	tot_bytes_read;
-	DWORD	op_rate;
-	DWORD	tot_errs;
-	DWORD	search_rate;
-	DWORD	add_rate;
-	DWORD	delete_rate;
-	DWORD	modify_rate;
-	DWORD	compare_rate;
-	DWORD	moddn_rate;
-	DWORD	connections;
-	DWORD	connectionsmaxthreads;
-	DWORD	connectionshitmaxthreads;
-	DWORD	bind_rate;
-	DWORD	entries_returned;
-	DWORD	entries_returned_rate;
-	DWORD	referrals_returned;
-	DWORD	referrals_returned_rate;
-	DWORD	bytes_read_rate;
-	DWORD	bytes_written_rate;
-};
-
-void 
-Get_Actual_Data(agt_stats_t *smem, 
-		struct _status_struct_s *results)
-{
-	/* Copy over the counters from the shared memory region */
-	struct ops_stats_t *pOpsStats = &(smem->ops_stats);
-
-	results->search_rate = pOpsStats->dsSearchOps;
-	results->modify_rate = pOpsStats->dsModifyEntryOps;
-	results->add_rate = pOpsStats->dsAddEntryOps ;
-	results->compare_rate = pOpsStats->dsCompareOps ;
-	results->moddn_rate = pOpsStats->dsModifyRDNOps ;
-	results->delete_rate = pOpsStats->dsRemoveEntryOps ;
-	results->bind_rate = pOpsStats->dsAnonymousBinds + pOpsStats->dsStrongAuthBinds + pOpsStats->dsSimpleAuthBinds ;
-	results->op_rate = results->search_rate + results->add_rate + results->delete_rate + 
-		results->modify_rate + results->compare_rate + results->moddn_rate + results->bind_rate;
-	results->connections = 0;
-	results->tot_errs = pOpsStats->dsErrors ;
-	results->connections = pOpsStats->dsConnections ;
-	results->connectionsmaxthreads = pOpsStats->dsConnectionsInMaxThreads ;
-	results->connectionshitmaxthreads = pOpsStats->dsMaxThreadsHit ;
-	results->tot_bytes_written = pOpsStats->dsBytesSent ;
-	results->tot_bytes_read = pOpsStats->dsBytesRecv ;
-	results->throughput = pOpsStats->dsBytesSent +  pOpsStats->dsBytesRecv;
-	results->connection_rate = pOpsStats->dsConnectionSeq ;
-	results->entries_returned = pOpsStats->dsEntriesReturned ;	  
-	results->entries_returned_rate = pOpsStats->dsEntriesReturned ;	  
-	results->referrals_returned = pOpsStats->dsReferralsReturned ;	  
-	results->referrals_returned_rate = pOpsStats->dsReferralsReturned ;	  
-	results->bytes_read_rate = pOpsStats->dsBytesRecv ;	  
-	results->bytes_written_rate = pOpsStats->dsBytesSent ;	  
-	/* Still to do : connections, throughput, db hit ratio, entry cache hit ratio */
-}
-
-/* --- Collect Function ------------------------------------------------------------------- */    
-export DWORD  APIENTRY
-CollectNSPerformanceData(
-    IN      LPWSTR  lpValueName,
-    IN OUT  LPVOID  *lppData,
-    IN OUT  LPDWORD lpcbTotalBytes,
-    IN OUT  LPDWORD lpNumObjectTypes
-)
-{
-    ULONG SpaceNeeded;
-    PDWORD pdwCounter;
-    PERF_COUNTER_BLOCK *pPerfCounterBlock;
-    NS_DATA_DEFINITION *pNSDataDefinition;
-    DWORD dwQueryType;
-	instance_list_t *pInstance;
-
-    if (!bInitialized) {
-	    *lpcbTotalBytes = (DWORD) 0;
-	    *lpNumObjectTypes = (DWORD) 0;
-        return ERROR_SUCCESS; 
-    }
-    
-    dwQueryType = GetQueryType (lpValueName);
-    
-    if (dwQueryType == QUERY_FOREIGN) {
-        // this routine does not service requests for data from
-        // Non-NT computers
-	    *lpcbTotalBytes = (DWORD) 0;
-	    *lpNumObjectTypes = (DWORD) 0;
-        return ERROR_SUCCESS;
-    }
-
-    if (dwQueryType == QUERY_ITEMS){
-	if ( !(IsNumberInUnicodeList (NSDataDefinition.NS_ObjectType.ObjectNameTitleIndex, lpValueName))) {
-            // request received for data object not provided by this routine
-            *lpcbTotalBytes = (DWORD) 0;
-    	    *lpNumObjectTypes = (DWORD) 0;
-            return ERROR_SUCCESS;
-        }
-    }
-    /* -------- OK DO THE REAL WORK HERE ---------- */
-
-
-	/* -------------------------------------------- */
-    /* | PERF_DATA_BLOCK (header)                 | */
-	/* -------------------------------------------- */
-    /* | PERF_OBJECT_TYPE 1                       | */
-	/* -------------------------------------------- */
-    /* | PERF_OBJECT_TYPE 2                       | */
-	/* -------------------------------------------- */
-    /* |        .                                 | */
-    /* |        .                                 | */
-    /* |        .                                 | */
-    /* |                                          | */
-    /* |                                          | */
-	/* -------------------------------------------- */
-
-
-	/* -------------------------------------------- */
-    /* | PERF_OBJECT_TYPE (header)                | */
-	/* -------------------------------------------- */
-    /* | PERF_COUNTER_DEFINITION 1                | */
-	/* -------------------------------------------- */
-    /* | PERF_COUNTER_DEFINITION 2                | */
-	/* -------------------------------------------- */
-    /* |        .                                 | */
-    /* |        .                                 | */
-    /* |        .                                 | */
-    /* |                                          | */
-	/* -------------------------------------------- */
-    /* | PERF_INSTANCE_DEFINITION 1               | */
-	/* -------------------------------------------- */
-    /* | PERF_INSTANCE_DEFINITION 2               | */
-	/* -------------------------------------------- */
-    /* |        .                                 | */
-    /* |        .                                 | */
-    /* |        .                                 | */
-    /* |                                          | */
-    /* |                                          | */
-	/* -------------------------------------------- */
-
-
-	/* -------------------------------------------- */
-    /* | PERF_INSTANCE_DEFINITION (header)        | */
-	/* -------------------------------------------- */
-    /* | Instance Name (variable)                 | */
-	/* -------------------------------------------- */
-    /* | PERF_COUNTER_BLOCK (header)              | */
-	/* -------------------------------------------- */
-    /* | Counter Data (variable)                  | */
-	/* -------------------------------------------- */
-
-
-
-	/* Check to see if there is enough space in caller's buffer */
-
-    pNSDataDefinition = (NS_DATA_DEFINITION *) *lppData;
-
-    SpaceNeeded = sizeof(NS_DATA_DEFINITION) + (dwInstanceCount * 
-    	(SIZE_OF_NS_PERFORMANCE_DATA + MAX_KEY_SIZE + sizeof(PERF_COUNTER_BLOCK) +
-    	sizeof(PERF_INSTANCE_DEFINITION)));
-
-    if ( *lpcbTotalBytes < SpaceNeeded ) {
-	    *lpcbTotalBytes = (DWORD) 0;
-	    *lpNumObjectTypes = (DWORD) 0;
-        return ERROR_MORE_DATA;
-    }
-
-	/* Set the PERF_OBJECT_TYPE definition and PERF_COUNTER_DEFINITIONs */
-	NSDataDefinition.NS_ObjectType.NumInstances = dwInstanceCount;
-    memmove(pNSDataDefinition, &NSDataDefinition, sizeof(NS_DATA_DEFINITION));
-
-	pdwCounter = (PDWORD) &(pNSDataDefinition[1]);
-
-	for ( pInstance = pInstanceList; pInstance; pInstance=pInstance->pNext) {
-
-		if ( pInstance->pData ) {
-
-			/* Set the PERF_INSTANCE_DEFINITION */
-			memmove(pdwCounter, &(pInstance->instance), sizeof(PERF_INSTANCE_DEFINITION));
-			pdwCounter += ((sizeof(PERF_INSTANCE_DEFINITION))/sizeof(DWORD));
-
-			/* Set the Instance Name */
-			memmove(pdwCounter, pInstance->pInstanceName, pInstance->instance.NameLength);
-			pdwCounter = pdwCounter + ((pInstance->instance.NameLength + sizeof(DWORD)-1)/sizeof(DWORD));
-
-			/* Set the PERF_COUNTER_BLOCK */
-			pPerfCounterBlock = (PERF_COUNTER_BLOCK *) pdwCounter;
-			pPerfCounterBlock->ByteLength = SIZE_OF_NS_PERFORMANCE_DATA + sizeof(PERF_COUNTER_BLOCK);
-			pdwCounter = (PDWORD) (&pPerfCounterBlock[1]);
-
-			/* Set the Instance Data */
-			Get_Actual_Data(pInstance->pData,(struct _status_struct_s*)pdwCounter);
-	
-			{
-			  DWORD x = (SIZE_OF_NS_PERFORMANCE_DATA) / sizeof(DWORD);
-			  
-			  pdwCounter += x;
-			}
-		}
-	}
-	
-	*lppData = (PVOID)(pdwCounter);
-    *lpNumObjectTypes = 1;
-    *lpcbTotalBytes = (PBYTE) pdwCounter - (PBYTE) pNSDataDefinition;
-	pNSDataDefinition->NS_ObjectType.TotalByteLength = *lpcbTotalBytes;
-
-    return ERROR_SUCCESS;
-}
-
diff --git a/ldap/servers/slapd/ntperfdll/nsldapctrdef.h b/ldap/servers/slapd/ntperfdll/nsldapctrdef.h
deleted file mode 100644
index 1785561..0000000
--- a/ldap/servers/slapd/ntperfdll/nsldapctrdef.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-/*
- * nsctrdef.h
- * 
- * Defines offsets of netscape server performance monitor counters.
- */
-
-#define NS_OBJ			0
-#define CONN_RATE		2
-#define THROUGHPUT		4
-#define	TOTAL_BYTES_WRITTEN	6
-#define	TOTAL_BYTES_READ	8
-#define OP_RATE			10
-#define TOTAL_ERRORS		12
-#define SEARCH_RATE		14
-#define ADD_RATE		16
-#define DELETE_RATE		18
-#define MODIFY_RATE		20
-#define COMPARE_RATE		22
-#define MODDN_RATE		24
-#define CONNECTIONS		26
-#define BIND_RATE		28
-#define ENTRIES_RETURNED	30
-#define ENTRIES_RETURNED_RATE	32
-#define REFERRALS_RETURNED	34
-#define REFERRALS_RETURNED_RATE	36
-#define BYTES_READ_RATE 38
-#define BYTES_WRITTEN_RATE 40
-#define CONNECTIONSMAXTHREADS 42
-#define CONNECTIONSHITMAXTHREADS 44
-
diff --git a/ldap/servers/slapd/ntperfdll/nsldapctrmc.h b/ldap/servers/slapd/ntperfdll/nsldapctrmc.h
deleted file mode 100644
index 22e64b6..0000000
--- a/ldap/servers/slapd/ntperfdll/nsldapctrmc.h
+++ /dev/null
@@ -1,159 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-/*
- *   nsctrs.h
- */
-//
-#ifndef _NSCTRMC_H_
-#define _NSCTRMC_H_
-//
-//
-//     Perfutil messages
-//
-//
-//  Values are 32 bit values layed out as follows:
-//
-//   3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
-//   1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
-//  +---+-+-+-----------------------+-------------------------------+
-//  |Sev|C|R|     Facility          |               Code            |
-//  +---+-+-+-----------------------+-------------------------------+
-//
-//  where
-//
-//      Sev - is the severity code
-//
-//          00 - Success
-//          01 - Informational
-//          10 - Warning
-//          11 - Error
-//
-//      C - is the Customer code flag
-//
-//      R - is a reserved bit
-//
-//      Facility - is the facility code
-//
-//      Code - is the facility's status code
-//
-//
-// Define the facility codes
-//
-
-
-//
-// Define the severity codes
-//
-
-
-//
-// MessageId: UTIL_LOG_OPEN
-//
-// MessageText:
-//
-//  An extensible counter has opened the Event Log for NSCTRS.DLL
-//
-#define UTIL_LOG_OPEN                    ((DWORD)0x4000076CL)
-
-//
-//
-// MessageId: UTIL_CLOSING_LOG
-//
-// MessageText:
-//
-//  An extensible counter has closed the Event Log for NSCTRS.DLL
-//
-#define UTIL_CLOSING_LOG                 ((DWORD)0x400007CFL)
-
-//
-//
-// MessageId: NSPERF_OPEN_FILE_MAPPING_ERROR
-//
-// MessageText:
-//
-//  Unable to open mapped file containing NS driver performance data.
-//
-#define NSPERF_OPEN_FILE_MAPPING_ERROR   ((DWORD)0xC00007D0L)
-
-//
-//
-// MessageId: NSPERF_UNABLE_MAP_VIEW_OF_FILE
-//
-// MessageText:
-//
-//  Unable to map to shared memory file containing NS driver performance data.
-//
-#define NSPERF_UNABLE_MAP_VIEW_OF_FILE   ((DWORD)0xC00007D1L)
-
-//
-//
-// MessageId: NSPERF_UNABLE_OPEN_DRIVER_KEY
-//
-// MessageText:
-//
-//  Unable open "Performance" key of NS driver in registry. Status code is returned in data.
-//
-#define NSPERF_UNABLE_OPEN_DRIVER_KEY    ((DWORD)0xC00007D2L)
-
-//
-//
-// MessageId: NSPERF_UNABLE_READ_FIRST_COUNTER
-//
-// MessageText:
-//
-//  Unable to read the "First Counter" value under the NS\Performance Key. Status codes returned in data.
-//
-#define NSPERF_UNABLE_READ_FIRST_COUNTER ((DWORD)0xC00007D3L)
-
-//
-//
-// MessageId: NSPERF_UNABLE_READ_FIRST_HELP
-//
-// MessageText:
-//
-//  Unable to read the "First Help" value under the NS\Performance Key. Status codes returned in data.
-//
-#define NSPERF_UNABLE_READ_FIRST_HELP    ((DWORD)0xC00007D4L)
-
-//
-#endif // _NSCTRMC_H_
diff --git a/ldap/servers/slapd/ntperfdll/nsldapctrmc.mc b/ldap/servers/slapd/ntperfdll/nsldapctrmc.mc
deleted file mode 100644
index 343f84e..0000000
--- a/ldap/servers/slapd/ntperfdll/nsldapctrmc.mc
+++ /dev/null
@@ -1,106 +0,0 @@
-; BEGIN COPYRIGHT BLOCK
-; This Program is free software; you can redistribute it and/or modify it under
-; the terms of the GNU General Public License as published by the Free Software
-; Foundation; version 2 of the License.
-; 
-; This Program is distributed in the hope that it will be useful, but WITHOUT
-; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-; 
-; You should have received a copy of the GNU General Public License along with
-; this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-; Place, Suite 330, Boston, MA 02111-1307 USA.
-; 
-; In addition, as a special exception, Red Hat, Inc. gives You the additional
-; right to link the code of this Program with code not covered under the GNU
-; General Public License ("Non-GPL Code") and to distribute linked combinations
-; including the two, subject to the limitations in this paragraph. Non-GPL Code
-; permitted under this exception must only link to the code of this Program
-; through those well defined interfaces identified in the file named EXCEPTION
-; found in the source code files (the "Approved Interfaces"). The files of
-; Non-GPL Code may instantiate templates or use macros or inline functions from
-; the Approved Interfaces without causing the resulting work to be covered by
-; the GNU General Public License. Only Red Hat, Inc. may make changes or
-; additions to the list of Approved Interfaces. You must obey the GNU General
-; Public License in all respects for all of the Program code and other code used
-; in conjunction with the Program except the Non-GPL Code covered by this
-; exception. If you modify this file, you may extend this exception to your
-; version of the file, but you are not obligated to do so. If you do not wish to
-; provide this exception without modification, you must delete this exception
-; statement from your version and license this file solely under the GPL without
-; exception. 
-; 
-; 
-; Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-; Copyright (C) 2005 Red Hat, Inc.
-; All rights reserved.
-; END COPYRIGHT BLOCK
-;
-;/*
-; *   nsctrs.h
-; */
-;//
-;#ifndef _NSCTRMC_H_
-;#define _NSCTRMC_H_
-;//
-MessageIdTypedef=DWORD
-;//
-;//     Perfutil messages
-;//
-MessageId=1900
-Severity=Informational
-Facility=Application
-SymbolicName=UTIL_LOG_OPEN
-Language=English
-An extensible counter has opened the Event Log for NSCTRS.DLL
-.
-;//
-MessageId=1999
-Severity=Informational
-Facility=Application
-SymbolicName=UTIL_CLOSING_LOG
-Language=English
-An extensible counter has closed the Event Log for NSCTRS.DLL
-.
-;//
-MessageId=2000
-Severity=Error
-Facility=Application
-SymbolicName=NSPERF_OPEN_FILE_MAPPING_ERROR
-Language=English
-Unable to open mapped file containing NS driver performance data.
-.
-;//
-MessageId=+1
-Severity=Error
-Facility=Application
-SymbolicName=NSPERF_UNABLE_MAP_VIEW_OF_FILE
-Language=English
-Unable to map to shared memory file containing NS driver performance data.
-.
-;//
-MessageId=+1
-Severity=Error
-Facility=Application
-SymbolicName=NSPERF_UNABLE_OPEN_DRIVER_KEY
-Language=English
-Unable open "Performance" key of NS driver in registry. Status code is returned in data.
-.
-;//
-MessageId=+1
-Severity=Error
-Facility=Application
-SymbolicName=NSPERF_UNABLE_READ_FIRST_COUNTER
-Language=English
-Unable to read the "First Counter" value under the NS\Performance Key. Status codes returned in data.
-.
-;//
-MessageId=+1
-Severity=Error
-Facility=Application
-SymbolicName=NSPERF_UNABLE_READ_FIRST_HELP
-Language=English
-Unable to read the "First Help" value under the NS\Performance Key. Status codes returned in data.
-.
-;//
-;#endif // _NSCTRMC_H_
diff --git a/ldap/servers/slapd/ntperfdll/nsldapctrmsg.h b/ldap/servers/slapd/ntperfdll/nsldapctrmsg.h
deleted file mode 100644
index f1c3ee0..0000000
--- a/ldap/servers/slapd/ntperfdll/nsldapctrmsg.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-/*
- * nsctrmsg.h
- *
- * Defines EventLog error handling stuff for performance monitor dll.
- *
- */
-
-
-#ifndef  _NSCTRMSG_H_
-#define  _NSCTRMSG_H_
-//
-// Report error message ID's for Counters
-//
-
-#define APP_NAME  "nsctrs"
-
-/*    Levels:  LOG_NONE = No event log messages ever
- *             LOG_USER = User event log messages (e.g. errors)
- *             LOG_DEBUG = Minimum Debugging 
- *             LOG_VERBOSE = Maximum Debugging 
- */
-
-#define  LOG_NONE     0
-#define  LOG_USER     1
-#define  LOG_DEBUG    2
-#define  LOG_VERBOSE  3
-
-#define  MESSAGE_LEVEL_DEFAULT  LOG_USER
-
-#define REPORT_SUCCESS(i,l) (MESSAGE_LEVEL >= l ? ReportEvent (hEventLog, EVENTLOG_INFORMATION_TYPE, \
-   0, i, (PSID)NULL, 0, 0, NULL, (PVOID)NULL) : FALSE)
-
-#define REPORT_INFORMATION(i,l) (MESSAGE_LEVEL >= l ? ReportEvent (hEventLog, EVENTLOG_INFORMATION_TYPE, \
-   0, i, (PSID)NULL, 0, 0, NULL, (PVOID)NULL) : FALSE)
-
-#define REPORT_WARNING(i,l) (MESSAGE_LEVEL >= l ? ReportEvent (hEventLog, EVENTLOG_WARNING_TYPE, \
-   0, i, (PSID)NULL, 0, 0, NULL, (PVOID)NULL) : FALSE)
-
-#define REPORT_ERROR(i,l) (MESSAGE_LEVEL >= l ? ReportEvent (hEventLog, EVENTLOG_ERROR_TYPE, \
-   0, i, (PSID)NULL, 0, 0, NULL, (PVOID)NULL) : FALSE)
-
-#define REPORT_INFORMATION_DATA(i,l,d,s) (MESSAGE_LEVEL >= l ? ReportEvent (hEventLog, EVENTLOG_INFORMATION_TYPE, \
-   0, i, (PSID)NULL, 0, s, NULL, (PVOID)(d)) : FALSE)
-
-#define REPORT_WARNING_DATA(i,l,d,s) (MESSAGE_LEVEL >= l ? ReportEvent (hEventLog, EVENTLOG_WARNING_TYPE, \
-   0, i, (PSID)NULL, 0, s, NULL, (PVOID)(d)) : FALSE)
-
-#define REPORT_ERROR_DATA(i,l,d,s) (MESSAGE_LEVEL >= l ? ReportEvent (hEventLog, EVENTLOG_ERROR_TYPE, \
-   0, i, (PSID)NULL, 0, s, NULL, (PVOID)(d)) : FALSE)
-
-extern HANDLE hEventLog;		/* handle to event log */
-extern DWORD  dwLogUsers;		/* counter of event log using routines */
-extern DWORD  MESSAGE_LEVEL;	/* event logging detail level */
-
-#endif /* _NSCTRMSG_H_ */
diff --git a/ldap/servers/slapd/ntperfdll/nsldapctrs.h b/ldap/servers/slapd/ntperfdll/nsldapctrs.h
deleted file mode 100644
index 897c985..0000000
--- a/ldap/servers/slapd/ntperfdll/nsldapctrs.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-/*
-
-      nsctrs.h
-
- */
-
-#ifndef _NSCTRS_H_
-#define _NSCTRS_H_
-
-#pragma pack (4)
-
-#define NS_NUM_PERF_OBJECT_TYPES 1
-#define NUM_CONN_RATE_OFFSET	    		sizeof(DWORD)
-#define NUM_THROUGHPUT_OFFSET	    		NUM_CONN_RATE_OFFSET + sizeof(DWORD)
-#define NUM_TOTAL_BYTES_WRITTEN_OFFSET		NUM_THROUGHPUT_OFFSET + sizeof(DWORD)
-#define NUM_TOTAL_BYTES_READ_OFFSET		NUM_TOTAL_BYTES_WRITTEN_OFFSET + sizeof(DWORD)
-#define NUM_OP_RATE_OFFSET			NUM_TOTAL_BYTES_READ_OFFSET + sizeof(DWORD)
-#define NUM_TOTAL_ERRORS_OFFSET			NUM_OP_RATE_OFFSET + sizeof(DWORD)
-#define NUM_SEARCH_RATE_OFFSET			NUM_TOTAL_ERRORS_OFFSET + sizeof(DWORD)
-#define ADD_RATE_OFFSET				NUM_SEARCH_RATE_OFFSET + sizeof(DWORD)
-#define DELETE_RATE_OFFSET			ADD_RATE_OFFSET + sizeof(DWORD)
-#define MODIFY_RATE_OFFSET			DELETE_RATE_OFFSET + sizeof(DWORD)
-#define COMPARE_RATE_OFFSET			MODIFY_RATE_OFFSET + sizeof(DWORD)
-#define MODDN_RATE_OFFSET			COMPARE_RATE_OFFSET + sizeof(DWORD)
-#define CONNECTIONS_OFFSET			MODDN_RATE_OFFSET + sizeof(DWORD)
-#define BIND_RATE_OFFSET			CONNECTIONS_OFFSET + sizeof(DWORD)
-#define ENTRIES_RETURNED_OFFSET		BIND_RATE_OFFSET + sizeof(DWORD)
-#define ENTRIES_RETURNED_RATE_OFFSET		ENTRIES_RETURNED_OFFSET + sizeof(DWORD)
-#define REFERRALS_RETURNED_OFFSET		ENTRIES_RETURNED_RATE_OFFSET + sizeof(DWORD)
-#define REFERRALS_RETURNED_RATE_OFFSET		REFERRALS_RETURNED_OFFSET + sizeof(DWORD)
-#define BYTES_READ_RATE_OFFSET		REFERRALS_RETURNED_RATE_OFFSET + sizeof(DWORD)
-#define BYTES_WRITTEN_RATE_OFFSET	BYTES_READ_RATE_OFFSET + sizeof(DWORD)
-#define SIZE_OF_NS_PERFORMANCE_DATA     	BYTES_WRITTEN_RATE_OFFSET + sizeof(DWORD)
-#define CONNECTIONSMAXTHREADS_OFFSET		SIZE_OF_NS_PERFORMANCE_DATA + sizeof(DWORD)
-#define CONNECTIONSHITMAXTHREADS_OFFSET	CONNECTIONSMAXTHREADS_OFFSET + sizeof(DWORD)
-
-typedef struct _NS_DATA_DEFINITION {
-	PERF_OBJECT_TYPE	NS_ObjectType;
-	PERF_COUNTER_DEFINITION	connection_rate;
-	PERF_COUNTER_DEFINITION	throughput;
-	PERF_COUNTER_DEFINITION total_bytes_written;
-	PERF_COUNTER_DEFINITION total_bytes_read;
-	PERF_COUNTER_DEFINITION	operation_rate;
-	PERF_COUNTER_DEFINITION total_errors;
-	PERF_COUNTER_DEFINITION search_rate;
-	PERF_COUNTER_DEFINITION add_rate;
-	PERF_COUNTER_DEFINITION delete_rate;
-	PERF_COUNTER_DEFINITION modify_rate;
-	PERF_COUNTER_DEFINITION compare_rate;
-	PERF_COUNTER_DEFINITION moddn_rate;
-	PERF_COUNTER_DEFINITION connections;
-	PERF_COUNTER_DEFINITION connectionsmaxthreads;
-	PERF_COUNTER_DEFINITION connectionshitmaxthreads;
-	PERF_COUNTER_DEFINITION bind_rate;
-	PERF_COUNTER_DEFINITION entries_returned;
-	PERF_COUNTER_DEFINITION entries_returned_rate;
-	PERF_COUNTER_DEFINITION referrals_returned;
-	PERF_COUNTER_DEFINITION referrals_returned_rate;
-	PERF_COUNTER_DEFINITION bytes_read_rate;
-	PERF_COUNTER_DEFINITION bytes_written_rate;
-} NS_DATA_DEFINITION;
-
-#pragma pack ()
-
-#endif /* _NSCTRS_H_ */
-  
diff --git a/ldap/servers/slapd/ntperfdll/nsldapctrs.ini b/ldap/servers/slapd/ntperfdll/nsldapctrs.ini
deleted file mode 100644
index 587b671..0000000
--- a/ldap/servers/slapd/ntperfdll/nsldapctrs.ini
+++ /dev/null
@@ -1,89 +0,0 @@
-#
-# BEGIN COPYRIGHT BLOCK
-# This Program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; version 2 of the License.
-# 
-# This Program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-# 
-# You should have received a copy of the GNU General Public License along with
-# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place, Suite 330, Boston, MA 02111-1307 USA.
-# 
-# In addition, as a special exception, Red Hat, Inc. gives You the additional
-# right to link the code of this Program with code not covered under the GNU
-# General Public License ("Non-GPL Code") and to distribute linked combinations
-# including the two, subject to the limitations in this paragraph. Non-GPL Code
-# permitted under this exception must only link to the code of this Program
-# through those well defined interfaces identified in the file named EXCEPTION
-# found in the source code files (the "Approved Interfaces"). The files of
-# Non-GPL Code may instantiate templates or use macros or inline functions from
-# the Approved Interfaces without causing the resulting work to be covered by
-# the GNU General Public License. Only Red Hat, Inc. may make changes or
-# additions to the list of Approved Interfaces. You must obey the GNU General
-# Public License in all respects for all of the Program code and other code used
-# in conjunction with the Program except the Non-GPL Code covered by this
-# exception. If you modify this file, you may extend this exception to your
-# version of the file, but you are not obligated to do so. If you do not wish to
-# provide this exception without modification, you must delete this exception
-# statement from your version and license this file solely under the GPL without
-# exception. 
-# 
-# 
-# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-# Copyright (C) 2005 Red Hat, Inc.
-# All rights reserved.
-# END COPYRIGHT BLOCK
-#
-[info]
-drivername=slapd1
-symbolfile=nsldapctrdef.h
-
-[languages]
-009=English
-
-[text]
-NS_OBJ_009_NAME=Directory Server 1.0
-NS_OBJ_009_HELP=Directory Server
-CONN_RATE_009_NAME=Client Connections/sec
-CONN_RATE_009_HELP=Rate of incoming client connections
-THROUGHPUT_009_NAME=Server Network Throughput (bytes/sec)
-THROUGHPUT_009_HELP=Number of bytes both sent and received per second on client connections
-TOTAL_BYTES_WRITTEN_009_NAME=Total Bytes Sent
-TOTAL_BYTES_WRITTEN_009_HELP=Total number of Bytes sent by the server since startup
-TOTAL_BYTES_READ_009_NAME=Total Bytes Received
-TOTAL_BYTES_READ_009_HELP=Total number of Bytes received by the server since startup
-OP_RATE_009_NAME=Operations/sec
-OP_RATE_009_HELP=Number of Operations (total of search, bind, modify, compare, modDN, delete) serviced per second
-SEARCH_RATE_009_NAME=Searches/sec
-SEARCH_RATE_009_HELP=Number of Search operations performed per second
-TOTAL_ERRORS_009_NAME=Total Number of Errors
-TOTAL_ERRORS_009_HELP=Total number of Errors seen by the server since startup
-ADD_RATE_009_NAME=Adds/sec
-ADD_RATE_009_HELP=Number of Add operations performed per second
-DELETE_RATE_009_NAME=Deletes/sec
-DELETE_RATE_009_HELP=Number of Delete operations performed per second
-MODIFY_RATE_009_NAME=Modifies/sec
-MODIFY_RATE_009_HELP=Number of Modify operations performed per second
-COMPARE_RATE_009_NAME=Compares/sec
-COMPARE_RATE_009_HELP=Number of Compare operations performed per second
-MODDN_RATE_009_NAME=ModDNs/sec
-MODDN_RATE_009_HELP=Number of ModDN operations performed per second
-CONNECTIONS_009_NAME=Connected Clients
-CONNECTIONS_009_HELP=Number of client sessions currently connected
-BIND_RATE_009_NAME=Binds/sec
-BIND_RATE_009_HELP=Number of Bind operations performed per second
-ENTRIES_RETURNED_009_NAME=Entries Returned
-ENTRIES_RETURNED_009_HELP=Number of entries returned to clients since startup
-ENTRIES_RETURNED_RATE_009_NAME=Entries Returned/sec
-ENTRIES_RETURNED_RATE_009_HELP=Number of entries returned to clients per second
-REFERRALS_RETURNED_009_NAME=Referrals Returned
-REFERRALS_RETURNED_009_HELP=Number of referrals returned to clients since startup
-REFERRALS_RETURNED_RATE_009_NAME=Referrals Returned/sec
-REFERRALS_RETURNED_RATE_009_HELP=Number of referrals returned to clients per second
-BYTES_READ_RATE_009_NAME=Network Bytes Read/sec
-BYTES_READ_RATE_009_HELP=Number of bytes per second read from connected clients
-BYTES_WRITTEN_RATE_009_NAME=Network Bytes Written/sec
-BYTES_WRITTEN_RATE_009_HELP=Number of bytes per second written to connected clients
diff --git a/ldap/servers/slapd/ntperfdll/nsldapctrutil.cpp b/ldap/servers/slapd/ntperfdll/nsldapctrutil.cpp
deleted file mode 100644
index df7dc67..0000000
--- a/ldap/servers/slapd/ntperfdll/nsldapctrutil.cpp
+++ /dev/null
@@ -1,401 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-/*
-
-    nsctrutil.c
-
-	Performance Monitor utility functions
-
-    This file implements the utility routines used to construct the
-    common parts of a PERF_INSTANCE_DEFINITION (see winperf.h) and
-    perform event logging functions.
-                 
- */
-
-#include <windows.h>
-#include <string.h>
-#include <winperf.h>
-#include "nsldapctrmc.h"
-#include "nsldapctrmsg.h"
-#include "nsldapctrutil.h"
-
-#define INITIAL_SIZE     1024L
-#define EXTEND_SIZE      1024L
-
-//
-// Global data definitions.
-//
-
-ULONG                   ulInfoBufferSize = 0;
-
-HANDLE hEventLog;		// handle to event log
-
-DWORD  dwLogUsers = 0;        // count of functions using event log
-
-DWORD MESSAGE_LEVEL = 0;
-
-WCHAR GLOBAL_STRING[] = L"Global";
-WCHAR FOREIGN_STRING[] = L"Foreign";
-WCHAR COSTLY_STRING[] = L"Costly";
-
-WCHAR NULL_STRING[] = L"\0";    // pointer to null string 
-
-// test for delimiter, end of line and non-digit characters
-// used by IsNumberInUnicodeList routine
-//
-#define DIGIT       1
-#define DELIMITER   2
-#define INVALID     3
-
-#define EvalThisChar(c,d) ( \
-     (c == d) ? DELIMITER : \
-     (c == 0) ? DELIMITER : \
-     (c < (WCHAR)'0') ? INVALID : \
-     (c > (WCHAR)'9') ? INVALID : \
-     DIGIT)
-
-HANDLE
-MonOpenEventLog (
-)
-/*++
-
-Routine Description:
-
-    Reads the level of event logging from the registry and opens the
-        channel to the event logger for subsequent event log entries.
-
-Arguments:
-
-      None
-
-Return Value:
-
-    Handle to the event log for reporting events.
-    NULL if open not successful.
-
---*/
-  
-  
-{
-  
-  
-    HKEY hAppKey;
-  
-  
-    TCHAR LogLevelKeyName[] = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Perflib";
-  
-  
-    TCHAR LogLevelValueName[] = "EventLogLevel";
-
-    LONG lStatus;
-
-    DWORD dwLogLevel;
-    DWORD dwValueType;
-    DWORD dwValueSize;
-   
-    // if global value of the logging level not initialized or is disabled, 
-    //  check the registry to see if it should be updated.
-
-    if (!MESSAGE_LEVEL) {
-
-       lStatus = RegOpenKeyEx (HKEY_LOCAL_MACHINE,
-                               LogLevelKeyName,
-                               0,                         
-                               KEY_READ,
-                               &hAppKey);
-
-       dwValueSize = sizeof (dwLogLevel);
-
-       if (lStatus == ERROR_SUCCESS) {
-            lStatus = RegQueryValueEx (hAppKey,
-                               LogLevelValueName,
-                               (LPDWORD)NULL,           
-                               &dwValueType,
-                               (LPBYTE)&dwLogLevel,
-                               &dwValueSize);
-
-            if (lStatus == ERROR_SUCCESS) {
-               MESSAGE_LEVEL = dwLogLevel;
-            } else {
-               MESSAGE_LEVEL = MESSAGE_LEVEL_DEFAULT;
-            }
-            RegCloseKey (hAppKey);
-       } else {
-  
-  
-         MESSAGE_LEVEL = MESSAGE_LEVEL_DEFAULT;
-       }
-    }
-       
-    if (hEventLog == NULL){
-         hEventLog = RegisterEventSource (
-            (LPTSTR)NULL,            // Use Local Machine
-            APP_NAME);               // event log app name to find in registry
-    }
-    
-    if (hEventLog != NULL) {
-         dwLogUsers++;           // increment count of perfctr log users
-    }
-    return (hEventLog);
-}
-
-VOID
-MonCloseEventLog (
-)
-/*++
-
-Routine Description:
-
-      Closes the handle to the event logger if this is the last caller
-      
-Arguments:
-
-      None
-
-Return Value:
-
-      None
-
---*/
-{
-    if (hEventLog != NULL) {
-        dwLogUsers--;         // decrement usage
-        if (dwLogUsers <= 0) {    // and if we're the last, then close up log
-            DeregisterEventSource (hEventLog);
-        }
-    }
-}
-
-DWORD
-GetQueryType (
-    IN LPWSTR lpValue
-)
-/*++
-
-GetQueryType
-
-    returns the type of query described in the lpValue string so that
-    the appropriate processing method may be used
-
-Arguments
-
-    IN lpValue
-        string passed to PerfRegQuery Value for processing
-
-Return Value
-
-    QUERY_GLOBAL
-        if lpValue == 0 (null pointer)
-           lpValue == pointer to Null string
-           lpValue == pointer to "Global" string
-
-    QUERY_FOREIGN
-        if lpValue == pointer to "Foreign" string
-
-    QUERY_COSTLY
-        if lpValue == pointer to "Costly" string
-
-    otherwise:
-
-    QUERY_ITEMS
-
---*/
-{
-    WCHAR   *pwcArgChar, *pwcTypeChar;
-    BOOL    bFound;
-
-    if (lpValue == 0) {
-        return QUERY_GLOBAL;
-    } else if (*lpValue == 0) {
-        return QUERY_GLOBAL;
-    }
-
-    // check for "Global" request
-
-    pwcArgChar = lpValue;
-    pwcTypeChar = GLOBAL_STRING;
-    bFound = TRUE;  // assume found until contradicted
-
-    // check to the length of the shortest string
-    
-    while ((*pwcArgChar != 0) && (*pwcTypeChar != 0)) {
-        if (*pwcArgChar++ != *pwcTypeChar++) {
-            bFound = FALSE; // no match
-            break;          // bail out now
-        }
-    }
-
-    if (bFound) return QUERY_GLOBAL;
-
-    // check for "Foreign" request
-    
-    pwcArgChar = lpValue;
-    pwcTypeChar = FOREIGN_STRING;
-    bFound = TRUE;  // assume found until contradicted
-
-    // check to the length of the shortest string
-    
-    while ((*pwcArgChar != 0) && (*pwcTypeChar != 0)) {
-        if (*pwcArgChar++ != *pwcTypeChar++) {
-            bFound = FALSE; // no match
-            break;          // bail out now
-        }
-    }
-
-    if (bFound) return QUERY_FOREIGN;
-
-    // check for "Costly" request
-    
-    pwcArgChar = lpValue;
-    pwcTypeChar = COSTLY_STRING;
-    bFound = TRUE;  // assume found until contradicted
-
-    // check to the length of the shortest string
-    
-    while ((*pwcArgChar != 0) && (*pwcTypeChar != 0)) {
-        if (*pwcArgChar++ != *pwcTypeChar++) {
-            bFound = FALSE; // no match
-            break;          // bail out now
-        }
-    }
-
-    if (bFound) return QUERY_COSTLY;
-
-    // if not Global and not Foreign and not Costly, 
-    // then it must be an item list
-    
-    return QUERY_ITEMS;
-
-}
-
-BOOL
-IsNumberInUnicodeList (
-    IN DWORD   dwNumber,
-    IN LPWSTR  lpwszUnicodeList
-)
-/*++
-
-IsNumberInUnicodeList
-
-Arguments:
-        
-    IN dwNumber
-        DWORD number to find in list
-
-    IN lpwszUnicodeList
-        Null terminated, Space delimited list of decimal numbers
-
-Return Value:
-
-    TRUE:
-            dwNumber was found in the list of unicode number strings
-
-    FALSE:
-            dwNumber was not found in the list.
-
---*/
-{
-    DWORD   dwThisNumber;
-    WCHAR   *pwcThisChar;
-    BOOL    bValidNumber;
-    BOOL    bNewItem;
-    //BOOL    bReturnValue;
-    WCHAR   wcDelimiter;    // could be an argument to be more flexible
-
-    if (lpwszUnicodeList == 0) return FALSE;    // null pointer, # not found
-
-    pwcThisChar = lpwszUnicodeList;
-    dwThisNumber = 0;
-    wcDelimiter = (WCHAR)' ';
-    bValidNumber = FALSE;
-    bNewItem = TRUE;
-    
-    while (TRUE) {
-        switch (EvalThisChar (*pwcThisChar, wcDelimiter)) {
-            case DIGIT:
-                // if this is the first digit after a delimiter, then 
-                // set flags to start computing the new number
-                if (bNewItem) {
-                    bNewItem = FALSE;
-                    bValidNumber = TRUE;
-                }
-                if (bValidNumber) {
-                    dwThisNumber *= 10;
-                    dwThisNumber += (*pwcThisChar - (WCHAR)'0');
-                }
-                break;
-            
-            case DELIMITER:
-                // a delimiter is either the delimiter character or the 
-                // end of the string ('\0') if when the delimiter has been
-                // reached a valid number was found, then compare it to the
-                // number from the argument list. if this is the end of the
-                // string and no match was found, then return.
-                //
-                if (bValidNumber) {
-                    if (dwThisNumber == dwNumber) return TRUE;
-                    bValidNumber = FALSE;
-                }
-                if (*pwcThisChar == 0) {
-                    return FALSE;
-                } else {
-                    bNewItem = TRUE;
-                    dwThisNumber = 0;
-                }
-                break;
-
-            case INVALID:
-                // if an invalid character was encountered, ignore all
-                // characters up to the next delimiter and then start fresh.
-                // the invalid number is not compared.
-                bValidNumber = FALSE;
-                break;
-
-            default:
-                break;
-
-        }
-        pwcThisChar++;
-    }
-
-}   // IsNumberInUnicodeList
diff --git a/ldap/servers/slapd/ntperfdll/nsldapctrutil.h b/ldap/servers/slapd/ntperfdll/nsldapctrutil.h
deleted file mode 100644
index 5d8586d..0000000
--- a/ldap/servers/slapd/ntperfdll/nsldapctrutil.h
+++ /dev/null
@@ -1,157 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-  
-  
-/*++ BUILD Version: 0001    // Increment this if a change has global effects
-
-Copyright (c) 1992 Microsoft Corporation
-
-Module Name:
-
-    perfutil.h  
-
-Abstract:
-
-  
-  
-    This file supports routines used to parse and create Performance Monitor Data 
-    Structures. It actually supports Performance Object types with multiple instances
-  
-  
-
-Revision History:
-
---*/
-#ifndef _PERFUTIL_H_
-#define _PERFUTIL_H_
-
-// enable this define to log process heap data to the event log
-#ifdef PROBE_HEAP_USAGE
-#undef PROBE_HEAP_USAGE
-#endif
-//
-  
-  
-//  Utility macro.  This is used to reserve a DWORD multiple of bytes for Unicode strings 
-//  embedded in the definitional data, viz., object instance names.
-  
-  
-//
-  
-  
-#define DWORD_MULTIPLE(x) (((x+sizeof(DWORD)-1)/sizeof(DWORD))*sizeof(DWORD))
-  
-  
-
-//    (assumes dword is 4 bytes long and pointer is a dword in size)
-  
-  
-#define ALIGN_ON_DWORD(x) ((VOID *)( ((DWORD) x & 0x00000003) ? ( ((DWORD) x & 0xFFFFFFFC) + 4 ) : ( (DWORD) x ) ))
-  
-  
-
-extern WCHAR  GLOBAL_STRING[];      // Global command (get all local ctrs)
-extern WCHAR  FOREIGN_STRING[];           // get data from foreign computers
-extern WCHAR  COSTLY_STRING[];      
-  
-  
-extern WCHAR  NULL_STRING[];
-  
-  
-
-#define QUERY_GLOBAL    1
-#define QUERY_ITEMS     2
-#define QUERY_FOREIGN   3
-#define QUERY_COSTLY    4
-
-//
-  
-  
-// The definition of the only routine of perfutil.c, It builds part of a performance data 
-// instance (PERF_INSTANCE_DEFINITION) as described in winperf.h
-  
-  
-//
-
-HANDLE MonOpenEventLog ();
-VOID MonCloseEventLog ();
-DWORD GetQueryType (IN LPWSTR);
-BOOL IsNumberInUnicodeList (DWORD, LPWSTR);
-
-typedef struct _LOCAL_HEAP_INFO_BLOCK {
-    DWORD   AllocatedEntries;
-    DWORD   AllocatedBytes;
-    DWORD   FreeEntries;
-    DWORD   FreeBytes;
-} LOCAL_HEAP_INFO, *PLOCAL_HEAP_INFO;
-
-
-//
-//  Memory Probe macro
-//
-#ifdef PROBE_HEAP_USAGE
-
-#define HEAP_PROBE()    { \
-    DWORD   dwHeapStatus[5]; \
-    NTSTATUS CallStatus; \
-    dwHeapStatus[4] = __LINE__; \
-    if (!(CallStatus = memprobe (dwHeapStatus, 16L, NULL))) { \
-        REPORT_INFORMATION_DATA (VGA_HEAP_STATUS, LOG_DEBUG,    \
-            &dwHeapStatus, sizeof(dwHeapStatus));  \
-    } else {  \
-        REPORT_ERROR_DATA (VGA_HEAP_STATUS_ERROR, LOG_DEBUG, \
-            &CallStatus, sizeof (DWORD)); \
-    } \
-}
-
-#else
-
-#define HEAP_PROBE()    ;
-  
-  
-
-  
-  
-#endif
-
-#endif  //_PERFUTIL_H_
diff --git a/ldap/servers/slapd/ntperfdll/nsldapreg.ini b/ldap/servers/slapd/ntperfdll/nsldapreg.ini
deleted file mode 100644
index c508130..0000000
--- a/ldap/servers/slapd/ntperfdll/nsldapreg.ini
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-# BEGIN COPYRIGHT BLOCK
-# This Program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; version 2 of the License.
-# 
-# This Program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-# 
-# You should have received a copy of the GNU General Public License along with
-# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place, Suite 330, Boston, MA 02111-1307 USA.
-# 
-# In addition, as a special exception, Red Hat, Inc. gives You the additional
-# right to link the code of this Program with code not covered under the GNU
-# General Public License ("Non-GPL Code") and to distribute linked combinations
-# including the two, subject to the limitations in this paragraph. Non-GPL Code
-# permitted under this exception must only link to the code of this Program
-# through those well defined interfaces identified in the file named EXCEPTION
-# found in the source code files (the "Approved Interfaces"). The files of
-# Non-GPL Code may instantiate templates or use macros or inline functions from
-# the Approved Interfaces without causing the resulting work to be covered by
-# the GNU General Public License. Only Red Hat, Inc. may make changes or
-# additions to the list of Approved Interfaces. You must obey the GNU General
-# Public License in all respects for all of the Program code and other code used
-# in conjunction with the Program except the Non-GPL Code covered by this
-# exception. If you modify this file, you may extend this exception to your
-# version of the file, but you are not obligated to do so. If you do not wish to
-# provide this exception without modification, you must delete this exception
-# statement from your version and license this file solely under the GPL without
-# exception. 
-# 
-# 
-# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-# Copyright (C) 2005 Red Hat, Inc.
-# All rights reserved.
-# END COPYRIGHT BLOCK
-#
-\Registry\Machine
-        System
-                CurrentControlSet
-                        Services
-                                slapd1
-                                        Performance
-                                                Close = REG_SZ CloseNSPerformanceData
-                                                Collect = REG_SZ CollectNSPerformanceData
-                                                Library = REG_SZ nsctr.dll
-                                                Open = REG_SZ OpenNSPerformanceData
-
diff --git a/ldap/servers/slapd/ntwdog/cron_conf.c b/ldap/servers/slapd/ntwdog/cron_conf.c
deleted file mode 100644
index 02db64f..0000000
--- a/ldap/servers/slapd/ntwdog/cron_conf.c
+++ /dev/null
@@ -1,691 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-
-#include <windows.h>
-#include <stdio.h>
-#include <string.h>
-#include <process.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include "cron_conf.h"
-
-#define NSAPI_PUBLIC
-
-#ifndef BUF_SIZE
-#define BUF_SIZE 4096
-#endif
-
-#ifndef S_BUF_SIZE
-#define S_BUF_SIZE 1024
-#endif
-
-#ifdef XP_WIN32
-#pragma warning (disable: 4005)  // macro redifinition //
-#define MALLOC(size)     malloc(size)
-#define REALLOC(x, size) realloc(x, size)
-#define FREE(x)          free((void*) x)
-#define STRDUP(x)        strdup(x)
-#define strcasecmp(x, y) stricmp(x, y)
-#pragma warning (default: 4005)  // macro redifinition //
-#endif
-
-static char *admroot;
-static char *nsroot;
-
-#define DAILY "Sun Mon Tue Wed Thu Fri Sat"
-
-static cron_conf_list *cclist   = NULL;
-static cron_conf_list *cctail   = NULL;
-static char           *conffile = NULL;
-
-#ifndef CRON_CONF_STAND_ALONE
-static void set_roots()
-{
-  char *ar = ADMCONFDIR;
-  if(ar)
-      admroot = STRDUP(ar);
-}
-#endif
-
-/* General note: strtok() is not MT safe on Unix , but it is okay to call 
-   here because this file is NT only and strtok() is MT safe on NT */
-
-static char *nocr(char *buf)
-{
-  if (buf)
-    {
-      if(buf[strlen(buf) - 1] == '\n')
-	buf[strlen(buf) - 1] = '\0';
-    }
-    
-  return buf;
-}
-
-static int debug(char *fmt, ...)
-{
-  va_list args;
-  char buf[BUF_SIZE];
- 
-  va_start(args, fmt);
-  vsprintf(buf, fmt, args);
-  va_end(args);
-
-  fprintf(stdout, "<<DEBUG>> %s <<DEBUG>>\n", buf);
-  fflush(stdout);
-
-  return 1;
-}
-
-static char *get_conf_file()
-{
-  static char conffile [S_BUF_SIZE];
-  char        nsconfile[S_BUF_SIZE];
-  char        buf      [BUF_SIZE];
-  char       *r, *p;
-  FILE       *fp;
-  int         flag = 0;
-
-  if (admroot)
-    sprintf(nsconfile, "%s/ns-cron.conf", admroot);
-  else
-    sprintf(nsconfile, "%s/admin-serv/config/ns-cron.conf", nsroot);
-  
-  if (!(fp = fopen(nsconfile, "r")))
-    return NULL;
-
-  while(fgets(buf, sizeof(buf), fp))
-    {
-      r = strtok(buf, " \t\n");
-      if (!r) /* bad line, ignore */
-	continue;
- 
-      p = strtok(NULL, " \t\n");
-      if (!p) /* bad line, ignore */
-	continue;
- 
-      if (!strcasecmp(r, "ConfFile"))
-	{
-	 /* if filename without path is specified, default to admin svr dir */
-	 if((strchr(p, '\\') == NULL) && 
-	    (strchr(p, '/') == NULL))
-	    sprintf(conffile, "%s/%s", admroot, p);
-	 else
-	    sprintf(conffile, "%s", p);
-	 flag++;
-	 break;
-	}
-    }
-
-  fclose(fp);
-
-  if (!flag)
-    return NULL;
-
-  return conffile;
-}
-
-
-#ifndef CRON_CONF_STAND_ALONE
-NSAPI_PUBLIC
-#endif
-cron_conf_obj *cron_conf_create_obj(char *name, char *command, char *dir,
-				    char *user, char *start_time, char *days)
-{
-  cron_conf_obj *object;
-  char *d = NULL;
-
-  object = (cron_conf_obj*)MALLOC(sizeof(cron_conf_obj));
- 
-  object->name       = (name)       ? STRDUP(name)       : NULL;
-  object->command    = (command)    ? STRDUP(command)    : NULL;
-  object->dir        = (dir)        ? STRDUP(dir)        : NULL;
-  object->user       = (user)       ? STRDUP(user)       : NULL;
-  object->start_time = (start_time) ? STRDUP(start_time) : NULL;
-
-#if 1
-  if (days)
-    {
-      if (!(strcasecmp(days, "Daily")))
-	d = STRDUP(DAILY);
-      else
-	d = STRDUP(days);
-    }
-#else
-  d = STRDUP("Wed Thu");
-#endif
-
-  object->days = d;
-
-  return object;
-}
-
-
-static void cron_conf_free_listobj(cron_conf_list *lobj)
-{
-  cron_conf_obj *obj = lobj->obj;
-
-
-  if (obj)
-    {
-      if(obj->name)       FREE(obj->name);
-      if(obj->command)    FREE(obj->command);
-      if(obj->dir)        FREE(obj->dir);
-      if(obj->user)       FREE(obj->user);
-      if(obj->start_time) FREE(obj->start_time);
-      if(obj->days)       FREE(obj->days);
-      
-      FREE(obj);
-    }
- 
-  FREE(lobj);
-}
-
-
-static cron_conf_obj *get_object(FILE *fp)
-{
-  cron_conf_obj *object;
-  char name      [S_BUF_SIZE];
-  char command   [S_BUF_SIZE];
-  char dir       [S_BUF_SIZE];
-  char user      [S_BUF_SIZE]; 
-  char start_time[S_BUF_SIZE];
-  char days      [S_BUF_SIZE];
-  char buf       [BUF_SIZE];
-  char *p, *q;
-  int flag = 0;
-  int hascom, hasdir, hasuser, hastime, hasdays;
-
-  p = fgets(buf, sizeof(buf), fp);
-
-  if (!p)
-    return NULL;
-  /* else debug("Read line '%s'", nocr(buf)); */
-
-  if (strncmp(buf, "<Object", 7))
-    return NULL;
-
-  hascom = hasdir = hasuser = hastime = hasdays = 0;
-
-  p = strtok(buf,  "<=>\n\t ");
-  if (!p)
-    return NULL;
-
-  p = strtok(NULL, "<=>\n\t ");
-  if (!p)
-    return NULL;
-
-  p = strtok(NULL, "<=>\n\t ");
-  if (!p)
-    return NULL;
-
-  sprintf(name, "%s", p);
-  /* debug("Setting name to '%s'", name); */
-
-  while(fgets(buf, sizeof(buf), fp))
-    {
-      /* debug("Read line '%s'", nocr(buf)); */
-
-      p = strtok(buf, " \t\n");
-
-      if (!p)
-	continue;
-
-      if (!strcasecmp(p, "</Object>"))
-	{
-	  flag++;
-	  break;
-	}
-
-      if(!strcasecmp(p, "Command"))
-	{
-	  q = strtok(NULL, "\n");
-
-	  if (q)
-	    q = strchr(q, '\"');
-
-	  if (q)
-	    q++;
-      
-	  if (q)
-	    {
-	      if (!hascom)
-		{
-		  /* get rid of quotes */
-		  p = strrchr(q, '\"');
-
-		  if (p)
-		    *p = '\0';
-
-		  if (q)
-		    {
-		      PR_snprintf(command, S_BUF_SIZE, "%s", q);
-		      /* debug("Setting command to '%s'", command); */
-		      hascom++;
-		    }
-		}
-	      else /* already has a command */
-		;  /* ignore */
-	    }
-	  continue;
-	}
-
-      if(!strcasecmp(p, "Dir"))
-	{
-	  q = strtok(NULL, "\n");
-
-	  if (q)
-	    q = strchr(q, '\"');
-
-	  if (q)
-	    q++;
-      
-	  if (q)
-	    {
-	      if (!hasdir)
-		{
-		  /* get rid of quotes */
-		  p = strrchr(q, '\"');
-
-		  if (p)
-		    *p = '\0';
-
-		  if (q)
-		    {
-		      PR_snprintf(dir, S_BUF_SIZE, "%s", q);
-		      /* debug("Setting dir to '%s'", dir); */
-		      hasdir++;
-		    }
-		}
-	      else /* already has a dir */
-		;  /* ignore */
-	    }
-	  continue;
-	}
-
-      else if(!strcasecmp(p, "User"))
-	{
-	  q = strtok(NULL, " \t\n");
-      
-	  if (q)
-	    {
-	      if (!hasuser)
-		{
-		  PR_snprintf(user, S_BUF_SIZE, "%s", q);
-		  /* debug("Setting user to '%s'", user); */
-		  hasuser++;
-		}
-	      else /* already has a user */
-		;  /* ignore */
-	    }
-	  continue;
-	}
-
-      else if(!strcasecmp(p, "Time"))
-	{
-	  q = strtok(NULL, "\n");
-	  
-	  if (q)
-	    {
-	      if (!hastime)
-		{
-		  PR_snprintf(start_time, S_BUF_SIZE, "%s", q);
-		  /* debug("Setting time to '%s'", start_time); */
-		  hastime++;
-		}
-	      else /* already has a time */
-		;  /* ignore */
-	    }
-	  continue;
-	}
-
-      else if(!strcasecmp(p, "Days"))
-	{
-	  q = strtok(NULL, "\n");
-
-	  if (q)
-	    {
-	      if (!hasdays)
-		{
-		  PR_snprintf(days, S_BUF_SIZE, "%s", q);
-		  /* debug("Setting days to '%s'", days); */
-		  hasdays++;
-		}
-	      else /* already has days */
-		;  /* ignore */
-	    }
-	  continue;
-	}
-
-      else
-	{
-	  /* gibberish...  ignore... will be fixed when
-	     file is rewritten */
-	  continue;	  
-	}
-    }
-
-  object = cron_conf_create_obj(name,
-				(hascom)  ? command    : NULL, 
-				(hasdir)  ? dir        : NULL,
-				(hasuser) ? user       : NULL, 
-				(hastime) ? start_time : NULL, 
-				(hasdays) ? days       : NULL);
-
-  return object;
-}
-
-
-static void cron_conf_write_stream(FILE *fp)
-{
-  cron_conf_obj *obj;
-  cron_conf_list *lobj;
-
-  for(lobj = cclist; lobj; lobj = lobj->next)
-    {
-      obj = lobj->obj;
-
-      fprintf(fp, "<Object name=%s>\n", (obj->name) ? obj->name : "?");
-      fprintf(fp, "    Command \"%s\"\n", (obj->command) ? obj->command : "?");
-      if (obj->dir) 
-	fprintf(fp, "    Dir \"%s\"\n", obj->dir);
-      if (obj->user) 
-	fprintf(fp, "    User %s\n", obj->user);
-      fprintf(fp, "    Time %s\n", (obj->start_time) ? obj->start_time : "?");
-      fprintf(fp, "    Days %s\n", (obj->days) ? obj->days : "?");
-      fprintf(fp, "</Object>\n");
-    }
-}
-
-
-static void cron_conf_delete(char *name, cron_conf_obj *cco)
-{
-  cron_conf_list *lobj = NULL;
-  cron_conf_list *pobj = NULL;
-
-  if (!cclist)
-    return;
-
-  if (!strcmp(cclist->name, name))
-    {
-      lobj = cclist;
-      cclist = cclist->next;
-      if (cctail == lobj)
-	cctail = cclist;
-
-      cron_conf_free_listobj(lobj);
-    }
-  else
-    {
-      pobj = cclist;
-
-      for(lobj = cclist->next; lobj; lobj = lobj->next)
-	{
-	  if(!strcmp(lobj->name, name))
-	    {
-	      if (lobj == cctail)
-		cctail = pobj;
-
-	      pobj->next = lobj->next;
-	      cron_conf_free_listobj(lobj);
-
-	      break;
-	    }
-
-	  pobj = lobj;
-	}
-    }
-
-  return;
-}
-
-#ifndef CRON_CONF_STAND_ALONE
-NSAPI_PUBLIC
-#endif
-int cron_conf_read()
-{
-  FILE *fp;
-  cron_conf_obj *obj;
-  cron_conf_list *lobj;
-
-#ifndef CRON_CONF_STAND_ALONE
-  set_roots();
-#endif
-
-  if (!(conffile = get_conf_file()))
-    {
-      /* debug("Conffile is null"); */
-      return 0;
-    }
-  /* else debug("Conffile: '%s'", conffile); */
-
-  if (!(fp = fopen(conffile, "r")))
-    {
-      /* debug("Couldn't open conffile"); */
-      return 0;
-    }
-
-  while((obj = get_object(fp)))
-    {
-      lobj       = (cron_conf_list*)MALLOC(sizeof(struct cron_conf_list));
-      lobj->name = obj->name;
-      lobj->obj  = obj;
-      lobj->next = NULL;
-
-      /* debug("Created a list object named '%s'", lobj->name); */
-
-      if(cclist == NULL) /* first object */
-	{
-	  cclist = cctail = lobj;
-	}
-      else
-	{
-	  cctail->next = lobj;
-	  cctail       = lobj;
-	}
-
-      /* debug("List now, head: '%s', tail: '%s'", 
-	 cclist->name, cctail->name); */
-    }
-
-  fclose(fp);
-
-  return 1;
-}
-
-#ifndef CRON_CONF_STAND_ALONE
-NSAPI_PUBLIC
-#endif
-cron_conf_obj *cron_conf_get(char *name)
-{
-  cron_conf_obj  *obj  = NULL;
-  cron_conf_list *lobj = NULL;
-
- /* find object */
-  for(lobj = cclist; lobj; lobj = lobj->next)
-    {
-      if(!strcmp(lobj->name, name))
-	{
-	  obj = lobj->obj;
-	  break;
-	}
-    }
-
-#if 0
-  if (obj)
-    {
-      debug("Found object %s", obj->name);
-      debug("obj->command = %s", (obj->command) ? obj->command : "NULL");
-      debug("obj->dir = %s", (obj->dir) ? obj->dir : "NULL");
-      debug("obj->user = %s", (obj->user) ? obj->user : "NULL");
-      debug("obj->start_time = %s", (obj->start_time) ? obj->start_time : "NULL");
-      debug("obj->days = %s", (obj->days) ? obj->days : "NULL");
-    }
-#endif
-
-  return obj;
-}
-
-
-#ifndef CRON_CONF_STAND_ALONE
-NSAPI_PUBLIC
-#endif
-cron_conf_list *cron_conf_get_list()
-{
-  return cclist;
-}
-
-#ifndef CRON_CONF_STAND_ALONE
-NSAPI_PUBLIC
-#endif
-cron_conf_obj *cron_conf_set(char *name, cron_conf_obj *cco)
-{
-  cron_conf_obj  *obj  = NULL;
-  cron_conf_list *lobj = NULL;
-
-  if (!name)
-    return NULL;
-
-  if (!cco)
-    {
-      cron_conf_delete(name, cco);
-      return NULL;
-    }
-  else /* cco exists */
-    {
-      /* find object */
-      obj = cron_conf_get(name);
-
-
-      if (obj)   /* found it */
-	{
-	  if (cco->command)
-	    {
-	      FREE(obj->command);
-	      obj->command = cco->command;
-	    }
-
-	  if (cco->dir)
-	    {
-	      FREE(obj->dir);
-	      obj->dir = cco->dir;
-	    }
-
-	  if (cco->user)
-	    {
-	      FREE(obj->user);
-	      obj->user = cco->user;
-	    }
-
-	  if (cco->start_time)
-	    {
-	      FREE(obj->start_time);
-	      obj->start_time = cco->start_time;
-	    }
-
-	  if (cco->days)
-	    {
-	      FREE(obj->days);
-	      obj->days = cco->days;
-	    }
-
-	  FREE(cco);
-	}
-      else /* couldn't find it */
-	{
-	  obj = cco;
-	  
-	  lobj       = (cron_conf_list*)MALLOC(sizeof(cron_conf_list));
-	  lobj->name = obj->name;
-	  lobj->obj  = obj;
-	  lobj->next = NULL;
-	  
-	  if(cclist == NULL) /* first object */
-	    {
-	      cclist = cctail = lobj;
-	    }
-	  else
-	    {
-	      cctail->next = lobj;
-	      cctail = lobj;
-	    }
-	}
-    }
-
-  return obj;
-}
-
-void cron_conf_write()
-{
-  FILE *fp;
-
-  if (!conffile)
-    conffile = get_conf_file();
-
-  if(!(fp = fopen(conffile, "w")))
-    return;
-
-  cron_conf_write_stream(fp);
-
-  fclose(fp);
-}
-
-
-#ifndef CRON_CONF_STAND_ALONE
-NSAPI_PUBLIC
-#endif
-void cron_conf_free()
-{
-  cron_conf_list  *lobj  = NULL;
- 
-  /* find object */
-  while(cclist)
-    {
-      lobj   = cclist;
-      cclist = cclist->next;
-
-      cron_conf_free_listobj(lobj);
-    }
-
-  cclist = cctail = NULL;
-}
-
diff --git a/ldap/servers/slapd/ntwdog/cron_conf.h b/ldap/servers/slapd/ntwdog/cron_conf.h
deleted file mode 100644
index 1cc43ee..0000000
--- a/ldap/servers/slapd/ntwdog/cron_conf.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-/***********************************************************************
-** $Id: cron_conf.h,v 1.6 2006/11/10 23:45:49 nhosoi Exp $
-**
-**
-** NAME
-**  cron_conf.h
-**
-** DESCRIPTION
-**
-**
-** AUTHOR
-**   <robw at netscape.com>
-**
-***********************************************************************/
-
-#ifndef _CRON_CONF_H_
-#define _CRON_CONF_H_
-
-/***********************************************************************
-** Includes
-***********************************************************************/
-/* read and write to cron.conf, cron_conf.c */
-/* Alex Feygin, 3/22/96                     */
-typedef struct cron_conf_obj
-{
-  char *name;
-  char *command;
-  char *dir;
-  char *user;
-  char *start_time;
-  char *days;
-} 
-cron_conf_obj;
- 
-typedef struct cron_conf_list
-{
-  char *name;
-  cron_conf_obj *obj;
-  struct cron_conf_list *next;
-} 
-cron_conf_list;
- 
-/* Reads cron.conf to a null terminated list of cron_conf_objects; returns
-   0 if unable to do a read; 1 otherwise */
-int cron_conf_read();
- 
-/* gets a cron object, NULL if it doesnt exist */
-cron_conf_obj *cron_conf_get(char *name);
- 
-/* returns a NULL-terminated cron_conf_list of all the cron conf objects */
-cron_conf_list *cron_conf_get_list();
- 
-/* Creates a cron conf object; all these args get STRDUP'd in the function
-   so make sure to free up the space later if need be */
-cron_conf_obj *cron_conf_create_obj(char *name, char *command,
-						 char *dir,  char *user, 
-						 char *start_time, char *days);
- 
-/* Puts a cron conf object into list or updates it if it already in there.
-   Returns either the object passed or the object in there already;
-   cco may be FREE'd during this operation so if you need the object
-   back, call it like so:
-   
-   cco = cron_conf_set(cco->name, cco);  
- 
-   calling cron_conf_set with a NULL cco will cause the 'name' object
-   to be deleted.
-*/
-cron_conf_obj *cron_conf_set(char *name, cron_conf_obj *cco);
- 
-/* write out current list of cron_conf_objects to cron.conf file */
-void cron_conf_write();
- 
-/* free all cron conf data structures */
-void cron_conf_free();
-
-#define ADMCONFDIR "../config/"
-
-
-#endif /* _CRON_CONF_H_ */
diff --git a/ldap/servers/slapd/ntwdog/ntcron.c b/ldap/servers/slapd/ntwdog/ntcron.c
deleted file mode 100644
index 8977936..0000000
--- a/ldap/servers/slapd/ntwdog/ntcron.c
+++ /dev/null
@@ -1,193 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-//                                                                          //
-//  Name: NTCRON                                                            //
-//	 Platforms: WIN32                                                       //
-//  Description: unix cron functionality in a separate thread               //
-//  Notes:                                                                  //
-//  The following assumptions are made:                                     //
-//  - gszServerRoot is set to c:\netscape\server                            //
-//  - ns-cron.conf and cron.conf are available                              //
-//  Todo:                                                                   //
-//  - handle time format variations of hh:mm                                //
-//  - keep track of children                                                //
-//  ......................................................................  //
-//  Revision History:                                                       //
-//  03-26-96  Initial Version, Andy Hakim (ahakim at netscape.com)             //
-//  07-10-96  Modified for Directory Server, pkennedy at netscape.com			//
-//--------------------------------------------------------------------------//
-#include <windows.h>
-#include "ntwatchdog.h"
-#include "ntslapdmessages.h" // event log msgs constants //
-#include "cron_conf.h"
-
-static cron_conf_list *cclist   = NULL;
-
-
-//--------------------------------------------------------------------------//
-//                                                                          //
-//--------------------------------------------------------------------------//
-BOOL CRON_CheckDay(LPSYSTEMTIME lpstNow, char *szDays)
-{
-	BOOL bReturn = FALSE;
-	char szToday[16];
-	if(GetDateFormat((LCID)NULL, 0, lpstNow, "ddd", szToday, sizeof(szToday)) != 0)
-	{
-		strlwr(szDays);
-		strlwr(szToday);
-		if(strstr(szDays, szToday) != NULL)
-			bReturn = TRUE;
-	}
-	return(bReturn);
-}
-
-
-
-//--------------------------------------------------------------------------//
-//                                                                          //
-//--------------------------------------------------------------------------//
-BOOL CRON_CheckTime(LPSYSTEMTIME lpstNow, char *szTime)
-{
-	BOOL bReturn = FALSE;
-	char szCurrentTime[16];
-	char szStartTime[16];
-
-	strncpy(szStartTime, szTime, sizeof(szStartTime)-1);
-
-	if(szTime[1] == ':')
-		wsprintf(szStartTime, "0%s", szTime);
-
-	if(GetTimeFormat((LCID)LOCALE_SYSTEM_DEFAULT, TIME_FORCE24HOURFORMAT, lpstNow, "hh:mm", szCurrentTime, sizeof(szCurrentTime)) != 0)
-	{
-		if(strcmp(szCurrentTime, szStartTime) == 0)
-			bReturn = TRUE;
-	}
-	return(bReturn);
-}
-
-
-
-//--------------------------------------------------------------------------//
-//                                                                          //
-//--------------------------------------------------------------------------//
-BOOL CRON_StartJob(PROCESS_INFORMATION *pi, cron_conf_obj *cco)
-{
-	BOOL bReturn = FALSE;
-	STARTUPINFO sui;
-
-   sui.cb               = sizeof(STARTUPINFO);
-   sui.lpReserved       = 0;
-   sui.lpDesktop        = NULL;
-   sui.lpTitle          = NULL;
-   sui.dwX              = 0;
-   sui.dwY              = 0;
-   sui.dwXSize          = 0;
-   sui.dwYSize          = 0;
-   sui.dwXCountChars    = 0;
-   sui.dwYCountChars    = 0;
-   sui.dwFillAttribute  = 0;
-   sui.dwFlags          = STARTF_USESHOWWINDOW;
-   sui.wShowWindow      = SW_SHOWMINIMIZED;
-   sui.cbReserved2      = 0;
-   sui.lpReserved2      = 0;
-   sui.hStdInput 			= 0;
-   sui.hStdOutput 		= 0;
-   sui.hStdError 			= 0;
-	
-	bReturn = CreateProcess(NULL, cco->command, NULL, NULL,
-                   TRUE, 0, NULL, cco->dir, &sui, pi );
-	if(!bReturn)
-		WD_SysLog(EVENTLOG_ERROR_TYPE, MSG_CRON_STARTFAILED, cco->name);
-
-	return(bReturn);
-}
-
-
-//--------------------------------------------------------------------------//
-//                                                                          //
-//--------------------------------------------------------------------------//
-BOOL CRON_CheckConfFile()
-{
-	BOOL bReturn = FALSE;
-	PROCESS_INFORMATION pi;
-	SYSTEMTIME stNow;
-
-	GetLocalTime(&stNow); // note: this provides time adjusted for local time zone
-	
-	if(cron_conf_read())
-		cclist = cron_conf_get_list();
-
-	while((cclist) && (cclist->obj))
-	{
-		cron_conf_obj *cco = cclist->obj;
-	 	if((cco->days) && (cco->start_time) && (cco->command))
-		{
-			if(CRON_CheckDay(&stNow, cco->days) && CRON_CheckTime(&stNow, cco->start_time))
-			{
-				bReturn = CRON_StartJob(&pi, cco);
-            CLOSEHANDLE(pi.hProcess);
-            CLOSEHANDLE(pi.hThread);
-			}
-		}
-		cclist = cclist->next;
-	}
-	cron_conf_free();
-	return bReturn;
-}
-
-
-
-//--------------------------------------------------------------------------//
-//                                                                          //
-//--------------------------------------------------------------------------//
-LPTHREAD_START_ROUTINE CRON_ThreadProc(HANDLE hevWatchDogExit)
-{
-	BOOL bExit = FALSE;
-	while(!bExit)
-	{
-		CRON_CheckConfFile();
-		if(WaitForSingleObject(hevWatchDogExit, 1000*DEFAULT_CRON_TIME) != WAIT_TIMEOUT)
-			bExit = TRUE;
-	}
-	return 0;
-}
diff --git a/ldap/servers/slapd/ntwdog/ntwatchdog.c b/ldap/servers/slapd/ntwdog/ntwatchdog.c
deleted file mode 100644
index b607c3e..0000000
--- a/ldap/servers/slapd/ntwdog/ntwatchdog.c
+++ /dev/null
@@ -1,1194 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-#pragma warning(disable : 4001) 
-// disable warning C4001: nonstandard extension 'single line comment' was used
-
-//                                                                          //
-//  Name: NTWATCHDOG                                                        //
-//	 Platforms: WIN32                                                       //
-//  Description: shell for nt directory server, runs as service, launches   //
-//               server, monitors it, re-launches if server crashes,        //
-//  Notes:                                                                  //
-//  ......................................................................  //
-//  Watchdog can be run as an application or a service.  When run as a      //
-//  service, it uses the service name from the SCM for the server name.     //
-//  When run as an application, it uses the command line to determine       //
-//  the server name.  The command line can be one of two formats:           //
-//  c:\navgold\server\slapd-kennedy\config                                  //
-//    or                                                                    //
-//  slapd-kennedy	                                                        //
-//  ......................................................................  //
-//  server file "lib\base\servssl.c" was changed                            //
-//  - added code to get password from WatchDog process                      //
-//  ......................................................................  //
-//  server file "httpd\src\ntmain.c" was changed                            //
-//  - server always runs as an application                                  //
-//  - changed hServerDoneEvent global name to "NS_service_name"             //
-//    this was necessary so that WatchDog can trap the "service_name" event //
-//  - above changes were also made in MultipleInstances()                   //
-//  ......................................................................  //
-//  server file "lib\libmessages\messages.mc" was changed                   //
-//  - added a couple of extra messages for watchdog event logging           //
-//  - watchdog is dependent on the server's eventlog source name            //
-//  ......................................................................  //
-//  Revision History:                                                       //
-//  01-12-96  Initial Version, Andy Hakim (ahakim at netscape.com)             //
-//  02-01-96  changed restart logic, now based on infant mortality time     //
-//            instead of server exit code                                   //
-//  07-10-96  Modified for Directory Server, pkennedy at netscape.com			//
-//                                                                          //
-//--------------------------------------------------------------------------//
-#include <windows.h>
-#include <stdio.h>
-#include <string.h>
-#include <process.h>
-#include "ntslapdmessages.h"           // event log msgs constants //
-#include "regparms.h"                // product name, etc //
-#include "ntwatchdog.h"
-#include "version.h"
-#include "ntresource.h"
-#include "proto-ntutil.h"
-
-#ifdef PUMPKIN_HOUR
-#include <time.h>
-#endif
-
-//--------------------------------------------------------------------------//
-// global variables 																			 //
-//--------------------------------------------------------------------------//
-SERVICE_STATUS_HANDLE gsshServiceStatus = 0L;
-HWND ghWndMain = NULL;
-HANDLE ghevWatchDogExit = NULL;
-HINSTANCE ghInstance = NULL;
-HANDLE ghdlgPassword = NULL;      // handle to password dialog window
-HANDLE ghDuplicateProcess = NULL; // process handle with PROCESS_VM_READ access
-HANDLE ghServerProcess = NULL;    // used by app window in TerminateProcess()
-HANDLE ghServerThread0 = NULL;    // used by app window in Suspend/ResumeThread()
-HANDLE ghWdogProcess = NULL;
-char gszServerConfig[MAX_LINE];   // ex: c:\netscape\server\slapd-kennedy\config
-char gszServerName[MAX_LINE];     // ex: slapd-kennedy
-char gszServerRoot[MAX_LINE];     // ex: c:\netscape\server
-char gszPassword[2048];
-DWORD gdwServiceError = NO_ERROR; // return error code for service
-DWORD gdwLastStatus = SERVICE_RUNNING;
-
-//--------------------------------------------------------------------------//
-// This is the shutdown handler we register via SetConsoleCtrlHandler()
-// It is really the only guaranteed means we have of shutting down gracefully
-// when the sytem is shutting down.  The Service Manager mechanism is not
-// guaranteed to work.
-//--------------------------------------------------------------------------//
-
-BOOL WINAPI WD_ControlHandler(DWORD dwCtrlType)
-{
-    if (dwCtrlType == CTRL_SHUTDOWN_EVENT) {
-		SetEvent(ghevWatchDogExit);
-		WaitForSingleObject(ghWdogProcess, 1000 * DEFAULT_KILL_TIME);
-        return TRUE;
-    }
-    return FALSE;
-}    
-
-
-//--------------------------------------------------------------------------//
-// calc szServerRoot given szServerName                                     //
-//--------------------------------------------------------------------------//
-BOOL WD_GetServerConfig(char *szServerId, char *szServerRoot, LPDWORD cbServerRoot)
-{
-	BOOL bReturn = FALSE;
-	HANDLE hSlapdKey = 0;
-	char szSlapdKey[MAX_PATH];
-	DWORD dwValueType;
-	DWORD dwResult = 0;
-
-	// don't want to monitor Admin server
-	if(strcmp(ADM_KEY_ROOT, szServerId) == 0)
-		return(bReturn);
-
-	// query registry key to figure out config directory
-    _snprintf(szSlapdKey, sizeof(szSlapdKey), "%s\\%s\\%s", KEY_SOFTWARE_NETSCAPE, SVR_KEY_ROOT,
-        szServerId);
-	szSlapdKey[sizeof(szSlapdKey)-1] = (char)0;
-
-	dwResult = RegOpenKey(HKEY_LOCAL_MACHINE, szSlapdKey, &hSlapdKey);
-	if(dwResult == ERROR_SUCCESS) 
-	{
-	 	dwResult = RegQueryValueEx(hSlapdKey, VALUE_CONFIG_PATH, NULL, 
-			&dwValueType, (LPBYTE)szServerRoot, cbServerRoot);
-		if(dwResult == ERROR_SUCCESS)
-			bReturn = TRUE;
-		RegCloseKey(hSlapdKey);
-	}
-	return(bReturn);
-}
-
-
-
-//--------------------------------------------------------------------------//
-// get server's id based on index value that corresponds to the order in    //
-// which it is listed under the the registry \SOFTWARE\Netscape\..          //
-//--------------------------------------------------------------------------//
-BOOL WD_GetServerId(IN DWORD dwSubKey, OUT char *szServerId, IN OUT LPDWORD cbServerId)
-{
-	BOOL bReturn = FALSE;
-	static HANDLE hSlapdKey = 0;
-	DWORD dwResult = ERROR_SUCCESS;
-	FILETIME ftLastWrite;
-	char szSlapdKey[MAX_LINE];
-
-	if(dwSubKey == 0) {
-    	_snprintf(szSlapdKey, sizeof(szSlapdKey), "%s\\%s", KEY_SOFTWARE_NETSCAPE, SVR_KEY_ROOT);
-		szSlapdKey[sizeof(szSlapdKey)-1] = (char)0;
-		dwResult = RegOpenKey(HKEY_LOCAL_MACHINE, szSlapdKey, 
-			&hSlapdKey);
-	}
-
-	if(dwResult == ERROR_SUCCESS)
-	{
-		dwResult = RegEnumKeyEx(hSlapdKey, dwSubKey, szServerId, 
-			cbServerId, NULL, NULL, NULL, &ftLastWrite);
-		if(dwResult == ERROR_SUCCESS)
-		{
-			bReturn = TRUE;
-		}
-		else
-		{
-			RegCloseKey(hSlapdKey);
-			hSlapdKey = 0;
-		}
-	}
-	return(bReturn);
-}
-
-
-
-//--------------------------------------------------------------------------//
-//                                                                          //
-//--------------------------------------------------------------------------//
-BOOL WD_IsServiceRunning(char *szServerId)
-{
-   BOOL bReturn = FALSE;
-   SC_HANDLE hscManager;
-   SC_HANDLE hscService;
-   SERVICE_STATUS ssServiceStatus;
-
-   if(hscManager = OpenSCManager(NULL, NULL, GENERIC_READ))
-   {
-      if(hscService = OpenService(hscManager, szServerId, SERVICE_QUERY_STATUS))
-      {
-         if(QueryServiceStatus(hscService, &ssServiceStatus))
-         {
-            if(ssServiceStatus.dwCurrentState != SERVICE_STOPPED)
-            {
-               bReturn = TRUE;
-            }
-         }
-         CloseServiceHandle(hscService);
-      }
-      CloseServiceHandle(hscManager);
-   }
-	return(bReturn);
-}
-
-
-
-
-
-//--------------------------------------------------------------------------//
-// get a list of installed servers                                          //
-//--------------------------------------------------------------------------//
-int WD_GetRunningServerCount(void)
-{
-	int nServerCount = 0;
-	int nEnumIndex = 0;
-	char szServerId[MAX_PATH];
-	DWORD cbServerId = sizeof(szServerId);
-	char szServerRoot[MAX_PATH];
-	DWORD cbServerRoot = sizeof(szServerRoot);
-
-	while(WD_GetServerId(nEnumIndex++, szServerId, &cbServerId))
-	{
-		cbServerId = sizeof(szServerId);
-		// we have an entry that MIGHT be a server, but check to see if it really is one
-		if(WD_GetServerConfig(szServerId, szServerRoot, &cbServerRoot))
-      {
-         if(WD_IsServiceRunning(szServerId))
-			   nServerCount++;
-      }
-		cbServerRoot = sizeof(szServerRoot);
-	}
-
-	return(nServerCount);
-}
-
-
-
-//--------------------------------------------------------------------------//
-//                                                                          //
-//--------------------------------------------------------------------------//
-DWORD WD_GetDefaultKeyValue(char *szServerName, char *szKeyName, DWORD dwDefault)
-{
-	HANDLE hSlapdKey = 0;
-	char szSlapdKey[MAX_LINE];
-	DWORD dwValueType;
-	DWORD dwValue = dwDefault;
-	DWORD cbValue = sizeof(dwValue);
-
-	// query registry key to figure out config directory
-    _snprintf(szSlapdKey, sizeof(szSlapdKey), "%s\\%s\\%s", KEY_SOFTWARE_NETSCAPE, SVR_KEY_ROOT,
-        szServerName);
-	szSlapdKey[sizeof(szSlapdKey)-1] = (char)0;
-	if(RegOpenKey(HKEY_LOCAL_MACHINE, szSlapdKey, &hSlapdKey) == ERROR_SUCCESS)
-	{
-	 	RegQueryValueEx(hSlapdKey, szKeyName, NULL, &dwValueType, 
-			(LPBYTE)&dwValue, &cbValue);
-		RegCloseKey(hSlapdKey);
-	}
-
-	return(dwValue);
-}
-
-
-//--------------------------------------------------------------------------//
-// figure out if we are running under Windows NT                            //
-//--------------------------------------------------------------------------//
-BOOL WD_IsWindowsNT(void)
-{
-	BOOL bReturn = FALSE;
-	OSVERSIONINFO osVersionInfo;
-
-	osVersionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
-	if(GetVersionEx(&osVersionInfo))
-	{
-		bReturn = (osVersionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT);
-	}
-	return(bReturn);
-}
-
-
-
-//--------------------------------------------------------------------------//
-// figure out if we have enough physical memory to operate server           //
-//--------------------------------------------------------------------------//
-BOOL WD_IsEnoughResources(void)
-{
-   BOOL bReturn = TRUE;
-   MEMORYSTATUS ms;
-   DWORD dwMinRamFree = 0;
-   DWORD dwMinRamTotal = DEFAULT_MINRAMTOTAL;
-   DWORD dwMinRamPerServer = DEFAULT_MINRAMPERSERVER;
-
-   dwMinRamFree = WD_GetDefaultKeyValue(gszServerName, MINRAMFREE_KEY, DEFAULT_MINRAMFREE);
-   dwMinRamTotal = WD_GetDefaultKeyValue(gszServerName, MINRAMTOTAL_KEY, DEFAULT_MINRAMTOTAL);
-   dwMinRamPerServer = WD_GetDefaultKeyValue(gszServerName, MINRAMPERSERVER_KEY, DEFAULT_MINRAMPERSERVER);
-
-   ZeroMemory((PVOID)&ms, sizeof(ms));
-   GlobalMemoryStatus(&ms);
-
-   if((ms.dwTotalPhys < (dwMinRamTotal * 1024)) || (ms.dwAvailPhys < (dwMinRamFree * 1024)))
-      bReturn = FALSE;
-
-   if(ms.dwTotalPhys < (WD_GetRunningServerCount() * dwMinRamPerServer * 1024))
-      bReturn = FALSE;
-
-   return(bReturn);
-}
-
-
-
-//--------------------------------------------------------------------------//
-// write error to EventLog service                                          //
-//--------------------------------------------------------------------------//
-BOOL WD_SysLog(WORD fwEventType, DWORD IDEvent, char *szData)
-{
-	BOOL bReturn = FALSE;
-	HANDLE hEventSource;
-	WORD     fwCategory = 0;	        // event category 
-	PSID     pUserSid = NULL;	        // user security identifier (optional) 
-	WORD     cStrings = 1;	            // number of strings to merge with message  
-	DWORD    cbData = 0;	            // size of binary data, in bytes
-	LPCTSTR  lpszStrings[64];	        // array of strings to merge with message 
-	LPVOID   lpvData = 0; 	            // address of binary data 
-
-	hEventSource = RegisterEventSource(NULL, TEXT(EVENTLOG_APPNAME));
-	if(	hEventSource != NULL)
-	{
-		lpszStrings[0] = (LPCTSTR)gszServerName;
-		if(szData != NULL)
-		{
-      		lpszStrings[1] = (LPCTSTR)szData;
-			cStrings++;
-		}
-		
-		bReturn = ReportEvent(hEventSource,	fwEventType, fwCategory,
-                  IDEvent, pUserSid, cStrings, cbData,
-                  lpszStrings, lpvData);
-		DeregisterEventSource(hEventSource);
-   }
-
-   return(bReturn);
-}
-
-
-
-//--------------------------------------------------------------------------//
-// converts '/' chars to '\'                                                //
-//--------------------------------------------------------------------------//
-void WD_UnixToDosPath(char *szText)
-{
-	if(szText)
-   {
-   	while(*szText)
-   	{
-   		if(*szText == '/')
-   	
-			*szText = '\\';
-   		szText++;
-   	}
-   }
-}
-
-
-
-//--------------------------------------------------------------------------//
-// calc szServerRoot given szServerConfig, and store szServerRoot in        //
-// SLAPD_ROOT environment variable.                                      //
-//--------------------------------------------------------------------------//
-BOOL WD_GetServerRoot(char *szServerRoot, char *szServerConfig)
-{
-	char szTemp[MAX_LINE], szServerRootEnvVar[MAX_LINE];
-	BOOL bReturn = FALSE;
-	char *szChar = NULL;
-
-	strncpy(szTemp, szServerConfig, sizeof(szTemp));
-	szTemp[sizeof(szTemp)-1] = (char)0;
-	// szTemp should be something like c:\navgold\server\slapd-kennedy\config
-	if(szChar = strrchr(szTemp,'\\'))
-	{
-		*szChar = 0;
-	   // szTemp should be c:\navgold\server\slapd-kennedy
-		if(szChar = strrchr(szTemp, '\\'))
-		{
-			*szChar = 0;
-		   // szTemp should be c:\navgold\server
-			strncpy( szServerRoot, szTemp, sizeof(gszServerRoot) );
-			szServerRoot[sizeof(gszServerRoot)-1] = (char)0;
-			wsprintf(szServerRootEnvVar, "%s=%s", SLAPD_ROOT, szTemp);
-			putenv(szServerRootEnvVar);
-			bReturn = TRUE;
-		}
-	}
-	return(bReturn);
-}
-
-
-
-//--------------------------------------------------------------------------//
-// calc szServerConfig given szServerName                                    //
-//--------------------------------------------------------------------------//
-BOOL WD_GetConfigFromRegistry(char *szServerConfig, char *szServerName)
-{
-	BOOL bReturn = FALSE;
-	HANDLE hSlapdKey = 0;
-	char szSlapdKey[MAX_LINE];
-	DWORD dwValueType;
-	char szValueString[MAX_LINE];
-	DWORD cbValueString = sizeof(szValueString);
-	DWORD dwResult = 0;
-
-	// query registry key to figure out config directory
-    _snprintf(szSlapdKey, sizeof(szSlapdKey), "%s\\%s\\%s", KEY_SOFTWARE_NETSCAPE, SVR_KEY_ROOT,
-        szServerName);
-	szSlapdKey[sizeof(szSlapdKey)-1] = (char)0;
-
-	dwResult = RegOpenKey(HKEY_LOCAL_MACHINE, szSlapdKey, &hSlapdKey);
-	if(dwResult != ERROR_SUCCESS) 
-	{
-		WD_SysLog(EVENTLOG_ERROR_TYPE, MSG_WD_REGISTRY, szSlapdKey);
-		return(bReturn);
-	}
-
- 	dwResult = RegQueryValueEx(hSlapdKey, VALUE_CONFIG_PATH, NULL, 
-				&dwValueType, szValueString, &cbValueString);
-	if(dwResult != ERROR_SUCCESS)
-	{
-		WD_SysLog(EVENTLOG_ERROR_TYPE, MSG_WD_REGISTRY, szSlapdKey);
-	} 
-	else
-	{
-		strncpy(szServerConfig, szValueString, sizeof(gszServerConfig));
-		szServerConfig[sizeof(gszServerConfig)-1] = (char)0;
-		WD_UnixToDosPath(szServerConfig);
-		WD_GetServerRoot(gszServerRoot, szServerConfig);
-		bReturn = TRUE;
-	}
-	RegCloseKey(hSlapdKey);
-	return(bReturn);
-}
-
-
-//--------------------------------------------------------------------------//
-// calc szServerConfig and szServerName given szCmdLine                      //
-//--------------------------------------------------------------------------//
-BOOL WD_GetConfigFromCmdline(char *szServerConfig, char *szServerName, char *szCmdLine)
-{
-	BOOL bReturn = FALSE;
-	char *szChar = NULL;
-
-	if(!szCmdLine || !(strcmp(szCmdLine, "")) ) 
-	{
-		WD_SysLog(EVENTLOG_ERROR_TYPE, MSG_WD_BADCMDLINE, szCmdLine);
-		return(bReturn);
-	}
-
-	strncpy(szServerConfig, szCmdLine, sizeof(gszServerConfig));
-	szServerConfig[sizeof(gszServerConfig)-1] = (char)0;
-	WD_UnixToDosPath(szCmdLine);
-	WD_GetServerRoot(gszServerRoot, szCmdLine);
-
-	// szCmdLine should be something like c:\navgold\server\slapd-kennedy\config
-	if(szChar = strrchr(szCmdLine, '\\'))
-	{
-		*szChar = 0;
-	   // szCmdLine should be c:\navgold\server\slapd-kennedy
-		if(szChar = strrchr(szCmdLine, '\\'))
-		{
-			szChar++;
-		   // szChar should point to slapd-kennedy
-			strncpy(szServerName, szChar, sizeof(gszServerName));
-			szServerName[sizeof(gszServerName)-1] = (char)0;
-			WD_GetConfigFromRegistry(szServerConfig, szServerName);
-			bReturn = TRUE;
-
-		}
-	}
-	else
-	{
-		// szCmdLine should be something like slapd-kennedy
-		strncpy(szServerName, szCmdLine, sizeof(gszServerName));
-		szServerName[sizeof(gszServerName)-1] = (char)0;
-		bReturn = WD_GetConfigFromRegistry(szServerConfig, szServerName);
-	}
-
-	if(strlen(szServerName) == 0)
-	{
-		WD_SysLog(EVENTLOG_ERROR_TYPE, MSG_WD_BADCMDLINE, szCmdLine);
-		bReturn = FALSE;
-	}
-
-	return(bReturn);
-}
-
-
-
-//--------------------------------------------------------------------------//
-// parse server config file to see if it security is enabled                //
-//--------------------------------------------------------------------------//
-BOOL WD_IsServerSecure(void)
-{
-	BOOL bReturn = FALSE;
-	char szFileName[MAX_PATH];
-	char szText[MAX_LINE];
-	char szSeperators[] = " \t\n";
-	char *szTemp;
-	FILE *fh = NULL;
-	
-	_snprintf(szFileName, sizeof(szFileName), "%s\\%s", gszServerConfig, SLAPD_CONF);
-	szFileName[sizeof(szFileName)-1] = (char)0;
-	if(fh = fopen(szFileName, "r"))
-	{
-		while(!feof(fh))
-		{
-			if(fgets(szText, sizeof(szText), fh))
-			{
-				strlwr(szText);
-
-				/* strtok() is not MT safe on Unix , but it is okay to call 
-				   here because this file is NT only and strtok() is MT safe on NT */
-
-				if(szTemp = strtok(szText, szSeperators))
-				{
-					if(strcmp(szTemp, "security") == 0)
-					{
-						if(szTemp = strtok(NULL, szSeperators))
-						{
-							if(strcmp(szTemp, "on") == 0)
-								bReturn = TRUE;
-						}
-						break;
-					}
-				}
-			}
-		}
-		fclose(fh);
-	}
-
-	return(bReturn);
-}
-
-//--------------------------------------------------------------------------//
-// message proc window for app window                                       //
-//--------------------------------------------------------------------------//
-LONG APIENTRY WD_MainWndProc(HWND hWnd, UINT message, UINT wParam, LONG lParam)
-{
-   switch(message) 
-   {
-      case WM_CREATE:
-         break;
-
-      case WM_CLOSE:
-			SetEvent(ghevWatchDogExit);
-         break;
-
-		case WM_COMMAND:
-		{
-			switch(LOWORD(wParam))
-			{
-				case ID_SERVER_SHUTDOWN:
-				{
-					HANDLE hevShutdown = NULL;
-					char szShutdownEvent[MAX_LINE];
-
-					// shutdown web server, it should exit with 0, WatchDog won't restart it
-					_snprintf(szShutdownEvent, sizeof(szShutdownEvent), "NS_%s", gszServerName);
-					szShutdownEvent[sizeof(szShutdownEvent)-1] = (char)0;
-					hevShutdown = OpenEvent(EVENT_MODIFY_STATE, FALSE, szShutdownEvent);
-					if(hevShutdown)
-					{
-						SetEvent(hevShutdown);  // try to exit gracefully
-						CLOSEHANDLE(hevShutdown);
-					}
-					break;
-				}
-
-				case ID_SERVER_RESTART:
-				{
-					// shutdown web server, it should exit with 2, WatchDog will restart it
-					if(ghServerProcess)
-					{
-						CLOSEHANDLE(ghServerProcess);
-						TerminateProcess(ghServerProcess, 2);
-					}
-					break;
-				}
-
-				case ID_SERVER_SUSPEND:
-				{
-					if(ghServerThread0)
-						SuspendThread(ghServerThread0);
-					break;
-				}
-				
-				case ID_SERVER_RESUME:
-				{
-					if(ghServerThread0)
-						ResumeThread(ghServerThread0);
-					break;
-				}
-				
-				case ID_FILE_EXIT:
-					PostMessage(hWnd, WM_CLOSE, 0, 0);
-					break;
-			}
-			break;
-		}
-
-      default:
-         return(DefWindowProc(hWnd, message, wParam, lParam));
-   }
-   return(0);
-}
-
-
-
-//--------------------------------------------------------------------------//
-// This window serves as an IPC method with the server process.  It has     //
-// pointers in it's storage area that the server uses to access the SSL     //
-// password.  Quite strange, but it works perfectly well.                   //
-//--------------------------------------------------------------------------//
-HWND WD_CreateWindow()
-{
-	HWND hWndMain = NULL;
-	WNDCLASS  wc;
-
-	wc.style = 0;
-	wc.lpfnWndProc = (WNDPROC)WD_MainWndProc;
-	wc.cbClsExtra = 0;
-	wc.cbWndExtra = sizeof(LONG) * 4;
-	wc.hIcon = LoadIcon(ghInstance, MAKEINTRESOURCE(IDI_LOGO));
-	wc.hInstance = ghInstance;
-	wc.hCursor = LoadCursor(NULL, IDC_ARROW);
-    wc.hbrBackground = GetStockObject(GRAY_BRUSH);
-    wc.lpszMenuName =  MAKEINTRESOURCE(IDR_MENU);
-    wc.lpszClassName = "slapd";
-
-   RegisterClass(&wc);  // class may be registered if more than one instance
-
-   hWndMain = CreateWindow(
-        wc.lpszClassName,               /* See RegisterClass() call.          */
-        gszServerName,                  /* Text for window title bar.         */
-        WS_OVERLAPPEDWINDOW |           /* Window style.                      */
-         WS_POPUP,                      /* Window style.                      */
-        CW_USEDEFAULT,                  /* Default horizontal position.       */
-        CW_USEDEFAULT,                  /* Default vertical position.         */
-        320,                            /* Default width.                     */
-        0,                              /* Default height.                    */
-        NULL,                           /* Overlapped windows have no parent. */
-        NULL,                           /* Use the window class menu.         */
-        ghInstance,                     /* This instance owns this window.    */
-        NULL                            /* Pointer not needed.                */
-    );
-
-	if(hWndMain)
-	{
-#ifdef SHOW_DEBUG_WINDOW
-		ShowWindow(hWndMain, SW_SHOWDEFAULT);
-#else
-		ShowWindow(hWndMain, SW_HIDE);
-#endif
-		UpdateWindow(hWndMain);
-	}
-	return hWndMain;
-}
-
-
-
-//--------------------------------------------------------------------------//
-//                                                                          //
-//--------------------------------------------------------------------------//
-void WD_WindowThreadProc(LPDWORD lpdwParam)
-{
-   HANDLE hevWindowCreated = (HANDLE)lpdwParam;
-   MSG msg;
-
-	// the ghWndMain global is used all over the place
-	ghWndMain = WD_CreateWindow();
-	
-	// inform parent that window creation is complete because it is waiting on us
-	SetEvent(hevWindowCreated);
-
-   if(ghWndMain)
-	{
-	   while(GetMessage(&msg, ghWndMain, 0, 0) == TRUE)
-	   {
-	      TranslateMessage(&msg);		// Translates virtual key codes
-	      DispatchMessage(&msg);		// Dispatches message to window
-	   }
-	}
-}
-
-
-
-//--------------------------------------------------------------------------//
-//                                                                          //
-//--------------------------------------------------------------------------//
-void WD_PasswordThreadProc(LPDWORD lpdwParam)
-{
-	// app window must be created sometime during initialization
-	if(ghWndMain)
-	{
-      	ZeroMemory(gszPassword, sizeof(gszPassword));
-	SetWindowLong(ghWndMain, GWL_PASSWORD_ADDR, (LONG)gszPassword);
-	SetWindowLong(ghWndMain, GWL_PASSWORD_LENGTH, (LONG)0);
-	}
-}
-
-
-
-//--------------------------------------------------------------------------//
-//                                                                          //
-//--------------------------------------------------------------------------//
-BOOL WD_StartServer(PROCESS_INFORMATION *pi)
-{
-	BOOL bReturn = FALSE;
-	char szCmdLine[MAX_LINE];
-	char szServerPath[MAX_PATH];
-	char szInstancePath [MAX_PATH];
-	char *szChar;
-	STARTUPINFO sui;
-    DWORD fdwCreate = DETACHED_PROCESS;  /* flags for CreateProcess */
-    int i;
-    char *posfile;
-    UNALIGNED long *posfhnd;
-    
-	if(!WD_IsEnoughResources())
-    {
-	    WD_SysLog(EVENTLOG_ERROR_TYPE, MSG_WD_STRING, MSG_RESOURCES);
-       gdwServiceError = ERROR_SERVICE_NOT_ACTIVE;
-       return(FALSE);
-    }
-
-	strncpy(szServerPath, gszServerConfig, sizeof(szServerPath));
-	szServerPath[sizeof(szServerPath)-1] = (char)0;
-	WD_UnixToDosPath(szServerPath);
-
-	// szServerPath should now be something similar to
-	//		c:\navgold\server\slapd-kennedy\config
-	if(szChar = strrchr(szServerPath, '\\'))
-	{
-		*szChar = 0;
-		strncpy (szInstancePath, szServerPath, sizeof(szInstancePath));
-		szInstancePath[sizeof(szInstancePath)-1] = (char)0;
-		if(szChar = strrchr(szServerPath, '\\'))
-		{
-			*szChar = 0;
-		}
-	}
-
-	// For Directory Server, service-name is defined as slapd.exe, 
-	// in ldapserver/include/nt/regpargms.h
-	_snprintf( szCmdLine, sizeof(szCmdLine), "%s\\bin\\%s\\server\\%s -D \"%s\"", szServerPath, 
-			 PRODUCT_NAME, SERVICE_EXE, szInstancePath );
-	szCmdLine[sizeof(szCmdLine)-1] = (char)0;
-	// szCmdLine ex: c:\navgold\server\bin\slapd\slapd.exe 
-	//		-f c:\navgold\server\slapd-kennedy\config
-
-	memset(&sui,0,sizeof(sui));
-    sui.cb = sizeof(STARTUPINFO);
-
-	/* All of this, to CreateProcess(), allows us to run a console
-	   app (slapd.exe) from the service (ns-slapd.exe), without a 
-	   new console being opened for the app. 
-	   See dospawn.c in the crt src for more details.
-	   */
-    sui.cbReserved2 = (WORD)(sizeof( int ) + (3 *
-                              (sizeof( char ) + sizeof( long ))));
-
-    sui.lpReserved2 = calloc( sui.cbReserved2, 1 );
-
-    *((UNALIGNED int *)(sui.lpReserved2)) = 3;
-
-    posfile = (char *)(sui.lpReserved2 + sizeof( int ));
-
-    posfhnd = (UNALIGNED long *)(sui.lpReserved2 + sizeof( int ) +
-              (3 * sizeof( char )));
-
-	for ( i = 0,
-		  posfile = (char *)(sui.lpReserved2 + sizeof( int )),
-		  posfhnd = (UNALIGNED long *)(sui.lpReserved2 + sizeof( int )
-					+ (3 * sizeof( char ))) ;
-		  i < 3 ;
-		  i++, posfile++, posfhnd++ )
-	{
-		*posfile = 0;
-		*posfhnd = (long)INVALID_HANDLE_VALUE;
-	}
-
-	fdwCreate |= CREATE_SUSPENDED;
-	bReturn = CreateProcess(NULL, szCmdLine, NULL, NULL,
-                   TRUE, fdwCreate, NULL, NULL, &sui, pi );
-	if(bReturn)
-	{
-		ghServerProcess = pi->hProcess; // used by app window
-		ghServerThread0 = pi->hThread; // used by app window
-		if(DuplicateHandle(GetCurrentProcess(), GetCurrentProcess(), 
-			pi->hProcess, (LPHANDLE)&ghDuplicateProcess, 
-			(DWORD)PROCESS_VM_READ | PROCESS_VM_WRITE | 
-			PROCESS_ALL_ACCESS, FALSE, (DWORD)0))
-		{
-			SetWindowLong(ghWndMain, GWL_PROCESS_HANDLE, 
-					(LONG)ghDuplicateProcess);
-		}
-		ResumeThread(pi->hThread);
-	}
-	else
-	{
-		WD_SysLog(EVENTLOG_ERROR_TYPE, MSG_WD_STARTFAILED, szCmdLine);
-	}
-        
-	free( sui.lpReserved2 );
-
-	return(bReturn);
-}
-
-
-
-
-//------------------------------------------------------z--------------------//
-//                                                                          //
-//--------------------------------------------------------------------------//
-BOOL WD_CreatePasswordThread(void)
-{
-	#define NUM_WAIT_OBJECTS 2
-	enum { CHILD_PROCESS, EXIT_EVENT };
-
-	BOOL bReturn = FALSE;
-	HANDLE lphObject[NUM_WAIT_OBJECTS];
-	HANDLE hPasswordThread;
-	DWORD dwThreadID;
-	DWORD dwResult;
-
-	lphObject[EXIT_EVENT] = ghevWatchDogExit;
-
-    hPasswordThread = CreateThread((LPSECURITY_ATTRIBUTES)NULL, 0, 
-										(LPTHREAD_START_ROUTINE)WD_PasswordThreadProc, NULL, 0, &dwThreadID);
-	if(hPasswordThread)
-	{
-		lphObject[CHILD_PROCESS] = hPasswordThread;
-		dwResult = WaitForMultipleObjects(NUM_WAIT_OBJECTS, lphObject, FALSE, INFINITE);
-		CLOSEHANDLE(hPasswordThread);
-		if(dwResult == WAIT_OBJECT_0 + EXIT_EVENT) // user stopped service
-		{
-			EndDialog(ghdlgPassword, 1);
-		}
-		bReturn = TRUE;
-	}
-	else
-	{
-		WD_SysLog(EVENTLOG_ERROR_TYPE, MSG_WD_BADPASSWORD, NULL);
-	}
-	return(bReturn);
-}
-
-
-//--------------------------------------------------------------------------//
-//                                                                          //
-//--------------------------------------------------------------------------//
-BOOL WD_CreateWindowThread(void)
-{
-	BOOL bReturn = FALSE;
-	DWORD dwThreadID;
-	HANDLE hWindowThread;
-	HANDLE hevWindowCreated = NULL;
-
-	if(hevWindowCreated = CreateEvent(NULL, FALSE, FALSE, NULL))
-	{
-   	if(hWindowThread = CreateThread((LPSECURITY_ATTRIBUTES)NULL, 0, 
-								 (LPTHREAD_START_ROUTINE)WD_WindowThreadProc, (LPVOID)hevWindowCreated, 0, &dwThreadID))
-		{
-			// make sure ghHwndMain is created otherwise
-			// SetWindowLong(ghWndMain) will fail in other threads
-			WaitForSingleObject(hevWindowCreated, INFINITE);
-			CLOSEHANDLE(hWindowThread);
-			bReturn = TRUE;
-		}
-	}
-	return(bReturn);
-}
-
-
-
-//--------------------------------------------------------------------------//
-//                                                                          //
-//--------------------------------------------------------------------------//
-BOOL WD_CreateCronThread(HANDLE hevWatchDogExit)
-{
-	BOOL bReturn = FALSE;
-	DWORD dwThreadID = 0;
-	HANDLE hWindowThread = NULL;
-#if 0
-	if(hWindowThread = CreateThread((LPSECURITY_ATTRIBUTES)NULL, 0, 
-							 (LPTHREAD_START_ROUTINE)CRON_ThreadProc, (LPVOID)hevWatchDogExit, 0, &dwThreadID))
-	{
-		CLOSEHANDLE(hWindowThread);
-		bReturn = TRUE;
-	}
-#endif
-	return(bReturn);
-}
-
-
-//--------------------------------------------------------------------------//
-//                                                                          //
-//--------------------------------------------------------------------------//
-BOOL WD_MonitorServer(void)
-{
-	#define NUM_WAIT_OBJECTS 2
-	enum { SERVER_PROCESS, WATCHDOG_EXIT };
-
-	BOOL bReturn = FALSE;
-	HANDLE lphObject[NUM_WAIT_OBJECTS];
-	DWORD dwResult = 0;
-	DWORD dwExitCode = 0;
-	PROCESS_INFORMATION pi;
-	HANDLE hevServerDone = NULL;
-	char szServerDoneEvent[MAX_LINE];
-	char szText[MAX_LINE];
-	DWORD dwTickCount = 0;
-
-	lphObject[WATCHDOG_EXIT] = ghevWatchDogExit;
-
-	while(WD_StartServer(&pi))
-	{
-		dwTickCount = GetTickCount();
-		lphObject[SERVER_PROCESS] = pi.hProcess;
-		dwResult = WaitForMultipleObjects(NUM_WAIT_OBJECTS, lphObject, FALSE, INFINITE);
-
-      //WS_SendSNMPTrapSignal();
-
-		if(dwResult == WAIT_OBJECT_0 + WATCHDOG_EXIT)
-		{
-			// shutdown web server
-			//CLOSEHANDLE(pi.hProcess);  // XXXahakim close them after TerminateProcess()
-			//CLOSEHANDLE(pi.hThread);
-			_snprintf(szServerDoneEvent, sizeof(szServerDoneEvent), "NS_%s", gszServerName);
-			szServerDoneEvent[sizeof(szServerDoneEvent)-1] = (char)0;
-			hevServerDone = OpenEvent(EVENT_MODIFY_STATE, FALSE, szServerDoneEvent);
-			if(hevServerDone)
-			{
-				SetEvent(hevServerDone);  // try to exit gracefully
-				CLOSEHANDLE(hevServerDone);
-				WaitForSingleObject(lphObject[SERVER_PROCESS], 1000 * DEFAULT_KILL_TIME);
-			}
-			// but just in case it's still alive, swat it again, harder!
-			TerminateProcess(lphObject[SERVER_PROCESS], 1);
-			CLOSEHANDLE(pi.hProcess);  // XXXahakim moved from above 03/06/96
-			CLOSEHANDLE(pi.hThread);
-			bReturn = TRUE;
-		}
-		else
-		if(dwResult == WAIT_OBJECT_0 + SERVER_PROCESS)
-		{
-			// why did web server shutdown?
-			// GetExitCodeProcess(lphObject[SERVER_PROCESS], &dwExitCode);
-			// if(dwExitCode != 0)
-			// checking the exit code is bogus because a crashed process can return
-			// anything, including 0, so we use another method to determine if the
-			// server shutdown legitimately, which is similar to how unix works
-			// according to robm.
-
-			// check to see if a specified amount of time has elapsed since the server
-			// started.  If it's "infant mortality" don't bother restarting it
-			// because chances are it will continue to fail (such as when the password
-			// is bad, or if there is some other severe startup problem)
-			if(GetTickCount() - dwTickCount > 1000 * WD_GetDefaultKeyValue(gszServerName, MORTALITY_KEY, DEFAULT_MORTALITY_TIME))
-			{
-				sprintf(szText, "%d", dwExitCode);
-				WD_SysLog(EVENTLOG_ERROR_TYPE, MSG_WD_RESTART, szText);
-				CLOSEHANDLE(pi.hProcess);
-				CLOSEHANDLE(pi.hThread);
-				CLOSEHANDLE(ghDuplicateProcess);
-				Sleep(DEFAULT_RESTART_TIME * 1000);
-            continue;
-			}
-			// server closed legitimately
-			else  
-				bReturn = TRUE;
-		}
-		CLOSEHANDLE(pi.hProcess);
-		CLOSEHANDLE(pi.hThread);
-		CLOSEHANDLE(ghDuplicateProcess);
-		break;
-	}
-
-	return(bReturn);
-}
-
-
-
-//--------------------------------------------------------------------------//
-//                                                                          //
-//--------------------------------------------------------------------------//
-BOOL WD_SetServiceStatus(DWORD dwCurrentState, DWORD dwError)
-{
-	BOOL bReturn = FALSE;
-	SERVICE_STATUS ssStatus;
-
-	if(gsshServiceStatus)
-	{
-        gdwLastStatus = dwCurrentState;
-		ssStatus.dwServiceType = SERVICE_WIN32_OWN_PROCESS;
-		ssStatus.dwCurrentState = dwCurrentState;
-		ssStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP | 
-                                      SERVICE_ACCEPT_PAUSE_CONTINUE | 
-                                      SERVICE_ACCEPT_SHUTDOWN;
-		ssStatus.dwWin32ExitCode = dwError;
-		ssStatus.dwServiceSpecificExitCode = (NO_ERROR ? 0 : 1);
-		ssStatus.dwCheckPoint = 0;
-		ssStatus.dwWaitHint = (1000 * ((dwCurrentState==SERVICE_STOP_PENDING)?600:DEFAULT_KILL_TIME + 1));
-		bReturn = SetServiceStatus(gsshServiceStatus, &ssStatus);
-	}
-	return(FALSE);
-}
-
-
-
-//--------------------------------------------------------------------------//
-//                                                                          //
-//--------------------------------------------------------------------------//
-VOID WINAPI WD_ServiceHandler(DWORD fdwControl)
-{
-	switch(fdwControl)
-	{
-		case SERVICE_CONTROL_STOP:
-		case SERVICE_CONTROL_SHUTDOWN:
-			WD_SetServiceStatus(SERVICE_STOP_PENDING, gdwServiceError);
-			SetEvent(ghevWatchDogExit);
-			return;
-
-		case SERVICE_CONTROL_PAUSE:
-			if(ghServerThread0)
-			{
-				WD_SetServiceStatus(SERVICE_PAUSE_PENDING, gdwServiceError);
-				SuspendThread(ghServerThread0);
-				WD_SetServiceStatus(SERVICE_PAUSED, gdwServiceError);
-				return;
-			}
-			break;
-
-		case SERVICE_CONTROL_CONTINUE:
-			if(ghServerThread0)
-			{
-				WD_SetServiceStatus(SERVICE_CONTINUE_PENDING, gdwServiceError);
-				ResumeThread(ghServerThread0);
-				WD_SetServiceStatus(SERVICE_RUNNING, gdwServiceError);
-				return;
-			}
-			break;
-
-		case SERVICE_CONTROL_INTERROGATE:
-			WD_SetServiceStatus(gdwLastStatus, gdwServiceError);
-			return;
-            
-        default:
-			WD_SysLog(EVENTLOG_ERROR_TYPE, MSG_WD_RESTART, "unknown service event");
-            return;
-	}
-	WD_SetServiceStatus(SERVICE_RUNNING, gdwServiceError);
-}
-
-
-
-//--------------------------------------------------------------------------//
-//                                                                          //
-//--------------------------------------------------------------------------//
-VOID WD_ServiceMain(DWORD dwArgc, LPTSTR  *lpszArgv)
-{
-	BOOL bOkToProceed = TRUE;
-	// if SCM calls us lpszArgv will not be NULL
-	BOOL bIsService = (lpszArgv != NULL);
-
-    // register our custom control handler to handle shutdown
-    ghWdogProcess = GetCurrentProcess();
-    SetConsoleCtrlHandler(WD_ControlHandler, TRUE);
-    
-	if(bIsService)
-	{
-		gsshServiceStatus = RegisterServiceCtrlHandler(lpszArgv[0], 
-									(LPHANDLER_FUNCTION)WD_ServiceHandler);
-		bOkToProceed = (gsshServiceStatus != (SERVICE_STATUS_HANDLE)NULL);
-		if(bOkToProceed)
-		{
-			strncpy(gszServerName, lpszArgv[0], sizeof(gszServerName));
-			gszServerName[sizeof(gszServerName)-1] = (char)0;
-			bOkToProceed = WD_GetConfigFromRegistry(gszServerConfig, 
-								gszServerName);
-		}
-	}
-
-	WD_SetServiceStatus(SERVICE_START_PENDING, gdwServiceError);
-
-	if(bOkToProceed)
-	{
-		if(ghevWatchDogExit = CreateEvent(NULL, TRUE, FALSE, gszServerName))
-		{
-			WD_SetServiceStatus(SERVICE_RUNNING, gdwServiceError);
-			WD_CreateWindowThread();
-#if 0
-			WD_CreateCronThread(ghevWatchDogExit);
-#endif
-
-			if(WD_IsServerSecure())
-			{
-				bOkToProceed = WD_CreatePasswordThread();
-			}
-
-			if(bOkToProceed)
-			{
-				WD_MonitorServer();
-			}
-			CLOSEHANDLE(ghevWatchDogExit);
-		}
-	}
-	WD_SetServiceStatus(SERVICE_STOPPED, gdwServiceError);
-}
-
-
-
-//--------------------------------------------------------------------------//
-//                                                                          //
-//--------------------------------------------------------------------------//
-WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine,
-               int nCmdShow)
-{
-	SERVICE_TABLE_ENTRY steServiceTable[2];
-
-#ifdef PUMPKIN_HOUR
-    if(time(NULL) > (PUMPKIN_HOUR - 10)) 
-	{
-		char szMessage[256];
-		sprintf( szMessage, " ** This beta software has expired **\n");
-		MessageBox(GetDesktopWindow(), szMessage, 
-			DS_NAME_FULL_VERSION, MB_ICONEXCLAMATION | MB_OK);
-        exit(1);
-    }
-#endif
-
-	if(!hPrevInstance)						  // other instances of app running?
-	{                                
-		ghInstance = hInstance;
-		memset(gszPassword, 0, sizeof(gszPassword));
-		memset(gszServerConfig, 0, sizeof(gszServerConfig));
-		memset(gszServerName, 0, sizeof(gszServerName));
-		if(WD_IsWindowsNT() && (lpCmdLine) && (strlen(lpCmdLine) == 0))
-		{
-		   // run as service
-			steServiceTable[0].lpServiceName = TEXT(PRODUCT_NAME);
-			steServiceTable[0].lpServiceProc = 
-					(LPSERVICE_MAIN_FUNCTION)WD_ServiceMain;
-			steServiceTable[1].lpServiceName = NULL;
-			steServiceTable[1].lpServiceProc = NULL;
-			StartServiceCtrlDispatcher(steServiceTable);
-		}
-		else
-		{
-			// run as application 
-			if(WD_GetConfigFromCmdline(gszServerConfig, 
-				gszServerName, lpCmdLine))
-			{
-				WD_ServiceMain(0, (LPTSTR *)NULL);
-			}
-		}
-   }
-   return(FALSE);
-}
diff --git a/ldap/servers/slapd/snmp_collator.c b/ldap/servers/slapd/snmp_collator.c
index f40d867..05a3afc 100644
--- a/ldap/servers/slapd/snmp_collator.c
+++ b/ldap/servers/slapd/snmp_collator.c
@@ -69,7 +69,6 @@
 #define SNMP_NUM_SEM_WAITS 10
 
 #include "snmp_collator.h" 
-#include "../snmp/ntagt/nslagtcom_nt.h"
 
 /* stevross: safe to assume port should be at most 5 digits ? */
 #define PORT_LEN 5
diff --git a/ldap/servers/slapd/test-plugins/Makefile.WINNT b/ldap/servers/slapd/test-plugins/Makefile.WINNT
deleted file mode 100644
index 6dd08ec..0000000
--- a/ldap/servers/slapd/test-plugins/Makefile.WINNT
+++ /dev/null
@@ -1,77 +0,0 @@
-#
-# BEGIN COPYRIGHT BLOCK
-# This Program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; version 2 of the License.
-# 
-# This Program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-# 
-# You should have received a copy of the GNU General Public License along with
-# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place, Suite 330, Boston, MA 02111-1307 USA.
-# 
-# In addition, as a special exception, Red Hat, Inc. gives You the additional
-# right to link the code of this Program with code not covered under the GNU
-# General Public License ("Non-GPL Code") and to distribute linked combinations
-# including the two, subject to the limitations in this paragraph. Non-GPL Code
-# permitted under this exception must only link to the code of this Program
-# through those well defined interfaces identified in the file named EXCEPTION
-# found in the source code files (the "Approved Interfaces"). The files of
-# Non-GPL Code may instantiate templates or use macros or inline functions from
-# the Approved Interfaces without causing the resulting work to be covered by
-# the GNU General Public License. Only Red Hat, Inc. may make changes or
-# additions to the list of Approved Interfaces. You must obey the GNU General
-# Public License in all respects for all of the Program code and other code used
-# in conjunction with the Program except the Non-GPL Code covered by this
-# exception. If you modify this file, you may extend this exception to your
-# version of the file, but you are not obligated to do so. If you do not wish to
-# provide this exception without modification, you must delete this exception
-# statement from your version and license this file solely under the GPL without
-# exception. 
-# 
-# 
-# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-# Copyright (C) 2005 Red Hat, Inc.
-# All rights reserved.
-# END COPYRIGHT BLOCK
-#
-# Makefile for Directory Server plug-in
-#
-
-CC = cl
-LD = link
-
-
-TARGET=testplugin
-
-OBJS=testsaslbind.obj testextendedop.obj testpreop.obj testpostop.obj testentry.obj testbind.obj testgetip.obj testdatainterop.obj testdbinterop.obj
-
-
-INC = ../include
-CFLAGS = /nologo -I $(INC) /c
-LDFLAGS = /dll /nologo
-LIBS=/DEFAULTLIB:kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ../lib/libslapd.lib ../lib/libnspr4.lib ./lib/libdb42.lib
-
-
-all:						\
-	init					\
-	$(TARGET).dll
-
-init:
-	"c:\program files\microsoft visual studio\vc98\bin\vcvars32.bat"
-
-
-$(TARGET).dll: $(OBJS)
-	$(LD) $(LDFLAGS) /def:$(TARGET).def /out:$(TARGET).dll $(EXTRA_LIBS) $(LIBS) $(OBJS)
-	-rm -f $(OBJS2) *~
-
-%.obj:%.c
-	$(CC) $(CFLAGS) $<
-
-clean:
-	del -f $(OBJS) $(TARGET).dll *~
-
-
-
diff --git a/ldap/servers/slapd/test-plugins/Makefile.server b/ldap/servers/slapd/test-plugins/Makefile.server
index 3e1ab7f..69224e3 100644
--- a/ldap/servers/slapd/test-plugins/Makefile.server
+++ b/ldap/servers/slapd/test-plugins/Makefile.server
@@ -53,10 +53,6 @@ LIBDIR = $(LIB_RELDIR)
 include $(BUILD_ROOT)/nsconfig.mk
 include $(LDAP_SRC)/nsldap.mk
 
-ifeq ($(ARCH), WINNT)
-DEF_FILE:=./libdistrib.def
-endif
-
 CFLAGS+=$(SLCFLAGS)
 
 INCLUDES += -I$(LDAP_SRC)/servers/slapd -I$(DB_INCLUDE)
@@ -66,72 +62,26 @@ DIS_OBJS= \
 
 OBJS = $(addprefix $(OBJDEST)/, $(DIS_OBJS)) 
 
-ifeq ($(ARCH), WINNT)
-LIBDIS_DLL_OBJ = $(addprefix $(OBJDEST)/, dllmain.o)
-endif
-
 # The sample distribution plugin is not part of DS.
 # So we generate the shared library outside of $(LIBDIR)
 # so that it's not retrieved by the packaging makefiles.
 #LIBDIS =	$(addprefix $(LIBDIR)/, $(DIS_DLL).$(DLL_SUFFIX))
 LIBDIS =	$(addprefix $(OBJDEST)/, $(TEST_PLUGIN_DLL).$(DLL_SUFFIX))
 
-ifeq ($(ARCH), WINNT)
-EXTRA_LIBS_DEP += \
-	$(LIBSLAPD_DEP) \
-	$(LDAP_LIBUTIL_DEP) \
-	$(LDAP_COMMON_LIBS_DEP)
-EXTRA_LIBS_DEP += \
-	$(LDAPSDK_DEP) \
-	$(SECURITY_DEP)
-EXTRA_LIBS += \
-	$(LIBSLAPD) \
-	$(LDAP_SDK_LIBLDAP_DLL) \
-	$(LIBUTIL) \
-	$(NSPRLINK) \
-	$(LDAP_COMMON_LIBS)
-endif
-ifeq ($(ARCH), AIX)
-EXTRA_LIBS_DEP += \
-	$(LIBSLAPD_DEP) \
-	$(LDAP_LIBUTIL_DEP) \
-	$(LDAP_COMMON_LIBS_DEP)
-EXTRA_LIBS_DEP += \
-	$(LDAPSDK_DEP)
-EXTRA_LIBS += \
-	$(LIBSLAPDLINK) \
-	$(LDAP_SDK_LIBLDAP_DLL) \
-	$(LIBUTIL) \
-	$(NSPRLINK) \
-	$(LDAP_COMMON_LIBS)
-endif
-
 EXTRA_LIBS_DEP += $(LIBSLAPD_DEP) $(LDAPSDK_DEP) $(NSPR_DEP) $(DB_LIB_DEP)
 EXTRA_LIBS += $(DYN_NSHTTPD) $(ADMINUTIL_LINK) $(LDAPLINK) $(NSPRLINK) $(ICULINK) $(DB_LIB)
 
-ifeq ($(ARCH), WINNT)
-DLL_LDFLAGS += -def:"./libdistrib.def"
-CFLAGS+= /WX 
-endif # WINNT
-
-ifeq ($(ARCH), AIX)
-LD=ld
-endif
-
 clientSDK: 
 
 all:	$(OBJDEST) $(LIBDIR) $(LIBDIS)
 
-$(LIBDIS): $(OBJS) $(LIBDIS_DLL_OBJ) $(DEF_FILE)
-	$(LINK_DLL) $(LIBDIS_DLL_OBJ) $(EXTRA_LIBS) 
+$(LIBDIS): $(OBJS) $(LIBDIS_DLL_OBJ)
+	$(LINK_DLL) $(EXTRA_LIBS) 
 
 veryclean: clean
 
 clean:
 	$(RM) $(OBJS)
-ifeq ($(ARCH), WINNT)
-	$(RM) $(LIBDIS_DLL_OBJ)
-endif
 	$(RM) $(LIBDIS)
 
 $(OBJDEST):
diff --git a/ldap/servers/slapd/test-plugins/dllmain.c b/ldap/servers/slapd/test-plugins/dllmain.c
deleted file mode 100644
index d42d227..0000000
--- a/ldap/servers/slapd/test-plugins/dllmain.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-/*
- * Microsoft Windows specifics for sample plug-ins DLL
- */
-#include "ldap.h"
-#include "lber.h"
-#include <stdio.h>
-
-
-int CALLBACK
-LibMain( HINSTANCE hinst, WORD wDataSeg, WORD cbHeapSize, LPSTR lpszCmdLine )
-{
-		/*UnlockData( 0 );*/
-		return( 1 );
-}
-
-/* The 16-bit version of the RTL does not implement perror() */
-void perror( const char *msg )
-{
-		char buf[128];
-		wsprintf( buf, "%s: error %d\n", msg, WSAGetLastError()) ;
-		OutputDebugString( buf );
-}
-
-
diff --git a/ldap/servers/slapd/test-plugins/testplugin.def b/ldap/servers/slapd/test-plugins/testplugin.def
deleted file mode 100644
index f7dfb77..0000000
--- a/ldap/servers/slapd/test-plugins/testplugin.def
+++ /dev/null
@@ -1,48 +0,0 @@
-; BEGIN COPYRIGHT BLOCK
-; This Program is free software; you can redistribute it and/or modify it under
-; the terms of the GNU General Public License as published by the Free Software
-; Foundation; version 2 of the License.
-; 
-; This Program is distributed in the hope that it will be useful, but WITHOUT
-; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-; 
-; You should have received a copy of the GNU General Public License along with
-; this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-; Place, Suite 330, Boston, MA 02111-1307 USA.
-; 
-; In addition, as a special exception, Red Hat, Inc. gives You the additional
-; right to link the code of this Program with code not covered under the GNU
-; General Public License ("Non-GPL Code") and to distribute linked combinations
-; including the two, subject to the limitations in this paragraph. Non-GPL Code
-; permitted under this exception must only link to the code of this Program
-; through those well defined interfaces identified in the file named EXCEPTION
-; found in the source code files (the "Approved Interfaces"). The files of
-; Non-GPL Code may instantiate templates or use macros or inline functions from
-; the Approved Interfaces without causing the resulting work to be covered by
-; the GNU General Public License. Only Red Hat, Inc. may make changes or
-; additions to the list of Approved Interfaces. You must obey the GNU General
-; Public License in all respects for all of the Program code and other code used
-; in conjunction with the Program except the Non-GPL Code covered by this
-; exception. If you modify this file, you may extend this exception to your
-; version of the file, but you are not obligated to do so. If you do not wish to
-; provide this exception without modification, you must delete this exception
-; statement from your version and license this file solely under the GPL without
-; exception. 
-; 
-; 
-; Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-; Copyright (C) 2005 Red Hat, Inc.
-; All rights reserved.
-; END COPYRIGHT BLOCK
-;
-DESCRIPTION		'Dirsrv 1 test plugin'
-EXPORTS
-	testentry_scramble				@2
-	testentry_unscramble				@3
-	testexop_init					@4
-	testpostop_init					@5
-	testpreop_init					@6
-	testsasl_init					@7
-	testbind_init					@8
-	nullsuffix_init					@9
diff --git a/ldap/servers/slapd/test-plugins/testplugin.dsp b/ldap/servers/slapd/test-plugins/testplugin.dsp
deleted file mode 100644
index 5e14056..0000000
--- a/ldap/servers/slapd/test-plugins/testplugin.dsp
+++ /dev/null
@@ -1,175 +0,0 @@
-#
-# BEGIN COPYRIGHT BLOCK
-# This Program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; version 2 of the License.
-# 
-# This Program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-# 
-# You should have received a copy of the GNU General Public License along with
-# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place, Suite 330, Boston, MA 02111-1307 USA.
-# 
-# In addition, as a special exception, Red Hat, Inc. gives You the additional
-# right to link the code of this Program with code not covered under the GNU
-# General Public License ("Non-GPL Code") and to distribute linked combinations
-# including the two, subject to the limitations in this paragraph. Non-GPL Code
-# permitted under this exception must only link to the code of this Program
-# through those well defined interfaces identified in the file named EXCEPTION
-# found in the source code files (the "Approved Interfaces"). The files of
-# Non-GPL Code may instantiate templates or use macros or inline functions from
-# the Approved Interfaces without causing the resulting work to be covered by
-# the GNU General Public License. Only Red Hat, Inc. may make changes or
-# additions to the list of Approved Interfaces. You must obey the GNU General
-# Public License in all respects for all of the Program code and other code used
-# in conjunction with the Program except the Non-GPL Code covered by this
-# exception. If you modify this file, you may extend this exception to your
-# version of the file, but you are not obligated to do so. If you do not wish to
-# provide this exception without modification, you must delete this exception
-# statement from your version and license this file solely under the GPL without
-# exception. 
-# 
-# 
-# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-# Copyright (C) 2005 Red Hat, Inc.
-# All rights reserved.
-# END COPYRIGHT BLOCK
-#
-# Microsoft Developer Studio Project File - Name="testplugin" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=testplugin - Win32 Release
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "testplugin.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "testplugin.mak" CFG="testplugin - Win32 Release"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "testplugin - Win32 Release" (based on\
- "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "testplugin - Win32 Debug" (based on\
- "Win32 (x86) Dynamic-Link Library")
-!MESSAGE 
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "testplugin - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir ".\Release"
-# PROP BASE Intermediate_Dir ".\Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ".\Release"
-# PROP Intermediate_Dir ".\Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WIN32" /YX /FD /c
-# ADD BASE MTL /nologo /D "NDEBUG" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ..\lib\libslapd.lib /nologo /subsystem:windows /dll /machine:I386
-
-!ELSEIF  "$(CFG)" == "testplugin - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir ".\Debug"
-# PROP BASE Intermediate_Dir ".\Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ".\Debug"
-# PROP Intermediate_Dir ".\Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /MD /W3 /Gm /GX /Zi /Od /I "..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_WIN32" /YX /FD /c
-# ADD BASE MTL /nologo /D "_DEBUG" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ..\lib\libslapd.lib /nologo /subsystem:windows /dll /debug /machine:I386
-
-!ENDIF 
-
-# Begin Target
-
-# Name "testplugin - Win32 Release"
-# Name "testplugin - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
-# Begin Source File
-
-SOURCE=.\dllmain.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\testbind.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\testentry.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\testextendedop.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\testplugin.def
-# End Source File
-# Begin Source File
-
-SOURCE=.\testpostop.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\testpreop.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\testsaslbind.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/ldap/servers/slapd/test-plugins/testplugin.mak b/ldap/servers/slapd/test-plugins/testplugin.mak
deleted file mode 100644
index 6dda603..0000000
--- a/ldap/servers/slapd/test-plugins/testplugin.mak
+++ /dev/null
@@ -1,463 +0,0 @@
-#
-# BEGIN COPYRIGHT BLOCK
-# This Program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; version 2 of the License.
-# 
-# This Program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-# 
-# You should have received a copy of the GNU General Public License along with
-# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place, Suite 330, Boston, MA 02111-1307 USA.
-# 
-# In addition, as a special exception, Red Hat, Inc. gives You the additional
-# right to link the code of this Program with code not covered under the GNU
-# General Public License ("Non-GPL Code") and to distribute linked combinations
-# including the two, subject to the limitations in this paragraph. Non-GPL Code
-# permitted under this exception must only link to the code of this Program
-# through those well defined interfaces identified in the file named EXCEPTION
-# found in the source code files (the "Approved Interfaces"). The files of
-# Non-GPL Code may instantiate templates or use macros or inline functions from
-# the Approved Interfaces without causing the resulting work to be covered by
-# the GNU General Public License. Only Red Hat, Inc. may make changes or
-# additions to the list of Approved Interfaces. You must obey the GNU General
-# Public License in all respects for all of the Program code and other code used
-# in conjunction with the Program except the Non-GPL Code covered by this
-# exception. If you modify this file, you may extend this exception to your
-# version of the file, but you are not obligated to do so. If you do not wish to
-# provide this exception without modification, you must delete this exception
-# statement from your version and license this file solely under the GPL without
-# exception. 
-# 
-# 
-# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-# Copyright (C) 2005 Red Hat, Inc.
-# All rights reserved.
-# END COPYRIGHT BLOCK
-#
-# Microsoft Developer Studio Generated NMAKE File, Based on testplugin.dsp
-!IF "$(CFG)" == ""
-CFG=testplugin - Win32 Release
-!MESSAGE No configuration specified. Defaulting to testplugin - Win32 Release.
-!ENDIF 
-
-!IF "$(CFG)" != "testplugin - Win32 Release" && "$(CFG)" !=\
- "testplugin - Win32 Debug"
-!MESSAGE Invalid configuration "$(CFG)" specified.
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "testplugin.mak" CFG="testplugin - Win32 Release"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "testplugin - Win32 Release" (based on\
- "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "testplugin - Win32 Debug" (based on\
- "Win32 (x86) Dynamic-Link Library")
-!MESSAGE 
-!ERROR An invalid configuration is specified.
-!ENDIF 
-
-!IF "$(OS)" == "Windows_NT"
-NULL=
-!ELSE 
-NULL=nul
-!ENDIF 
-
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "testplugin - Win32 Release"
-
-OUTDIR=.\Release
-INTDIR=.\Release
-# Begin Custom Macros
-OutDir=.\.\Release
-# End Custom Macros
-
-!IF "$(RECURSE)" == "0" 
-
-ALL : "$(OUTDIR)\testplugin.dll"
-
-!ELSE 
-
-ALL : "$(OUTDIR)\testplugin.dll"
-
-!ENDIF 
-
-CLEAN :
-	- at erase "$(INTDIR)\dllmain.obj"
-	- at erase "$(INTDIR)\testbind.obj"
-	- at erase "$(INTDIR)\testentry.obj"
-	- at erase "$(INTDIR)\testextendedop.obj"
-	- at erase "$(INTDIR)\testpostop.obj"
-	- at erase "$(INTDIR)\testpreop.obj"
-	- at erase "$(INTDIR)\testsaslbind.obj"
-	- at erase "$(INTDIR)\vc50.idb"
-	- at erase "$(OUTDIR)\testplugin.dll"
-	- at erase "$(OUTDIR)\testplugin.exp"
-	- at erase "$(OUTDIR)\testplugin.lib"
-
-"$(OUTDIR)" :
-    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "..\include" /D "WIN32" /D "NDEBUG" /D\
- "_WINDOWS" /D "_WIN32" /Fp"$(INTDIR)\testplugin.pch" /YX /Fo"$(INTDIR)\\"\
- /Fd"$(INTDIR)\\" /FD /c 
-CPP_OBJS=.\Release/
-CPP_SBRS=.
-MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
-BSC32=bscmake.exe
-BSC32_FLAGS=/nologo /o"$(OUTDIR)\testplugin.bsc" 
-BSC32_SBRS= \
-	
-LINK32=link.exe
-LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
- advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\
- odbccp32.lib wsock32.lib ..\lib\libslapd.lib /nologo /subsystem:windows /dll\
- /incremental:no /pdb:"$(OUTDIR)\testplugin.pdb" /machine:I386\
- /def:".\testplugin.def" /out:"$(OUTDIR)\testplugin.dll"\
- /implib:"$(OUTDIR)\testplugin.lib" 
-DEF_FILE= \
-	".\testplugin.def"
-LINK32_OBJS= \
-	"$(INTDIR)\dllmain.obj" \
-	"$(INTDIR)\testbind.obj" \
-	"$(INTDIR)\testentry.obj" \
-	"$(INTDIR)\testextendedop.obj" \
-	"$(INTDIR)\testpostop.obj" \
-	"$(INTDIR)\testpreop.obj" \
-	"$(INTDIR)\testsaslbind.obj"
-
-"$(OUTDIR)\testplugin.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
-    $(LINK32) @<<
-  $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF  "$(CFG)" == "testplugin - Win32 Debug"
-
-OUTDIR=.\Debug
-INTDIR=.\Debug
-# Begin Custom Macros
-OutDir=.\.\Debug
-# End Custom Macros
-
-!IF "$(RECURSE)" == "0" 
-
-ALL : "$(OUTDIR)\testplugin.dll"
-
-!ELSE 
-
-ALL : "$(OUTDIR)\testplugin.dll"
-
-!ENDIF 
-
-CLEAN :
-	- at erase "$(INTDIR)\dllmain.obj"
-	- at erase "$(INTDIR)\testbind.obj"
-	- at erase "$(INTDIR)\testentry.obj"
-	- at erase "$(INTDIR)\testextendedop.obj"
-	- at erase "$(INTDIR)\testpostop.obj"
-	- at erase "$(INTDIR)\testpreop.obj"
-	- at erase "$(INTDIR)\testsaslbind.obj"
-	- at erase "$(INTDIR)\vc50.idb"
-	- at erase "$(INTDIR)\vc50.pdb"
-	- at erase "$(OUTDIR)\testplugin.dll"
-	- at erase "$(OUTDIR)\testplugin.exp"
-	- at erase "$(OUTDIR)\testplugin.ilk"
-	- at erase "$(OUTDIR)\testplugin.lib"
-	- at erase "$(OUTDIR)\testplugin.pdb"
-
-"$(OUTDIR)" :
-    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-CPP_PROJ=/nologo /MD /W3 /Gm /GX /Zi /Od /I "..\include" /D "WIN32" /D "_DEBUG"\
- /D "_WINDOWS" /D "_WIN32" /Fp"$(INTDIR)\testplugin.pch" /YX /Fo"$(INTDIR)\\"\
- /Fd"$(INTDIR)\\" /FD /c 
-CPP_OBJS=.\Debug/
-CPP_SBRS=.
-MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
-BSC32=bscmake.exe
-BSC32_FLAGS=/nologo /o"$(OUTDIR)\testplugin.bsc" 
-BSC32_SBRS= \
-	
-LINK32=link.exe
-LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
- advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\
- odbccp32.lib wsock32.lib ..\lib\libslapd.lib /nologo /subsystem:windows /dll\
- /incremental:yes /pdb:"$(OUTDIR)\testplugin.pdb" /debug /machine:I386\
- /def:".\testplugin.def" /out:"$(OUTDIR)\testplugin.dll"\
- /implib:"$(OUTDIR)\testplugin.lib" 
-DEF_FILE= \
-	".\testplugin.def"
-LINK32_OBJS= \
-	"$(INTDIR)\dllmain.obj" \
-	"$(INTDIR)\testbind.obj" \
-	"$(INTDIR)\testentry.obj" \
-	"$(INTDIR)\testextendedop.obj" \
-	"$(INTDIR)\testpostop.obj" \
-	"$(INTDIR)\testpreop.obj" \
-	"$(INTDIR)\testsaslbind.obj"
-
-"$(OUTDIR)\testplugin.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
-    $(LINK32) @<<
-  $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ENDIF 
-
-.c{$(CPP_OBJS)}.obj::
-   $(CPP) @<<
-   $(CPP_PROJ) $< 
-<<
-
-.cpp{$(CPP_OBJS)}.obj::
-   $(CPP) @<<
-   $(CPP_PROJ) $< 
-<<
-
-.cxx{$(CPP_OBJS)}.obj::
-   $(CPP) @<<
-   $(CPP_PROJ) $< 
-<<
-
-.c{$(CPP_SBRS)}.sbr::
-   $(CPP) @<<
-   $(CPP_PROJ) $< 
-<<
-
-.cpp{$(CPP_SBRS)}.sbr::
-   $(CPP) @<<
-   $(CPP_PROJ) $< 
-<<
-
-.cxx{$(CPP_SBRS)}.sbr::
-   $(CPP) @<<
-   $(CPP_PROJ) $< 
-<<
-
-
-!IF "$(CFG)" == "testplugin - Win32 Release" || "$(CFG)" ==\
- "testplugin - Win32 Debug"
-SOURCE=.\dllmain.c
-
-!IF  "$(CFG)" == "testplugin - Win32 Release"
-
-DEP_CPP_DLLMA=\
-	{$(INCLUDE)}"lber.h"\
-	{$(INCLUDE)}"ldap.h"\
-	
-
-"$(INTDIR)\dllmain.obj" : $(SOURCE) $(DEP_CPP_DLLMA) "$(INTDIR)"
-
-
-!ELSEIF  "$(CFG)" == "testplugin - Win32 Debug"
-
-DEP_CPP_DLLMA=\
-	{$(INCLUDE)}"lber.h"\
-	{$(INCLUDE)}"ldap.h"\
-	{$(INCLUDE)}"sys\types.h"\
-	
-NODEP_CPP_DLLMA=\
-	"..\include\macsock.h"\
-	"..\include\os2sock.h"\
-	
-
-"$(INTDIR)\dllmain.obj" : $(SOURCE) $(DEP_CPP_DLLMA) "$(INTDIR)"
-
-
-!ENDIF 
-
-SOURCE=.\testbind.c
-
-!IF  "$(CFG)" == "testplugin - Win32 Release"
-
-DEP_CPP_TESTB=\
-	"..\include\slapi-plugin.h"\
-	{$(INCLUDE)}"lber.h"\
-	{$(INCLUDE)}"ldap.h"\
-	
-
-"$(INTDIR)\testbind.obj" : $(SOURCE) $(DEP_CPP_TESTB) "$(INTDIR)"
-
-
-!ELSEIF  "$(CFG)" == "testplugin - Win32 Debug"
-
-DEP_CPP_TESTB=\
-	"..\include\slapi-plugin.h"\
-	{$(INCLUDE)}"lber.h"\
-	{$(INCLUDE)}"ldap.h"\
-	{$(INCLUDE)}"sys\types.h"\
-	
-NODEP_CPP_TESTB=\
-	"..\include\macsock.h"\
-	"..\include\os2sock.h"\
-	
-
-"$(INTDIR)\testbind.obj" : $(SOURCE) $(DEP_CPP_TESTB) "$(INTDIR)"
-
-
-!ENDIF 
-
-SOURCE=.\testentry.c
-
-!IF  "$(CFG)" == "testplugin - Win32 Release"
-
-DEP_CPP_TESTE=\
-	"..\include\slapi-plugin.h"\
-	{$(INCLUDE)}"lber.h"\
-	{$(INCLUDE)}"ldap.h"\
-	
-
-"$(INTDIR)\testentry.obj" : $(SOURCE) $(DEP_CPP_TESTE) "$(INTDIR)"
-
-
-!ELSEIF  "$(CFG)" == "testplugin - Win32 Debug"
-
-DEP_CPP_TESTE=\
-	"..\include\slapi-plugin.h"\
-	{$(INCLUDE)}"lber.h"\
-	{$(INCLUDE)}"ldap.h"\
-	{$(INCLUDE)}"sys\types.h"\
-	
-NODEP_CPP_TESTE=\
-	"..\include\macsock.h"\
-	"..\include\os2sock.h"\
-	
-
-"$(INTDIR)\testentry.obj" : $(SOURCE) $(DEP_CPP_TESTE) "$(INTDIR)"
-
-
-!ENDIF 
-
-SOURCE=.\testextendedop.c
-
-!IF  "$(CFG)" == "testplugin - Win32 Release"
-
-DEP_CPP_TESTEX=\
-	"..\include\slapi-plugin.h"\
-	{$(INCLUDE)}"lber.h"\
-	{$(INCLUDE)}"ldap.h"\
-	
-
-"$(INTDIR)\testextendedop.obj" : $(SOURCE) $(DEP_CPP_TESTEX) "$(INTDIR)"
-
-
-!ELSEIF  "$(CFG)" == "testplugin - Win32 Debug"
-
-DEP_CPP_TESTEX=\
-	"..\include\slapi-plugin.h"\
-	{$(INCLUDE)}"lber.h"\
-	{$(INCLUDE)}"ldap.h"\
-	{$(INCLUDE)}"sys\types.h"\
-	
-NODEP_CPP_TESTEX=\
-	"..\include\macsock.h"\
-	"..\include\os2sock.h"\
-	
-
-"$(INTDIR)\testextendedop.obj" : $(SOURCE) $(DEP_CPP_TESTEX) "$(INTDIR)"
-
-
-!ENDIF 
-
-SOURCE=.\testpostop.c
-
-!IF  "$(CFG)" == "testplugin - Win32 Release"
-
-DEP_CPP_TESTP=\
-	"..\include\slapi-plugin.h"\
-	{$(INCLUDE)}"lber.h"\
-	{$(INCLUDE)}"ldap.h"\
-	
-
-"$(INTDIR)\testpostop.obj" : $(SOURCE) $(DEP_CPP_TESTP) "$(INTDIR)"
-
-
-!ELSEIF  "$(CFG)" == "testplugin - Win32 Debug"
-
-DEP_CPP_TESTP=\
-	"..\include\slapi-plugin.h"\
-	{$(INCLUDE)}"lber.h"\
-	{$(INCLUDE)}"ldap.h"\
-	{$(INCLUDE)}"sys\types.h"\
-	
-NODEP_CPP_TESTP=\
-	"..\include\macsock.h"\
-	"..\include\os2sock.h"\
-	
-
-"$(INTDIR)\testpostop.obj" : $(SOURCE) $(DEP_CPP_TESTP) "$(INTDIR)"
-
-
-!ENDIF 
-
-SOURCE=.\testpreop.c
-
-!IF  "$(CFG)" == "testplugin - Win32 Release"
-
-DEP_CPP_TESTPR=\
-	"..\include\slapi-plugin.h"\
-	{$(INCLUDE)}"lber.h"\
-	{$(INCLUDE)}"ldap.h"\
-	
-
-"$(INTDIR)\testpreop.obj" : $(SOURCE) $(DEP_CPP_TESTPR) "$(INTDIR)"
-
-
-!ELSEIF  "$(CFG)" == "testplugin - Win32 Debug"
-
-DEP_CPP_TESTPR=\
-	"..\include\slapi-plugin.h"\
-	{$(INCLUDE)}"lber.h"\
-	{$(INCLUDE)}"ldap.h"\
-	{$(INCLUDE)}"sys\types.h"\
-	
-NODEP_CPP_TESTPR=\
-	"..\include\macsock.h"\
-	"..\include\os2sock.h"\
-	
-
-"$(INTDIR)\testpreop.obj" : $(SOURCE) $(DEP_CPP_TESTPR) "$(INTDIR)"
-
-
-!ENDIF 
-
-SOURCE=.\testsaslbind.c
-
-!IF  "$(CFG)" == "testplugin - Win32 Release"
-
-DEP_CPP_TESTS=\
-	"..\include\slapi-plugin.h"\
-	{$(INCLUDE)}"lber.h"\
-	{$(INCLUDE)}"ldap.h"\
-	
-
-"$(INTDIR)\testsaslbind.obj" : $(SOURCE) $(DEP_CPP_TESTS) "$(INTDIR)"
-
-
-!ELSEIF  "$(CFG)" == "testplugin - Win32 Debug"
-
-DEP_CPP_TESTS=\
-	"..\include\slapi-plugin.h"\
-	{$(INCLUDE)}"lber.h"\
-	{$(INCLUDE)}"ldap.h"\
-	{$(INCLUDE)}"sys\types.h"\
-	
-NODEP_CPP_TESTS=\
-	"..\include\macsock.h"\
-	"..\include\os2sock.h"\
-	
-
-"$(INTDIR)\testsaslbind.obj" : $(SOURCE) $(DEP_CPP_TESTS) "$(INTDIR)"
-
-
-!ENDIF 
-
-
-!ENDIF 
-
diff --git a/ldap/servers/snmp/ntagt/msrvdefs.mak b/ldap/servers/snmp/ntagt/msrvdefs.mak
deleted file mode 100644
index 1e52dde..0000000
--- a/ldap/servers/snmp/ntagt/msrvdefs.mak
+++ /dev/null
@@ -1,523 +0,0 @@
-#
-# BEGIN COPYRIGHT BLOCK
-# This Program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; version 2 of the License.
-# 
-# This Program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-# 
-# You should have received a copy of the GNU General Public License along with
-# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place, Suite 330, Boston, MA 02111-1307 USA.
-# 
-# In addition, as a special exception, Red Hat, Inc. gives You the additional
-# right to link the code of this Program with code not covered under the GNU
-# General Public License ("Non-GPL Code") and to distribute linked combinations
-# including the two, subject to the limitations in this paragraph. Non-GPL Code
-# permitted under this exception must only link to the code of this Program
-# through those well defined interfaces identified in the file named EXCEPTION
-# found in the source code files (the "Approved Interfaces"). The files of
-# Non-GPL Code may instantiate templates or use macros or inline functions from
-# the Approved Interfaces without causing the resulting work to be covered by
-# the GNU General Public License. Only Red Hat, Inc. may make changes or
-# additions to the list of Approved Interfaces. You must obey the GNU General
-# Public License in all respects for all of the Program code and other code used
-# in conjunction with the Program except the Non-GPL Code covered by this
-# exception. If you modify this file, you may extend this exception to your
-# version of the file, but you are not obligated to do so. If you do not wish to
-# provide this exception without modification, you must delete this exception
-# statement from your version and license this file solely under the GPL without
-# exception. 
-# 
-# 
-# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-# Copyright (C) 2005 Red Hat, Inc.
-# All rights reserved.
-# END COPYRIGHT BLOCK
-#
-#############################################################################
-#                       Mail Server Common Rulesets                         #
-#############################################################################
-
-MSRV_RELEASE    =   4.0
-
-ifeq ($(DEBUG), optimize)
-MSRV_DEBUG  =   no
-else
-MSRV_DEBUG  =   yes
-endif
-
-ifeq ($(MSRV_DEBUG), yes)
-DEBUG_DEST  =   DBG-
-else
-DEBUG_DEST  =
-endif
-
-# this allows mixing DBG objects with non DBG libs, avoiding
-# a complete autobuild or other linking hacks. Any DBG libs 
-# (under mailserv2) will get picked up first, followed by non-DBG
-# libs. In any event, no DBG libs will be linked if MSRV_DEBUG=no.
-NDBGDEST    =   $(MSRV_ROOT)/built/$(ARCH)
-
-# This is where we are generally supposed to put built stuff 
-BLDDEST     =   $(MSRV_ROOT)/built/$(DEBUG_DEST)$(ARCH)
-
-# module specific locations for build stuff
-LIBDEST     =   $(BLDDEST)/lib
-NETDEST     =   $(BLDDEST)/network
-LOCDEST     =   $(BLDDEST)/local
-EXTDEST     =   $(BLDDEST)/extras
-BINDEST     =   $(BLDDEST)/bin
-OBJDEST     =   $(BLDDEST)/obj
-
-IMPORTS_DIR =   $(MSRV_ROOT)/code/import
-
-
-# Extensions for generated files.
-
-SHLIB_SUFFIX    =       so
-ARCHIVE_SUFFIX  =       a
-OBJ_SUFFIX      =       o
-EXE_SUFFIX      =
-
-export SHLIB_EXT ARCHIVE_EXT OBJ_EXT EXE_EXT
-
-RM      =   rm -f
-AR      =   ar cr
-MD      =   mkdir -p
-MAKE    =   gmake
-STRIP   =   strip
-CP      =   cp
-ECHO    =   echo
-
-# For reasons you really don't want to know, we put all the C++ core 
-# modules into a static lib on Unix platforms. If the system supports
-# shared libs, we use it only for C-derived object modules.
-
-ifneq ($(ARCH), WINNT)
-STAT_LIB    =   libNSmObj.$(ARCHIVE_SUFFIX)
-endif
-
-ifeq ($(ARCH), WINNT)
-
-ifeq ($(DEBUG), full)
-ML_DEBUG    =   /DEBUG
-ifeq ($(NTDEBUGENV),ON)
-MC_DEBUGENV= /D__NTDebugEnv__
-else
-MC_DEBUGENV= 
-endif
-ifeq ($(NTDEBUGSLEEP),ON)
-MC_DEBUG=/D__NTDebug__ /D__NTDebugSleep__ $(MC_DEBUGENV)
-else
-MC_DEBUG    =   /D__NTDebug__ $(MC_DEBUGENV)
-endif
-else
-ML_DEBUG    =
-MC_DEBUG    =
-endif
-
-endif
-### Solaris #############################################################
-
-ifeq ($(ARCH), SOLARIS)
-	BUILD_SHARED    =   TRUE
-	BUILDAPI_SHARED =   FALSE
-	PLUGIN_SHARED   =   TRUE
-	CC		=   gcc
-	CXX		=   g++
-
-ifeq ($(PURIFY), yes)
-	CC      =   /stuff/iasrc3/xtern/purify/purify gcc
-	CXX     =   /stuff/iasrc3/xtern/purify/purify g++
-endif
-
-ifeq ($(QUANTIFY), yes)
-	CC      =   /stuff/iasrc3/xtern/quantify/quantify gcc
-	CXX     =   /stuff/iasrc3/xtern/quantify/quantify g++
-endif
-
-	LD		=   ld
-	DLL_CFLAGS	=   -fpic
-	DLL_CXXFLAGS    =   -fpic
-	DLL_LDFLAGS	=   -G
-	OPTIMIZE_FLAGS  =   -O2
-	CFLAGS		=    $(DLL_CFLAGS) -DSVR4 -D__svr4__ -DSOLARIS \
-				-DHAVE_NIS -DHAS_GETSPNAM -DHAS_FGETPWENT \
-				-DSTATOBJS \
-				-DMSRV_RELEASE=\"$(MSRV_RELEASE)\" \
-				-DOSVERSION=$(OSVERSION) -D_REENTRANT
-	LD_EXTRAS	=   -L/tools/ns/lib -lthread -lsocket -lnsl -lgen -ldl
-	MADM_LDLIBS	=   -ldl
-endif
-
-### IRIX  notes ##########################################################
-## Suppress warnings about statement unreachable (3203) and 
-## unused parameters (3262). Increase Olimit
-## Suppress REALLY ANNOYING link warnings unless a debug build
-## 84 is unsed libs. 85 is duplicate symbol preemption. 
-## This hides duplicate symbols in the link - so watch it
-##########################################################################
-ifeq ($(ARCH), IRIX)
-	BUILD_SHARED    =   TRUE
-	BUILDAPI_SHARED =       FALSE
-	PLUGIN_SHARED   =   TRUE
-	CC      =   cc
-ifneq ($(MSRV_DEBUG),yes)
-	CXX     =   CC -woff 3203,3262 -Wl,-woff,84 -Wl,-woff,85
-else
-	CXX	=   CC
-endif
-	LD      =   CC
-	DLL_CFLAGS  =
-	DLL_CXXFLAGS    =
-	DLL_LDFLAGS =   -shared
-	OPTIMIZE_FLAGS  =   -O -Olimit 4096
-	CFLAGS      =    $(DLL_CFLAGS) -DIRIX -DSTATOBJS \
-				-DHAVE_NIS -DHAS_GETSPNAM -DHAS_FGETPWENT \
-				-DMSRV_RELEASE=\"$(MSRV_RELEASE)\" \
-				-DOSVERSION=$(OSVERSION)
-
-	LD_EXTRAS   =   
-endif
-
-### HPUX notes ###########################################################
-## g++ does not support pic on a300 architecture
-## -Wl,+b,/usr/lib,+s is needed so that runtime can find shared lib 
-## correctly
-## Also, gcc is used to compile and link modules with c-based main
-## to overcome a global constructor problem. Change in
-## admin/src/Makefile and code/network/IMAP4-Server/unix/Makefile
-## and code/tools/Makefile
-#########################################################################
-
-ifeq ($(ARCH), HPUX)
-	SHLIB_SUFFIX    =       sl
-	BUILD_SHARED    =   TRUE
-	BUILDAPI_SHARED =       FALSE
-	PLUGIN_SHARED   =   TRUE
-	CC      =   cc
-	CXX     =   g++
-	LD      =   ld
-	NATIVE_CFLAGS   =   -Aa -D_HPUX_SOURCE
-	DLL_CFLAGS  =   +z
-	DLL_CXXFLAGS    =
-	DLL_LDFLAGS =   -b
-	OPTIMIZE_FLAGS  =   -O
-	CFLAGS      =   -DHPUX -DSTATOBJS -DHAVE_NIS \
-				-DHAS_FGETPWENT \
-				-DMSRV_RELEASE=\"$(MSRV_RELEASE)\" \
-				-DOSVERSION=$(OSVERSION)
-	LD_EXTRAS   =   -Wl,+b,/usr/lib,+s \
-				-L/tools/ns/lib -liostream -ldld -lm 
-				#-L/tools/ns/lib -liostream -ldld -lm -lpthread
-	MSRV_INCLUDES   =   -I/tools/ns/lib/g++-include 
-endif
-
-
-### OSF1 notes ############################################################
-## -taso options and -DIS_64 are needed to get 32 bit behavior on the alpha
-## ...otherwise libdbm will not work
-###########################################################################
-
-ifeq ($(ARCH), OSF1)
-	BUILD_SHARED    =   TRUE
-	BUILDAPI_SHARED =       FALSE
-	PLUGIN_SHARED   =   TRUE
-	CC      =   cc -taso -DIS_64 -Olimit 4000
-	CXX     =   g++
-	LD      =   ld
-	DLL_CFLAGS  =
-	DLL_CXXFLAGS    =
-	DLL_LDFLAGS =
-	OPTIMIZE_FLAGS  =   -O
-	CFLAGS      =   -DOSF1 -DSTATOBJS -DHAVE_NIS \
-				-DHAS_FGETPWENT \
-				-DMSRV_RELEASE=\"$(MSRV_RELEASE)\" \
-				-DOSVERSION=$(OSVERSION)
-	LD_EXTRAS   =   -lc_r -L/tools/ns/lib -liostream -Wl,-taso
-	MSRV_INCLUDES   =   -I/tools/ns/lib/g++-include 
-endif
-
-### AIX notes #############################################################
-## Yah, right. In your dreams...
-## What a horrid c++ platform. We need to supply our own g++ config file
-## because the systems supplied one is broken. Lots of surprises in store.
-## Needs a separate build tree on 3.2.5 because automount is broken.
-## Also, like HP - gcc is used to compile and link modules with c-based main
-## to overcome a global constructor problem. Change in
-## admin/src/Makefile and code/network/IMAP4-Server/unix/Makefile
-## and code/tools/Makefile
-##
-## DLL_CFLAGS type of stuff is set specifically in plugins/Makefile
-## and also local/SMTP-Router/Makefile to use a specific export list
-## (for the NSmatch plugin in this case). Also see further below for the 
-## linker override option to use the import list instead of a named lib
-##########################################################################
-
-## AIX 4
-ifeq ($(ARCH), AIX)
-	BUILD_SHARED    =   FALSE
-	BUILDAPI_SHARED =       FALSE
-	PLUGIN_SHARED   =   TRUE
-	SHLIB_SUFFIX	=   _shr.a
-	CC      =   cc
-	CXX     =   g++
-#	CXX     =   g++ -I$(MSRV_ROOT)/code/include/aix
-	LD      =   ld
-	DLL_CLAGS   =   
-	DLL_CXXFLAGS    =
-	OPTIMIZE_FLAGS  =   -O
-	CFLAGS      =   -DAIX -DAIXV3 -DAIXV4 -DSTATOBJS \
-				-DHAVE_NIS -mcpu=common\
-				-DMSRV_RELEASE=\"$(MSRV_RELEASE)\" \
-				-DOSVERSION=$(OSVERSION)
-	LD_EXTRAS   =  -L/gnu/install/lib -L/gnu/install/lib/gcc-lib/powerpc-ibm-aix4.1.4.0/2.7.2.1/common -lstdc++ -ls -lsvld -lgcc -lc_r
-#	LD_EXTRAS   =   -L/usr/gnu/lib  -liostream -ls -ldl
-	MSRV_INCLUDES   =   -I/gnu/install/lib/g++-include  
-#	MSRV_INCLUDES   =   -I/usr/gnu/lib/g++-include  
-endif
-
-## AIX 3
-#ifeq ($(ARCH), AIX)
-#   BUILD_SHARED    =   FALSE
-#       BUILDAPI_SHARED =       FALSE
-#   PLUGIN_SHARED   =   TRUE
-#   CC      =   svcc
-#   CXX     =   g++ -I$(MSRV_ROOT)/code/include/aix
-#   LD      =   ld
-#   DLL_CLAGS   =   
-#   DLL_CXXFLAGS    =
-#   OPTIMIZE_FLAGS  =   -O
-#   CFLAGS      =   -DAIX -DAIXV3 -DSTATOBJS \
-#               -DHAVE_NIS \
-#		-DMSRV_RELEASE=\"$(MSRV_RELEASE)\"
-#   LD_EXTRAS   =   -L/tools/ns/lib -liostream -ls
-#   MSRV_INCLUDES   =   -I/tools/ns/lib/g++-include 
-#endif
-
-
-ifeq ($(ARCH), WINNT)
-
-	SHLIB_SUFFIX    =       dll
-	ARCHIVE_SUFFIX  =       lib
-	RM              =       del /q
-	EXE_SUFFIX      =       .exe
-	OBJ_SUFFIX      =       obj
-
-	SHARED_LIB	=	NetscapeMTA30.$(SHLIB_SUFFIX)
-	SHARED_IMPLIB   =	NetscapeMTA30.$(ARCHIVE_SUFFIX)
-	SHARED_BASE_LIB	=	NetscapeMTAX30.$(SHLIB_SUFFIX)
-	SHARED_BASE_IMPLIB   =	NetscapeMTAX30.$(ARCHIVE_SUFFIX)
-	MATCH_LIB	=	NSMatch30.$(SHLIB_SUFFIX)
-	MATCH_IMPLIB    =	NSMatch30.$(ARCHIVE_SUFFIX)
-	POSEC_LIB       =       nsSupport30.$(SHLIB_SUFFIX)
-	POSEC_IMPLIB    =       nsSupport30.$(ARCHIVE_SUFFIX)
-	MDBAPI_LIB      =       NetscapeMDB30.$(SHLIB_SUFFIX)
-	MDBAPI_IMPLIB   =       NetscapeMDB30.$(ARCHIVE_SUFFIX)
-	BUILD_SHARED    =	TRUE
-	BUILDAPI_SHARED =       TRUE
-	PLUGIN_SHARED   =	TRUE
-	POSEC_SHARED    =       FALSE
-	CFLAGS          =	/D__NT__ $(MC_DEBUG) \
-				/DMSRV_RELEASE=\"$(MSRV_RELEASE)\" \
-				/D$(NS_PRODUCT) $(XP_FLAG) \
-				/D__USE_THREAD_HEAPS__ -Gy
-	OPTIMIZE_FLAGS	=	-Ob1 -O2
-	DLL_CFLAGS	=	/D__Lib__
-	DLL_CXXFLAGS    =	/D__Lib__
-	LD_EXTRAS	=	/INCREMENTAL:NO $(ML_DEBUG)
-	LINK_CONSOLE    =	link /NOLOGO /SUBSYSTEM:CONSOLE $(ML_DEBUG) \
-				/OUT:$@ /OPT:REF /MAP
-endif
-
-
-.SUFFIXES: .cxx
-
-# In Debug mode, always build archive libraries
-
-ifeq ($(MSRV_DEBUG), yes)
-
-ifneq ($(ARCH), WINNT)
-MSRV_DBG_DEFINES    =       -g -DMSRV_DEBUG $(DBG_FLAGS)
-BUILD_SHARED        =   FALSE
-PLUGIN_SHARED       =   FALSE   
-else
-MSRV_DBG_DEFINES    =       /Od /Zi $(DBG_FLAGS)
-endif
-
-else
-MSRV_DBG_DEFINES =  $(OPTIMIZE_FLAGS)
-endif
-
-
-ifneq ($(ARCH), WINNT)
-
-ifeq ($(BUILD_SHARED), TRUE)
-	SHARED_LIB  =   libNSmail.$(SHLIB_SUFFIX)
-else
-	SHARED_LIB  =   libNSmail.$(ARCHIVE_SUFFIX)
-endif
-
-ifeq ($(BUILDAPI_SHARED), TRUE)
-	MDBAPI_LIB  =   libNSmdb.$(SHLIB_SUFFIX)
-else
-	MDBAPI_LIB  =   libNSmdb.$(ARCHIVE_SUFFIX)
-endif
-
-
-ifeq ($(PLUGIN_SHARED), TRUE)
-ifeq ($(ARCH), AIX)
-	MATCH_LIB   =   libNSmatch$(SHLIB_SUFFIX)
-	HDR_LIB     =   libNShdr$(SHLIB_SUFFIX)
-else
-	MATCH_LIB   =   libNSmatch.$(SHLIB_SUFFIX)
-	HDR_LIB     =   libNShdr.$(SHLIB_SUFFIX)
-endif
-else
-	MATCH_LIB   =   libNSmatch.$(ARCHIVE_SUFFIX)
-	HDR_LIB     =   libNShdr.$(ARCHIVE_SUFFIX)
-endif
-
-	
-ifeq ($(ARCH), HPUX)
-ifeq ($(MSRV_HPUX_CURSES_STATIC), TRUE)
-CURSES=/usr/lib/libHcurses.a
-else
-CURSES=/usr/lib/libcurses.sl
-endif
-else
-CURSES=-lcurses -ltermcap
-endif
-
-ifeq ($(ARCH), AIX)
-CURSES=-lcurses
-endif
-
-# Before merge stuff - nirmal 4/24
-#LD_LINKLIB  =		-L$(LIBDEST) -L/usr/lib -L$(NDBGDEST)/lib \
-#			-lNSmdb -lNSmail -lNSmObj \
-#			-lNSmail -lNSmdb -L$(NSCP_DISTDIR)/lib \
-#			-llcache10 -lldap10 $(CURSES)
-#
-
-ifeq ($(ARCH), HPUX)
-LD_LINKLIB  =		-L$(LIBDEST) -L/usr/lib -L$(NDBGDEST)/lib \
-			-lNSmdb -lNSmail -lNSmObj -lNSmail -lNSmdb \
-			-L$(NSCP_DISTDIR)/lib  -llcache10 \
-			-lldap10 \
-			$(CURSES)
-else
-LD_LINKLIB  =		-L$(LIBDEST) -L/usr/lib -L$(NDBGDEST)/lib \
-			-lNSmdb -lNSmail -lNSmObj -lNSmail -lNSmdb \
-			$(NSCP_DISTDIR)/lib/liblcache10.$(SHLIB_SUFFIX) \
-			$(NSCP_DISTDIR)/lib/libldap10.$(SHLIB_SUFFIX) \
-			$(CURSES)
-endif
-
-ifeq ($(ARCH), AIX)
-CURSES=-lcurses
-LD_LINKLIB  =		-L$(LIBDEST) -L/usr/lib -L$(NDBGDEST)/lib \
-			-lNSmdb -lNSmail -lNSmObj \
-			$(NSCP_DISTDIR)/lib/liblcache10$(SHLIB_SUFFIX) \
-			$(NSCP_DISTDIR)/lib/libldap10$(SHLIB_SUFFIX) \
-			$(NSCP_DISTDIR)/lib/libssldap10.a \
-			$(CURSES)
-
-endif
-
-
-LD_MATCHLIB =   -lNSmatch
-else  # ARCH = WINNT section
-LD_POSECLIB =   $(addprefix $(LIBDEST)/, $(POSEC_IMPLIB))
-LD_LINKLIB  =   $(addprefix $(LIBDEST)/, $(SHARED_IMPLIB))
-LD_MATCHLIB =   $(addprefix $(LIBDEST)/, $(MATCH_IMPLIB))
-endif
-
-ifeq ($(ARCH), WINNT)
-LD_LINKLIB += $(NSCP_DISTDIR)/lib/nsldap32v10.lib $(NSCP_DISTDIR)/lib/nslch32v10.lib
-LDX_LINKLIB = $(LD_LINKLIB) $(LIBDEST)/$(SHARED_BASE_IMPLIB)
-
-I18NLIBS=$(addsuffix .$(LIB_SUFFIX),\
-		$(addprefix $(OBJDIR)/lib/lib, \
-		ldapu  $(LIBADMIN) $(FRAME) $(CRYPT) $(LIBACCESS))) \
-		$(LIBDBM) $(LIBXP) $(LIBNSPR)  $(LIBARES) $(LIBSEC)
-else
-
-# The way I18LIBS was defined in server3_mail_branch,  is quite misleading. 
-# (see modules.mk for details). After this, LD_LINKLIB gets redefined
-# and that adds unwanted lines to the link of bunch of things. Please
-# add I18LIBS to the individual makefiles, where necessary. See 
-# mailserv2/admin/src/Makefile -> DEPLIBS for an example.
-# I am changing this definition for the merge. Retain these changes in
-# future merges. I haved added posix4 to keep what was before merge.
-# - Nirmal 4/24/97.
-#I18NLIBS=$(addsuffix .$(LIB_SUFFIX),\
-#		$(addprefix $(OBJDIR)/lib/lib, \
-#		ldapu  $(LIBADMIN) $(FRAME) $(CRYPT) $(LIBACCESS))) \
-#		$(LIBDBM) $(LIBXP) $(LIBNSPR)  $(LIBARES) \
-#		-L$(MCOM_ROOT)/components/ldapsdk/$(NSOBJDIR_NAME)/lib \
-#		-lssldap10 $(LIBSEC)
-I18NLIBS=$(addsuffix .$(LIB_SUFFIX),\
-		$(addprefix $(OBJDIR)/lib/lib, \
-		ldapu  $(LIBADMIN) $(FRAME) $(CRYPT) $(LIBACCESS))) \
-		$(LIBDBM) $(LIBXP) $(LIBNSPR)  $(LIBARES) \
-		-L$(NSCP_DISTDIR)/lib \
-		-lssldap10 $(LIBSEC)
-
-endif
-
-ifeq ($(ARCH), SOLARIS)  # IRIX and HPUX have no posix4 lib 
-	I18NLIBS += -lposix4
-endif
-
-LD_LINKLIB += $(I18NLIBS)
-
-ifeq ($(ARCH), IRIX)  
-LD_LINKLIB += $(NSCP_DISTDIR)/lib/libldap10.so
-endif
-
-##########################################################################
-## AIX override to make dynamic linking work correctly
-## instead of linking directly with the shared object, we use an
-## import list. Note this syntax only works with g++ or gcc as the compiler
-##########################################################################
-
-ifeq ($(ARCH), AIX)
-LD_MATCHLIB     =  -Wl,-bI:$(MSRV_ROOT)/code/plugins/NSMatch.exp
-endif
-
-
-
-DB_DEFINES  =   -DMEMMOVE -D__DBINTERFACE_PRIVATE -DPOSIX_MISTAKE
-
-INCLUDES    =   -I$(MSRV_ROOT)/code/include \
-			-I$(MCOM_ROOT)/lib/libdbm \
-			-I$(MSRV_ROOT)/contrib/regex \
-			$(MSRV_INCLUDES)
-
-CCOPTS      =   $(MSRV_DBG_DEFINES) $(CFLAGS) $(INCLUDES) \
-			$(MCC_INCLUDE) $(NSPR_DEFINES)
-CXXOPTS     =   $(MSRV_DBG_DEFINES) $(CFLAGS) $(INCLUDES) \
-			$(MCC_INCLUDE) $(NSPR_DEFINES)
-
-
-MSRVDESTS = $(BLDDEST) $(LIBDEST) $(NETDEST) $(LOCDEST) $(EXTDEST) \
-			$(BINDEST) $(OBJDEST)
-
-$(MSRVDESTS):
-	$(MD) $@
-
-default: all
-
-all: $(MSRVDESTS)
-
-depend: localdepend
-
-clean: localclean
-
-spotless: clean
-	$(RM) -r $(BLDDEST) 
-
diff --git a/ldap/servers/snmp/ntagt/nslagtcom_nt.h b/ldap/servers/snmp/ntagt/nslagtcom_nt.h
deleted file mode 100644
index 28dd59f..0000000
--- a/ldap/servers/snmp/ntagt/nslagtcom_nt.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-
-/*-------------------------------------------------------------------------
- *
- * nslagtcom_nt.h - Common definitions for NS Directory Server's SNMP 
- *                  subagent on NT.
- *                  The definitions in here should be kept so that modules
- *                  other than the subagent can share this file.
- * 
- * Revision History:
- * 07/27/1997		Steve Ross	Created
- *
- *
- *
- *-----------------------------------------------------------------------*/
-
-#ifndef __NSLAGTCOM_NT_H_
-#define __NSLMAGTCOM_NT_H_
-
-/*-------------------------------------------------------------------------
- *
- * Defines 
- *
- *-----------------------------------------------------------------------*/
-
-#define MAGT_NSEV_SNMPTRAP "NSEV_SNMPTRAP_LDAP"
-
-#endif					/* __NSLAGTCOM_NT_H_ */
diff --git a/ldap/servers/snmp/ntagt/nsldapagt_nt.c b/ldap/servers/snmp/ntagt/nsldapagt_nt.c
deleted file mode 100644
index 0934680..0000000
--- a/ldap/servers/snmp/ntagt/nsldapagt_nt.c
+++ /dev/null
@@ -1,1778 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-
-/*-------------------------------------------------------------------------
- *
- * nsldapagt_nt.c - SNMP Extension Agent for Directory Server on NT.
- *                  Provides SNMP data to NT SNMP Service on behalf of the
- *                  Directory Server installed on the current system.  SNMP
- *                  data is collected from the following sources:
- *                    1. config file (static data)
- *                    2. daemonstats file (dynamic data)
- * 
- * Revision History:
- * 07/25/1997		Steve Ross	Created
- *
- *
- *-----------------------------------------------------------------------*/
-
-
-#include <ctype.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <io.h>
-#include <windows.h>
-#include <winsock.h>
-#include <time.h>
-#include <snmp.h>
-#include "nt/regparms.h"
-#include "agtmmap.h"
-#include "nslagtcom_nt.h"  
-#include "nsldapmib_nt.h"
-#include "nsldapagt_nt.h"
-#include "ldap.h"
-
-/*-------------------------------------------------------------------------
- *
- * Defines
- *
- *-----------------------------------------------------------------------*/
-
-#define REPLACE(x, y) do {if ((x)) SNMP_free((x));\
-                          (x) = SNMP_malloc(strlen((y)) + 1);\
-	                         if ((x)) strcpy((x), (y));} while(0)
-
-#define export extern "C"
-
-/*-------------------------------------------------------------------------
- *
- * Globals
- *
- *-----------------------------------------------------------------------*/
-
-instance_list_t *pInstanceList = NULL;
-
-/*
- * Extension Agent DLLs need access to elapsed time agent has been active.
- * This is implemented by initializing the Extension Agent with a time zero
- * reference, and allowing the agent to compute elapsed time by subtracting
- * the time zero reference from the current system time.  This Extension
- * Agent implements this reference with dwTimeZero.
- */
-DWORD dwTimeZero = 0;
-
-/*-------------------------------------------------------------------------
- *
- * Externs
- *
- *-----------------------------------------------------------------------*/
-
-extern AsnObjectIdentifier MIB_OidPrefix;
-extern UINT MIB_num_vars;
-
-/*------------------------ prototypes -----------------------------------*/
-// char *getRootDirFromConfFile(char *filename, char *szLogPath);
-char *getRootDirFromConfFile(char *filename);
-
-/*-------------------------------------------------------------------------
- *
- * MagtInitInstance:  initializes entry in instance list
- *                   
- *
- * 
- *          
- *
- *-----------------------------------------------------------------------*/
-
- int MagtInitInstance(instance_list_t *pInstance)
- {
-	
-   
-	pInstance->ghTrapEvent          = NULL;
-	pInstance->pOpsStatInfo         = NULL;
-    pInstance->pEntriesStatInfo     = NULL;
-    pInstance->ppIntStatInfo        = NULL;
-    pInstance->pMibInfo             = NULL;
-    pInstance->oldUpdateTime        = 0;
-    pInstance->oldStartTime         = 0;
-    pInstance->graceCycles          = MAGT_TIME_QUANTUM;
-    pInstance->mmapStale            = MAGT_FALSE;
-    pInstance->mmapOk               = MAGT_FALSE;
-    pInstance->serverUp             = MAGT_FALSE;
-    pInstance->downTrapSent         = MAGT_FALSE;
-    pInstance->trapType             = MAGT_TRAP_NONE;
-
-	return 0;
- }
- 
- int MagtInitStats(MagtOpsTblInfo_t    *OpsTblInfo,
-                   MagtEntriesTblInfo_t *EntriesTblInfo,
-                   MagtIntTblInfo_t     **IntTblInfo  )
- {
-	 int i;
-
-     if (OpsTblInfo != NULL)
-	 {
-         OpsTblInfo->AnonymousBinds        = 0;
-         OpsTblInfo->UnAuthBinds           = 0;
-         OpsTblInfo->SimpleAuthBinds       = 0;
-         OpsTblInfo->StrongAuthBinds       = 0;
-         OpsTblInfo->BindSecurityErrors    = 0;
-         OpsTblInfo->InOps                 = 0;
-         OpsTblInfo->ReadOps               = 0;
-         OpsTblInfo->CompareOps            = 0;
-         OpsTblInfo->AddEntryOps           = 0;
-         OpsTblInfo->RemoveEntryOps        = 0;
-         OpsTblInfo->ModifyEntryOps        = 0;
-         OpsTblInfo->ModifyRDNOps          = 0;
-         OpsTblInfo->ListOps               = 0;
-         OpsTblInfo->SearchOps             = 0;
-         OpsTblInfo->OneLevelSearchOps     = 0;
-         OpsTblInfo->WholeSubtreeSearchOps = 0;
-         OpsTblInfo->Referrals             = 0;
-         OpsTblInfo->Chainings             = 0;
-         OpsTblInfo->SecurityErrors        = 0;
-         OpsTblInfo->Errors                = 0;
-      }
-      
-	  if(EntriesTblInfo != NULL)
-	  {
-          EntriesTblInfo->MasterEntries = 0;
-          EntriesTblInfo->CopyEntries   = 0;
-          EntriesTblInfo->CacheEntries  = 0;
-          EntriesTblInfo->CacheHits     = 0;
-          EntriesTblInfo->SlaveHits     = 0;
-      }
-
-      if(IntTblInfo != NULL)
-	  {
-	      for(i=0; i < NUM_SNMP_INT_TBL_ROWS; i++)
-	      {
-	            strcpy(IntTblInfo[i]->DsName.val, "Not Available");
-                IntTblInfo[i]->DsName.len               = strlen("Not Available"); 
-	      
-                IntTblInfo[i]->TimeOfCreation           = 0;
-                IntTblInfo[i]->TimeOfLastAttempt        = 0;
-                IntTblInfo[i]->TimeOfLastSuccess        = 0;
-                IntTblInfo[i]->FailuresSinceLastSuccess = 0;
-                IntTblInfo[i]->Failures                 = 0;
-                IntTblInfo[i]->Successes                = 0;
-                
-				strcpy(IntTblInfo[i]->URL.val, "Not Available");
-                IntTblInfo[i]->URL.len                  = strlen("Not Available"); 
- 	      }
-	  }
-
-	  return 0;
- }
-
-/*-------------------------------------------------------------------------
- *
- * MagtCheckServer:  Checks the Server's status and indicates
- *                   which trap is to be generated if necessary.
- *
- * Returns:  MAGT_TRAP_NONE - No trap to be generated
- *           Trap # - Id of trap to be generated
- *
- *-----------------------------------------------------------------------*/
-
-int MagtCheckServer(instance_list_t *pInstance)
-{
-  int err;
-
-  if (pInstance->mmapStale == MAGT_TRUE)
-    pInstance->mmapOk = MAGT_FALSE;			/* Ensure open of mmap */
-
-  err = MagtReadStats(&(pInstance->hdrInfo), 
-					    NULL, 
-						NULL, 
-						NULL, 
-	                    pInstance->szStatsPath, 
-						pInstance->szLogPath);		/* Find times info in hdr */
-
-  if (pInstance->mmapOk == MAGT_FALSE)
-  {
-      if (err != 0)				/* Cannot open mmap file */
-      {
-            if ((pInstance->serverUp == MAGT_TRUE) ||		/* Server status changes */
-                (pInstance->downTrapSent == MAGT_FALSE))		/* Down trap was not sent */
-            {
-                pInstance->serverUp = MAGT_FALSE;
-                pInstance->downTrapSent = MAGT_TRUE;
-                pInstance->trapType = MAGT_TRAP_SERVER_DOWN;
-            }
-       }  
-       else
-       {
-           pInstance->mmapOk = MAGT_TRUE;
-
-           /*
-            * Since mmapOk was false, it means the mmap file couldn't be
-            * opened before.  Now it is opened ok, so it will be assumed
-            * that the server has gone down and up and a start trap may need
-            * to be sent.
-            */
-            if (pInstance->mmapStale == MAGT_FALSE)
-                pInstance->serverUp = MAGT_FALSE;
-            else
-                pInstance->mmapStale = MAGT_FALSE;			/* Not stale anymore */
-        }
-  }
-
-  if (pInstance->trapType == MAGT_TRAP_NONE)
-  {
-      if (err != 0)
-      {
-          pInstance->mmapOk = MAGT_FALSE;
-
-          /*
-           * If the mmap file does not exist, assume server has gone down.
-           */
-          if (err == ENOENT)
-          {
-              if((pInstance->serverUp == MAGT_TRUE) ||		/* Server status changes */
-                 (pInstance->downTrapSent == MAGT_FALSE))	/* Down trap was not sent */
-              {
-                  pInstance->serverUp = MAGT_FALSE;
-                  pInstance->downTrapSent = MAGT_TRUE;
-                  pInstance->trapType = MAGT_TRAP_SERVER_DOWN;
-              }
-          }
-      }   
-      else					/* Got hdr info ok */
-      {
-
-          /*
-           * The fact that header info can be read will be taken as the
-           * server is up.  If it was not up before, a server start trap
-           * will need to be sent.
-           */
-          if (((pInstance->hdrInfo.restarted) || (pInstance->hdrInfo.startTime > pInstance->oldStartTime))
-			   && (pInstance->hdrInfo.updateTime > pInstance->oldUpdateTime))
-          {
-              pInstance->oldUpdateTime = pInstance->hdrInfo.updateTime;
-              pInstance->oldStartTime  = pInstance->hdrInfo.startTime;
-              pInstance->graceCycles   = MAGT_TIME_QUANTUM;
-              pInstance->serverUp      = MAGT_TRUE;
-              pInstance->downTrapSent  = MAGT_FALSE;
-              pInstance->trapType      = MAGT_TRAP_SERVER_START;
-          }
-          else
-          {
-              if (pInstance->hdrInfo.updateTime > pInstance->oldUpdateTime)
-              {
-                  pInstance->oldUpdateTime = pInstance->hdrInfo.updateTime;
-                  if (pInstance->graceCycles == 0)
-                  {
-            
-                      /*
-                       * The server has probably been stuck and has been restarted.
-                       */
-                      pInstance->serverUp     = MAGT_TRUE;
-                      pInstance->downTrapSent = MAGT_FALSE;
-                      pInstance->trapType     = MAGT_TRAP_SERVER_START;
-                  }
-
-                  /*
-                   * Reset grace cycles in either case because server is healthy.
-                   */
-                  pInstance->graceCycles = MAGT_TIME_QUANTUM;
-              }
-              else					/* Mmap file not updated */
-              {
-                  pInstance->mmapStale = MAGT_TRUE;
-
-                  /*
-                   * The server is not responding, send trap if one has not
-                   * been sent yet.
-                   */
-                  if (pInstance->graceCycles > 0)
-                  {
-                      pInstance->graceCycles--;
-                      if (pInstance->graceCycles == 0)
-                      {
-                          pInstance->trapType = MAGT_TRAP_SERVER_DOWN;
-                      }
-                  }
-              }
-          }
-      }
-  }
-
-  return pInstance->trapType;
-}
-
-
-/*-------------------------------------------------------------------------
- *
- * MagtCleanUp:  Cleans up any allocated global resources.
- *
- * Returns:  None
- *
- *-----------------------------------------------------------------------*/
-
-void MagtCleanUp()
-{
-    instance_list_t *pInstance;
-
-	for (pInstance = pInstanceList; pInstance; pInstance = pInstance->pNext) 
-	{
-        if (pInstance->pCfgInfo != NULL)
-            GlobalFree(pInstance->pCfgInfo);
-        
-		if (pInstance->pMibInfo != NULL)
-            GlobalFree(pInstance->pMibInfo);
-        
-		if (pInstance->szRootDir != NULL)
-            GlobalFree(pInstance->szRootDir);
-        
-		if (pInstance->ghTrapEvent != NULL)
-            CloseHandle(pInstance->ghTrapEvent);
-	}
-
-}
-
-/*-------------------------------------------------------------------------
- *
- * MagtConfProcess:  Processes a configuration entry and updates the
- *                   corresponding static info field.
- *
- * Returns:  None
- *
- *-----------------------------------------------------------------------*/
-
-void MagtConfProcess(char *line, int lineLen, 
-                     MagtLDAPInfo_t *info)
-					 
-{
-  char keyWord[MAGT_MAX_LINELEN + 1];
-  char *val, *p;
-
-  if (line == NULL)				/* Shouldn't happen */
-    return;
-
-  if ((*line) == '#')				/* Comment - Ignore */
-    return;
-
-  keyWord[0] = '\0';
-
-  if (sscanf(line, "%s", keyWord) != 1)		/* Partial entry */
-    return;
-
-  val = line;
-
-  /*
-   * Go past any spaces preceding the keyword.
-   */
-  while ((*val) && (isspace(*val)))
-    ++val;
-
-  if (!(*val))
-    return;
-
-  /*
-   * Go past the keyword.
-   */
-  for (; (*val) && !(isspace(*val)); ++val);
-
-  if (!(*val))
-    return;
-
-  /*
-   * Go past the spaces that follow the key word.
-   */
-  while ((*val) && (isspace(*val)))
-    ++val;
-
-  if (!(*val))
-    return;
-
-  /*
-   * Strip CRLF characters.
-   */
-  if ((p = strchr(val, '\r')) != NULL)
-    *p = '\0';
-  if ((p = strchr(val, '\n')) != NULL)
-    *p = '\0';
-
-  /*
-   * Now val points to the value and keyWord points to the key word.
-   */
- 
-  if (!stricmp(keyWord, "nsslapd-port:"))
-  {
-    info->port = atoi(val);
-    return;
-  }
-
-  if (!stricmp(keyWord, "nsslapd-localhost:"))
-  {
-    REPLACE(info->host, val);
-    info->host[strlen(info->host)] = '\0';
-    return;
-  }
-
-  if (!stricmp(keyWord, "nsslapd-rootdn:"))
-  {
-    REPLACE(info->rootdn, val);
-    info->rootdn[strlen(info->rootdn)] = '\0';
-    return;
-  }
-
-   if (!stricmp(keyWord, "nsslapd-rootpw:"))
-  {
-    REPLACE(info->rootpw, val);
-    info->rootpw[strlen(info->rootpw)] = '\0';
-    return;
-  }
-
-  /*
-   * None of the above?  Invalid keyword.  Just return.
-   */
-  return;
-}
-
- 
-char *getRootDirFromConfFile(char *confpath)
-{
- char *rootDir      = NULL;
- const char *config = "\\config\0" ;
- char instanceDir[MAGT_MAX_LINELEN + 1] = "";
- size_t len ;
-
- if (confpath) {
-	len = strlen(confpath) - strlen(config) ;
-	strncpy(instanceDir, confpath, len);
-	rootDir = _strdup(instanceDir) ; // allocate memory for rootDir and set up to value pointed by instanceDir
-	return rootDir ;
-	}
- else return NULL ;
-}
-
-
-/*-------------------------------------------------------------------------
- *
- * MagtInitMibStorage:  Initializes the storage pointers of MIB variables.
- *
- * Returns:  None
- *
- *-----------------------------------------------------------------------*/
-
-void MagtInitMibStorage(MagtMibEntry_t *        MibInfo, 
-						MagtOpsTblInfo_t *      pOpsStatInfo,
-						MagtEntriesTblInfo_t *  pEntriesStatInfo, 
-						MagtIntTblInfo_t **     ppIntStatInfo,
-						MagtStaticInfo_t *      pCfgInfo)
-{
-  switch(MibInfo->uId)
-  {
-    case MAGT_ID_DESC:
-      MibInfo->Storage = pCfgInfo->entityDescr.val;
-      break;
-    case MAGT_ID_VERS:
-      MibInfo->Storage = pCfgInfo->entityVers.val;
-      break;
-    case MAGT_ID_ORG:
-      MibInfo->Storage = pCfgInfo->entityOrg.val;
-      break;
-    case MAGT_ID_LOC:
-      MibInfo->Storage = pCfgInfo->entityLocation.val;
-      break;
-    case MAGT_ID_CONTACT:
-      MibInfo->Storage = pCfgInfo->entityContact.val; 
-      break;
-    case MAGT_ID_NAME:
-      MibInfo->Storage = pCfgInfo->entityName.val;
-      break;
-    case MAGT_ID_APPLINDEX:
-      MibInfo->Storage = &pCfgInfo->ApplIndex;
-      break;
-
-      /* operations table attrs */
-    case MAGT_ID_ANONYMOUS_BINDS:
-        MibInfo->Storage = &pOpsStatInfo->AnonymousBinds;
-    break;
-    case MAGT_ID_UNAUTH_BINDS:
-        MibInfo->Storage = &pOpsStatInfo->UnAuthBinds;
-    break;
-    case MAGT_ID_SIMPLE_AUTH_BINDS:  
-        MibInfo->Storage = &pOpsStatInfo->SimpleAuthBinds;
-    break;
-    case MAGT_ID_STRONG_AUTH_BINDS:
-        MibInfo->Storage = &pOpsStatInfo->StrongAuthBinds;
-    break;
-    case MAGT_ID_BIND_SECURITY_ERRORS:
-        MibInfo->Storage = &pOpsStatInfo->BindSecurityErrors;
-    break;
-    case MAGT_ID_IN_OPS:
-        MibInfo->Storage = &pOpsStatInfo->InOps;
-    break;
-    case MAGT_ID_READ_OPS:
-        MibInfo->Storage = &pOpsStatInfo->ReadOps;
-    break;
-    case MAGT_ID_COMPARE_OPS:
-        MibInfo->Storage = &pOpsStatInfo->CompareOps;    
-    break;
-    case MAGT_ID_ADD_ENTRY_OPS:
-        MibInfo->Storage = &pOpsStatInfo->AddEntryOps;
-    break;
-    case MAGT_ID_REMOVE_ENTRY_OPS:
-        MibInfo->Storage = &pOpsStatInfo->RemoveEntryOps;
-    break;
-    case MAGT_ID_MODIFY_ENTRY_OPS:
-        MibInfo->Storage = &pOpsStatInfo->ModifyEntryOps;
-    break;
-    case MAGT_ID_MODIFY_RDN_OPS:
-        MibInfo->Storage = &pOpsStatInfo->ModifyRDNOps;
-    break;
-    case MAGT_ID_LIST_OPS:
-        MibInfo->Storage = &pOpsStatInfo->ListOps;
-    break;
-    case MAGT_ID_SEARCH_OPS:
-        MibInfo->Storage = &pOpsStatInfo->SearchOps;
-    break;
-    case MAGT_ID_ONE_LEVEL_SEARCH_OPS:
-        MibInfo->Storage = &pOpsStatInfo->OneLevelSearchOps;
-    break;
-    case MAGT_ID_WHOLE_SUBTREE_SEARCH_OPS:
-        MibInfo->Storage = &pOpsStatInfo->WholeSubtreeSearchOps;
-    break;
-    case MAGT_ID_REFERRALS:
-        MibInfo->Storage = &pOpsStatInfo->Referrals;
-    break;
-    case MAGT_ID_CHAININGS:
-        MibInfo->Storage = &pOpsStatInfo->Chainings;
-    break;
-    case MAGT_ID_SECURITY_ERRORS:
-        MibInfo->Storage = &pOpsStatInfo->SecurityErrors;
-    break;
-    case MAGT_ID_ERRORS:
-        MibInfo->Storage = &pOpsStatInfo->Errors;
-    break;
-      /* entries table attrs */
-    case MAGT_ID_MASTER_ENTRIES:
-        MibInfo->Storage = &pEntriesStatInfo->MasterEntries;
-    break;
-    case MAGT_ID_COPY_ENTRIES:
-        MibInfo->Storage = &pEntriesStatInfo->CopyEntries;
-    break;
-    case MAGT_ID_CACHE_ENTRIES:
-        MibInfo->Storage = &pEntriesStatInfo->CacheEntries;
-    break;
-    case MAGT_ID_CACHE_HITS:
-        MibInfo->Storage = &pEntriesStatInfo->CacheHits;
-    break;
-    case MAGT_ID_SLAVE_HITS:
-        MibInfo->Storage = &pEntriesStatInfo->SlaveHits;
-    break;
-      /* interaction table entries 
-        *---------------------------------
-	   * a little different because table of N entries, we can get current value of n 
-	   * from MibInfo->Oid.ids[MibInfo->Oid.idLength] because dsIntIndex is last,
-	   *  subtract 1 from it because oids go from 1 to NUM_SNMP_INT_TBL_ROWS array goes
-	   *    from 0 to NUM_SNMP_INT_TBL_ROWS - 1
-	   *	if this ever changes this logic will have to change to get it from
-	   *	appropriate spot 
-	   */
-    case MAGT_ID_DS_NAME:
-	      MibInfo->Storage = ppIntStatInfo[MibInfo->Oid.ids[MibInfo->Oid.idLength - 1] - 1]->DsName.val; 
-	break;
-    case MAGT_ID_TIME_OF_CREATION:
-        MibInfo->Storage = &(ppIntStatInfo[MibInfo->Oid.ids[MibInfo->Oid.idLength - 1] - 1]->TimeOfCreation);
-    break;
-    case MAGT_ID_TIME_OF_LAST_ATTEMPT:
-        MibInfo->Storage = &(ppIntStatInfo[MibInfo->Oid.ids[MibInfo->Oid.idLength - 1] - 1]->TimeOfLastAttempt);
-    break;
-    case MAGT_ID_TIME_OF_LAST_SUCCESS:
-        MibInfo->Storage = &(ppIntStatInfo[MibInfo->Oid.ids[MibInfo->Oid.idLength - 1] - 1]->TimeOfLastSuccess);
-    break;
-    case MAGT_ID_FAILURES_SINCE_LAST_SUCCESS:
-        MibInfo->Storage = &(ppIntStatInfo[MibInfo->Oid.ids[MibInfo->Oid.idLength - 1] - 1]->FailuresSinceLastSuccess);
-    break;
-    case MAGT_ID_FAILURES:
-        MibInfo->Storage = &(ppIntStatInfo[MibInfo->Oid.ids[MibInfo->Oid.idLength - 1] - 1]->Failures);
-    break;
-    case MAGT_ID_SUCCESSES:
-        MibInfo->Storage = &(ppIntStatInfo[MibInfo->Oid.ids[MibInfo->Oid.idLength - 1] - 1]->Successes);
-    break;
-    case MAGT_ID_URL:
-	    MibInfo->Storage = ppIntStatInfo[MibInfo->Oid.ids[MibInfo->Oid.idLength  - 1] - 1]->URL.val;  
-    break;
-
-
-   default:
-      break;
-  }
-}
-
-/*-------------------------------------------------------------------------
- *
- * ReadStaticSettingsOverLdap:  Reads static information from the directory server
- *                     
- *
- * Returns:  0 - No error
- *           -1 - Errors
- *
- *-----------------------------------------------------------------------*/
-
-int ReadStaticSettingsOverLdap(MagtLDAPInfo_t ldapInfo, MagtStaticInfo_t *staticInfo, int *SNMPoff)
-{ 
- LDAP *ld;
- LDAPMessage *result, *e;
- BerElement *ber;
- char *a;
- char **vals;
- char *attrs[]={LDAP_ATTR_SNMP_ENABLED, 
-			   LDAP_ATTR_SNMP_DESCRIPTION,
-			   LDAP_ATTR_SNMP_ORGANIZATION,
-			   LDAP_ATTR_SNMP_LOCATION,
-			   LDAP_ATTR_SNMP_CONTACT,
-			   NULL};
- /* set the applIndex to the ldap port */
- staticInfo->ApplIndex = ldapInfo.port;
-
- /* get rest of static settings from the Directory Server */
- if ( ( ld = ldap_init( ldapInfo.host, ldapInfo.port ) ) == NULL ) 
- { 
-	return -1; 
- }
- 
- if ( ldap_simple_bind_s( ld, NULL, NULL) != LDAP_SUCCESS ) 
- {
-    return -1;
- }
-
-
- if ( ldap_search_s( ld, LDAP_CONFIG_DN, LDAP_SCOPE_BASE, BASE_OBJECTCLASS_SEARCH, 
-							attrs, 0, &result ) != LDAP_SUCCESS ) 
- {
-     return -1;
-
- }else{
-	 
-     e = ldap_first_entry( ld, result );
-	 
-	 if(e != NULL)
-	 {
-		for ( a = ldap_first_attribute( ld, e, &ber );
-	          a != NULL; a = ldap_next_attribute( ld, e, ber ) ) 
-	    {
-            if ((vals = ldap_get_values( ld, e, a)) != NULL ) 
-			{
-			   MagtDispStr_t *pStaticAttr=NULL;
-			   /* we only want the first value, ignore any others */
-			   if( 0 == strcmp(LDAP_ATTR_SNMP_ENABLED, a) )
-			   {
-				   if(0 == stricmp(SNMP_ON, vals[0]) )
-				   {
-				       *SNMPoff = 0;
-				   }else{
-					   *SNMPoff = 1;
-				   }
-			   }else if( 0 == strcmp(LDAP_ATTR_SNMP_DESCRIPTION, a) ){
-				   pStaticAttr = &(staticInfo->entityDescr);
-			   }else if( 0 == strcmp(LDAP_ATTR_SNMP_ORGANIZATION, a) ){
-				   pStaticAttr = &(staticInfo->entityOrg);
-			   }else if( 0 == strcmp(LDAP_ATTR_SNMP_LOCATION, a) ){
-				   pStaticAttr = &(staticInfo->entityLocation);
-			   }else if( 0 == strcmp(LDAP_ATTR_SNMP_CONTACT, a) ){
-				   pStaticAttr = &(staticInfo->entityContact);
-			   }
-			   /* stevross: missing the following for NT
-						version
-						DSName
-			   */
-	
-			   /* for Unix also missing
-					MasterHost, MasterPort
-					*/
-			   if(pStaticAttr != NULL && vals[0] != NULL)
-			   {
-			       REPLACE(pStaticAttr->val, vals[0]);
-				   pStaticAttr->len = strlen(pStaticAttr->val);
-			   }
-    
-                ldap_value_free( vals );
-
-            }
-
-            ldap_memfree( a );
-
-        }
-
-        if ( ber != NULL ) 
-		{
-             ldap_ber_free( ber, 0 );
-        }
-    }
- }
-
- ldap_msgfree( result );
- ldap_unbind( ld );
-
- return 0;
-}
-
-/*-------------------------------------------------------------------------
- *
- * MagtLoadStaticInfo:  Loads static information from the configuration
- *                      file.
- *
- * Returns:  0 - No error
- *           -1 - Errors
- *
- *-----------------------------------------------------------------------*/
-
-int MagtLoadStaticInfo(MagtStaticInfo_t *staticInfo, char *pszRootDir, int *SNMPOff, char *pszLogPath)
-{
-  char confpath[MAX_PATH];
-  FILE *fp;
-  char linebuf[MAGT_MAX_LINELEN + 1];
-  int lineLen;
-  char logMsg[1024];
-  MagtLDAPInfo_t ldapInfo;
-
-  /*
-   * Set-up default values first.
-   */
-
-  staticInfo->entityDescr.val = NULL;
-  staticInfo->entityVers.val = NULL;
-  staticInfo->entityOrg.val = NULL;
-  staticInfo->entityLocation.val = NULL;
-  staticInfo->entityContact.val = NULL;
-  staticInfo->entityName.val = NULL;
- 
-  staticInfo->ApplIndex = 0;
- 
-  REPLACE(staticInfo->entityDescr.val, CAPBRAND " Directory Server");
-  staticInfo->entityDescr.len = strlen(staticInfo->entityDescr.val);
- 
-  REPLACE(staticInfo->entityVers.val, "1");
-  staticInfo->entityVers.len = strlen(staticInfo->entityVers.val);
- 
-  REPLACE(staticInfo->entityOrg.val, "Not Available");
-  staticInfo->entityOrg.len = strlen(staticInfo->entityOrg.val);
- 
-  REPLACE(staticInfo->entityLocation.val, "Not Available");
-  staticInfo->entityLocation.len = strlen(staticInfo->entityLocation.val);
- 
-  REPLACE(staticInfo->entityContact.val, "Not Available");
-  staticInfo->entityContact.len = strlen(staticInfo->entityContact.val);
- 
-  REPLACE(staticInfo->entityName.val, "Not Available");
-  staticInfo->entityName.len = strlen(staticInfo->entityName.val);
-
-  /*
-   * Read any config info from dse.ldif (for now its just port used as 
-   * applIndex
-   */
-  
-  wsprintf(confpath, "%s/%s/%s", pszRootDir, MAGT_CONFDIR, DSE_LDIF);
-
-  if ((fp = fopen(confpath, "r")) == (FILE *) NULL)
-  {
-      wsprintf(logMsg,
-                 "Failed to open dse.ldif (error = %d)\n",
-                  errno);
-      MagtLog(logMsg, pszLogPath);
-      return (-1);
-  }
- 
- 
-  while ((lineLen = MagtReadLine(linebuf, MAGT_MAX_LINELEN, fp)) > 0)
-  {
-      /*
-       * Update the configured entries.
-       */
-      MagtConfProcess(linebuf, lineLen, &ldapInfo);
-  }
-  fclose (fp);
- 
-  if( 0 != ReadStaticSettingsOverLdap(ldapInfo, staticInfo, SNMPOff) < 0 )
-  {
-      wsprintf(logMsg,
-               "Failed to read SNMP configuration over ldap\n");
-      MagtLog(logMsg, pszLogPath);
-      return (-1);
-  } 
- 
-  return (0);
-}
-
-/*-------------------------------------------------------------------------
- *
- * MagtLog:  Logs the specified message into the log file.
- *           Notes:  Log file is opened and closed each time.
- *
- * Returns:  None
- *
- *-----------------------------------------------------------------------*/
-
-void MagtLog(char *logMsg, char *pszLogPath)
-{
-  FILE *f;
-  char *szTime;
-
-  f = fopen(pszLogPath, "a");
-  if (!f)
-    return;
-  szTime = MagtLogTime();
-  if (szTime != NULL)
-  {
-    fprintf(f, "%s %s", szTime, logMsg);
-    SNMP_free(szTime);
-  }
-  else					/* No time string returned */
-  {
-    fprintf(f, "%s %s", "00000000000000", logMsg);
-  }
-  fclose(f);
-}
-
-/*-------------------------------------------------------------------------
- *
- * MagtLogTime:  Returns time for logging purpose.
- *
- * Returns:  Formatted time string - No error
- *           "00000000000000" - Errors
- *
- *-----------------------------------------------------------------------*/
-
-char *MagtLogTime()
-{
-  time_t timeNow;
-  struct tm tmLocal;
-  char dateBuf[64];
-  char *timeStr = NULL;
-  static timeZoneSet = MAGT_FALSE;
-
-  timeNow = time(0);
-  memcpy(&tmLocal, localtime(&timeNow), sizeof(tmLocal));
-
-  /*
-   * Set up the timezone information.
-   */
-  if (!timeZoneSet)
-  {
-    tzset();
-    timeZoneSet = MAGT_TRUE;
-  }
-
-  /*
-   * Create the date string.
-   */
-  if (!strftime(dateBuf, 64, "%Y%m%d%H%M%S", &tmLocal))
-  {
-    strcpy(dateBuf, "00000000000000");
-  }
-  REPLACE(timeStr, dateBuf);
-
-  return timeStr;
-}
-
-/*-------------------------------------------------------------------------
- *
- * MagtOpenLog:  Creates and opens the log file.
- *               Backs up any old log file.
- *
- * Returns:  None
- *
- *-----------------------------------------------------------------------*/
-
-void MagtOpenLog(char *pszRootDir, char *pszLogPath)
-{
-  char logDir[MAX_PATH];
-  char oldPath[MAX_PATH];
-  int  fd;
-
-  wsprintf(logDir, "%s\\%s", pszRootDir, "logs");
-  if (mkdir(logDir) != 0)
-  {
-    if (errno != EEXIST)
-      return;
-  }
-
-  wsprintf(pszLogPath, "%s\\%s", logDir, MAGT_LOGFILE);
-  wsprintf(oldPath, "%s\\%s%s", logDir, MAGT_LOGFILE, ".old");
-
-  /*
-   * Rename old log file to keep a back up.
-   */
-  unlink(oldPath);
-  rename(pszLogPath, oldPath);
-  
-  /*
-   * Create and open new log file.
-   */
-  fd = open(pszLogPath,
-            _O_WRONLY | _O_CREAT | _O_TRUNC,
-            _S_IWRITE);
-  if (fd != -1)
-    close(fd);
-}
-
-/*-------------------------------------------------------------------------
- *
- * MagtReadLine:  Reads one line of text (up to n chars) from specified
- *                file.
- *
- * Returns:  Len read - No error
- *           -1 - Errors
- *
- *-----------------------------------------------------------------------*/
-
-int MagtReadLine(char *buf, int n, FILE *fp)
-{
-  if (fgets(buf, n, fp) != NULL)
-  {
-    return(strlen(buf));
-  }
-  else
-  {
-    return(-1);
-  }
-}
-
-
-/*-------------------------------------------------------------------------
- *
- * MagtReadStats:  Reads statistics from stats file.  The hdr and tbl data
- *                 buffers will be filled in if they are not NULL.
- *
- * Returns:  0 - No errors
- *           errno - Errors
- *
- *-----------------------------------------------------------------------*/
-
-int MagtReadStats(MagtHdrInfo_t *hdrInfo, 
-                  MagtOpsTblInfo_t *OpsTblInfo,
-                  MagtEntriesTblInfo_t *EntriesTblInfo,
-                  MagtIntTblInfo_t **IntTblInfo,
-				  char * pszStatsPath,
-				  char * pszLogPath)
-{
-  int hdl;
-  int err;
-  int i;
-  struct agt_stats_t 	*pfile_stats;
-
-    if ((err = agt_mopen_stats(pszStatsPath, O_RDONLY, &hdl)) != 0)
-    {
-
-        /* 
-		   now with multiple instances this function gets called
-		   on every snmprequest. Hence 
-		   logging here became too expensive, now let caller interpret
-		   results and figure out if it should log something or not
-		*/
-		
-		
-        return err;
-    }
-
-  	
-
-	if ( (hdl > 1) || (hdl < 0) )
-	{
-		return (EINVAL); 	/* Inavlid handle */
-	}
-
-	if ((mmap_tbl [hdl].maptype != AGT_MAP_READ) && (mmap_tbl [hdl].maptype != AGT_MAP_RDWR))
-	{
-		return (EINVAL); 	/* Inavlid handle */
-	}
-
-	if (mmap_tbl [hdl].fp <= (caddr_t) 0)
-	{
-		return (EFAULT); 	/* Something got corrupted */
-	}
-
-#if (0)
-	fprintf (stderr, "%s@%d> fp = %d\n",  __FILE__, __LINE__, mmap_tbl [hdl].fp);
-#endif
-
-	pfile_stats = (struct agt_stats_t *) (mmap_tbl [hdl].fp);
-
-  /*
-   * Only fill in buffers if they are not NULL.  This way, one can choose
-   * to get only the hdr info or only the tbl info.
-   */
-  if (hdrInfo != NULL)
-  {
-/* versMajor and versMinor are no longer used. <03/04/05> */ 
-//	hdrInfo->versMajor  = pfile_stats->hdr_stats.hdrVersionMjr;
-//  hdrInfo->versMinor  = pfile_stats->hdr_stats.hdrVersionMnr;
-    hdrInfo->restarted  = pfile_stats->hdr_stats.restarted;
-    hdrInfo->startTime  = pfile_stats->hdr_stats.startTime;
-    hdrInfo->updateTime = pfile_stats->hdr_stats.updateTime;
-  }
-  if (OpsTblInfo != NULL){
-    OpsTblInfo->AnonymousBinds        = pfile_stats->ops_stats.dsAnonymousBinds;
-    OpsTblInfo->UnAuthBinds           = pfile_stats->ops_stats.dsUnAuthBinds;
-    OpsTblInfo->SimpleAuthBinds       = pfile_stats->ops_stats.dsSimpleAuthBinds;
-    OpsTblInfo->StrongAuthBinds       = pfile_stats->ops_stats.dsStrongAuthBinds;
-    OpsTblInfo->BindSecurityErrors    = pfile_stats->ops_stats.dsBindSecurityErrors;
-    OpsTblInfo->InOps                 = pfile_stats->ops_stats.dsInOps;
-    OpsTblInfo->ReadOps               = pfile_stats->ops_stats.dsReadOps;
-    OpsTblInfo->CompareOps            = pfile_stats->ops_stats.dsCompareOps;
-    OpsTblInfo->AddEntryOps           = pfile_stats->ops_stats.dsAddEntryOps;
-    OpsTblInfo->RemoveEntryOps        = pfile_stats->ops_stats.dsRemoveEntryOps;
-    OpsTblInfo->ModifyEntryOps        = pfile_stats->ops_stats.dsModifyEntryOps;
-    OpsTblInfo->ModifyRDNOps          = pfile_stats->ops_stats.dsModifyRDNOps;
-    OpsTblInfo->ListOps               = pfile_stats->ops_stats.dsListOps;
-    OpsTblInfo->SearchOps             = pfile_stats->ops_stats.dsSearchOps;
-    OpsTblInfo->OneLevelSearchOps     = pfile_stats->ops_stats.dsOneLevelSearchOps;
-    OpsTblInfo->WholeSubtreeSearchOps = pfile_stats->ops_stats.dsWholeSubtreeSearchOps;
-    OpsTblInfo->Referrals             = pfile_stats->ops_stats.dsReferrals;
-    OpsTblInfo->Chainings             = pfile_stats->ops_stats.dsChainings;
-    OpsTblInfo->SecurityErrors        = pfile_stats->ops_stats.dsSecurityErrors;
-    OpsTblInfo->Errors                = pfile_stats->ops_stats.dsErrors;
-    OpsTblInfo->ConnectionsInMaxThreads = pfile_stats->ops_stats.dsConnectionsInMaxThreads;
-    OpsTblInfo->ConnectionsMaxThreadsHit = pfile_stats->ops_stats.dsMaxThreadsHit;
-   }
-  if(EntriesTblInfo != NULL){
-    EntriesTblInfo->MasterEntries = pfile_stats->entries_stats.dsMasterEntries;
-    EntriesTblInfo->CopyEntries   = pfile_stats->entries_stats.dsCopyEntries;
-    EntriesTblInfo->CacheEntries  = pfile_stats->entries_stats.dsCacheEntries;
-    EntriesTblInfo->CacheHits     = pfile_stats->entries_stats.dsCacheHits;
-    EntriesTblInfo->SlaveHits     = pfile_stats->entries_stats.dsSlaveHits;
-  }
-
-  if(IntTblInfo != NULL){
-	  for(i=0; i < NUM_SNMP_INT_TBL_ROWS; i++)
-	  {
-
-	      strcpy(IntTblInfo[i]->DsName.val, pfile_stats->int_stats[i].dsName);
-          IntTblInfo[i]->DsName.len               = strlen(pfile_stats->int_stats[i].dsName); 
-	      
-          IntTblInfo[i]->TimeOfCreation           = pfile_stats->int_stats[i].dsTimeOfCreation;
-          IntTblInfo[i]->TimeOfLastAttempt        = pfile_stats->int_stats[i].dsTimeOfLastAttempt;
-          IntTblInfo[i]->TimeOfLastSuccess        = pfile_stats->int_stats[i].dsTimeOfLastSuccess;
-          IntTblInfo[i]->FailuresSinceLastSuccess = pfile_stats->int_stats[i].dsFailuresSinceLastSuccess;
-          IntTblInfo[i]->Failures                 = pfile_stats->int_stats[i].dsFailures;
-          IntTblInfo[i]->Successes                = pfile_stats->int_stats[i].dsSuccesses;
-          strcpy(IntTblInfo[i]->URL.val, pfile_stats->int_stats[i].dsURL);
-          IntTblInfo[i]->URL.len                  = strlen(pfile_stats->int_stats[i].dsURL); 
-
-	  }
-  }
-  
-  agt_mclose_stats(hdl); 
-  return 0;
-}
-
-/*-------------------------------------------------------------------------
- *
- * DllMain:  Standard WIN32 DLL entry point.
- *
- * Returns:  TRUE
- *
- *-----------------------------------------------------------------------*/
-
-BOOL WINAPI DllMain(HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
-{
-  
-  switch(dwReason)
-  {
-    case DLL_PROCESS_ATTACH:
-    case DLL_THREAD_ATTACH:
-    case DLL_THREAD_DETACH:
-      break;
-    case DLL_PROCESS_DETACH:
-      MagtCleanUp();
-      break;
-    default:
-      break;
-  }
-    
-  return TRUE;
-}
-
-/*-------------------------------------------------------------------------
- *
- * SnmpExtensionInit:  Entry point to coordinate the initializations of the
- *                     Extension Agent and the Extendible Agent.  The
- *                     Extendible Agent provides the Extension Agent with a
- *                     time zero reference; and the Extension Agent
- *                     provides the Extendible Agent with an Event handle
- *                     for communicating occurence of traps, and an object
- *                     identifier representing the root of the MIB subtree
- *                     that the Extension Agent supports.
- *
- * Returns:  TRUE - No error
- *           FALSE - Errors
- *
- *-----------------------------------------------------------------------*/
-
-BOOL WINAPI SnmpExtensionInit(IN DWORD dwTimeZeroReference,
-                              OUT HANDLE *hPollForTrapEvent,
-                              OUT AsnObjectIdentifier *supportedView)
-{
-  int nMibIndex = 0;
-  SECURITY_ATTRIBUTES sa;
-  PSECURITY_ATTRIBUTES psa = NULL;
-  SECURITY_DESCRIPTOR sd;
-  char logMsg[1024];
-  int i;
-  
-  instance_list_t *pInstance;
-
-  /*
-   * Record the time reference provided by the Extendible Agent.
-   */
-
-  dwTimeZero = dwTimeZeroReference;
-
-  /*
-   * Create a security descriptor that gives everyone access to the
-   * trap event.  This is so that the SNMP process can set the event
-   * when it detects that the server is up or down.  Without this
-   * relaxed ACL, the SNMP process which usually runs as the Netscape
-   * DS user can not set the trap event created by this DLL which is
-   * loaded by the Extendible Agent, which usually runs as LocalSystem.
-   */
-  if (InitializeSecurityDescriptor(&sd,
-        SECURITY_DESCRIPTOR_REVISION) == TRUE)
-  {
-    if (SetSecurityDescriptorDacl(&sd, TRUE, NULL, FALSE) == TRUE)
-    {
-      sa.nLength = sizeof(SECURITY_ATTRIBUTES);
-      sa.bInheritHandle = TRUE;
-      sa.lpSecurityDescriptor = &sd;
-      psa = &sa;
-    }
-  }
-  
-  /*
-   * Create an event that will be used to communicate the occurence of
-   * traps to the Extendible Agent.
-   * The event will have a signaled initial state so that the status of
-   * the server can be checked as soon as the subagent is loaded and
-   * the necessary trap will be generated.
-   */
-   if ((*hPollForTrapEvent = CreateEvent(psa, 
-                                         FALSE, 
-                                         FALSE,
-                                         MAGT_NSEV_SNMPTRAP)) == NULL)
-   {
-       return FALSE;
-   }
-  
-  /*
-   * Indicate the MIB view supported by this Extension Agent, an object
-   * identifier representing the sub root of the MIB that is supported.
-   */
-  *supportedView = MIB_OidPrefix;
-
-
-  /*
-   * Initialize globals.
-   */
- 
-  if ( !_FindNetscapeServers() )
-  {
-      return FALSE;
-  }
-
-  for (pInstance = pInstanceList; pInstance; pInstance = pInstance->pNext) 
-  {
-      MagtInitInstance(pInstance);
-  }
-
-  for (pInstance = pInstanceList; pInstance; pInstance = pInstance->pNext) 
-  {
-	  /* build the mib */
-
-	  if ((pInstance->pOpsStatInfo = (MagtOpsTblInfo_t *) GlobalAlloc(GPTR, 
-                                     sizeof(MagtOpsTblInfo_t))) == NULL)
-	  {
-		  wsprintf(logMsg, "Failed to allocate ops stats structure (error = %d)\n",
-					GetLastError());
-		  MagtLog(logMsg, pInstance->szLogPath);
-		  return FALSE;
-	  }
-
-	  if ((pInstance->pEntriesStatInfo = (MagtEntriesTblInfo_t *) GlobalAlloc(GPTR, 
-                                          sizeof(MagtEntriesTblInfo_t))) == NULL)
-	  {
-		  wsprintf(logMsg, "Failed to allocate entries stat structure (error = %d)\n",
-                   GetLastError());
-          MagtLog(logMsg, pInstance->szLogPath);
-          return FALSE;
-      }
-
-	  if ((pInstance->ppIntStatInfo = (MagtIntTblInfo_t **) GlobalAlloc(GPTR, 
-                                     NUM_SNMP_INT_TBL_ROWS * sizeof(MagtIntTblInfo_t *))) == NULL)
-	  {
-		  wsprintf(logMsg, "Failed to allocate interaction stat structure (error = %d)\n",
-                   GetLastError());
-          MagtLog(logMsg, pInstance->szLogPath);
-          return FALSE;
-	  }
-
-	  for(i =0; i < NUM_SNMP_INT_TBL_ROWS; i++)
-	  {
-		  pInstance->ppIntStatInfo[i] = (MagtIntTblInfo_t *) GlobalAlloc(GPTR, 
-		                                sizeof(MagtIntTblInfo_t));
-
-	      /* make the static char for name and url so they have one address for later use */
-	      pInstance->ppIntStatInfo[i]->DsName.val = (char *) GlobalAlloc(GPTR, 
-											                  100 * sizeof(char));
-	      pInstance->ppIntStatInfo[i]->URL.val =    (char *) GlobalAlloc(GPTR, 
-															  100 *	sizeof(char));
-	  }
-
-	  /* initialize the stats we just allocated */
-	  MagtInitStats(pInstance->pOpsStatInfo, 
-		            pInstance->pEntriesStatInfo, 
-					pInstance->ppIntStatInfo);
-	  
-	  
-	  if( Mib_init(&(pInstance->pMibInfo), pInstance->pCfgInfo->ApplIndex) == -1)
-	  {
-		  wsprintf(logMsg, "Failed to create Mib structure (error = %d)\n",
-                   GetLastError());
-          MagtLog(logMsg, pInstance->szLogPath);
-          return FALSE;
- 	  }
-
-	  for (nMibIndex = 0; nMibIndex < (int) MIB_num_vars; nMibIndex++)
-	  {
-	  	  MagtInitMibStorage(&(pInstance->pMibInfo[nMibIndex]),
-							   pInstance->pOpsStatInfo,
-							   pInstance->pEntriesStatInfo,
-							   pInstance->ppIntStatInfo,
-							   pInstance->pCfgInfo);
-	  }
-	
-
-      /*
-       * Construct the path to stats file.
-       */
-       wsprintfA(pInstance->szStatsPath, "%s/logs/%s", pInstance->szRootDir, 
-		         AGT_STATS_FILE);
-
-       if (MagtReadStats(NULL, pInstance->pOpsStatInfo, 
-		                 pInstance->pEntriesStatInfo, 
-						 pInstance->ppIntStatInfo,
-						 pInstance->szStatsPath,
-						 pInstance->szLogPath) != 0)
-       {
-	       wsprintf(logMsg,
-                    "Failed to open Memory Mapped Stats File. Make sure ns-slapd is running\n",
-                    GetLastError());
-           MagtLog(logMsg, pInstance->szLogPath);
-       }
- 
-	   	
-  }
-    
-  /* now that all mib's set up set next pointer from last entry to first 
-	 entry of next instance */
-
-  for (nMibIndex = 0; nMibIndex < (int) MIB_num_vars; nMibIndex++)
-  {
-
-      for (pInstance = pInstanceList; pInstance; pInstance = pInstance->pNext) 
-	  {
-	      if(pInstance->pNext != NULL)
-	      {
-              pInstance->pMibInfo[nMibIndex].MibNext = &(pInstance->pNext->pMibInfo[nMibIndex]);
-	      }else{
-		      if (nMibIndex + 1 != (int) MIB_num_vars) 
-		      { 
-			      pInstance->pMibInfo[nMibIndex].MibNext = &(pInstanceList->pMibInfo[nMibIndex + 1]); 
-			  } 
-		  }
-      }  
-
-    
-  }
-
-  /*
-   * Set event to have SnmpExtensionTrap invoked for initial check of
-   * Server status.
-   */
-  if (SetEvent(*hPollForTrapEvent) == FALSE)
-  {
-	/* don't have a specific instance to log it to, find something better to do later */
-  }
-  
-  return TRUE;
-}
-
-/*-------------------------------------------------------------------------
- *
- * SnmpExtensionTrap:  Entry point to communicate traps to the Extendible
- *                     Agent.  The Extendible Agent will query this entry
- *                     point when the trap event (supplied at initialization
- *                     time) is asserted, which indicates that zero or more
- *                     traps may have occured.  The Extendible Agent will
- *                     repeatedly call this entry point until FALSE is
- *                     returned, indicating that all outstanding traps have
- *                     been processed.
- *
- * Returns:  TRUE - Valid trap data
- *           FALSE - No trap data 
- *
- *-----------------------------------------------------------------------*/
-
-BOOL WINAPI SnmpExtensionTrap(OUT AsnObjectIdentifier *enterprise,
-                              OUT AsnInteger *genericTrap,
-                              OUT AsnInteger *specificTrap,
-                              OUT AsnTimeticks *timeStamp,
-                              OUT RFC1157VarBindList *variableBindings)
-{
-  static UINT oidList[] = {1, 3, 6, 1, 4, 1, 1450};
-  static UINT oidListLen = MAGT_OID_SIZEOF(oidList);
-  static RFC1157VarBind *trapVars = NULL;
-  static MagtTrapTask_t trapTask = MAGT_TRAP_GENERATION;
-  int nVarLen;
-  char logMsg[1024];
-  instance_list_t *pInstance;
-  
-  
-  if (trapTask == MAGT_TRAP_CLEANUP)
-  {
-      if (variableBindings->list != NULL)
-          SNMP_FreeVarBind(variableBindings->list);
- 
-	  trapTask = MAGT_TRAP_GENERATION;
-  }
-
-
-  if (trapTask == MAGT_TRAP_GENERATION)
-  {
-
-      for (pInstance = pInstanceList; pInstance; pInstance = pInstance->pNext)
-	  {
-          MagtCheckServer(pInstance);
-
-          /*
-           * If there is no trap to be generated for this instance keep looking at other
-		   *  instances.
-           */
-           if (pInstance->trapType == MAGT_TRAP_NONE)
-		   {
-              continue;
-		   }
-
-           enterprise->ids = (UINT *) SNMP_malloc(sizeof(UINT) * oidListLen);
-           if (enterprise->ids == NULL)
-           {
-               wsprintf(logMsg,
-                        "Failed to allocate enterprise id\n");
-               MagtLog(logMsg, pInstance->szLogPath);
-               return FALSE;
-           }
-           enterprise->idLength = oidListLen;
-           memcpy(enterprise->ids, oidList, sizeof(UINT) * oidListLen);
-
-           *genericTrap = SNMP_GENERICTRAP_ENTERSPECIFIC; 
-           *specificTrap = pInstance->trapType;
-           *timeStamp = GetCurrentTime() - dwTimeZero;
-    
-           /*
-            * Set up the variable binding list with variables specified in the MIB
-            * for each trap.
-            */
-           if ((trapVars = SNMP_malloc(sizeof(RFC1157VarBind) * 4)) == NULL)
-           {
-               wsprintf(logMsg,
-                        "Failed to allocate trap variables\n");
-               MagtLog(logMsg, pInstance->szLogPath);
-               SNMP_oidfree(enterprise);
-               return FALSE;
-		   }
-
-           if ((nVarLen = MagtFillTrapVars(pInstance->trapType, trapVars, pInstance->pCfgInfo)) == 0)
-           {
-               wsprintf(logMsg,
-                        "Failed to fill trap variables\n");
-               MagtLog(logMsg, pInstance->szLogPath);
-               SNMP_free(trapVars);
-               SNMP_oidfree(enterprise);
-               return FALSE;
-           }
-
-           variableBindings->list = trapVars;
-           variableBindings->len = nVarLen;
-
-           trapTask = MAGT_TRAP_CLEANUP;
-
-           wsprintf(logMsg,
-                    "Sending trap %d\n",
-                    pInstance->trapType);
-           MagtLog(logMsg, pInstance->szLogPath);
-
-		   /* reset the trap type for this instance */
-		   pInstance->trapType = MAGT_TRAP_NONE;
-
-           /*
-            * Indicate that a trap should be sent and parameters contain valid
-            * data.
-            */
-            return TRUE;
-        }
-        
-
-    }
-
-    /*
-     * Indicate that no more traps are available and parameters do not
-     * refer to any valid data.
-     */
-
-     return FALSE;
-}
-
-/*-------------------------------------------------------------------------
- *
- * SnmpExtensionQuery:  Entry point to resolve queries for MIB variables in
- *                      their supported MIB view (supplied at
- *                      initialization time).  The supported requestType is
- *                      Get/GetNext.
- *
- * Returns:  TRUE - No error
- *           FALSE - Errors
- *
- *-----------------------------------------------------------------------*/
-
-BOOL WINAPI SnmpExtensionQuery(IN BYTE requestType,
-                               IN OUT RFC1157VarBindList *variableBindings,
-                               OUT AsnInteger *errorStatus,
-                               OUT AsnInteger *errorIndex)
-{
-  static time_t lastChkTime = 0;
-  UINT i;
-  HANDLE hTrapEvent;
-  time_t currTime;
-   
-  /*
-   * Check for valid input.
-   */
-  
-  if (variableBindings == NULL ||
-      errorStatus == NULL ||
-      errorIndex == NULL)
-  {
-      return FALSE;
-  }
-
-  /*
-   * Iterate through the variable bindings list to resolve individual
-   * variable bindings.
-   */
-
-  for (i = 0; i < variableBindings->len; i++)
-  {
-    *errorStatus = MagtResolveVarBind(&variableBindings->list[i], 
-                                      requestType);
-
-    /*
-     * Test and handle case where GetNext past end of MIB view supported by
-     * this Extension Agent occurs.  Special processing is required to 
-     * communicate this situation to the Extendible Agent so it can take
-     * appropriate action.
-     */
-    if (*errorStatus == SNMP_ERRORSTATUS_NOSUCHNAME &&
-        requestType == MAGT_MIB_ACTION_GETNEXT)
-    {
-      *errorStatus = SNMP_ERRORSTATUS_NOERROR;
-
-      /*
-       * Modify variable binding of such variables so the OID points just
-       * outside the MIB view supported by this Extension Agent.  The
-       * Extendible Agent tests for this, and takes appropriate action.
-       */
-      SNMP_oidfree(&variableBindings->list[i].name);
-      SNMP_oidcpy(&variableBindings->list[i].name, &MIB_OidPrefix);
-      variableBindings->list[i].name.ids[MAGT_MIB_PREFIX_LEN - 1]++;
-    }
-
-    /*
-     * If an error was indicated, communicate error status and error index
-     * to the Extendible Agent.  The Extendible Agent will ensure that the
-     * original variable bindings are returned in the response packet.
-     */
-    if (*errorStatus != SNMP_ERRORSTATUS_NOERROR)
-    {
-      *errorIndex = i + 1;
-      return FALSE;
-    }
-  }
-
-  /* 
-   * Before going back, set the trap event so server status can be checked
-   * to see if a trap needs to be generated.  This is to cover the case the
-   * SNMP process is unable to set the trap event because it is stuck.
-   */
-  currTime = time(0);
-
-  /*
-   * If just check status, do not generate event again.
-   */
-  if ((currTime - lastChkTime) >= MAGT_TIME_QUANTUM * 3)
-  {
-    if ((hTrapEvent = OpenEvent(EVENT_MODIFY_STATE, FALSE,
-                                (LPCTSTR)MAGT_NSEV_SNMPTRAP)) != NULL)
-      SetEvent(hTrapEvent);
-
-    lastChkTime = currTime;
-  }
-
-  return TRUE;
-}
-
-
-/* --- Open Function --------------------------------------------------------------------- */    
-
-
-/* _FindNetscapeServers()
- * Function to loop through registry looking for netscape servers 
- * Stores them into pInstanceList as it finds them.
- */
-
-#define MAX_KEY_SIZE 128
-DWORD
-_FindNetscapeServers()
-{
-	LONG	regStatus,
-			status;
-	HKEY	hKeyNetscape = NULL,
-			hKeyNetscapeConf;
-	DWORD	dwKey, 
-			type,
-			dwServerKeySize, 
-			size,
-			dwServerCount = 0;
-	WCHAR	szServerKeyName[MAX_KEY_SIZE],
-			szPath[MAX_KEY_SIZE];
-	FILETIME fileTime;
-	instance_list_t *pNew;
-	instance_list_t *pCurrent;
-	DWORD	iUniqueID = 0;
-	char logMsg[1024];
-    regStatus = RegOpenKeyEx( 
-		HKEY_LOCAL_MACHINE,
-        TEXT(KEY_SOFTWARE_NETSCAPE) TEXT("\\") TEXT(DS_KEY_ROOT),
-		0L,
-		KEY_ALL_ACCESS,
-		&hKeyNetscape);
-
-	if (regStatus != ERROR_SUCCESS) {
-		goto ExitPoint;
-	}
-
-	dwKey = 0;
-	do {
-		dwServerKeySize = MAX_KEY_SIZE;
-		regStatus = RegEnumKeyEx(
-			hKeyNetscape,
-			dwKey,
-			(char *) szServerKeyName,
-			&dwServerKeySize,
-			NULL,
-			0,
-			0,
-			&fileTime);
-		dwKey++;
-
-		if (regStatus == ERROR_SUCCESS) {
-
-			regStatus = RegOpenKeyEx( 
-				hKeyNetscape,
-				(char *) szServerKeyName,
-				0L,
-				KEY_ALL_ACCESS,
-				&hKeyNetscapeConf);
-
-			if (regStatus != ERROR_SUCCESS) {
-				continue;
-			}
-
-			/* Now look for "ConfigurationPath" to find 3.0 netscape servers */
-			size = MAX_KEY_SIZE;
-       		status = RegQueryValueEx(
-						hKeyNetscapeConf, 
-						TEXT(VALUE_CONFIG_PATH),
-						0L,
-						&type,
-						(LPBYTE)szPath,
-						&size);
-			if ( status == ERROR_SUCCESS ) {
-				/* this is a netscape server */
-				if ( (pNew = (instance_list_t *)malloc(sizeof(instance_list_t))) == NULL) {
-					status = (unsigned long)-1;
-					RegCloseKey(hKeyNetscapeConf);
-					goto ExitPoint;
-				}
-				if ( (pNew->pInstanceName = (PWCH)malloc(sizeof(WCHAR) *(dwServerKeySize+1))) == NULL) {
-					status = (unsigned long)-1;
-					RegCloseKey(hKeyNetscapeConf);
-					goto ExitPoint;
-				}
-				if ( (pNew->pConfPath = (PWCH)malloc(sizeof(WCHAR) *(size+1))) == NULL) {
-					status = (unsigned long)-1;
-					RegCloseKey(hKeyNetscapeConf);
-					goto ExitPoint;
-				}
-				
-								
-				pNew->Handle = 0;
-				pNew->pData = NULL;
-
-				pNew->instance.ParentObjectTitleIndex = 0;
-				pNew->instance.ParentObjectInstance = 0;
-				pNew->instance.UniqueID	= -1;
-				pNew->instance.NameOffset = sizeof(PERF_INSTANCE_DEFINITION);
-				lstrcpy((char *) pNew->pInstanceName, (char *) szServerKeyName);
-
-				lstrcpy((char *) pNew->pConfPath, (char *) szPath);
-	
-				pNew->instance.NameLength = (dwServerKeySize+1) * sizeof(WCHAR);
-				pNew->instance.ByteLength = sizeof(PERF_INSTANCE_DEFINITION) + 
-						(((pNew->instance.NameLength + sizeof(DWORD)-1)/sizeof(DWORD))*sizeof(DWORD));
-				pNew->instance.UniqueID = iUniqueID++;
-						
-				wsprintf(pNew->szLogPath, "\\%s", MAGT_LOGFILE);
-                if( ((char *) pNew->szRootDir = getRootDirFromConfFile(pNew->pConfPath) ) != NULL)
-	            {
-                    /* can only check if getRootDir */
-
-					/* open the log */
-					
- 				    MagtOpenLog(pNew->szRootDir, pNew->szLogPath);
-
-	                if ((pNew->pCfgInfo = (MagtStaticInfo_t *) GlobalAlloc(GPTR, 
-                                                      sizeof(MagtStaticInfo_t))) == NULL)
-	                {
-						/* something fatal happened but try to free this
-						   node that won't be used anyway
-						 */
-						if(pNew != NULL)
-						{
-							free(pNew);
-						}
-                        status = (unsigned long)-1;
-					    goto ExitPoint;
-                    }
-	  
-                    MagtLoadStaticInfo(pNew->pCfgInfo, pNew->szRootDir, &pNew->SNMPOff, pNew->szLogPath);
-					
-                
-                    if ( pNew->SNMPOff )
-                    {
-                        wsprintf(logMsg,
-                                 "SNMP subagent is not configured to be on\n");
-                        MagtLog(logMsg, pNew->szLogPath);
-
-						/* since not adding this to list free it */
-						if(pNew != NULL)
-						{
-							free(pNew);
-						}
-                    }else{
-					    /* new instance that is on to add to list */
-		            	               			
-				        /* if first element null or less than first element add to beginning */
-				        if(   (pInstanceList == NULL) 
-					       || (pNew->pCfgInfo->ApplIndex < pInstanceList->pCfgInfo->ApplIndex) )
-				        {
-					        pNew->pNext = pInstanceList;
-					        pInstanceList = pNew;
-				        }else{
-					        /* must be after first element */
-					        for(pCurrent= pInstanceList; pCurrent; pCurrent=pCurrent->pNext)
-					        {
-								if(pNew->pCfgInfo->ApplIndex == pCurrent->pCfgInfo->ApplIndex)
-								{
-								    /* ApplIndex must be unique, another instance on this host
-								       is already configured to be on using this applIndex,
-								       so I can't monitor this one. Log the error and
-								       don't add this instance to the list */
-
-								    wsprintf(logMsg,
-									    "Another server instance with this ApplIndex: %d is already being" 
-									    " monitored. ApplIndex must be unique. Turn off"
-									    " SNMP monitoring of the other server instance or change"
-									    " the ApplIndex of one of the server instances.\n", 
-										pNew->pCfgInfo->ApplIndex);
-                                    MagtLog(logMsg, pNew->szLogPath);
-
-						            /* since not adding this to list free it */
-						            if(pNew != NULL)
-						            {
-							            free(pNew);
-						            }
-							    }else if(   (pCurrent->pNext == NULL)
-						           || (   (pNew->pCfgInfo->ApplIndex > pCurrent->pCfgInfo->ApplIndex)
-						                && (pNew->pCfgInfo->ApplIndex < pCurrent->pNext->pCfgInfo->ApplIndex)) )
-						        {
-									/* if next is null or if greater this element and less then next one
-						               add it inbetween */
-							        pNew->pNext=pCurrent->pNext;
-							        pCurrent->pNext=pNew;
-									break;
-						        }
-					        }
-				        }
-					}
-				}
-				dwServerCount++;
-			}
-
-			RegCloseKey(hKeyNetscapeConf);
-		}
-
-	} while ( regStatus != ERROR_NO_MORE_ITEMS );
-
-ExitPoint:
-	if (hKeyNetscape)
-		RegCloseKey (hKeyNetscape); 
-
-	return dwServerCount;
-}
-
diff --git a/ldap/servers/snmp/ntagt/nsldapagt_nt.def b/ldap/servers/snmp/ntagt/nsldapagt_nt.def
deleted file mode 100644
index 31e8d5a..0000000
--- a/ldap/servers/snmp/ntagt/nsldapagt_nt.def
+++ /dev/null
@@ -1,56 +0,0 @@
-; BEGIN COPYRIGHT BLOCK
-; This Program is free software; you can redistribute it and/or modify it under
-; the terms of the GNU General Public License as published by the Free Software
-; Foundation; version 2 of the License.
-; 
-; This Program is distributed in the hope that it will be useful, but WITHOUT
-; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-; 
-; You should have received a copy of the GNU General Public License along with
-; this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-; Place, Suite 330, Boston, MA 02111-1307 USA.
-; 
-; In addition, as a special exception, Red Hat, Inc. gives You the additional
-; right to link the code of this Program with code not covered under the GNU
-; General Public License ("Non-GPL Code") and to distribute linked combinations
-; including the two, subject to the limitations in this paragraph. Non-GPL Code
-; permitted under this exception must only link to the code of this Program
-; through those well defined interfaces identified in the file named EXCEPTION
-; found in the source code files (the "Approved Interfaces"). The files of
-; Non-GPL Code may instantiate templates or use macros or inline functions from
-; the Approved Interfaces without causing the resulting work to be covered by
-; the GNU General Public License. Only Red Hat, Inc. may make changes or
-; additions to the list of Approved Interfaces. You must obey the GNU General
-; Public License in all respects for all of the Program code and other code used
-; in conjunction with the Program except the Non-GPL Code covered by this
-; exception. If you modify this file, you may extend this exception to your
-; version of the file, but you are not obligated to do so. If you do not wish to
-; provide this exception without modification, you must delete this exception
-; statement from your version and license this file solely under the GPL without
-; exception. 
-; 
-; 
-; Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-; Copyright (C) 2005 Red Hat, Inc.
-; All rights reserved.
-; END COPYRIGHT BLOCK
-;
-LIBRARY ns-ldapagt
-
-DESCRIPTION 'Dirsrv SNMP Agent'
-
-CODE  LOADONCALL MOVEABLE DISCARDABLE
-DATA  PRELOAD    MOVEABLE SINGLE
-
-SEGMENTS
-  _TEXT      PRELOAD
-  INIT_TEXT  PRELOAD
-
-HEAPSIZE  1024
-
-EXPORTS
-  SnmpExtensionInit
-  SnmpExtensionTrap
-  SnmpExtensionQuery
-
diff --git a/ldap/servers/snmp/ntagt/nsldapagt_nt.h b/ldap/servers/snmp/ntagt/nsldapagt_nt.h
deleted file mode 100644
index 51d4cd3..0000000
--- a/ldap/servers/snmp/ntagt/nsldapagt_nt.h
+++ /dev/null
@@ -1,268 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-
-/*-------------------------------------------------------------------------
- *
- * nsldapagt_nt.h - Definitions for NS Directory Server's SNMP subagent on
- *                  NT.
- * 
- * Revision History:
- * 07/25/1997		Steve Ross	Created
- *
- *
- *-----------------------------------------------------------------------*/
-
-#ifndef __NSLDAPAGT_NT_H_
-#define __NSLDAPAGT_NT_H_
-
-/*-------------------------------------------------------------------------
- *
- * Defines 
- *
- *-----------------------------------------------------------------------*/
-
-#define MAGT_MAX_LINELEN 255
-#define MAGT_CONFFILE "snmp.conf"
-#define MAGT_CONFDIR  "config"
-#define DSE_LDIF "dse.ldif"
-#define MAGT_LOGFILE "nsldapagt.log"
-#define MAGT_TIME_QUANTUM 10
-
-#define MAGT_TRAP_NONE 0
-#define MAGT_TRAP_SERVER_DOWN 7001
-#define MAGT_TRAP_SERVER_START 7002
-
-#define LDAP_CONFIG_DN "cn=SNMP,cn=config"
-#define BASE_OBJECTCLASS_SEARCH "objectclass=*"
-
-#define LDAP_ATTR_SNMP_ENABLED			"nssnmpenabled"
-#define LDAP_ATTR_SNMP_DESCRIPTION		"nssnmpdescription"
-#define LDAP_ATTR_SNMP_ORGANIZATION		"nssnmporganization"
-#define LDAP_ATTR_SNMP_LOCATION			"nssnmplocation"
-#define LDAP_ATTR_SNMP_CONTACT			"nssnmpcontact"
-
-#define SNMP_ON "ON"
-
-/*-------------------------------------------------------------------------
- *
- * Types
- *
- *-----------------------------------------------------------------------*/
- 
-typedef enum
-{
-  MAGT_FALSE = 0,
-  MAGT_TRUE
-} MagtBool_t;
-
-typedef enum
-{
-  MAGT_TRAP_GENERATION,
-  MAGT_TRAP_CLEANUP
-} MagtTrapTask_t;
-
-typedef struct MagtDispStr
-{
-  int len;
-  unsigned char *val;
-} MagtDispStr_t;
-
-typedef struct MagtStaticInfo
-{
-  MagtDispStr_t entityDescr;
-  MagtDispStr_t entityVers;
-  MagtDispStr_t entityOrg;
-  MagtDispStr_t entityLocation;
-  MagtDispStr_t entityContact;
-  MagtDispStr_t entityName;
-  int ApplIndex;
-
-} MagtStaticInfo_t;
-
-typedef struct MagtLDAPInfo
-{
-  char *host;
-  int port;
-  char *rootdn;
-  char *rootpw;
-
-
-} MagtLDAPInfo_t;
-
-typedef struct MagtHdrInfo
-{
-/* versMajor and versMinor are no longer used. <03/04/05> */
-//  int versMajor;
-//  int versMinor;
-  int restarted;
-  time_t startTime;
-  time_t updateTime;
-} MagtHdrInfo_t;
-
-typedef struct MagtOpsTblInfo
-{
-  int AnonymousBinds;
-  int UnAuthBinds;
-  int SimpleAuthBinds;
-  int StrongAuthBinds;
-  int BindSecurityErrors;
-  int InOps;
-  int ReadOps;
-  int CompareOps;
-  int AddEntryOps;
-  int RemoveEntryOps;
-  int ModifyEntryOps;
-  int ModifyRDNOps;
-  int ListOps;
-  int SearchOps;
-  int OneLevelSearchOps;
-  int WholeSubtreeSearchOps;
-  int Referrals;
-  int Chainings;
-  int SecurityErrors;
-  int Errors;
-  int ConnectionsInMaxThreads;
-  int ConnectionsMaxThreadsHit;
-} MagtOpsTblInfo_t;
-
-typedef struct MagtEntriesTblInfo
-{
-  int MasterEntries;
-  int CopyEntries;
-  int CacheEntries;
-  int CacheHits;
-  int SlaveHits;
-} MagtEntriesTblInfo_t;
-
-typedef struct MagtIntTblInfo
-{
-  MagtDispStr_t DsName;
-  time_t        TimeOfCreation;
-  time_t        TimeOfLastAttempt;
-  time_t        TimeOfLastSuccess;
-  int           FailuresSinceLastSuccess;
-  int           Failures;
-  int           Successes;
-  MagtDispStr_t URL;
-}MagtIntTblInfo_t;
-
-typedef struct instance_list_t {
-	PERF_INSTANCE_DEFINITION	instance;
-	PWSTR						pInstanceName;
-	PWSTR						pConfPath;
-	int							Handle;
-	struct agt_stats_t *		pData;
-	HANDLE                      ghTrapEvent;
-	MagtOpsTblInfo_t *          pOpsStatInfo;
-    MagtEntriesTblInfo_t *      pEntriesStatInfo;
-    MagtIntTblInfo_t **         ppIntStatInfo;
-    MagtStaticInfo_t *          pCfgInfo;
-    MagtMibEntry_t *            pMibInfo;
-    char *                      szRootDir;
-    char                        szLogPath[MAX_PATH];
-    char                        szStatsPath[MAX_PATH];
-    int SNMPOff;
-
-
-	/* trap stuff */
-	time_t                      oldUpdateTime;
-    time_t                      oldStartTime;
-    int                         graceCycles;
-    MagtBool_t                  mmapStale; 
-    MagtBool_t                  mmapOk;
-    MagtBool_t                  serverUp;
-    MagtBool_t                  downTrapSent;
-    int                         trapType;
-    MagtHdrInfo_t               hdrInfo;
-
-	struct instance_list_t *	pNext;
-} instance_list_t;
-
-/*-------------------------------------------------------------------------
- *
- * Prototypes
- *
- *-----------------------------------------------------------------------*/
-
-int MagtCheckServer(instance_list_t *pInstance);
-
-void MagtCleanUp();
-
-void MagtConfProcess(char *line, int lineLen, 
-                     MagtLDAPInfo_t *info);
-
-char *MagtGetRootDir(void);
-
-
-void MagtInitMibStorage(MagtMibEntry_t *        MibInfo, 
-						MagtOpsTblInfo_t *      pOpsStatInfo,
-						MagtEntriesTblInfo_t *  pEntriesStatInfo, 
-						MagtIntTblInfo_t **     ppIntStatInfo,
-						MagtStaticInfo_t *      pCfgInfo);
-
-
-int MagtLoadStaticInfo(MagtStaticInfo_t *staticInfo, char *pszRootDir, int *SNMPOff, char *pszLogPath);
-
-void MagtLog(char *logMsg, char *pszLogPath);
-
-char *MagtLogTime();
-
-void MagtOpenLog(char *pszRootDir, char *pszLogPath);
-
-int MagtReadLine(char *buf, 
-                 int n, 
-                 FILE *fp);
-
-int MagtReadStats(MagtHdrInfo_t *hdrInfo, 
-                  MagtOpsTblInfo_t *OpsTblInfo,
-                  MagtEntriesTblInfo_t *EntriesTblInfo,
-                  MagtIntTblInfo_t **IntTblInfo,
-				  char * pszStatsPath,
-				  char * pszLogPath);
-
-DWORD _FindNetscapeServers();
-
-extern instance_list_t *pInstanceList;
-
-
-#endif					/* __NSLDAPAGT_NT_H_ */
diff --git a/ldap/servers/snmp/ntagt/nsldapmib_nt.c b/ldap/servers/snmp/ntagt/nsldapmib_nt.c
deleted file mode 100644
index b319457..0000000
--- a/ldap/servers/snmp/ntagt/nsldapmib_nt.c
+++ /dev/null
@@ -1,1078 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-
-/*-------------------------------------------------------------------------
- *
- * nsldapmib_nt.c - NS Directory Server's MIB for extended SNMP agent
- *                  on NT.
- * 
- * Revision History:
- * 07/25/1997	Steve Ross	Created
- *
- * 
- *-----------------------------------------------------------------------*/
-
-#include <stdio.h>
-#include <malloc.h>
-#include <time.h>
-#include <windows.h>
-#include <malloc.h>
-#include <snmp.h>
-#include <mgmtapi.h>
-#include "nsldapmib_nt.h"
-#include "nsldapagt_nt.h"
-#include "agtmmap.h"
-
-/*-------------------------------------------------------------------------
- *
- * Globals
- *
- *-----------------------------------------------------------------------*/
-
-/*
- * For ldap, the prefix to all MIB variables is 1.3.6.1.4.1.1450.7
- */
-UINT OID_Prefix[] = {1, 3, 6, 1, 4, 1, 1450, 7};
-AsnObjectIdentifier MIB_OidPrefix = {MAGT_OID_SIZEOF(OID_Prefix), 
-                                     OID_Prefix};
-
-/*
- * OID of each MIB variable.
- * For example, the OID for mtaReceivedMessages is:
- *  1.3.6.1.4.1.1450.7
- *  
- *  - nsldap        = netscape 7
- *  -dsOpsTable     = nsldap 1
- *  -dsEntriesTable = nsldap 2
- *	-dsIntTable     = nsldap 3
- *	-dsEntityINfo   = nsldap 5
- *    
- */
-
-
-UINT OID_ApplIndex[]		     = {389};
-/* setup the parts of the OID we know in advance */
-          
-/* ops table */
-UINT OID_AnonymousBinds[]		 = {1, 1,  1};
-UINT OID_UnAuthBinds[]			 = {1, 1,  2};
-UINT OID_SimpleAuthBinds[]		 = {1, 1,  3};
-UINT OID_StrongAuthBinds[]		 = {1, 1,  4};
-UINT OID_BindSecurityErrors[]	 = {1, 1,  5};
-UINT OID_InOps[]			     = {1, 1,  6};
-UINT OID_ReadOps[]			     = {1, 1,  7};
-UINT OID_CompareOps[]			 = {1, 1,  8};
-UINT OID_AddEntryOps[]			 = {1, 1,  9};
-UINT OID_RemoveEntryOps[]		 = {1, 1, 10};
-UINT OID_ModifyEntryOps[]		 = {1, 1, 11};
-UINT OID_ModifyRDNOps[]			 = {1, 1, 12};
-UINT OID_ListOps[]			     = {1, 1, 13};
-UINT OID_SearchOps[]			 = {1, 1, 14};
-UINT OID_OneLevelSearchOps[]	 = {1, 1, 15};
-UINT OID_WholeSubtreeSearchOps[] = {1, 1, 16};
-UINT OID_Referrals[]			 = {1, 1, 17};
-UINT OID_Chainings[]			 = {1, 1, 18};
-UINT OID_SecurityErrors[]		 = {1, 1, 19};
-UINT OID_Errors[]			     = {1, 1, 20};
-
-/* entries table */
-UINT OID_MasterEntries[]		 = {2, 1, 1};
-UINT OID_CopyEntries[]			 = {2, 1, 2};
-UINT OID_CacheEntries[]			 = {2, 1, 3};
-UINT OID_CacheHits[]			 = {2, 1, 4};
-UINT OID_SlaveHits[]			 = {2, 1, 5};
-
-/* interaction table */
-UINT OID_DsIntIndex[]                = {3, 1, 1}; 
-UINT OID_DsName[]			         = {3, 1, 2};
-UINT OID_TimeOfCreation[]		     = {3, 1, 3};
-UINT OID_TimeOfLastAttempt[]	     = {3, 1, 4};
-UINT OID_TimeOfLastSuccess[]	     = {3, 1, 5};
-UINT OID_FailuresSinceLastSuccess[]	 = {3, 1, 6};
-UINT OID_Failures[]			         = {3, 1, 7};
-UINT OID_Successes[]			     = {3, 1, 8};
-UINT OID_URL[]				         = {3, 1, 9};
-
-/* entity table */
-UINT OID_EntityDescr[]           = {5, 1, 1};
-UINT OID_EntityVers[]            = {5, 1, 2};
-UINT OID_EntityOrg[]             = {5, 1, 3};
-UINT OID_EntityLocation[]        = {5, 1, 4};
-UINT OID_EntityContact[]         = {5, 1, 5};
-UINT OID_EntityName[]            = {5, 1, 6};
-
-
-/* make AsnObjectIdentifiers so can use snmputilOidcpy for each server instance, and append to put on indexes later */
-/* ops table */
-AsnObjectIdentifier ASN_AnonymousBinds               = {MAGT_OID_SIZEOF(OID_AnonymousBinds)       ,OID_AnonymousBinds};
-AsnObjectIdentifier ASN_UnAuthBinds			         = {MAGT_OID_SIZEOF(OID_UnAuthBinds)          ,OID_UnAuthBinds};
-AsnObjectIdentifier ASN_SimpleAuthBinds		         = {MAGT_OID_SIZEOF(OID_SimpleAuthBinds)      ,OID_SimpleAuthBinds}; 
-AsnObjectIdentifier ASN_StrongAuthBinds		         = {MAGT_OID_SIZEOF(OID_StrongAuthBinds)      ,OID_StrongAuthBinds};
-AsnObjectIdentifier ASN_BindSecurityErrors	         = {MAGT_OID_SIZEOF(OID_BindSecurityErrors)   ,OID_BindSecurityErrors};
-AsnObjectIdentifier ASN_InOps			             = {MAGT_OID_SIZEOF(OID_InOps)                ,OID_InOps};
-AsnObjectIdentifier ASN_ReadOps			             = {MAGT_OID_SIZEOF(OID_ReadOps)              ,OID_ReadOps};
-AsnObjectIdentifier ASN_CompareOps			         = {MAGT_OID_SIZEOF(OID_CompareOps)           ,OID_CompareOps};
-AsnObjectIdentifier ASN_AddEntryOps			         = {MAGT_OID_SIZEOF(OID_AddEntryOps)          ,OID_AddEntryOps};
-AsnObjectIdentifier ASN_RemoveEntryOps		         = {MAGT_OID_SIZEOF(OID_RemoveEntryOps)       ,OID_RemoveEntryOps};
-AsnObjectIdentifier ASN_ModifyEntryOps		         = {MAGT_OID_SIZEOF(OID_ModifyEntryOps)       ,OID_ModifyEntryOps};
-AsnObjectIdentifier ASN_ModifyRDNOps		         = {MAGT_OID_SIZEOF(OID_ModifyRDNOps)         ,OID_ModifyRDNOps};
-AsnObjectIdentifier ASN_ListOps			             = {MAGT_OID_SIZEOF(OID_ListOps)              ,OID_ListOps};
-AsnObjectIdentifier ASN_SearchOps			         = {MAGT_OID_SIZEOF(OID_SearchOps)            ,OID_SearchOps};
-AsnObjectIdentifier ASN_OneLevelSearchOps	         = {MAGT_OID_SIZEOF(OID_OneLevelSearchOps)    ,OID_OneLevelSearchOps};
-AsnObjectIdentifier ASN_WholeSubtreeSearchOps        = {MAGT_OID_SIZEOF(OID_WholeSubtreeSearchOps),OID_WholeSubtreeSearchOps};
-AsnObjectIdentifier ASN_Referrals			         = {MAGT_OID_SIZEOF(OID_Referrals)            ,OID_Referrals};
-AsnObjectIdentifier ASN_Chainings			         = {MAGT_OID_SIZEOF(OID_Chainings)            ,OID_Chainings};
-AsnObjectIdentifier ASN_SecurityErrors		         = {MAGT_OID_SIZEOF(OID_SecurityErrors)       ,OID_SecurityErrors};
-AsnObjectIdentifier ASN_Errors			             = {MAGT_OID_SIZEOF(OID_Errors)               ,OID_Errors};
-
-/* entries table */
-AsnObjectIdentifier ASN_MasterEntries		         = {MAGT_OID_SIZEOF(OID_MasterEntries)        ,OID_MasterEntries};
-AsnObjectIdentifier ASN_CopyEntries	   		         = {MAGT_OID_SIZEOF(OID_CopyEntries)          ,OID_CopyEntries};
-AsnObjectIdentifier ASN_CacheEntries			     = {MAGT_OID_SIZEOF(OID_CacheEntries)         ,OID_CacheEntries};
-AsnObjectIdentifier ASN_CacheHits			         = {MAGT_OID_SIZEOF(OID_CacheHits)            ,OID_CacheHits};
-AsnObjectIdentifier ASN_SlaveHits			         = {MAGT_OID_SIZEOF(OID_SlaveHits)            ,OID_SlaveHits};
-
-/* interaction table */
-AsnObjectIdentifier ASN_DsName				         = {MAGT_OID_SIZEOF(OID_DsName)                   ,OID_DsName};
-AsnObjectIdentifier ASN_TimeOfCreation			     = {MAGT_OID_SIZEOF(OID_TimeOfCreation)           ,OID_TimeOfCreation};
-AsnObjectIdentifier ASN_TimeOfLastAttempt	         = {MAGT_OID_SIZEOF(OID_TimeOfLastAttempt)        ,OID_TimeOfLastAttempt};
-AsnObjectIdentifier ASN_TimeOfLastSuccess	         = {MAGT_OID_SIZEOF(OID_TimeOfLastSuccess)        ,OID_TimeOfLastSuccess};
-AsnObjectIdentifier ASN_FailuresSinceLastSuccess	 = {MAGT_OID_SIZEOF(OID_FailuresSinceLastSuccess) ,OID_FailuresSinceLastSuccess};
-AsnObjectIdentifier ASN_Failures			         = {MAGT_OID_SIZEOF(OID_Failures)                 ,OID_Failures};
-AsnObjectIdentifier ASN_Successes			         = {MAGT_OID_SIZEOF(OID_Successes)                ,OID_Successes};
-AsnObjectIdentifier ASN_URL					         = {MAGT_OID_SIZEOF(OID_URL)                      ,OID_URL};
-
-/* entity table */
-AsnObjectIdentifier ASN_EntityDescr	                 = {MAGT_OID_SIZEOF(OID_EntityDescr)     ,OID_EntityDescr};
-AsnObjectIdentifier ASN_EntityVers	                 = {MAGT_OID_SIZEOF(OID_EntityVers)      ,OID_EntityVers};
-AsnObjectIdentifier ASN_EntityOrg	                 = {MAGT_OID_SIZEOF(OID_EntityOrg)       ,OID_EntityOrg};
-AsnObjectIdentifier ASN_EntityLocation	             = {MAGT_OID_SIZEOF(OID_EntityLocation)  ,OID_EntityLocation};
-AsnObjectIdentifier ASN_EntityContact	             = {MAGT_OID_SIZEOF(OID_EntityContact)   ,OID_EntityContact};
-AsnObjectIdentifier ASN_EntityName                   = {MAGT_OID_SIZEOF(OID_EntityName)      ,OID_EntityName};
-
-/*
- * Storage definitions for MIB.
- */
-char szPlaceHolder[] = "Not Available";
-int nPlaceHolder = 0;
-
-#define NUM_ENTITY_COLUMNS     6
-#define NUM_OPS_COLUMNS       20
-#define NUM_ENTRIES_COLUMNS    5
-#define NUM_INT_COLUMNS        8
-#define NUM_INT_ROWS           5
-
-
-UINT MIB_num_vars;
-
-void OidAppendIndex(AsnObjectIdentifier *Oid, int Index);
-
-int Mib_init(MagtMibEntry_t **Mib, int ApplIndex)
-{
-	int i;
-	int j;
-		
-	MIB_num_vars = (UINT) 71;
-
-	/* allocate the memory for this Mib Instance */
-	if( (*Mib = (MagtMibEntry_t *) GlobalAlloc(GPTR, MIB_num_vars * 
-		                            sizeof(MagtMibEntry_t ) )) == NULL)
-	{
-         	  return -1;
-    }
-		
-	/**************************
-	* Ops Table Stuff
-	* --------------
-	* AnonymousBinds         
-	* UnAuthBinds            
-	* SimpleAuthBinds        
-	* StrongAuthBinds         
-	* BindSecurityErrors    
-	* InOps                 
-	* ReadOps                
-	* CompareOps            
-	* AddEntryOps           
-	* RemoveEntryOps        
-	* ModifyEntryOps        
-	* ModifyRDNOps          
-	* ListOps               
-	* SearchOps             
-	* OneLevelSearchOps      
-	* WholeSubtreeSearchOps 
-	* Referrals             
-	* Chainings             
-	* SecurityErrors        
-	* Errors                
-    **************************/
-	
-
-	i=0;
-	SnmpUtilOidCpy(&((*Mib)[i].Oid),  &ASN_AnonymousBinds);
-	OidAppendIndex(&((*Mib)[i].Oid), ApplIndex);
-  	(*Mib)[i].Storage      = &nPlaceHolder;
-	(*Mib)[i].Type         = ASN_RFC1155_COUNTER;
-	(*Mib)[i].Access       = MAGT_MIB_ACCESS_READ;
-	(*Mib)[i].MibFunc      = MagtMIBLeafFunc;
-	(*Mib)[i].MibNext	    = NULL;
-	(*Mib)[i].uId          = MAGT_ID_ANONYMOUS_BINDS;
-
-	i++;
-	SnmpUtilOidCpy(&((*Mib)[i].Oid),  &ASN_UnAuthBinds);
-	OidAppendIndex(&((*Mib)[i].Oid), ApplIndex);
-   	(*Mib)[i].Storage      = &nPlaceHolder;
-	(*Mib)[i].Type         = ASN_RFC1155_COUNTER;
-	(*Mib)[i].Access       = MAGT_MIB_ACCESS_READ;
-	(*Mib)[i].MibFunc      = MagtMIBLeafFunc;
-	(*Mib)[i].MibNext	    = NULL;
-	(*Mib)[i].uId          = MAGT_ID_UNAUTH_BINDS;
-
-	i++;
-	SnmpUtilOidCpy(&((*Mib)[i].Oid),  &ASN_SimpleAuthBinds);
-	OidAppendIndex(&((*Mib)[i].Oid), ApplIndex);
-	(*Mib)[i].Storage      = &nPlaceHolder;
-	(*Mib)[i].Type         = ASN_RFC1155_COUNTER;
-	(*Mib)[i].Access       = MAGT_MIB_ACCESS_READ;
-	(*Mib)[i].MibFunc      = MagtMIBLeafFunc;
-	(*Mib)[i].MibNext	    = NULL;
-	(*Mib)[i].uId          = MAGT_ID_SIMPLE_AUTH_BINDS;
-
-	i++;
-	SnmpUtilOidCpy(&((*Mib)[i].Oid),  &ASN_StrongAuthBinds);
-	OidAppendIndex(&((*Mib)[i].Oid), ApplIndex);
-   	(*Mib)[i].Storage      = &nPlaceHolder;
-	(*Mib)[i].Type         = ASN_RFC1155_COUNTER;
-	(*Mib)[i].Access       = MAGT_MIB_ACCESS_READ;
-	(*Mib)[i].MibFunc      = MagtMIBLeafFunc;
-	(*Mib)[i].MibNext	     = NULL;
-	(*Mib)[i].uId          = MAGT_ID_STRONG_AUTH_BINDS;
-
-	i++;
-	SnmpUtilOidCpy(&((*Mib)[i].Oid),  &ASN_BindSecurityErrors);
-	OidAppendIndex(&((*Mib)[i].Oid), ApplIndex);
-	(*Mib)[i].Storage      = &nPlaceHolder;
-	(*Mib)[i].Type         = ASN_RFC1155_COUNTER;
-	(*Mib)[i].Access       = MAGT_MIB_ACCESS_READ;
-	(*Mib)[i].MibFunc      = MagtMIBLeafFunc;
-	(*Mib)[i].MibNext      = NULL;
-	(*Mib)[i].uId          = MAGT_ID_BIND_SECURITY_ERRORS;
-
-	i++;
-	SnmpUtilOidCpy(&((*Mib)[i].Oid),  &ASN_InOps);
-	OidAppendIndex(&((*Mib)[i].Oid), ApplIndex);
-	(*Mib)[i].Storage      = &nPlaceHolder;
-	(*Mib)[i].Type         = ASN_RFC1155_COUNTER;
-	(*Mib)[i].Access       = MAGT_MIB_ACCESS_READ;
-	(*Mib)[i].MibFunc      = MagtMIBLeafFunc;
-	(*Mib)[i].MibNext      = NULL;
-	(*Mib)[i].uId          = MAGT_ID_IN_OPS;
-
-	i++;
-	SnmpUtilOidCpy(&((*Mib)[i].Oid),  &ASN_ReadOps);
-	OidAppendIndex(&((*Mib)[i].Oid), ApplIndex);
-	(*Mib)[i].Storage      = &nPlaceHolder;
-	(*Mib)[i].Type         = ASN_RFC1155_COUNTER;
-	(*Mib)[i].Access       = MAGT_MIB_ACCESS_READ;
-	(*Mib)[i].MibFunc      = MagtMIBLeafFunc;
-	(*Mib)[i].MibNext      = NULL;
-	(*Mib)[i].uId          = MAGT_ID_READ_OPS;
-
-	i++;
-	SnmpUtilOidCpy(&((*Mib)[i].Oid),  &ASN_CompareOps);
-	OidAppendIndex(&((*Mib)[i].Oid), ApplIndex);
-	(*Mib)[i].Storage      = &nPlaceHolder;
-	(*Mib)[i].Type         = ASN_RFC1155_COUNTER;
-	(*Mib)[i].Access       = MAGT_MIB_ACCESS_READ;
-	(*Mib)[i].MibFunc      = MagtMIBLeafFunc;
-	(*Mib)[i].MibNext      = NULL;
-	(*Mib)[i].uId          = MAGT_ID_COMPARE_OPS;
-
-	i++;
-	SnmpUtilOidCpy(&((*Mib)[i].Oid),  &ASN_AddEntryOps);
-	OidAppendIndex(&((*Mib)[i].Oid), ApplIndex);
-	(*Mib)[i].Storage      = &nPlaceHolder;
-	(*Mib)[i].Type         = ASN_RFC1155_COUNTER;
-	(*Mib)[i].Access       = MAGT_MIB_ACCESS_READ;
-	(*Mib)[i].MibFunc      = MagtMIBLeafFunc;
-	(*Mib)[i].MibNext      = NULL;
-	(*Mib)[i].uId          = MAGT_ID_ADD_ENTRY_OPS;
-
-	i++;
-	SnmpUtilOidCpy(&((*Mib)[i].Oid),  &ASN_RemoveEntryOps);
-	OidAppendIndex(&((*Mib)[i].Oid), ApplIndex);
-	(*Mib)[i].Storage      = &nPlaceHolder;
-	(*Mib)[i].Type         = ASN_RFC1155_COUNTER;
-	(*Mib)[i].Access       = MAGT_MIB_ACCESS_READ;
-	(*Mib)[i].MibFunc      = MagtMIBLeafFunc;
-	(*Mib)[i].MibNext      = NULL;
-	(*Mib)[i].uId          = MAGT_ID_REMOVE_ENTRY_OPS;
- 
-	i++;
-	SnmpUtilOidCpy(&((*Mib)[i].Oid),  &ASN_ModifyEntryOps);
-	OidAppendIndex(&((*Mib)[i].Oid), ApplIndex);
-	(*Mib)[i].Storage      = &nPlaceHolder;
-	(*Mib)[i].Type         = ASN_RFC1155_COUNTER;
-	(*Mib)[i].Access       = MAGT_MIB_ACCESS_READ;
-	(*Mib)[i].MibFunc      = MagtMIBLeafFunc;
-	(*Mib)[i].MibNext      = NULL;
-	(*Mib)[i].uId          = MAGT_ID_MODIFY_ENTRY_OPS;
-
-	i++;
-	SnmpUtilOidCpy(&((*Mib)[i].Oid),  &ASN_ModifyRDNOps);
-	OidAppendIndex(&((*Mib)[i].Oid), ApplIndex);
-	(*Mib)[i].Storage      = &nPlaceHolder;
-	(*Mib)[i].Type         = ASN_RFC1155_COUNTER;
-	(*Mib)[i].Access       = MAGT_MIB_ACCESS_READ;
-	(*Mib)[i].MibFunc      = MagtMIBLeafFunc;
-	(*Mib)[i].MibNext      = NULL;
-	(*Mib)[i].uId          = MAGT_ID_MODIFY_RDN_OPS;
-
-	i++;
-	SnmpUtilOidCpy(&((*Mib)[i].Oid),  &ASN_ListOps);
-	OidAppendIndex(&((*Mib)[i].Oid), ApplIndex);
-	(*Mib)[i].Storage      = &nPlaceHolder;
-	(*Mib)[i].Type         = ASN_RFC1155_COUNTER;
-	(*Mib)[i].Access       = MAGT_MIB_ACCESS_READ;
-	(*Mib)[i].MibFunc      = MagtMIBLeafFunc;
-	(*Mib)[i].MibNext      = NULL;
-	(*Mib)[i].uId          = MAGT_ID_LIST_OPS;
-
-	i++;
-	SnmpUtilOidCpy(&((*Mib)[i].Oid),  &ASN_SearchOps);
-	OidAppendIndex(&((*Mib)[i].Oid), ApplIndex);
-	(*Mib)[i].Storage      = &nPlaceHolder;
-	(*Mib)[i].Type         = ASN_RFC1155_COUNTER;
-	(*Mib)[i].Access       = MAGT_MIB_ACCESS_READ;
-	(*Mib)[i].MibFunc      = MagtMIBLeafFunc;
-	(*Mib)[i].MibNext      = NULL;
-	(*Mib)[i].uId          = MAGT_ID_SEARCH_OPS;
- 
-	i++;
-	SnmpUtilOidCpy(&((*Mib)[i].Oid),  &ASN_OneLevelSearchOps);
-	OidAppendIndex(&((*Mib)[i].Oid), ApplIndex);
-	(*Mib)[i].Storage      = &nPlaceHolder;
-	(*Mib)[i].Type         = ASN_RFC1155_COUNTER;
-	(*Mib)[i].Access       = MAGT_MIB_ACCESS_READ;
-	(*Mib)[i].MibFunc      = MagtMIBLeafFunc;
-	(*Mib)[i].MibNext      = NULL;
-	(*Mib)[i].uId          = MAGT_ID_ONE_LEVEL_SEARCH_OPS;
-
-	i++;
-	SnmpUtilOidCpy(&((*Mib)[i].Oid),  &ASN_WholeSubtreeSearchOps);
-	OidAppendIndex(&((*Mib)[i].Oid), ApplIndex);
-	(*Mib)[i].Storage      = &nPlaceHolder;
-	(*Mib)[i].Type         = ASN_RFC1155_COUNTER;
-	(*Mib)[i].Access       = MAGT_MIB_ACCESS_READ;
-	(*Mib)[i].MibFunc      = MagtMIBLeafFunc;
-	(*Mib)[i].MibNext      = NULL;
-	(*Mib)[i].uId          = MAGT_ID_WHOLE_SUBTREE_SEARCH_OPS;
-
-	i++;
-	SnmpUtilOidCpy(&((*Mib)[i].Oid),  &ASN_Referrals);
-	OidAppendIndex(&((*Mib)[i].Oid), ApplIndex);
-	(*Mib)[i].Storage      = &nPlaceHolder;
-	(*Mib)[i].Type         = ASN_RFC1155_COUNTER;
-	(*Mib)[i].Access       = MAGT_MIB_ACCESS_READ;
-	(*Mib)[i].MibFunc      = MagtMIBLeafFunc;
-	(*Mib)[i].MibNext      = NULL;
-	(*Mib)[i].uId          = MAGT_ID_REFERRALS;
-
-	i++;
-	SnmpUtilOidCpy(&((*Mib)[i].Oid),  &ASN_Chainings);
-	OidAppendIndex(&((*Mib)[i].Oid), ApplIndex);
-	(*Mib)[i].Storage      = &nPlaceHolder;
-	(*Mib)[i].Type         = ASN_RFC1155_COUNTER;
-	(*Mib)[i].Access       = MAGT_MIB_ACCESS_READ;
-	(*Mib)[i].MibFunc      = MagtMIBLeafFunc;
-	(*Mib)[i].MibNext      = NULL;
-	(*Mib)[i].uId          = MAGT_ID_CHAININGS;
-
-	i++;
-	SnmpUtilOidCpy(&((*Mib)[i].Oid),  &ASN_SecurityErrors);
-	OidAppendIndex(&((*Mib)[i].Oid), ApplIndex);
-	(*Mib)[i].Storage      = &nPlaceHolder;
-	(*Mib)[i].Type         = ASN_RFC1155_COUNTER;
-	(*Mib)[i].Access       = MAGT_MIB_ACCESS_READ;
-	(*Mib)[i].MibFunc      = MagtMIBLeafFunc;
-	(*Mib)[i].MibNext      = NULL;
-	(*Mib)[i].uId          = MAGT_ID_SECURITY_ERRORS;
-
-	i++;
-	SnmpUtilOidCpy(&((*Mib)[i].Oid),  &ASN_Errors);
-	OidAppendIndex(&((*Mib)[i].Oid), ApplIndex);
-	(*Mib)[i].Storage      = &nPlaceHolder;
-	(*Mib)[i].Type         = ASN_RFC1155_COUNTER;
-	(*Mib)[i].Access       = MAGT_MIB_ACCESS_READ;
-	(*Mib)[i].MibFunc      = MagtMIBLeafFunc;
-	(*Mib)[i].MibNext      = NULL;
-	(*Mib)[i].uId          = MAGT_ID_ERRORS;
-
-	/**************************
-	* Entries Table Stuff
-	* --------------
-	* MasterEntries  
-	* CopyEntries    
-	* CacheEntries   
-	* CacheHits     
-	* SlaveHits     
-    **************************/
-
-	i++;
-    SnmpUtilOidCpy(&((*Mib)[i].Oid),  &ASN_MasterEntries);
-	OidAppendIndex(&((*Mib)[i].Oid), ApplIndex);
-	(*Mib)[i].Storage      = &nPlaceHolder;
-	(*Mib)[i].Type         = ASN_RFC1155_COUNTER;
-	(*Mib)[i].Access       = MAGT_MIB_ACCESS_READ;
-	(*Mib)[i].MibFunc      = MagtMIBLeafFunc;
-	(*Mib)[i].MibNext      = NULL;
-	(*Mib)[i].uId          = MAGT_ID_MASTER_ENTRIES;
-
-	i++;
-	SnmpUtilOidCpy(&((*Mib)[i].Oid),  &ASN_CopyEntries);
-	OidAppendIndex(&((*Mib)[i].Oid), ApplIndex);
-	(*Mib)[i].Storage      = &nPlaceHolder;
-	(*Mib)[i].Type         = ASN_RFC1155_COUNTER;
-	(*Mib)[i].Access       = MAGT_MIB_ACCESS_READ;
-	(*Mib)[i].MibFunc      = MagtMIBLeafFunc;
-	(*Mib)[i].MibNext      = NULL;
-	(*Mib)[i].uId          = MAGT_ID_COPY_ENTRIES;
-
-	i++;
-	SnmpUtilOidCpy(&((*Mib)[i].Oid),  &ASN_CacheEntries);
-	OidAppendIndex(&((*Mib)[i].Oid), ApplIndex);
-	(*Mib)[i].Storage      = &nPlaceHolder;
-	(*Mib)[i].Type         = ASN_RFC1155_COUNTER;
-	(*Mib)[i].Access       = MAGT_MIB_ACCESS_READ;
-	(*Mib)[i].MibFunc      = MagtMIBLeafFunc;
-	(*Mib)[i].MibNext      = NULL;
-	(*Mib)[i].uId          = MAGT_ID_CACHE_ENTRIES;
-
-	i++;
-	SnmpUtilOidCpy(&((*Mib)[i].Oid),  &ASN_CacheHits);
-	OidAppendIndex(&((*Mib)[i].Oid), ApplIndex);
-	(*Mib)[i].Storage      = &nPlaceHolder;
-	(*Mib)[i].Type         = ASN_RFC1155_COUNTER;
-	(*Mib)[i].Access       = MAGT_MIB_ACCESS_READ;
-	(*Mib)[i].MibFunc      = MagtMIBLeafFunc;
-	(*Mib)[i].MibNext      = NULL;
-	(*Mib)[i].uId          = MAGT_ID_CACHE_HITS;
-
-	i++;
-	SnmpUtilOidCpy(&((*Mib)[i].Oid),  &ASN_SlaveHits);
-	OidAppendIndex(&((*Mib)[i].Oid), ApplIndex);
-	(*Mib)[i].Storage      = &nPlaceHolder;
-	(*Mib)[i].Type         = ASN_RFC1155_COUNTER;
-	(*Mib)[i].Access       = MAGT_MIB_ACCESS_READ;
-	(*Mib)[i].MibFunc      = MagtMIBLeafFunc;
-	(*Mib)[i].MibNext      = NULL;
-	(*Mib)[i].uId          = MAGT_ID_SLAVE_HITS;
-
-
-	/**************************
-	* Interaction Table Stuff
-	* --------------
-	* DsName
-	* TimeOfCreation 
-	* TimeOfLastAttempt
-	* TimeOfLastSuccess
-	* FailuresSinceLastSuccess
-	* Failures
-	* Successes
-	* URL
-    **************************/
-
-    for(j=1; j <= NUM_SNMP_INT_TBL_ROWS; j++)
-	{
-		
-	    i++;
-  	    SnmpUtilOidCpy(&((*Mib)[i].Oid),  &ASN_DsName);
-	    OidAppendIndex(&((*Mib)[i].Oid), ApplIndex);
-		OidAppendIndex(&((*Mib)[i].Oid), j);
-	  	(*Mib)[i].Storage      = szPlaceHolder;
-	    (*Mib)[i].Type         = ASN_RFC1213_DISPSTRING;
-	    (*Mib)[i].Access       = MAGT_MIB_ACCESS_READ;
-	    (*Mib)[i].MibFunc      = MagtMIBLeafFunc;
-	    (*Mib)[i].MibNext	    = NULL;
-	    (*Mib)[i].uId          = MAGT_ID_DS_NAME;
-
-	}
-
-	for(j=1; j <= NUM_SNMP_INT_TBL_ROWS; j++)
-	{
-	
-	    i++;
-  	    SnmpUtilOidCpy(&((*Mib)[i].Oid),  &ASN_TimeOfCreation);
-	    OidAppendIndex(&((*Mib)[i].Oid), ApplIndex);
-		OidAppendIndex(&((*Mib)[i].Oid), j);
-	   	(*Mib)[i].Storage      = &nPlaceHolder;
-	    (*Mib)[i].Type         = ASN_RFC1155_TIMETICKS;
-	    (*Mib)[i].Access       = MAGT_MIB_ACCESS_READ;
-    	(*Mib)[i].MibFunc      = MagtMIBLeafFunc;
-    	(*Mib)[i].MibNext	    = NULL;
-    	(*Mib)[i].uId          = MAGT_ID_TIME_OF_CREATION;
-	}
-
-	for(j=1; j <= NUM_SNMP_INT_TBL_ROWS; j++)
-	{
-	
-    	i++;
-  	    SnmpUtilOidCpy(&((*Mib)[i].Oid),  &ASN_TimeOfLastAttempt);
-	    OidAppendIndex(&((*Mib)[i].Oid), ApplIndex);
-		OidAppendIndex(&((*Mib)[i].Oid), j);
-	   	(*Mib)[i].Storage      = &nPlaceHolder;
-    	(*Mib)[i].Type         = ASN_RFC1155_TIMETICKS;
-    	(*Mib)[i].Access       = MAGT_MIB_ACCESS_READ;
-    	(*Mib)[i].MibFunc      = MagtMIBLeafFunc;
-    	(*Mib)[i].MibNext	    = NULL;
-    	(*Mib)[i].uId          = MAGT_ID_TIME_OF_LAST_ATTEMPT;
-	}
-
-	for(j=1; j <= NUM_SNMP_INT_TBL_ROWS; j++)
-	{
-	
-    	i++;
-  	    SnmpUtilOidCpy(&((*Mib)[i].Oid),  &ASN_TimeOfLastSuccess);
-	    OidAppendIndex(&((*Mib)[i].Oid), ApplIndex);
-		OidAppendIndex(&((*Mib)[i].Oid), j);
-    	(*Mib)[i].Storage      = &nPlaceHolder;
-    	(*Mib)[i].Type         = ASN_RFC1155_TIMETICKS;
-    	(*Mib)[i].Access       = MAGT_MIB_ACCESS_READ;
-    	(*Mib)[i].MibFunc      = MagtMIBLeafFunc;
-    	(*Mib)[i].MibNext	    = NULL;
-    	(*Mib)[i].uId          = MAGT_ID_TIME_OF_LAST_SUCCESS;
-	}
-    
-	for(j=1; j <= NUM_SNMP_INT_TBL_ROWS; j++)
-	{
-	
-		i++;
-  	    SnmpUtilOidCpy(&((*Mib)[i].Oid),  &ASN_FailuresSinceLastSuccess);
-	    OidAppendIndex(&((*Mib)[i].Oid), ApplIndex);
-		OidAppendIndex(&((*Mib)[i].Oid), j);
-    	(*Mib)[i].Storage      = &nPlaceHolder;
-    	(*Mib)[i].Type         = ASN_RFC1155_COUNTER;
-    	(*Mib)[i].Access       = MAGT_MIB_ACCESS_READ;
-    	(*Mib)[i].MibFunc      = MagtMIBLeafFunc;
-    	(*Mib)[i].MibNext	    = NULL;
-    	(*Mib)[i].uId          = MAGT_ID_FAILURES_SINCE_LAST_SUCCESS;
-	}
-	
-	for(j=1; j <= NUM_SNMP_INT_TBL_ROWS; j++)
-	{
-	   	i++;
-  	    SnmpUtilOidCpy(&((*Mib)[i].Oid),  &ASN_Failures);
-	    OidAppendIndex(&((*Mib)[i].Oid), ApplIndex);
-		OidAppendIndex(&((*Mib)[i].Oid), j);
-		(*Mib)[i].Storage      = &nPlaceHolder;
-    	(*Mib)[i].Type         = ASN_RFC1155_COUNTER;
-    	(*Mib)[i].Access       = MAGT_MIB_ACCESS_READ;
-    	(*Mib)[i].MibFunc      = MagtMIBLeafFunc;
-    	(*Mib)[i].MibNext	    = NULL;
-    	(*Mib)[i].uId          = MAGT_ID_FAILURES;
-	}
-     
-	for(j=1; j <= NUM_SNMP_INT_TBL_ROWS; j++)
-	{
-		i++;
-  	    SnmpUtilOidCpy(&((*Mib)[i].Oid),  &ASN_Successes);
-	    OidAppendIndex(&((*Mib)[i].Oid), ApplIndex);
-		OidAppendIndex(&((*Mib)[i].Oid), j);
-		(*Mib)[i].Storage      = &nPlaceHolder;
-	    (*Mib)[i].Type         = ASN_RFC1155_COUNTER;
-	    (*Mib)[i].Access       = MAGT_MIB_ACCESS_READ;
-	    (*Mib)[i].MibFunc      = MagtMIBLeafFunc;
-	    (*Mib)[i].MibNext	    = NULL;
-	    (*Mib)[i].uId          = MAGT_ID_SUCCESSES;
-	}
-	
-	for(j=1; j <= NUM_SNMP_INT_TBL_ROWS; j++)
-	{
-	    i++;
-  	    SnmpUtilOidCpy(&((*Mib)[i].Oid),  &ASN_URL);
-	    OidAppendIndex(&((*Mib)[i].Oid), ApplIndex);
-		OidAppendIndex(&((*Mib)[i].Oid), j);
-		(*Mib)[i].Storage      = szPlaceHolder;
-	    (*Mib)[i].Type         = ASN_RFC1213_DISPSTRING;
-	    (*Mib)[i].Access       = MAGT_MIB_ACCESS_READ;
-	    (*Mib)[i].MibFunc      = MagtMIBLeafFunc;
-	    (*Mib)[i].MibNext	    = NULL;
-	    (*Mib)[i].uId          = MAGT_ID_URL;
-	}
-
-	/**************************
-	* Entity Stuff 
-	* --------------
-	* EntityDescr       
-	* EntityVers        
-	* EntityOrg         
-	* EntityLocation    
-	* EntityContact     
-	* EntityName        
-    **************************/
-
-	i++;
-   	SnmpUtilOidCpy(&((*Mib)[i].Oid),  &ASN_EntityDescr);
-	OidAppendIndex(&((*Mib)[i].Oid), ApplIndex);
-	(*Mib)[i].Storage      = szPlaceHolder;
-	(*Mib)[i].Type         = ASN_RFC1213_DISPSTRING;
-	(*Mib)[i].Access       = MAGT_MIB_ACCESS_READ;
-	(*Mib)[i].MibFunc      = MagtMIBLeafFunc;
-	(*Mib)[i].MibNext	    = NULL;
-	(*Mib)[i].uId          = MAGT_ID_DESC;
-    
-	i++;
-	SnmpUtilOidCpy(&((*Mib)[i].Oid),  &ASN_EntityVers);
-	OidAppendIndex(&((*Mib)[i].Oid), ApplIndex);
-	(*Mib)[i].Storage      = szPlaceHolder;
-	(*Mib)[i].Type         = ASN_RFC1213_DISPSTRING;
-	(*Mib)[i].Access       = MAGT_MIB_ACCESS_READ;
-	(*Mib)[i].MibFunc      = MagtMIBLeafFunc;
-	(*Mib)[i].MibNext	     = NULL;
-	(*Mib)[i].uId          = MAGT_ID_VERS;
-  
-	i++;
-  	SnmpUtilOidCpy(&((*Mib)[i].Oid),  &ASN_EntityOrg);
-	OidAppendIndex(&((*Mib)[i].Oid), ApplIndex);
-	(*Mib)[i].Storage      = szPlaceHolder;
-	(*Mib)[i].Type         = ASN_RFC1213_DISPSTRING;
-	(*Mib)[i].Access       = MAGT_MIB_ACCESS_READ;
-	(*Mib)[i].MibFunc      = MagtMIBLeafFunc;
-	(*Mib)[i].MibNext	     = NULL;
-	(*Mib)[i].uId          = MAGT_ID_ORG;
-
-	i++;
-	SnmpUtilOidCpy(&((*Mib)[i].Oid),  &ASN_EntityLocation);
-	OidAppendIndex(&((*Mib)[i].Oid), ApplIndex);
-	(*Mib)[i].Storage      = szPlaceHolder;
-	(*Mib)[i].Type         = ASN_RFC1213_DISPSTRING;
-	(*Mib)[i].Access       = MAGT_MIB_ACCESS_READ;
-	(*Mib)[i].MibFunc      = MagtMIBLeafFunc;
-	(*Mib)[i].MibNext	     = NULL;
-	(*Mib)[i].uId          = MAGT_ID_LOC;
-
-	i++;
-	SnmpUtilOidCpy(&((*Mib)[i].Oid),  &ASN_EntityContact);
-	OidAppendIndex(&((*Mib)[i].Oid), ApplIndex);
-	(*Mib)[i].Storage      = szPlaceHolder;
-	(*Mib)[i].Type         = ASN_RFC1213_DISPSTRING;
-	(*Mib)[i].Access       = MAGT_MIB_ACCESS_READ;
-	(*Mib)[i].MibFunc      = MagtMIBLeafFunc;
-	(*Mib)[i].MibNext	     = NULL;
-	(*Mib)[i].uId          = MAGT_ID_CONTACT;
-
-	i++;
-	SnmpUtilOidCpy(&((*Mib)[i].Oid),  &ASN_EntityName);
-	OidAppendIndex(&((*Mib)[i].Oid), ApplIndex);
-	(*Mib)[i].Storage      = szPlaceHolder;
-	(*Mib)[i].Type         = ASN_RFC1213_DISPSTRING;
-	(*Mib)[i].Access       = MAGT_MIB_ACCESS_READ;
-	(*Mib)[i].MibFunc      = MagtMIBLeafFunc;
-	(*Mib)[i].MibNext	     = NULL;
-	(*Mib)[i].uId          = MAGT_ID_NAME;
-
-	return 0;
-}
-
-void OidAppendIndex(AsnObjectIdentifier *Oid, int Index)
-{
-	UINT OID_Index[1];             
-	AsnObjectIdentifier ASN_Index;
-
-	OID_Index[0] = Index;
-	ASN_Index.ids = OID_Index;
-	ASN_Index.idLength = 1;
-
-	SnmpUtilOidAppend(Oid,  &ASN_Index);
-
-}
-
-/*-------------------------------------------------------------------------
- *
- * MagtFillTrapVars:  Fills in the variable list for the specified trap.
- *
- * Returns:  0 - No variable filled
- *           n - Number of variables filled
- *
- *-----------------------------------------------------------------------*/
-
-int MagtFillTrapVars(int trapType, RFC1157VarBind *trapVars, MagtStaticInfo_t *pCfgInfo)
-{
-  MagtDispStr_t varVals[4];
-  int nVarLen = 0;
-  int i, j;
-  static AsnObjectIdentifier varOid[4] = {{MAGT_OID_SIZEOF(OID_EntityDescr),
-                                           OID_EntityDescr},
-                                          {MAGT_OID_SIZEOF(OID_EntityVers),
-                                           OID_EntityVers},
-                                          {MAGT_OID_SIZEOF(OID_EntityLocation),
-                                           OID_EntityLocation},
-                                          {MAGT_OID_SIZEOF(OID_EntityContact),
-                                           OID_EntityContact}};
-
-  /*
-   * Get the variable values from the static info which has been obtained
-   * from the snmp config file at initialization time.
-   */ 
-  varVals[0].len = pCfgInfo->entityDescr.len;
-  varVals[0].val = pCfgInfo->entityDescr.val;
-  varVals[1].len = pCfgInfo->entityVers.len;
-  varVals[1].val = pCfgInfo->entityVers.val;
-  varVals[2].len = pCfgInfo->entityLocation.len;
-  varVals[2].val = pCfgInfo->entityLocation.val;
-  varVals[3].len = pCfgInfo->entityContact.len;
-  varVals[3].val = pCfgInfo->entityContact.val;
-
-  for (i = 0; i < 4; i++)
-  {
-      SNMP_oidcpy(&trapVars[i].name, &MIB_OidPrefix);
-      SNMP_oidappend(&trapVars[i].name, &varOid[i]);
-      trapVars[i].value.asnType = ASN_OCTETSTRING;
-      trapVars[i].value.asnValue.string.length = varVals[i].len;
-      trapVars[i].value.asnValue.string.stream =
-          SNMP_malloc((trapVars[i].value.asnValue.string.length) *
-              sizeof(char));
-      if (trapVars[i].value.asnValue.string.stream == NULL)
-      {
-
-          /*
-           * Clean up any allocated variable binding allocated up until now.
-           */
-          for (j = 0; j < i; j++)
-          {
-              SNMP_FreeVarBind(&trapVars[j]);  
-              return nVarLen;
-          }
-      }
-      memcpy(trapVars[i].value.asnValue.string.stream, varVals[i].val,
-                 trapVars[i].value.asnValue.string.length);
-      trapVars[i].value.asnValue.string.dynamic = TRUE;
-  }
-
-  switch (trapType)
-  {
-      case MAGT_TRAP_SERVER_DOWN:
-          nVarLen = 4;
-          break;
-      case MAGT_TRAP_SERVER_START:
-          nVarLen = 3;
-          break;
-      default:
-          break;
-  }
-
-  return nVarLen;
-}
-
-/*-------------------------------------------------------------------------
- *
- * MagtMIBLeafFunc:  Performs generic actions on leaf variables in the MIB.
- *                   Note that SET action is not supported.
- *
- * Returns: SNMP_ERRORSTATUS_NOERROR - No error
- *          PDU error codes - Errors
- *
- *-----------------------------------------------------------------------*/
-
-UINT MagtMIBLeafFunc(IN UINT Action, IN MagtMibEntry_t *mibPtr,
-                     IN RFC1157VarBind *VarBind)
-{
-  UINT ErrStat = SNMP_ERRORSTATUS_NOERROR;
-  static AsnObjectIdentifier ApplIndexOid = {MAGT_OID_SIZEOF(OID_ApplIndex),
-                                         OID_ApplIndex};
-  instance_list_t *pInstance;
-  char logMsg[1024];
-
-  switch(Action)
-  {
-    case MAGT_MIB_ACTION_GETNEXT:
-      /*
-       * If there is no next pointer, this is the end of the MIB tree.
-       */
-      if (mibPtr->MibNext == NULL)
-      {
-        ErrStat = SNMP_ERRORSTATUS_NOSUCHNAME;
-        return ErrStat;
-      }
-      
-      /*
-       * Set up VarBind to contain the OID of the next variable.
-       */
-      SNMP_oidfree(&VarBind->name);
-      SNMP_oidcpy(&VarBind->name, &MIB_OidPrefix);
-      SNMP_oidappend(&VarBind->name, &mibPtr->MibNext->Oid);
-
-      /*
-       * Call function to process the GET request.
-       */
-      ErrStat = (*mibPtr->MibNext->MibFunc)(MAGT_MIB_ACTION_GET, mibPtr->MibNext,
-                                            VarBind);
-      break;
-    case MAGT_MIB_ACTION_GET:
-      
-      /*
-       * Make sure that the variable's access right allows GET.
-       */
-      if (mibPtr->Access != MAGT_MIB_ACCESS_READ &&
-          mibPtr->Access != MAGT_MIB_ACCESS_READWRITE)
-      {
-        ErrStat = SNMP_ERRORSTATUS_NOSUCHNAME;
-        return ErrStat;
-      }
-      
-      if (mibPtr->Storage == NULL)		/* Counter not supported */
-      {
-        ErrStat = SNMP_ERRORSTATUS_GENERR;
-        return ErrStat;
-      }
-
-      if ((VarBind->name.ids[MAGT_MIB_PREFIX_LEN] > 1) &&
-          (SNMP_oidcmp(&mibPtr->Oid, &ApplIndexOid) != 0))
-      {
-
-            /*
-             * Read stats file to update counter statistics.
-             */
-
-		  /* need to update all of them because don't know which instance resulted
-			 into call into this function */
-		  for (pInstance = pInstanceList; pInstance; pInstance = pInstance->pNext)
-          {
-			  if (MagtReadStats(NULL, pInstance->pOpsStatInfo, 
-									  pInstance->pEntriesStatInfo, 
-									  pInstance->ppIntStatInfo, 
-									  pInstance->szStatsPath, 
-									  pInstance->szLogPath) != 0)
-              {
-                 
-				  /* this server is off/or went down since we 
-					 started up snmp. The snmp agent will
-					 return last values it was set to until
-					 server starts back up. If server was not
-					 started will return null for strings and
-					 0 for values */
-				 
-				  /* to log for each snmp request is to expensive
-				     for now, just silently acknowledge the fact
-					 and think about something better for the future
-				   */
-					
-				  
-              }
-		  }
-      }
-
-      /*
-       * Set up VarBind's return value.
-       */
-      VarBind->value.asnType = mibPtr->Type;
-      switch (VarBind->value.asnType)
-      {
-        case ASN_RFC1155_TIMETICKS:
-        case ASN_RFC1155_COUNTER:
-        case ASN_RFC1155_GAUGE:
-        case ASN_INTEGER:
-          VarBind->value.asnValue.number = *(AsnInteger *)(mibPtr->Storage);
-          break;
-        case ASN_RFC1155_IPADDRESS:
-        case ASN_OCTETSTRING:			/* = ASN_RFC1213_DISPSTRING */
-          VarBind->value.asnValue.string.length =
-            strlen((LPSTR)mibPtr->Storage);
-          VarBind->value.asnValue.string.stream =
-            SNMP_malloc((VarBind->value.asnValue.string.length + 2) * 
-              sizeof(char));
-          if (VarBind->value.asnValue.string.stream == NULL)
-          {
-            ErrStat = SNMP_ERRORSTATUS_GENERR;
-            return ErrStat;
-          }
-          memcpy(VarBind->value.asnValue.string.stream,
-                 (LPSTR)mibPtr->Storage,
-                 VarBind->value.asnValue.string.length);
-          VarBind->value.asnValue.string.dynamic = TRUE;
-          break;
-        case ASN_OBJECTIDENTIFIER:
-          VarBind->value.asnValue.object = 
-            *(AsnObjectIdentifier *)(mibPtr->Storage);
-          break;
-        default:
-          ErrStat = SNMP_ERRORSTATUS_GENERR;
-          break;
-      }						/* Switch */
-
-      break;
-    default:
-      ErrStat = SNMP_ERRORSTATUS_GENERR;
-      break;
-  }						/* Switch */
-  
-  return ErrStat;
-}
-
-/*-------------------------------------------------------------------------
- *
- * MagtResolveVarBind:  Resolves a single variable binding.  Modifies the
- *                      variable on a GET or a GETNEXT.
- *
- * Returns: SNMP_ERRORSTATUS_NOERROR - No error
- *          PDU error codes - Errors
- *
- *-----------------------------------------------------------------------*/
-
-UINT MagtResolveVarBind(IN OUT RFC1157VarBind *VarBind, IN UINT PduAction)
-{
-  MagtMibEntry_t *mibPtr = NULL;
-  AsnObjectIdentifier TempOid;
-  int CompResult;
-  UINT i = 0;
-  UINT nResult;
-  instance_list_t *pInstance;
- 
-	  pInstance = pInstanceList;
-
-      while (mibPtr == NULL && pInstance !=NULL) 
-      {		  
-          /*
-           * Construct OID with complete prefix for comparison purpose
-           */
-          SNMP_oidcpy(&TempOid, &MIB_OidPrefix);
-          SNMP_oidappend(&TempOid, &(pInstance->pMibInfo[i].Oid));
-    
-          /*
-           * Check for OID in MIB.  On a GET-NEXT, the OID does not have to match
-           * exactly a variable in the MIB, it must only fall under the MIB root.
-           */
-           CompResult = SNMP_oidcmp(&VarBind->name, &TempOid); 
-		   
-           if (CompResult < 0)				/* Not an exact match */
-           {
-               if (PduAction != MAGT_MIB_ACTION_GETNEXT)	/* Only GET-NEXT is valid */
-               {
-
-				   pInstance=pInstance->pNext;
-				   i=0;
-				   if(pInstance == NULL)
-				   {
-                       nResult = SNMP_ERRORSTATUS_NOSUCHNAME;
-                       return nResult;
-				   }else{
-					   continue;
-				   }
-
-				}
-      
-               /*
-                * Since the match was not exact, but var bind name is within MIB,
-                * we are at the next MIB variable down from the one specified.
-                */
-                PduAction = MAGT_MIB_ACTION_GET;
-                mibPtr = &(pInstance->pMibInfo[i]);
-
-               /*
-                * Replace var bind name with new name.
-                */
-               SNMP_oidfree(&VarBind->name);
-               SNMP_oidcpy(&VarBind->name, &MIB_OidPrefix);
-               SNMP_oidappend(&VarBind->name, &mibPtr->Oid);
-           }
-           else
-           {
-			   if (CompResult == 0)			/* Found an exact match */
-               {
-			       mibPtr = &(pInstance->pMibInfo[i]);
-		       }else{
-			       /* see if it is one of the other ApplIndex */
-				   instance_list_t *pApplIndex;
-				   for(pApplIndex = pInstance; pApplIndex; pApplIndex=pApplIndex->pNext)
-				   {
-					   SNMP_oidfree(&TempOid);
-
-					   SNMP_oidcpy(&TempOid, &MIB_OidPrefix);
-                       SNMP_oidappend(&TempOid, &(pApplIndex->pMibInfo[i].Oid));
-
-					   CompResult = SNMP_oidcmp(&VarBind->name, &TempOid); 
-					   if(CompResult == 0)
-					   {
-						   mibPtr = &(pApplIndex->pMibInfo[i]);
-					   }
-				   }
-			   }
-
-
-           }
-
-           /*
-            * Free OID memory before checking another variable.
-            */
-           SNMP_oidfree(&TempOid);
-           i++;
-		   
-		   if(i == MIB_num_vars)
-		   {
-		       pInstance=pInstance->pNext;
-			   i=0;
-		   }
-       }						/* While */
-
-       if (mibPtr == NULL)				/* OID not within MIB's scope */
-       {
-		   nResult = SNMP_ERRORSTATUS_NOSUCHNAME;
-           return nResult;
-       }
-
-       if (*mibPtr->MibFunc == NULL)
-       {
-           nResult = SNMP_ERRORSTATUS_NOSUCHNAME;
-           return nResult;
-       }
-     
-       /*
-        * Call function to process request.  Each MIB entry has a function pointer
-        * that knows how to process its MIB variable.
-        */
-       nResult = (*mibPtr->MibFunc)(PduAction, mibPtr, VarBind);
-
-       SNMP_oidfree(&TempOid);			/* Free temp memory */
-  
-       return nResult;
-  
-}
diff --git a/ldap/servers/snmp/ntagt/nsldapmib_nt.h b/ldap/servers/snmp/ntagt/nsldapmib_nt.h
deleted file mode 100644
index f303e76..0000000
--- a/ldap/servers/snmp/ntagt/nsldapmib_nt.h
+++ /dev/null
@@ -1,167 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-
-/*-------------------------------------------------------------------------
- *
- * nsldapmib_nt.h - Definitions for NS Directory Server's MIB on NT.
- * 
- * Revision History:
- * 07/25/1997		Steve Ross	Created
- *
- *
- *
- *-----------------------------------------------------------------------*/
-
-#ifndef __NSLDAPMIB_NT_H_
-#define __NSLDAPMIB_NT_H_
-
-/*-------------------------------------------------------------------------
- *
- * Defines 
- *
- *-----------------------------------------------------------------------*/
-
-#define MAGT_MIB_PREFIX_LEN MIB_OidPrefix.idLength
-#define MAGT_MAX_STRING_LEN 255
-
-#define MAGT_MIB_ACCESS_READ      0
-#define MAGT_MIB_ACCESS_WRITE     1
-#define MAGT_MIB_ACCESS_READWRITE 2
-
-#define MAGT_MIB_ACTION_GET     ASN_RFC1157_GETREQUEST
-#define MAGT_MIB_ACTION_SET     ASN_RFC1157_SETREQUEST
-#define MAGT_MIB_ACTION_GETNEXT ASN_RFC1157_GETNEXTREQUEST
-
-/*
- * Macro to determine number of sub-oids in array.
- */
-#define MAGT_OID_SIZEOF(Oid) (sizeof Oid / sizeof(UINT))
-
-/*
- * Unique ID for each entry in the MIB.
- */
-enum
-{
-  MAGT_ID_DESC = 0,
-  MAGT_ID_VERS,
-  MAGT_ID_ORG,
-  MAGT_ID_LOC,
-  MAGT_ID_CONTACT,
-  MAGT_ID_NAME,
-  /* operations table attrs */
-  MAGT_ID_ANONYMOUS_BINDS,
-  MAGT_ID_UNAUTH_BINDS,
-  MAGT_ID_SIMPLE_AUTH_BINDS,  
-  MAGT_ID_STRONG_AUTH_BINDS ,
-  MAGT_ID_BIND_SECURITY_ERRORS,
-  MAGT_ID_IN_OPS,
-  MAGT_ID_READ_OPS,
-  MAGT_ID_COMPARE_OPS,
-  MAGT_ID_ADD_ENTRY_OPS,
-  MAGT_ID_REMOVE_ENTRY_OPS,
-  MAGT_ID_MODIFY_ENTRY_OPS,
-  MAGT_ID_MODIFY_RDN_OPS,
-  MAGT_ID_LIST_OPS,
-  MAGT_ID_SEARCH_OPS,
-  MAGT_ID_ONE_LEVEL_SEARCH_OPS,
-  MAGT_ID_WHOLE_SUBTREE_SEARCH_OPS,
-  MAGT_ID_REFERRALS,
-  MAGT_ID_CHAININGS,
-  MAGT_ID_SECURITY_ERRORS,
-  MAGT_ID_ERRORS,
-  /* entries table attrs */
-  MAGT_ID_MASTER_ENTRIES,
-  MAGT_ID_COPY_ENTRIES,
-  MAGT_ID_CACHE_ENTRIES,
-  MAGT_ID_CACHE_HITS,
-  MAGT_ID_SLAVE_HITS,
-  /* interaction table entries */
-  MAGT_ID_DS_NAME,
-  MAGT_ID_TIME_OF_CREATION,
-  MAGT_ID_TIME_OF_LAST_ATTEMPT,
-  MAGT_ID_TIME_OF_LAST_SUCCESS,
-  MAGT_ID_FAILURES_SINCE_LAST_SUCCESS,
-  MAGT_ID_FAILURES,
-  MAGT_ID_SUCCESSES,
-  MAGT_ID_URL,
-  /* applIndex */
-  MAGT_ID_APPLINDEX
-};
-
-/*-------------------------------------------------------------------------
- *
- * Types
- *
- *-----------------------------------------------------------------------*/
- 
-typedef struct MagtMibEntry
-{
-  AsnObjectIdentifier Oid;
-  void *Storage;
-  BYTE Type;
-  UINT Access;
-  UINT (*MibFunc)(UINT, struct MagtMibEntry *, RFC1157VarBind *);
-  struct MagtMibEntry *MibNext;
-  UINT uId;
-} MagtMibEntry_t;
-
-#include "nsldapagt_nt.h"
-/*-------------------------------------------------------------------------
- *
- * Prototypes
- *
- *-----------------------------------------------------------------------*/
-
-int MagtFillTrapVars(int                trapType, 
-	  			     RFC1157VarBind   * trapVars, 
-				     MagtStaticInfo_t * pCfgInfo);
-
-UINT MagtMIBLeafFunc(IN UINT Action,
-                     IN MagtMibEntry_t *MibPtr,
-                     IN RFC1157VarBind *VarBind);
-
-UINT MagtResolveVarBind(IN OUT RFC1157VarBind *VarBind,
-                        IN UINT PduAction);
-
-int Mib_init(MagtMibEntry_t **Mib, int ApplIndex);
-#endif					/* __NSLDAPMIB_NT_H_ */
diff --git a/lib/base/eventlog.cpp b/lib/base/eventlog.cpp
deleted file mode 100644
index 7144edd..0000000
--- a/lib/base/eventlog.cpp
+++ /dev/null
@@ -1,106 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-//                                                                          //
-//  Name: EVENTLOG                                                          //
-//	Platforms: WIN32                                                        //
-//  ......................................................................  //
-//  Revision History:                                                       //
-//  01-12-95  Initial Version, Aruna Victor (aruna at netscape.com)            //
-//  12-02-96  Code cleanup, Andy Hakim (ahakim at netscape.com)                //
-//            - consolidated admin and http functions into one              //
-//            - moved registry modification code to installer               //
-//            - removed several unecessary functions                        //
-//            - changed function parameters to existing functions           //
-//                                                                          //
-//--------------------------------------------------------------------------//
-
-#include <windows.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include "netsite.h"
-#include "base/eventlog.h"
-#include <nt/regparms.h>
-#include <nt/messages.h>
-
-HANDLE ghEventSource;
-
-NSPR_BEGIN_EXTERN_C
-
-NSAPI_PUBLIC HANDLE InitializeLogging(char *szEventLogName)
-{
-    ghEventSource = RegisterEventSource(NULL, szEventLogName);
-    return ghEventSource;
-}
-
-
-
-NSAPI_PUBLIC BOOL TerminateLogging(HANDLE hEventSource)
-{
-    BOOL bReturn = FALSE;
-    if(hEventSource == NULL)
-        hEventSource = ghEventSource;
-    if(hEventSource)
-        bReturn = DeregisterEventSource(hEventSource);
-    return(bReturn);
-}
-
-
-
-NSAPI_PUBLIC BOOL LogErrorEvent(HANDLE hEventSource, WORD fwEventType, WORD fwCategory, DWORD IDEvent, LPTSTR chMsg, LPTSTR lpszMsg)
-{
-    BOOL bReturn = FALSE;
-    LPTSTR lpszStrings[2];
-
-	lpszStrings[0] = chMsg;
-    lpszStrings[1] = lpszMsg;
-
-    if(hEventSource == NULL)
-        hEventSource = ghEventSource;
-
-    if(hEventSource)
-        bReturn = ReportEvent(hEventSource, fwEventType, fwCategory,
-                        IDEvent, NULL, 2, 0, (LPCTSTR *)lpszStrings, NULL);
-    return(bReturn);
-}
-
-NSPR_END_EXTERN_C
diff --git a/lib/base/nterrors.cpp b/lib/base/nterrors.cpp
deleted file mode 100644
index 68c31fe..0000000
--- a/lib/base/nterrors.cpp
+++ /dev/null
@@ -1,120 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- * 
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- * 
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception. 
- * 
- * 
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-/*
- * nterrors.c: Conversion of error numbers to explanation strings
- * 
- * Aruna Victor 12/6/95
- */
-
-
-#include <windows.h>
-#include <stdio.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <netsite.h>
-#include <base/nterrors.h>
-#include <base/nterr.h>
-
-struct _NtHashedError {
-	int ErrorNumber;
-	char *ErrorString;
-	struct _NtHashedError *next;
-} ;
-
-typedef struct _NtHashedError NtHashedError;
-
-NtHashedError *hashedNtErrors[200];
-
-#define HASH_ERROR_MODULUS 199
-#define DEFAULT_ERROR_STRING "Error Number is unknown"
-
-char *
-FindError(int error)
-{
-    NtHashedError *tmp;
-
-    int hashValue = error % HASH_ERROR_MODULUS;
-    tmp = hashedNtErrors[hashValue];
-
-    while(tmp) {
-        if (tmp->ErrorNumber == error) {
-            return tmp->ErrorString;
-        }
-        tmp = tmp->next;
-    }
-    return(DEFAULT_ERROR_STRING);
-}
-
-void
-EnterError(NtHashedError *error)
-{
-    NtHashedError *tmp;
-    int hashValue;
-    int number = 199;
-
-    hashValue = error->ErrorNumber % HASH_ERROR_MODULUS;
-
-     if(!(tmp = hashedNtErrors[hashValue])){
-        hashedNtErrors[hashValue] = error;
-     } else {
-        while(tmp->next) {
-            tmp = tmp->next;
-        }
-        tmp->next = error;
-    }
-}
-
-void
-HashNtErrors()
-{
-    NtHashedError *error;
-    int i = 0;
-    
-    while(NtErrorStrings[i].ErrorString) {
-        error = (NtHashedError *)MALLOC(sizeof(NtHashedError));
-        error->ErrorNumber = NtErrorStrings[i].ErrorNumber;
-        error->ErrorString = NtErrorStrings[i++].ErrorString;
-        error->next = NULL;
-        EnterError(error);
-    }
-}
\ No newline at end of file




More information about the 389-commits mailing list