📄 mmsaprg.c
字号:
/************************************************************************//* SISCO SOFTWARE MODULE HEADER *****************************************//************************************************************************//* (c) Copyright Systems Integration Specialists Company, Inc., *//* 1986 - 1997, All Rights Reserved. *//* *//* MODULE NAME : mmsaprg.c *//* PRODUCT(S) : MMSEASE *//* *//* MODULE DESCRIPTION : *//* This module contains functions to initiate the MMS program *//* invocation management services. These functions are called *//* from the mainloop (check_key). *//* *//* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : *//* *//* MODIFICATION LOG : *//* Date Who Rev Comments *//* -------- --- ------ ------------------------------------------- *//* 11/03/98 RKR 02 worked on displaying local PI attributes *//* 07/29/97 DSF 01 Removed references to INSTANTC *//* 04/15/97 DSF 7.00 MMSEASE 7.0 release. See MODL70.DOC for *//* history. *//************************************************************************/#include "glbtypes.h"#include "sysincs.h"#include "mms_usr.h"#include "userdefs.h"#include "fkeydefs.h"#include "scrndefs.h"#include "mmsop_en.h"#include "gvaldefs.h"#include "mms_pprg.h"#include "mms_vprg.h"#include "mms_vvmd.h"/************************************************************************//* For debug version, use a static pointer to avoid duplication of *//* __FILE__ strings. *//************************************************************************/#ifdef DEBUG_SISCOstatic ST_CHAR *thisFileName = __FILE__;#endif/************************************************************************//************************************************************************//* do_crepi *//* create and send a create program invocation request. *//************************************************************************/ST_VOID do_crepi (ST_VOID) {#if MMS_CRE_PI_EN & REQ_ENCREPI_REQ_INFO *info;ST_CHAR **dn_ptr;ST_BOOLEAN data_entered;ST_BOOLEAN done;ST_INT chan;ST_CHAR *data;ST_CHAR temp [256]; if (!get_chan (&chan)) { (*menu_set_fun) (); return; } /* use 1 - 3K for request data */ info = (CREPI_REQ_INFO *) dest_buffer; /* build the create pi request */ printf (" Enter program invocation name : (R) "); if (data_entered = strget (temp)) { temp[MAX_IDENT_LEN] = '\x00'; strcpy (info->piname,temp); } if (data_entered) { data = dest_buffer + 4096; /* use 4 - 5K for domain names */ dn_ptr = (ST_CHAR **) (info + 1); info->num_of_dnames = 0; done = SD_FALSE; while (!done) { printf (" Enter domain name : (R) "); if (strget (data)) { info->num_of_dnames++; data [MAX_IDENT_LEN] = '\x00'; *(dn_ptr++) = data; data += strlen (data) + 1; } else done = SD_TRUE; } } info->reusable = ask (" Reusable (Y) ? ",SD_TRUE); if (ask (" Send Monitor ? ",0)) { info->monitor_pres = SD_TRUE; if (ask (" Monitor == SD_TRUE ? ",1)) info->monitor = SD_TRUE; else info->monitor = SD_FALSE; } else info->monitor_pres = SD_FALSE; if (data_entered) { if (!mp_crepi (chan,info)) print_req_error (); } else wait_msg ("\n Must enter all required information "); (*menu_set_fun) ();#endif }/************************************************************************//* do_delpi *//* create and send a delete program invocation request. *//************************************************************************/ST_VOID do_delpi (ST_VOID) {#if MMS_DEL_PI_EN & REQ_ENDELPI_REQ_INFO info;ST_BOOLEAN data_entered;ST_INT chan;ST_CHAR temp [256]; if (!get_chan (&chan)) /* ask the user what channel to use */ { (*menu_set_fun) (); return; } /* build the request */ printf (" Enter program invocation name : (R) "); if (data_entered = strget (temp)) { temp[MAX_IDENT_LEN] = '\x00'; strcpy (info.piname,temp); } if (data_entered) { if (!mp_delpi (chan,&info)) print_req_error (); if (num_reps) /* if this an auto repeat - */ { if (start_cont ()) /* wait for 1st to complete */ return; num_outstanding = 1; while (rep_count < num_reps) /* if enough done - */ { if (!mp_delpi (chan,&info)) break; num_outstanding++; if (cont_serve ()) /* if user hit a key */ return; } cont_done (); /* display results */ } } else wait_msg ("\n Must enter all required information "); (*menu_set_fun) ();#endif }/************************************************************************//* do_start *//* create and send a start request. *//************************************************************************/ST_VOID do_start (ST_VOID) {#if MMS_START_EN & REQ_ENSTART_REQ_INFO info;ST_BOOLEAN data_entered;ST_INT chan;ST_CHAR *data;ST_CHAR temp [256];ST_UCHAR ext_buf[100]; if (!get_chan (&chan)) { (*menu_set_fun) (); return; } /* build the request */ printf (" Enter program invocation name : (R) "); if (data_entered = strget (temp)) { temp[MAX_IDENT_LEN] = '\x00'; strcpy (info.piname,temp); } if (data_entered) { data = dest_buffer; /* use 1 - 5K for input data */ if (ask (" Send EXECUTION ARG (N) ? ",0)) { info.start_arg_pres = SD_TRUE; if (ask (" Send ENCODED (N) ? ",0)) { info.start_arg_type = ARG_TYPE_ENCODED; get_external_asn1 (ext_buf,&(info.start_arg_len)); info.start_arg = ext_buf; } else { info.start_arg_type = ARG_TYPE_SIMPLE; printf (" Enter start argument : "); strcpy (data,"EXE ARG"); strget (data); info.start_arg = (ST_UCHAR *) data; } } else info.start_arg_pres = SD_FALSE; if (!mp_start (chan,&info)) print_req_error (); if (num_reps) /* if this an auto repeat - */ { if (start_cont ()) /* wait for 1st to complete */ return; num_outstanding = 1; while (rep_count < num_reps) /* if enough done - */ { if (!mp_start (chan,&info)) break; num_outstanding++; if (cont_serve ()) /* if user hit a key */ return; } cont_done (); /* display results */ } } else wait_msg ("\n Must enter all required information "); (*menu_set_fun) ();#endif }/************************************************************************//* do_stop *//* create and send a stop request. *//************************************************************************/ST_VOID do_stop (ST_VOID) {#if MMS_STOP_EN & REQ_ENSTOP_REQ_INFO info;ST_BOOLEAN data_entered;ST_INT chan;ST_CHAR temp [256]; if (!get_chan (&chan)) /* ask the user what channel to use */ { (*menu_set_fun) (); return; } /* build the request */ printf (" Enter program invocation name : (R) "); if (data_entered = strget (temp)) { temp[MAX_IDENT_LEN] = '\x00'; strcpy (info.piname,temp); } if (data_entered) { if (!mp_stop (chan,&info)) print_req_error (); if (num_reps) /* if this an auto repeat - */ { if (start_cont ()) /* wait for 1st to complete */ return; num_outstanding = 1; while (rep_count < num_reps) /* if enough done - */ { if (!mp_stop (chan,&info)) break; num_outstanding++; if (cont_serve ()) /* if user hit a key */ return; } cont_done (); /* display results */ } } else wait_msg ("\n Must enter all required information "); (*menu_set_fun) ();#endif }/************************************************************************//* do_resume *//* create and send a resume request. *//************************************************************************/ST_VOID do_resume (ST_VOID) {#if MMS_RESUME_EN & REQ_ENRESUME_REQ_INFO info;ST_BOOLEAN data_entered;ST_INT chan;ST_CHAR *data;ST_CHAR temp [256];ST_UCHAR ext_buf[100]; if (!get_chan (&chan)) /* ask the user what channel to use */ { (*menu_set_fun) (); return; } /* build the request */ printf (" Enter program invocation name : (R) "); if (data_entered = strget (temp)) { temp[MAX_IDENT_LEN] = '\x00'; strcpy (info.piname,temp); } if (data_entered) { data = dest_buffer; /* use 1 - 5K for input data */ if (ask (" Send EXECUTION ARG (N) ? ",0)) { info.resume_arg_pres = SD_TRUE; if (ask (" Send ENCODED (N) ? ",0)) { info.resume_arg_type = ARG_TYPE_ENCODED; get_external_asn1 (ext_buf,&(info.resume_arg_len)); info.resume_arg = ext_buf; } else { info.resume_arg_type = ARG_TYPE_SIMPLE; printf (" Enter resume argument : "); strcpy (data,"EXE ARG"); strget (data); info.resume_arg = (ST_UCHAR *) data; } } else info.resume_arg_pres = SD_FALSE; if (!mp_resume (chan,&info)) print_req_error (); if (num_reps) /* if this an auto repeat - */ { if (start_cont ()) /* wait for 1st to complete */ return; num_outstanding = 1; while (rep_count < num_reps) /* if enough done - */ { if (!mp_resume (chan,&info)) break; num_outstanding++; if (cont_serve ()) /* if user hit a key */ return; } cont_done (); /* display results */ } } else wait_msg ("\n Must enter all required information "); (*menu_set_fun) ();#endif }/************************************************************************//* do_reset *//* create and send a reset request. *//************************************************************************/ST_VOID do_reset (ST_VOID) {#if MMS_RESET_EN & REQ_ENRESET_REQ_INFO info;ST_BOOLEAN data_entered;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -