%( **************************************************************** Copyright (c) 1992, Carnegie Mellon University All Rights Reserved Permission is hereby granted to use, copy, modify, and distribute this software provided that the above copyright notice appears in all copies and that any distribution be for noncommercial purposes. Carnegie Mellon University disclaims all warranties with regard to this software. In no event shall Carnegie Mellon University be liable for any special, indirect, or consequential damages or any damages whatsoever resulting from loss of use, data, or profits arising out of or in connection with the use or performance of this software. **************************************************************** )% Module Startup ( IDENT='001', ADDRESSING_MODE(EXTERNAL=LONG_RELATIVE, NONEXTERNAL=LONG_RELATIVE), LIST(NORequire,Assembly,object,binary))= BEGIN !++ ! StartUp.BLI Copyright (c) 1986 Carnegie Mellon University ! ! Description: ! ! A utility to start/stop CMU-OpenVMS/IP processes ! ! Modifications: ! ! 19-Feb-1990 Bruce R. Miller CMU NetDev ! Original version. ! !-- LIBRARY 'SYS$LIBRARY:STARLET'; LIBRARY 'IPNCP'; ROUTINE Invoke_IPACP = BEGIN LOCAL SRVPRIVS : $BBLOCK[8], ! IPACP privs Quotas : BLOCKVECTOR [ 5 , 5 , BYTE ], PID, RC; BIND SYSPRV = SRVPRIVS : VECTOR [ 2 ]; MACRO Quota_Type = 0,0,8,0 %, Quota_Value = 1,0,32,0 %; SYSPRV[0] = 0; sysPRV[1] = 0; SRVPRIVS [ PRV$V_CMKRNL ] = 1; SRVPRIVS [ PRV$V_PHY_IO ] = 1; SRVPRIVS [ PRV$V_SYSPRV ] = 1; SRVPRIVS [ PRV$V_SETPRV ] = 1; SRVPRIVS [ PRV$V_NOACNT ] = 1; SRVPRIVS [ PRV$V_ALTPRI ] = 1; SRVPRIVS [ PRV$V_DETACH ] = 1; SRVPRIVS [ PRV$V_TMPMBX ] = 1; SRVPRIVS [ PRV$V_NETMBX ] = 1; Quotas [ 0 , Quota_Type ] = PQL$_BYTLM; Quotas [ 0 , Quota_Value] = 65535; Quotas [ 1 , Quota_Type ] = PQL$_BIOLM; Quotas [ 1 , Quota_Value] = 32767; Quotas [ 2 , Quota_Type ] = PQL$_DIOLM; Quotas [ 2 , Quota_Value] = 32767; Quotas [ 3 , Quota_Type ] = PQL$_TQELM; Quotas [ 3 , Quota_Value] = 100; Quotas [ 4 , Quota_Type ] = PQL$_LISTEND; RC = $CREPRC ( PIDADR = PID, IMAGE = %ASCID'INET$IPACP', PRVADR = SRVPRIVS, QUOTA = Quotas, BASPRI = 6, UIC = %x'00010004', STSFLG = PRC$M_NOACNT or PRC$M_IMGDMP or PRC$M_DETACH or PRC$M_NOUAF); IF NOT .RC THEN Signal (.RC) ELSE PrintTT('Created new IPACP, PID=!XL!/!/',.PID); .RC END; ROUTINE Invoke_NamRes = BEGIN LOCAL SRVPRIVS : $BBLOCK[8], ! IPACP privs Quotas : BLOCKVECTOR [ 6 , 5 , BYTE ], PID, RC; BIND SYSPRV = SRVPRIVS : VECTOR [ 2 ]; MACRO Quota_Type = 0,0,8,0 %, Quota_Value = 1,0,32,0 %; SYSPRV[0] = 0; SYSPRV[1] = 0; SRVPRIVS [ PRV$V_EXQUOTA ] = 1; SRVPRIVS [ PRV$V_TMPMBX ] = 1; SRVPRIVS [ PRV$V_NETMBX ] = 1; SRVPRIVS [ PRV$V_SYSPRV ] = 1; SRVPRIVS [ PRV$V_WORLD ] = 1; Quotas [ 0 , Quota_Type ] = PQL$_BYTLM; Quotas [ 0 , Quota_Value] = 10000; Quotas [ 1 , Quota_Type ] = PQL$_PGFLQUOTA; Quotas [ 1 , Quota_Value] = 8000; Quotas [ 2 , Quota_Type ] = PQL$_WSDEFAULT; Quotas [ 2 , Quota_Value] = 1024; Quotas [ 3 , Quota_Type ] = PQL$_WSQUOTA; Quotas [ 3 , Quota_Value] = 1024; Quotas [ 4 , Quota_Type ] = PQL$_WSEXTENT; Quotas [ 4 , Quota_Value] = 3000; Quotas [ 5 , Quota_Type ] = PQL$_LISTEND; RC = $CREPRC ( PIDADR = PID, IMAGE = %ASCID'INET$NAMRES', PRCNAM = %ASCID'NAMRES', PRVADR = SRVPRIVS, QUOTA = Quotas, BASPRI = 5, UIC = %x'00010004', STSFLG = PRC$M_NOACNT or PRC$M_IMGDMP or PRC$M_DETACH); IF NOT .RC THEN Signal (.RC) ELSE PrintTT('Created new NamRes process, PID=!XL!/!/',.PID); .RC END; GLOBAL ROUTINE Do_StartUp (IPACP_flag,NamRes_flag) : NOVALUE= Begin LOCAL RC; IF .IPACP_flag THEN BEGIN PrintTT('Ok, I''m going to startup the IPACP.!/'); Invoke_IPACP() END; IF .NamRes_flag THEN BEGIN PrintTT('Ok, I''m going to startup the Name Resolver.!/'); Invoke_NamRes() END; SS$_NORMAL END; GLOBAL ROUTINE Do_ShutDown (IPACP_flag,NamRes_flag) : NOVALUE= Begin LOCAL RC; IF .IPACP_flag THEN PrintTT('Ok, I''m pretending to shutdown the IPACP.!/'); IF .NamRes_flag THEN PrintTT('Ok, I''m pretending to shutdown the Name Resolver.!/'); SS$_NORMAL END; END ELUDOM