mmsallc.c
来自「ICCP Toolkit 是在 Tru64下开发Tase.2通信协议的开发包」· C语言 代码 · 共 293 行
C
293 行
/************************************************************************//* SISCO SOFTWARE MODULE HEADER *****************************************//************************************************************************//* (c) Copyright Systems Integration Specialists Company, Inc., *//* 1986 - 2001, All Rights Reserved. *//* *//* MODULE NAME : mmsallc.c *//* PRODUCT(S) : MMSEASE *//* *//* MODULE DESCRIPTION : *//* *//* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : *//* *//* MODIFICATION LOG : *//* Date Who Rev Comments *//* -------- --- ------ ------------------------------------------- *//* 11/29/01 EJV 01 Del code for old LATT, XENIX, ultrix, RMX86. *//* 04/15/97 DSF 7.00 MMSEASE 7.0 release. See MODL70.DOC for *//* history. *//************************************************************************/#include "glbtypes.h"#include "sysincs.h"#if (SYSTEM_SEL & (MSOFT | OS2))#include <dos.h>#include <process.h>#include <malloc.h>#endif#include "mms_user.h" /* to access MMS fucntions, variables */#include "suicacse.h"#include "suil.h"#include "mmsop_en.h"#include "asn1defs.h" /* to access ASN.1 variables */#include "userdefs.h"#include "gvaldefs.h"#include "scrndefs.h"#include "fkeydefs.h" /* Function key handling *//************************************************************************//* For debug version, use a static pointer to avoid duplication of *//* __FILE__ strings. *//************************************************************************/#ifdef DEBUG_SISCOstatic ST_CHAR *thisFileName = __FILE__;#endif/************************************************************************//************************************************************************//************************************************************************//* comm_stat *//* SUIC function to display comm system status for debug *//************************************************************************/ST_VOID llc_comm_stat (ST_VOID) {register i;ST_CHAR *name;ST_CHAR *l_find_loc_name (ST_VOID); for (i = 0; i < l_num_chans; ++i) { CLEARSCR; printf ("\n\n\tInformation for SUIL channel %d\n\n",i); if (l_chan_info[i].chan_reg) { printf ("\n\tChannel Registered\n"); if (l_chan_info[i].listen) printf ("\tChannel in Listen State\n"); else printf ("\tChannel not in Listen State\n"); if (l_chan_info[i].co) printf ("\tChannel in Association Oriented Mode\n"); else printf ("\tChannel in Associationless Mode\n"); name = l_get_name (l_chan_info[i].local_addr); printf ("\tRegistered Name = %s\n",name); name = l_get_name (l_chan_info[i].remote_addr); if (!name) printf ("Remote Partner Name not found\n"); else printf ("\tRemote Partner Name = %s\n",name); } else printf ("\n\tChannel Not Registered\n"); wait_msg ("Press any key for next channel"); } (*menu_set_fun) (); }/************************************************************************//* debug_set *//* SUIC function to select the level of debug messages *//************************************************************************/ST_VOID llc_debug_set (ST_VOID) {ST_CHAR str[100]; CLEARSCR; if (l_debug_sel & CTRLRX_PRINT) printf ("\n\n\n Enable SUIC Transaction Receive Debug Print (now ON) ?"); else printf ("\n\n\n Enable SUIC Transaction Receive Debug Print (now OFF) ?"); if (strget (str)) { if (str[0] == 'y' || str[0] == 'Y') l_debug_sel |= CTRLRX_PRINT; else l_debug_sel &= ~CTRLRX_PRINT; } if (l_debug_sel & CTRLTX_PRINT) printf (" Enable SUIC Transaction Transmit Debug Print (now ON) ?"); else printf (" Enable SUIC Transaction Transmit Debug Print (now OFF) ?"); if (strget (str)) { if (str[0] == 'y' || str[0] == 'Y') l_debug_sel |= CTRLTX_PRINT; else l_debug_sel &= ~CTRLTX_PRINT; } if (l_debug_sel & SUICDEC_PRINT) printf ("\n Enable SUIC ACSE Decode Debug Print (now ON) ?"); else printf ("\n Enable SUIC ACSE Decode Debug Print (now OFF) ?"); if (strget (str)) { if (str[0] == 'y' || str[0] == 'Y') l_debug_sel |= SUICDEC_PRINT; else l_debug_sel &= ~SUICDEC_PRINT; } (*menu_set_fun) (); }/************************************************************************//* set_suic_param_llc *//* Function to set up any SUIC specific parameters. *//* These parameters may differ depending on the OS and board used. *//************************************************************************/ST_VOID set_suic_param_llc (ST_VOID) { }/************************************************************************//* SUIC DEBUG SET *//* for use with debug versions of SUIC ONLY *//************************************************************************/ST_VOID llc_suic_debug_set (ST_VOID) {ST_CHAR q[100]; if (l_debug_sel & SUILLOG_FLOW) printf ("\n\n\n Enable SUIL Flow Logging (now ON) ?"); else printf ("\n\n\n Enable SUIL Flow Logging (now OFF) ?"); if (strget (q)) { if (q[0] == 'y' || q[0] == 'Y') l_debug_sel |= SUILLOG_FLOW; else l_debug_sel &= ~SUILLOG_FLOW; } } /************************************************************************//* set_name_alias *//* This function registers a AR NAME with SUIC *//************************************************************************/ST_VOID set_name_alias (ST_VOID) {ST_INT i;ST_CHAR name[180];ST_INT chan;ST_RET ret; CLEARSCR; printf ("\n\n Select Alias Number to use for Name : "); if (!intget (&chan)) { (*menu_set_fun) (); return; } printf ("\n Enter Remote AR NAME to Alias - "); if (!strget (name)) { (*menu_set_fun) (); return; } if ((i = strlen (name)) > 64) { wait_msg ("Title Too Long"); (*menu_set_fun) (); return; } if (ret = mllp_set_llc_name_alias (name,chan)) { printf ("\n Alias Failed, Error Code = 0x%X",ret); wait_msg (""); } (*menu_set_fun) (); }/************************************************************************//* set_remote_dest_addr *//* This function registers a AR NAME with SUIC *//************************************************************************/ST_VOID set_remote_dest_addr (ST_VOID) {ST_INT chan;ST_RET ret;ST_UINT alias; CLEARSCR; printf ("\n\n Select Alias Number to use for Name : "); if (!intget (&alias)) { (*menu_set_fun) (); return; } printf ("\n\n Select Channel Number to use : "); if (!intget (&chan)) { (*menu_set_fun) (); return; } if (ret = mllp_set_llc_dest (chan,alias)) { printf ("\n Remote Destination Set Failed, Error Code = 0x%X",ret); wait_msg (""); } (*menu_set_fun) (); }/************************************************************************//* do_get_rem_name *//************************************************************************/ST_VOID do_get_rem_name (ST_VOID) {ST_INT chan;ST_CHAR *name; CLEARSCR; printf ("\n\n Get Remote AR Name - Select Channel : "); if (!intget (&chan)) { (*menu_set_fun) (); return; } if (name = mllp_l_get_rem_name (chan)) { printf ("\n Remote AR Name : %s" ,name); wait_msg (""); } else { printf ("\n Could Not Find Remote Name"); wait_msg (""); } (*menu_set_fun) (); }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?