📄 u_ievn.c
字号:
printf (" Event Action Name : "); print_objname (&(req_ptr->evact_name)); printf ("\n Confirmed Serv Request : "); list_bytes (req_ptr->conf_serv_req,req_ptr->conf_serv_req_len); printf ("\n Comp Std Request Detail : "); if (req_ptr->cs_rdetail_pres) list_bytes (req_ptr->cs_rdetail,req_ptr->cs_rdetail_len); else printf ("Not present"); if (req_ptr->modlist_pres) { printf ("\n Number of Modifiers : %d",req_ptr->num_of_modifiers); mod_ptr = (MODIFIER *) (req_ptr + 1); for (j = 0; j < req_ptr->num_of_modifiers; j++) { printf ("\n Modifier : %d", j+1); print_modifier (mod_ptr); mod_ptr++; if ((j+1) < req_ptr->num_of_modifiers) { printf ("\n\n Press return to continue, x to exit"); ch = get_a_char (); if (ch == 'x' || ch == 'X') j = req_ptr->num_of_modifiers; /* exit selected */ } } } else printf ("\n List of Modifiers : Not present"); } mp_defea_resp (req_info); /* send the response */ indic_info_wait (); /* allow user to see indic info */ }#endif/************************************************************************//* DELETE EVENT ACTION *//************************************************************************/#if MMS_DELEA_EN & RESP_ENST_VOID u_delea_ind (MMSREQ_IND *req_info) {DELEA_REQ_INFO *req_ptr;OBJECT_NAME *obj_ptr;DELEA_RESP_INFO rsp_info;ST_INT j, ch, line; if (mms_debug_sel & MMS_LOG_USR_IND) { indic_info_print (req_info,"Delete Event Action "); req_ptr = (DELEA_REQ_INFO *) req_info->req_info_ptr; printf ("\n Scope of Delete : "); switch (req_ptr->req_tag) { case 0 : printf ("specific"); obj_ptr = (OBJECT_NAME *) (req_ptr + 1); printf ("\n Object Names : %d ", req_ptr->num_of_names); line = 14; for (j = 0; j < req_ptr->num_of_names; j++) { print_objname (obj_ptr); obj_ptr++; line += 2; if (((j+1) < req_ptr->num_of_names) && (line >= 22)) { printf ("\n\n Press return to continue, x to exit"); ch = get_a_char (); if (ch == 'x' || ch == 'X') j = req_ptr->num_of_names; /* exit selected */ line = 14; } } break; case 1 : printf ("aa-specific"); break; case 3 : printf ("domain"); printf ("\n Domain Name : %s ", req_ptr->dname); break; case 4 : printf ("vmd"); break; default: printf ("invalid scope"); break; } } /* create a default response */ rsp_info.cand_not_deleted = 98765L; if (mms_debug_sel & MMS_LOG_USR_IND) { printf ("\n\n Enter Number of Canditates Not Deleted : "); rsp_info.cand_not_deleted = 0; if (intget (&num)) rsp_info.cand_not_deleted = (unsigned long) num; } mp_delea_resp (req_info, &rsp_info); indic_info_wait (); /* allow user to see indic info */ } #endif/************************************************************************//* GET EVENT ACTION ATTRIBUTES *//************************************************************************/#if MMS_GETEAA_EN & RESP_ENST_VOID u_geteaa_ind (MMSREQ_IND *req_info) {GETEAA_REQ_INFO *req_ptr;GETEAA_RESP_INFO *rsp_info;MODIFIER *mod_ptr;ST_UCHAR cs_req [20];ST_UCHAR detail [20]; if (mms_debug_sel & MMS_LOG_USR_IND) { indic_info_print (req_info,"Get Event Action Attributes "); req_ptr = (GETEAA_REQ_INFO *) req_info->req_info_ptr; printf ("\n Event Action Name : "); print_objname (&(req_ptr->evact_name)); } /* create a default response */ rsp_info = (GETEAA_RESP_INFO *) dest_buffer; mod_ptr = (MODIFIER *) (rsp_info + 1); rsp_info->mms_deletable = SD_FALSE; rsp_info->num_of_modifiers = 0; memcpy (cs_req, "\x80\x01\x01", 3); rsp_info->conf_serv_req = cs_req; rsp_info->conf_serv_req_len = 3; rsp_info->cs_rdetail_pres = SD_TRUE; memcpy (detail, "\x80\x01\x01", 3); rsp_info->cs_rdetail = detail; rsp_info->cs_rdetail_len = 3; if (mms_debug_sel & MMS_LOG_USR_IND) { if (ask ("\n\n Enter MMS Deletable (y/n) : (default = FALSE) ", 0)) rsp_info->mms_deletable = SD_TRUE; else rsp_info->mms_deletable = SD_FALSE; printf ("\n"); mod_ptr = (MODIFIER *) (rsp_info + 1); done = SD_FALSE; while (!done) { printf (" Enter Modifier : \n"); if (get_modifier (mod_ptr)) { rsp_info->num_of_modifiers++; mod_ptr++; } else done = SD_TRUE; } printf (" Enter Confirmed Service Request : (R) "); if (len = input_hex ((ST_UCHAR *)tbuf, 20)) { memcpy (cs_req, tbuf, len); rsp_info->conf_serv_req = cs_req; rsp_info->conf_serv_req_len = len; } printf (" Enter Companion Standard Request Detail : (O) "); if (len = input_hex ((ST_UCHAR *)tbuf, 20)) { memcpy (detail, tbuf, len); rsp_info->cs_rdetail_pres = SD_TRUE; rsp_info->cs_rdetail = detail; rsp_info->cs_rdetail_len = len; } else rsp_info->cs_rdetail_pres = SD_FALSE; } mp_geteaa_resp (req_info, rsp_info); indic_info_wait (); /* allow user to see indic info */ }#endif/************************************************************************//* REPORT EVENT ACTION STATUS *//************************************************************************/#if MMS_REPEAS_EN & RESP_ENST_VOID u_repeas_ind (MMSREQ_IND *req_info) {REPEAS_REQ_INFO *req_ptr;REPEAS_RESP_INFO rsp_info; if (mms_debug_sel & MMS_LOG_USR_IND) { indic_info_print (req_info,"Report Event Action Status "); req_ptr = (REPEAS_REQ_INFO *) req_info->req_info_ptr; printf ("\n Event Action Name : "); print_objname (&(req_ptr->evact_name)); } /* create a default response */ rsp_info.num_of_ev_enroll = 98765L; if (mms_debug_sel & MMS_LOG_USR_IND) { printf ("\n\n Enter Number of Event Enrollments : "); rsp_info.num_of_ev_enroll = 0; if (intget (&num)) rsp_info.num_of_ev_enroll = (unsigned long) num; } mp_repeas_resp (req_info, &rsp_info); indic_info_wait (); /* allow user to see indic info */ }#endif/************************************************************************//* DEFINE EVENT ENROLLMENT *//************************************************************************/#if MMS_DEFEE_EN & RESP_ENST_VOID u_defee_ind (MMSREQ_IND *req_info) {DEFEE_REQ_INFO *ptr;ST_INT ch; if (mms_debug_sel & MMS_LOG_USR_IND) { indic_info_print (req_info,"Define Event Enrollment "); ptr = (DEFEE_REQ_INFO *) req_info->req_info_ptr; printf ("\n\n Press return to display continue"); ch = get_a_char (); CLEARSCR; printf (" Event Enrollment Name : "); print_objname (&(ptr->evenroll_name)); printf ("\n Event Condition Name : "); print_objname (&(ptr->evcon_name)); printf ("\n Event Cond Transitions : %02x",ptr->ec_transitions); printf ("\n Idle to Disabled : "); if (ptr->ec_transitions & 0x01) printf ("set "); else printf ("not set "); printf ("\n Active to Disabled : "); if (ptr->ec_transitions & 0x02) printf ("set "); else printf ("not set "); printf ("\n Disabled to Idle : "); if (ptr->ec_transitions & 0x04) printf ("set "); else printf ("not set "); printf ("\n Active to Idle : "); if (ptr->ec_transitions & 0x08) printf ("set "); else printf ("not set "); printf ("\n Disabled to Active : "); if (ptr->ec_transitions & 0x10) printf ("set "); else printf ("not set "); printf ("\n Idle to Active : "); if (ptr->ec_transitions & 0x20) printf ("set "); else printf ("not set "); printf ("\n Any to Deleted : "); if (ptr->ec_transitions & 0x40) printf ("set "); else printf ("not set "); printf ("\n Alarm Ack Rule : %d, ", ptr->alarm_ack_rule); switch (ptr->alarm_ack_rule) { case 0 : printf ("none"); break; case 1 : printf ("simple"); break; case 2 : printf ("ack active"); break; case 3 : printf ("ack all"); break; default: printf ("invalid ack rule"); break; } printf ("\n Event Action Name : "); if (ptr->evact_name_pres) print_objname (&(ptr->evact_name)); else printf ("Not present"); printf ("\n Client Application : "); if (ptr->client_app_pres) print_asn1_app_ref (ptr->client_app, ptr->client_app_len); else printf ("Not Present"); printf ("\n Ack Event Condition Name: "); if (ptr->ackec_name_pres) print_objname (&(ptr->ackec_name)); else printf ("Not present"); } mp_defee_resp (req_info); /* send the response */ indic_info_wait (); /* allow user to see indic info */ }#endif/************************************************************************//* DELETE EVENT ENROLLMENT *//************************************************************************/#if MMS_DELEE_EN & RESP_ENST_VOID u_delee_ind (MMSREQ_IND *req_info) {DELEE_REQ_INFO *req_ptr;OBJECT_NAME *obj_ptr;DELEE_RESP_INFO rsp_info;ST_INT j, ch, line; if (mms_debug_sel & MMS_LOG_USR_IND) { indic_info_print (req_info,"Delete Event Enrollment "); req_ptr = (DELEE_REQ_INFO *) req_info->req_info_ptr; printf ("\n Scope of Delete : "); switch (req_ptr->req_tag) { case 0 : printf ("specific"); obj_ptr = (OBJECT_NAME *) (req_ptr + 1); printf ("\n Object Names : %d",req_ptr->sod.num_of_names); line = 14; for (j = 0; j < req_ptr->sod.num_of_names; j++) { print_objname (obj_ptr); obj_ptr++; line += 2; if (((j+1) < req_ptr->sod.num_of_names) && (line >= 22)) { printf ("\n\n Press return to continue, x to exit"); ch = get_a_char (); if (ch == 'x' || ch == 'X') j = req_ptr->sod.num_of_names; /* exit selected */ line = 14; } } break; case 1 : printf ("Event Condition"); print_objname (&req_ptr->sod.evcon_name); break; case 2 : printf ("Event Action"); print_objname (&req_ptr->sod.evact_name); break; default: printf ("%d, invalid scope", req_ptr->req_tag); break; } } /* create a default response */ rsp_info.cand_not_deleted = 98765L; if (mms_debug_sel & MMS_LOG_USR_IND) { printf ("\n\n Enter Number of Canditates Not Deleted : "); rsp_info.cand_not_deleted = 0; if (intget (&num)) rsp_info.cand_not_deleted = (unsigned long) num; } mp_delee_resp (req_info, &rsp_info); indic_info_wait (); /* allow user to see indic info */ }#endif/************************************************************************//* GET EVENT ENROLLMENT ATTRIBUTES *//************************************************************************/#if MMS_GETEEA_EN & RESP_ENST_VOID u_geteea_ind (MMSREQ_IND *req_info) {GETEEA_REQ_INFO *req_ptr;OBJECT_NAME *obj_ptr;GETEEA_RESP_INFO *rsp_info;EVENT_ENROLLMENT *ee_ptr;ST_UCHAR *inp_str;ST_INT j, ch, line; if (mms_debug_sel & MMS_LOG_USR_IND) { indic_info_print (req_info,"Get Event Enrollment Attributes "); req_ptr = (GETEEA_REQ_INFO *) req_info->req_info_ptr; printf ("\n\n Press return to continue"); ch = get_a_char (); CLEARSCR; printf ("\n Scope of Request : %d, ", req_ptr->scope_of_req); switch (req_ptr->scope_of_req) { case 0 : printf ("specific"); break; case 1 : printf ("client"); break; case 2 : printf ("event condition"); break; case 3 : printf ("event action"); break; default: printf ("invalid scope"); break; } printf ("\n Client Application : "); if (req_ptr->client_app_pres) print_asn1_app_ref (req_ptr->client_app, req_ptr->client_app_len); else printf ("Not Present"); printf ("\n Event Condition Name : "); if (req_ptr->evcon_name_pres) print_objname (&(req_ptr->evcon_name)); else
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -