summaryrefslogtreecommitdiffstats
path: root/private/net/svcdlls/rpl/rplstart
diff options
context:
space:
mode:
Diffstat (limited to 'private/net/svcdlls/rpl/rplstart')
-rw-r--r--private/net/svcdlls/rpl/rplstart/local.h66
-rw-r--r--private/net/svcdlls/rpl/rplstart/makefile6
-rw-r--r--private/net/svcdlls/rpl/rplstart/rplstart.c139
-rw-r--r--private/net/svcdlls/rpl/rplstart/sources32
4 files changed, 243 insertions, 0 deletions
diff --git a/private/net/svcdlls/rpl/rplstart/local.h b/private/net/svcdlls/rpl/rplstart/local.h
new file mode 100644
index 000000000..85977e516
--- /dev/null
+++ b/private/net/svcdlls/rpl/rplstart/local.h
@@ -0,0 +1,66 @@
+/*++
+
+Copyright (c) 1993 Microsoft Corporation
+
+Module Name:
+
+ local.h
+
+Abstract:
+
+ Main include file for RPLSTART
+
+Author:
+
+ Jon Newman (jonn) 12 - January - 1994
+
+Revision History:
+
+--*/
+
+#include <nt.h> // ntexapi.h\NtQuerySystemTime
+#include <ntrtl.h> // RtlTimeToSecondsSince1970
+#include <nturtl.h>
+
+#include <windows.h> // DWORD, IN, File APIs, etc.
+#include <stdlib.h>
+#include <lmcons.h>
+
+#include <stdio.h> // vsprintf
+#include <ctype.h> // isspace
+
+#include <lmerr.h> // NERR_RplBootStartFailed - used to be here
+
+//
+#include <lmapibuf.h> // NetApiBufferFree
+#include <netlib.h>
+
+#include <lmsvc.h>
+
+#include <lmalert.h> // STD_ALERT ALERT_OTHER_INFO
+
+#include <lmerrlog.h>
+#include <alertmsg.h>
+#include <lmserver.h>
+#include <netlib.h>
+#include <netlock.h> // Lock data types, functions, and macros.
+#include <thread.h> // FORMAT_NET_THREAD_ID, NetpCurrentThread().
+
+#include <lmshare.h> // PSHARE_INFO_2
+#include <lmaccess.h> // NetGroupGetInfo
+#include <lmconfig.h> // NetConfigGet
+#include <nb30.h> // NCB
+
+//
+// Global types and constants (used in all RPL server files).
+//
+
+#include <riplcons.h> // includes __JET500 flag
+#include <jet.h>
+#include <rpllib.h> // AddKey(), MapJetError(), FillTcpIpString()
+
+#include <rpldb.h>
+
+#include "rplmgrd.h"
+
+#define RPL_BUGBUG_ERROR ((DWORD)-1) // need to get rid of these
diff --git a/private/net/svcdlls/rpl/rplstart/makefile b/private/net/svcdlls/rpl/rplstart/makefile
new file mode 100644
index 000000000..6ee4f43fa
--- /dev/null
+++ b/private/net/svcdlls/rpl/rplstart/makefile
@@ -0,0 +1,6 @@
+#
+# DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source
+# file to this component. This file merely indirects to the real make file
+# that is shared by all the components of NT OS/2
+#
+!INCLUDE $(NTMAKEENV)\makefile.def
diff --git a/private/net/svcdlls/rpl/rplstart/rplstart.c b/private/net/svcdlls/rpl/rplstart/rplstart.c
new file mode 100644
index 000000000..1903c25a5
--- /dev/null
+++ b/private/net/svcdlls/rpl/rplstart/rplstart.c
@@ -0,0 +1,139 @@
+/*++
+
+Copyright (c) 1987-1993 Microsoft Corporation
+
+Module Name:
+
+ rplstart.c
+
+Abstract:
+
+ Copies fresh RPL database and files.
+
+ BUGBUG Should polish and make WIN32 application out of this.
+
+Author:
+
+ Jon Newman (jonn) 12 - January - 1994
+
+Environment:
+
+ User mode
+
+Revision History :
+
+--*/
+
+#define RPLDATA_ALLOCATE
+#include "local.h"
+#undef RPLDATA_ALLOCATE
+
+#define RPL_INSTALL_FILES L"\\INSTALL"
+
+
+DWORD _CRTAPI1 main ( VOID)
+{
+
+ WCHAR awchConvertPath[ PATHLEN+1];
+ DWORD dwErr;
+
+ dwErr = I_NetRpl_QueryDirectory( awchConvertPath, NULL);
+ if ( dwErr != NO_ERROR) {
+ return( dwErr);
+ }
+
+ if ( lstrlenW(awchConvertPath) + lstrlenW(RPL_INSTALL_FILES) > PATHLEN) {
+ return( RPL_BUGBUG_ERROR);
+ }
+
+ (void) lstrcatW( awchConvertPath, RPL_INSTALL_FILES);
+
+ dwErr = I_NetRplCmd_ConvertDatabase( awchConvertPath);
+
+// BUGBUG proper error reporting
+// BUGBUG print final message
+
+ return( dwErr);
+
+#if 0
+
+ DWORD Error;
+ JET_ERR JetError;
+
+ Assert = 0;
+#ifdef __JET500
+ CallM( JetSetSystemParameter( 0, JET_paramSystemPath, 0, "."));
+#else
+ CallM( JetSetSystemParameter( 0, JET_paramSysDbPath, 0, "system.mdb"));
+#endif
+ CallM( JetSetSystemParameter( 0, JET_paramTempPath, 0, "temp.tmp"));
+ CallM( JetSetSystemParameter( 0, JET_paramMaxBuffers, 250, NULL));
+ CallM( JetSetSystemParameter( 0, JET_paramBfThrshldLowPrcnt, 0, NULL));
+ CallM( JetSetSystemParameter( 0, JET_paramBfThrshldHighPrcnt, 100, NULL));
+ CallM( JetSetSystemParameter( 0, JET_paramMaxOpenTables, 30, NULL));
+ CallM( JetSetSystemParameter( 0, JET_paramMaxOpenTableIndexes, 105, NULL))
+ CallM( JetSetSystemParameter( 0, JET_paramMaxCursors, 100, NULL));
+ CallM( JetSetSystemParameter( 0, JET_paramMaxSessions, 10, NULL));
+ CallM( JetSetSystemParameter( 0, JET_paramMaxVerPages, 64, NULL));
+ CallM( JetSetSystemParameter( 0, JET_paramMaxTemporaryTables, 5, NULL));
+ CallM( JetSetSystemParameter( 0, JET_paramLogFilePath, 0, "."));
+ CallM( JetSetSystemParameter( 0, JET_paramLogBuffers, 41, NULL));
+#ifdef __JET500
+ CallM( JetSetSystemParameter( 0, JET_paramLogFileSize, 1000, NULL));
+ CallM( JetSetSystemParameter( 0, JET_paramBaseName, "j50", NULL));
+#else
+ CallM( JetSetSystemParameter( 0, JET_paramLogFileSectors, 1000, NULL));
+#endif
+ CallM( JetSetSystemParameter( 0, JET_paramLogFlushThreshold, 10, NULL));
+
+ CallM( JetInit());
+ CallM( JetBeginSession( &SesId, "admin", ""));
+ JetError = JetCreateDatabase( SesId, RPL_SERVICE_DATABASE, NULL, &DbId, JET_bitDbSingleExclusive);
+
+ if ( JetError == JET_errDatabaseDuplicate) {
+ CallM( JetAttachDatabase( SesId, RPL_SERVICE_DATABASE, 0));
+ CallM( JetOpenDatabase( SesId, RPL_SERVICE_DATABASE, NULL, &DbId, JET_bitDbExclusive));
+ BootListTable();
+ ConfigListTable();
+ ProfileListTable();
+ WkstaListTable();
+ ListWkstaInfo( L"02608C1B87A5");
+ } else if ( JetError == JET_errSuccess) {
+ Error = ProcessRplMap();
+ if ( Error != ERROR_SUCCESS) {
+ return( Error);
+ }
+ Error = ProcessRplmgrIni();
+ if ( Error != ERROR_SUCCESS) {
+ return( Error);
+ }
+ ConfigPruneTable();
+ ProfilePruneTable();
+ WkstaPruneTable();
+ //
+ // If we were to return here, database would be left in an unusable
+ // state and any further app calling JetInit() for this database
+ // would fail.
+ //
+ BootCloseTable();
+ ConfigCloseTable();
+ ProfileCloseTable();
+ WkstaCloseTable();
+ AdapterCloseTable();
+ } else {
+ RplDump( ++Assert, ("CreateDatabase: JetError=%d", JetError));
+ CallM( JetEndSession( SesId, 0));
+ CallM( JetTerm2( BUGBUG, JET_bitTermComplete));
+ return( MapJetError( JetError));
+ }
+
+ CallM( JetCloseDatabase( SesId, DbId, 0));
+ CallM( JetDetachDatabase( SesId, RPL_SERVICE_DATABASE));
+ CallM( JetEndSession( SesId, 0));
+ CallM( JetTerm2( BUGBUG, JET_bitTermComplete));
+
+#endif
+
+ return( ERROR_SUCCESS);
+}
+
diff --git a/private/net/svcdlls/rpl/rplstart/sources b/private/net/svcdlls/rpl/rplstart/sources
new file mode 100644
index 000000000..5f4748061
--- /dev/null
+++ b/private/net/svcdlls/rpl/rplstart/sources
@@ -0,0 +1,32 @@
+MAJORCOMP=net
+MINORCOMP=rplstart
+
+TARGETPATH=obj
+TARGETNAME=rplstart
+TARGETTYPE=PROGRAM
+
+TARGETLIBS= \
+ ..\obj\*\jet.lib \
+ ..\lib\obj\*\rpllib.lib \
+ ..\convert\obj\*\rplmgrd.lib \
+ $(BASEDIR)\Public\Sdk\Lib\*\netlib.lib \
+ $(BASEDIR)\public\sdk\lib\*\netapi32.lib \
+ $(BASEDIR)\public\sdk\lib\*\wsock32.lib
+
+!IFNDEF DISABLE_NET_UNICODE
+UNICODE=1
+NET_C_DEFINES=-DUNICODE
+!ENDIF
+
+INCLUDES=.;..\inc;..\..\..\inc;..\..\..\api;..\..\..\..\inc;
+
+MSC_WARNING_LEVEL=/W3 /WX
+
+SOURCES= \
+ rplstart.c
+
+
+C_DEFINES= -DINCL_32= -DNT -DRPC_NO_WINDOWS_H -DWIN32 -DRPL_RPLCNV
+
+UMTYPE=console
+