u_cvmd.c
来自「ICCP Toolkit 是在 Tru64下开发Tase.2通信协议的开发包」· C语言 代码 · 共 259 行
C
259 行
/************************************************************************//* SISCO SOFTWARE MODULE HEADER *****************************************//************************************************************************//* (c) Copyright Systems Integration Specialists Company, Inc., *//* 1986 - 1997, All Rights Reserved. *//* *//* MODULE NAME : u_cvmd.c *//* PRODUCT(S) : MMSEASE *//* *//* MODULE DESCRIPTION : *//* This module contains user confirm functions. These functions *//* are invoked from 'mms_req_serve' when the response to an *//* outstanding request is received. These functions should check *//* the resp_err member of the request control structure before *//* assuming returned data. *//* *//* NOTES ON REQUEST INFORMATION : *//* In the user application, request information structures may be *//* committed when the request is made (e.g. for error recovery). *//* If so, these information buffers could be freed in the confirm *//* functions. In the sample application, all request information *//* structures are automatic or handled when the request is issued. *//* *//* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : *//* *//* MODIFICATION LOG : *//* Date Who Rev Comments *//* -------- --- ------ ------------------------------------------- *//* 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 "mms_pvmd.h"#include "userdefs.h"#include "mmsop_en.h"#include "gvaldefs.h"#include "scrndefs.h"#include "fkeydefs.h"/************************************************************************//* For debug version, use a static pointer to avoid duplication of *//* __FILE__ strings. *//************************************************************************/#ifdef DEBUG_SISCOstatic ST_CHAR *thisFileName = __FILE__;#endif/************************************************************************//************************************************************************//* VMD SUPPORT *//************************************************************************//************************************************************************//* MP STATUS *//************************************************************************/#if MMS_STATUS_EN & REQ_ENST_VOID u_mp_status_conf (MMSREQ_PEND *req_ptr) {STATUS_RESP_INFO *ptr2; if (mms_debug_sel & MMS_LOG_USR_CONF) { conf_info_print (req_ptr,"Status "); if (req_ptr->resp_err) list_err_info (req_ptr); else { ptr2 = (STATUS_RESP_INFO *) req_ptr->resp_info_ptr; printf ("\n Logical Status : %d",ptr2->logical_stat); printf ("\n Physical Status : %d",ptr2->physical_stat); if (ptr2->local_detail_pres) { printf ("\n %d bit(s) of Local Detail present (in HEX) : ", ptr2->local_detail_len); list_bytes (ptr2->local_detail,(ptr2->local_detail_len-1)/8+1); } else printf ("\n No Local Detail present."); } conf_info_wait (); } /* take care of continuous send var */ resp_rcvd = 1; /* set response received flag */ rep_count++; /* increment number of reps counter */ }#endif/************************************************************************//* MP NAMELIST *//************************************************************************/#if MMS_GETNAMES_EN & REQ_ENST_VOID u_mp_namelist_conf (MMSREQ_PEND *req_ptr) {NAMELIST_RESP_INFO *ptr2;ST_CHAR **nptr;register j; if (mms_debug_sel & MMS_LOG_USR_CONF) { conf_info_print (req_ptr,"Get Name List "); if (req_ptr->resp_err) list_err_info (req_ptr); else { ptr2 = (NAMELIST_RESP_INFO *) req_ptr->resp_info_ptr; if (ptr2->more_follows) printf ("\n More Follows : TRUE"); else printf ("\n More Follows : FALSE"); printf ("\n %d Names returned : ",ptr2->num_names); printf ("\n Name List :"); nptr = (ST_CHAR **) (ptr2 + 1); for (j = 0; j < ptr2->num_names; ++j) printf ("\n %s ",nptr[j]); } conf_info_wait (); } /* take care of continuous send var */ resp_rcvd = 1; /* set response received flag */ rep_count++; /* increment number of reps counter */ }#endif/************************************************************************//* MP IDENT *//************************************************************************/#if MMS_IDENT_EN & REQ_ENST_VOID u_mp_ident_conf (MMSREQ_PEND *req_ptr) {MMS_OBJ_ID *obj;IDENT_RESP_INFO *ident_ptr;ST_INT i,j;#if 0 /* change to 1 to compile in */struct reject_resp_info reject_info;#endifif (mms_debug_sel & MMS_LOG_USR_CONF) { conf_info_print (req_ptr,"Identify");#if 0 /* change to 1 to compile in */ reject_info.invoke_known = SD_TRUE; reject_info.invoke = req_ptr->id; reject_info.rej_class = 2; reject_info.rej_code = 3; mp_reject_conf (req_ptr, &reject_info);#else if (req_ptr->resp_err) list_err_info (req_ptr); else { if (req_ptr->resp_info_pres) { ident_ptr = (IDENT_RESP_INFO *) req_ptr->resp_info_ptr; printf ("\n System Information : "); printf ("\n vendor = %s",ident_ptr->vend); printf ("\n model = %s",ident_ptr->model); printf ("\n rev = %s",ident_ptr->rev); if (ident_ptr->num_as) { printf ("\n Abstract Syntax's :"); obj = (MMS_OBJ_ID *) (ident_ptr +1); /* point to first */ for (i = 0; i < ident_ptr->num_as; ++i, ++obj) { printf ("\n %d)",i+1); for (j = 0; j < obj->num_comps; ++j) printf (" %d",obj->comps[j]); } } } } conf_info_wait (); }#endif /* take care of continuous send var */ resp_rcvd = 1; /* set response received flag */ rep_count++; /* increment number of reps counter */ }#endif/************************************************************************//* MP RENAME *//************************************************************************/#if MMS_RENAME_EN & REQ_ENST_VOID u_mp_rename_conf (MMSREQ_PEND *req_ptr) { if (mms_debug_sel & MMS_LOG_USR_CONF) { conf_info_print (req_ptr,"Rename "); if (req_ptr->resp_err) list_err_info (req_ptr); conf_info_wait (); } /* take care of continuous send var */ resp_rcvd = 1; /* set response received flag */ rep_count++; /* increment number of reps counter */ }#endif/************************************************************************//* MP GET CAPABILITY LIST *//************************************************************************/#if MMS_GETCL_EN & REQ_ENST_VOID u_mp_getcl_conf (MMSREQ_PEND *req_ptr) {GETCL_RESP_INFO *ptr;ST_CHAR **cap_ptr;ST_INT i; if (mms_debug_sel & MMS_LOG_USR_CONF) { conf_info_print (req_ptr,"Get Capability List "); if (req_ptr->resp_err) list_err_info (req_ptr); else { ptr = (GETCL_RESP_INFO *) req_ptr->resp_info_ptr; cap_ptr = (ST_CHAR **) (ptr + 1); printf ("\n More Follows : "); if (ptr->more_follows) printf ("TRUE"); else printf ("FALSE"); printf ("\n Number of Capabilities : %d", ptr->num_of_capab); for (i = 0; i < ptr->num_of_capab; i++, cap_ptr++) printf ("\n %d) %s ", i+1, *cap_ptr); } conf_info_wait (); } /* take care of continuous send var */ resp_rcvd = 1; /* set response received flag */ rep_count++; /* increment number of reps counter */ }#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?