自主协议库编译通过
This commit is contained in:
448
mmslib/mmsle/mms_ced1.c
Normal file
448
mmslib/mmsle/mms_ced1.c
Normal file
@@ -0,0 +1,448 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : mms_ced1.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains common primitive encode/decode functions */
|
||||
/* particular to get and write journal service. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 05 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 04 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 04/28/00 JRB 03 Lint cleanup */
|
||||
/* 09/13/99 MDE 02 Added SD_CONST modifiers */
|
||||
/* 08/15/97 MDE 01 BTOD handling changes */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pjou.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* global structures & functions */
|
||||
/************************************************************************/
|
||||
|
||||
static ENTRY_CONTENT *ent_cont_ptr;
|
||||
|
||||
static ST_VOID (*get_jou_ent_cont_done) (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jec_get_data_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jec_get_annotation (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jec_list_of_var_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jec_vlist_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jec_vlist_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jec_vs_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jec_value_spec_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jec_get_var_tag (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jec_event_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jec_get_state (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jec_evcon_name_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jec_ecn_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jec_evcon_name_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jec_event_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jec_data_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
#ifdef CS_SUPPORT
|
||||
static ST_VOID jec_addl_detail_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jec_addl_detail_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jec_get_addl_detail (ASN1_DEC_CTXT *aCtx);
|
||||
#endif
|
||||
static ST_VOID jec_get_occur_time (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
static VAR_INFO *var_info_ptr;
|
||||
|
||||
static ST_INT MAX_DATA_VARS;
|
||||
static ST_RET ERROR_CODE;
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_get_jou_ent_cont */
|
||||
/* Function to get a Journal Entry Content from the received message. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_get_jou_ent_cont (ASN1_DEC_CTXT *aCtx, ENTRY_CONTENT *data_ptr,
|
||||
ST_INT max_vars,
|
||||
ST_VOID (*done_fun) (ASN1_DEC_CTXT *aCtx))
|
||||
{
|
||||
/* set decode error for request or response */
|
||||
if (_mmsdec_rslt->type == MMSRESP)
|
||||
ERROR_CODE = RESP_BAD_VALUE;
|
||||
else
|
||||
ERROR_CODE = REQ_BAD_VALUE;
|
||||
|
||||
ent_cont_ptr = data_ptr;
|
||||
MAX_DATA_VARS = max_vars;
|
||||
get_jou_ent_cont_done = done_fun;
|
||||
|
||||
ent_cont_ptr->addl_detail_pres = SD_FALSE; /* set default values */
|
||||
ent_cont_ptr->entry_form_tag = 0;
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 0, jec_get_occur_time);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jec_get_occur_time */
|
||||
/* journal entry content is being decoded: occurrence time was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jec_get_occur_time (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jec_get_occur_time");
|
||||
/* read time from message */
|
||||
if (asn1r_get_btod (aCtx, &ent_cont_ptr->occur_time))
|
||||
asn1r_set_dec_err (aCtx, ERROR_CODE);
|
||||
|
||||
#ifdef CS_SUPPORT
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 1, jec_get_addl_detail);
|
||||
#endif
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 2, jec_get_data_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 3, jec_get_annotation);
|
||||
|
||||
/* set cstr done function */
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = get_jou_ent_cont_done;
|
||||
}
|
||||
|
||||
#ifdef CS_SUPPORT
|
||||
/************************************************************************/
|
||||
/* jec_get_addl_detail */
|
||||
/* journal entry content is being decoded: additional detail was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jec_get_addl_detail (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jec_get_addl_detail");
|
||||
|
||||
ent_cont_ptr->addl_detail_pres = SD_TRUE; /* set addl detail pres */
|
||||
|
||||
/* leave additional detail in place; just parse it. */
|
||||
ent_cont_ptr->addl_detail = aCtx->asn1r_field_ptr;
|
||||
asn1r_parse_next (aCtx, jec_addl_detail_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jec_addl_detail_done */
|
||||
/* journal entry content is being decoded: additional detail has been */
|
||||
/* parsed. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jec_addl_detail_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
ent_cont_ptr->addl_detail_len = aCtx->asn1r_octetcount; /* save length */
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = jec_addl_detail_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jec_addl_detail_cstr_done */
|
||||
/* journal entry content is being decoded: additional detail cstr done */
|
||||
/* has been encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jec_addl_detail_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 2, jec_get_data_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 3, jec_get_annotation);
|
||||
}
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* jec_get_data_cstr */
|
||||
/* journal entry content is being decoded: data constructor was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jec_get_data_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jec_get_data_cstr");
|
||||
|
||||
ent_cont_ptr->entry_form_tag = 2; /* set data form tag */
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 0, jec_event_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 1, jec_list_of_var_cstr);
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = jec_data_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jec_event_cstr */
|
||||
/* journal entry content is being decoded: event cstr was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jec_event_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jec_event_cstr");
|
||||
|
||||
ent_cont_ptr->ef.data.event_pres = SD_TRUE; /* set event present */
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 0, jec_evcon_name_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jec_evcon_name_cstr */
|
||||
/* journal entry content is being decoded: event condition name cstr */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jec_evcon_name_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jec_evcon_name_cstr");
|
||||
|
||||
_ms_get_mms_objname (aCtx, &ent_cont_ptr->ef.data.evcon_name, jec_ecn_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jec_ecn_done */
|
||||
/* journal entry content is being decoded: event condition name has */
|
||||
/* been obtained. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jec_ecn_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jec_ecn_done");
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = jec_evcon_name_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jec_evcon_name_cstr_done */
|
||||
/* journal entry content is being decoded: event condition name cstr */
|
||||
/* done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jec_evcon_name_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, jec_get_state);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jec_get_state */
|
||||
/* journal entry content is being decoded: current state was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jec_get_state (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jec_get_state");
|
||||
/* read time from message */
|
||||
if (asn1r_get_i16 (aCtx, &ent_cont_ptr->ef.data.cur_state) ||
|
||||
(ent_cont_ptr->ef.data.cur_state < 0) ||
|
||||
(ent_cont_ptr->ef.data.cur_state > 2))
|
||||
asn1r_set_dec_err (aCtx, UNCONF_BAD_VALUE);
|
||||
/* set cstr done function */
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = jec_event_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jec_event_cstr_done */
|
||||
/* journal entry content is being decoded: event cstr done was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jec_event_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 1, jec_list_of_var_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jec_list_of_var_cstr */
|
||||
/* journal entry content is being decoded: list of variables cstr was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jec_list_of_var_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jec_list_of_var_cstr");
|
||||
|
||||
ent_cont_ptr->ef.data.list_of_var_pres = SD_TRUE;
|
||||
|
||||
ent_cont_ptr->ef.data.num_of_var = 0; /* initialize # of variables */
|
||||
/* initialize var list pointer*/
|
||||
var_info_ptr = (VAR_INFO *) (ent_cont_ptr + 1);
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, UNI | CONSTR, SEQ_CODE, jec_vlist_cstr);
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = NULL;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jec_vlist_cstr */
|
||||
/* journal entry content is being decoded: variable list constructor */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jec_vlist_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jec_vlist_cstr");
|
||||
|
||||
ent_cont_ptr->ef.data.num_of_var++; /* increment # of variables */
|
||||
if (ent_cont_ptr->ef.data.num_of_var > MAX_DATA_VARS)
|
||||
asn1r_set_dec_err (aCtx, ERROR_CODE);
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 0, jec_get_var_tag);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jec_get_var_tag */
|
||||
/* journal entry content is being decoded: variable tag was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jec_get_var_tag (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jec_get_var_tag");
|
||||
|
||||
/* copy variable tag back onto itself shifted by 1 char */
|
||||
var_info_ptr->var_tag = (ST_CHAR *) aCtx->asn1r_field_ptr - 1;
|
||||
|
||||
/* read variable tag from message */
|
||||
if (asn1r_get_vstr (aCtx, var_info_ptr->var_tag))
|
||||
asn1r_set_dec_err (aCtx, ERROR_CODE);
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 1, jec_value_spec_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jec_value_spec_cstr */
|
||||
/* journal entry content is being decoded: value specification cstr */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jec_value_spec_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jec_value_spec_cstr");
|
||||
|
||||
_ms_get_va_data (aCtx, &var_info_ptr->value_spec, jec_vs_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jec_vs_done */
|
||||
/* journal entry content is being decoded: value specification has been */
|
||||
/* obtained. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jec_vs_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jec_vs_done");
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = NULL;
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level-1] = jec_vlist_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jec_vlist_cstr_done */
|
||||
/* journal entry content is being decoded: variable list constructor */
|
||||
/* done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jec_vlist_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
var_info_ptr++; /* point to where next will go */
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, UNI | CONSTR, SEQ_CODE, jec_vlist_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jec_data_cstr_done */
|
||||
/* journal entry content is being decoded: data constructor done was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jec_data_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jec_get_annotation */
|
||||
/* journal entry content is being decoded: annotation was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jec_get_annotation (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jec_get_annotation");
|
||||
|
||||
/* copy annotation back onto itself shifted by 1 char */
|
||||
|
||||
ent_cont_ptr->entry_form_tag = 3;
|
||||
ent_cont_ptr->ef.annotation = (ST_CHAR *) aCtx->asn1r_field_ptr - 1;
|
||||
|
||||
if (asn1r_get_vstr (aCtx, ent_cont_ptr->ef.annotation)) /* read annotation */
|
||||
asn1r_set_dec_err (aCtx, ERROR_CODE);
|
||||
}
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_wr_jou_ent_cont */
|
||||
/* Function to write a Journal Entry Content to the message. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_wr_jou_ent_cont (ASN1_ENC_CTXT *aCtx, ENTRY_CONTENT *data_ptr)
|
||||
{
|
||||
VAR_INFO *vi_ptr;
|
||||
ST_INT i;
|
||||
|
||||
if (data_ptr->entry_form_tag == 3)
|
||||
{ /* write annotation */
|
||||
asn1r_wr_vstr (aCtx, data_ptr->ef.annotation);
|
||||
asn1r_fin_prim (aCtx, 3, CTX); /* context tag 3 */
|
||||
}
|
||||
else
|
||||
{
|
||||
asn1r_strt_constr (aCtx); /* start context tag 2 cstr */
|
||||
if (data_ptr->ef.data.list_of_var_pres)
|
||||
{
|
||||
asn1r_strt_constr (aCtx); /* start context tag 1 cstr */
|
||||
vi_ptr = (VAR_INFO *) (data_ptr + 1);
|
||||
vi_ptr += data_ptr->ef.data.num_of_var - 1;
|
||||
for (i = 0; i < data_ptr->ef.data.num_of_var; i++)
|
||||
{
|
||||
asn1r_strt_constr (aCtx); /* start universal sequece cstr */
|
||||
asn1r_strt_constr (aCtx); /* start context tag 1 cstr */
|
||||
_ms_wr_va_data (aCtx, &vi_ptr->value_spec);
|
||||
asn1r_fin_constr (aCtx, 1, CTX, DEF); /* finish context tag 1 cstr */
|
||||
asn1r_wr_vstr (aCtx, vi_ptr->var_tag);
|
||||
asn1r_fin_prim (aCtx, 0, CTX);
|
||||
asn1r_fin_constr (aCtx, SEQ_CODE, UNI, DEF);
|
||||
vi_ptr--; /* point to previous var name */
|
||||
}
|
||||
asn1r_fin_constr (aCtx, 1, CTX, DEF); /* finish context tag 1 cstr */
|
||||
}
|
||||
if (data_ptr->ef.data.event_pres)
|
||||
{
|
||||
asn1r_strt_constr (aCtx); /* start context tag 0 cstr */
|
||||
asn1r_wr_i16 (aCtx, data_ptr->ef.data.cur_state);/* write the current state */
|
||||
asn1r_fin_prim (aCtx, 1,CTX); /* context tag 1 */
|
||||
asn1r_strt_constr (aCtx); /* start context tag 0 cstr */
|
||||
_ms_wr_mms_objname (aCtx, &data_ptr->ef.data.evcon_name);
|
||||
asn1r_fin_constr (aCtx, 0, CTX, DEF); /* finish context tag 0 cstr */
|
||||
asn1r_fin_constr (aCtx, 0, CTX, DEF); /* finish context tag 0 cstr */
|
||||
}
|
||||
asn1r_fin_constr (aCtx, 2, CTX, DEF); /* finish context tag 2 cstr */
|
||||
}
|
||||
|
||||
if (data_ptr->addl_detail_pres)
|
||||
{
|
||||
asn1r_strt_constr (aCtx); /* start context tag 1 cstr */
|
||||
asn1r_wr_delmnt (aCtx, data_ptr->addl_detail,data_ptr->addl_detail_len);
|
||||
asn1r_fin_constr (aCtx, 1, CTX, DEF); /* context tag 1 */
|
||||
}
|
||||
/* select short form if not present */
|
||||
asn1r_wr_btod (aCtx, &data_ptr->occur_time);
|
||||
asn1r_fin_prim (aCtx, 0, CTX); /* context tag 0 */
|
||||
}
|
||||
115
mmslib/mmsle/mms_ced2.c
Normal file
115
mmslib/mmsle/mms_ced2.c
Normal file
@@ -0,0 +1,115 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : mms_ced2.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains common primitive encode/decode functions */
|
||||
/* particular getting and writing filenames. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 03 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 02 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 01 Added SD_CONST modifiers */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID fname_get_name (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
/************************************************************************/
|
||||
/* global structures & functions */
|
||||
/************************************************************************/
|
||||
|
||||
static FILE_NAME *fname_ptr;
|
||||
|
||||
|
||||
static ST_INT MAX_FNAMES;
|
||||
static ST_INT *fname_count;
|
||||
static ST_RET ERROR_CODE;
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_get_mms_fname */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_get_mms_fname (ASN1_DEC_CTXT *aCtx, FILE_NAME *data_ptr, ST_INT ptr_len,
|
||||
ST_INT *num_of_names_ptr)
|
||||
{
|
||||
MLOG_CDEC0 ("_ms_get_mms_fname");
|
||||
|
||||
if (_mmsdec_rslt->type == MMSRESP)
|
||||
ERROR_CODE = RESP_BAD_VALUE;
|
||||
else
|
||||
ERROR_CODE = REQ_BAD_VALUE;
|
||||
|
||||
fname_ptr = data_ptr; /* save the addr of the array */
|
||||
MAX_FNAMES = ptr_len; /* save the array upper bounds */
|
||||
fname_count = num_of_names_ptr; /* save the ptr to the count */
|
||||
ASN1R_TAG_ADD (aCtx, UNI, GRAFSTR_CODE, fname_get_name);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* fname_get_name */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID fname_get_name (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("fname_get_name");
|
||||
|
||||
(*fname_count)++; /* increment # of file names */
|
||||
if (*fname_count > MAX_FNAMES)
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, ERROR_CODE);
|
||||
return;
|
||||
}
|
||||
/* save file name pointer & length */
|
||||
fname_ptr->fn_len = aCtx->asn1r_elmnt_len;
|
||||
fname_ptr->fname = (ST_CHAR *) aCtx->asn1r_field_ptr;
|
||||
asn1r_get_octstr (aCtx, (ST_UCHAR *) fname_ptr->fname);
|
||||
|
||||
fname_ptr++; /* point to where next will go */
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, UNI, GRAFSTR_CODE, fname_get_name);
|
||||
}
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_wr_mms_fname */
|
||||
/* encode a list of file names. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_wr_mms_fname (ASN1_ENC_CTXT *aCtx, FILE_NAME *data_ptr, ST_INT len)
|
||||
{
|
||||
ST_INT i;
|
||||
FILE_NAME *fn_ptr;
|
||||
|
||||
fn_ptr = data_ptr;
|
||||
fn_ptr += len - 1; /* point to last file name */
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
asn1r_wr_octstr (aCtx, (ST_UCHAR *) fn_ptr->fname,fn_ptr->fn_len);/* file name */
|
||||
asn1r_fin_prim (aCtx, GRAFSTR_CODE,UNI); /* universal grafstring */
|
||||
fn_ptr--;
|
||||
}
|
||||
}
|
||||
124
mmslib/mmsle/rq_altec.c
Normal file
124
mmslib/mmsle/rq_altec.c
Normal file
@@ -0,0 +1,124 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_altec.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of alter event */
|
||||
/* condition monitoring. It decodes the alter event condition */
|
||||
/* monitoring response (confirm) & encodes the alter event */
|
||||
/* condition monitoring request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/20/01 JRB 02 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 06/15/98 MDE 01 Changes to allow compile under C++ */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pevn.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_altecm_rsp */
|
||||
/* NOTE : Since the mms_altecm_rsp is a NULL PDU, the decode is */
|
||||
/* continued by '_mms_null_pdu_dec', which simply sets decode done = 1 */
|
||||
/* and sets the decode done function to point to the general decode done*/
|
||||
/* fun. See mmsdec.c for the general functions. */
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_altecm */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the alter event condition monitoring */
|
||||
/* request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_altecm (ST_INT chan, ALTECM_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_ALT_EC_MON,
|
||||
M_CAST_MK_FUN (_ms_mk_altecm_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_altecm */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the alter event condition monitoring request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_altecm (ALTECM_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_ALT_EC_MON,
|
||||
M_CAST_MK_FUN (_ms_mk_altecm_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_altecm_req */
|
||||
/* ENCODE a alter event condition monitoring REQUEST: */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_altecm_req (ASN1_ENC_CTXT *aCtx, ALTECM_REQ_INFO *info)
|
||||
{
|
||||
if (info->eval_int_pres)
|
||||
{
|
||||
asn1r_wr_u32 (aCtx, info->eval_int); /* write evaluation interval */
|
||||
asn1r_fin_prim (aCtx, 4, CTX); /* ctx tag 4 */
|
||||
}
|
||||
|
||||
if (info->as_reports_pres)
|
||||
{
|
||||
asn1r_wr_bool (aCtx, info->as_reports); /* write alarm summary reports */
|
||||
asn1r_fin_prim (aCtx, 3, CTX); /* ctx tag 3 */
|
||||
}
|
||||
|
||||
if (info->priority_pres)
|
||||
{
|
||||
asn1r_wr_u8 (aCtx, info->priority); /* write the priority */
|
||||
asn1r_fin_prim (aCtx, 2, CTX); /* ctx tag 2 */
|
||||
}
|
||||
|
||||
if (info->enabled_pres)
|
||||
{
|
||||
asn1r_wr_bool (aCtx, info->enabled); /* write enabled */
|
||||
asn1r_fin_prim (aCtx, 1, CTX); /* ctx tag 1 */
|
||||
}
|
||||
|
||||
asn1r_strt_constr (aCtx); /* start ctx tag 0 constructor */
|
||||
_ms_wr_mms_objname (aCtx, &info->evcon_name); /* write event cond mon name */
|
||||
asn1r_fin_constr (aCtx, 0,CTX,DEF); /* context specific tag 0 */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_ALT_EC_MON,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
233
mmslib/mmsle/rq_altee.c
Normal file
233
mmslib/mmsle/rq_altee.c
Normal file
@@ -0,0 +1,233 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_altee.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of alter event */
|
||||
/* enrollment. It decodes the alter event enrollment response */
|
||||
/* (confirm) & encodes the alter event enrollment request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 06 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 05 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 04 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 03 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 02 Changes to allow compile under C++ */
|
||||
/* 07/03/97 MDE 01 Op-specific info buffer handling changes */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pevn.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static ALTEE_RESP_INFO *rsp_info;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID altee_cur_state_cstr (ASN1_DEC_CTXT *ac);
|
||||
static ST_VOID altee_get_state (ASN1_DEC_CTXT *ac);
|
||||
static ST_VOID altee_get_undef (ASN1_DEC_CTXT *ac);
|
||||
static ST_VOID altee_cur_state_cstr_done (ASN1_DEC_CTXT *ac);
|
||||
static ST_VOID altee_ttime_cstr (ASN1_DEC_CTXT *ac);
|
||||
static ST_VOID altee_ttime_done (ASN1_DEC_CTXT *ac);
|
||||
static ST_VOID altee_ttime_cstr_done (ASN1_DEC_CTXT *ac);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_altee_rsp */
|
||||
/* This function is called from MMSDEC when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_altee_rsp (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("Alter Event Enrollment Response");
|
||||
|
||||
/* get storage for request information */
|
||||
rsp_info = (ALTEE_RESP_INFO *) _m_get_dec_buf (aCtx, sizeof (ALTEE_RESP_INFO));
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 0, altee_cur_state_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* altee_cur_state_cstr */
|
||||
/* Decoding alter event enrollment response: current state constructor */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID altee_cur_state_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("altee_cur_state_cstr");
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 0, altee_get_state);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, altee_get_undef);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* altee_get_state */
|
||||
/* Decoding alter event enrollment request: state was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID altee_get_state (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("altee_get_state");
|
||||
|
||||
rsp_info->cur_state_tag = 0; /* set tag to state */
|
||||
|
||||
if (asn1r_get_i16 (aCtx, &(rsp_info->state)))
|
||||
{ /* read the state */
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
else if ((rsp_info->state < 0) || (rsp_info->state > 7))
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = altee_cur_state_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* altee_get_undef */
|
||||
/* Decoding alter event enrollment request: undefined was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID altee_get_undef (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("altee_get_undef");
|
||||
|
||||
rsp_info->cur_state_tag = 1; /* set tag to undefined */
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = altee_cur_state_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* altee_cur_state_cstr_done */
|
||||
/* Decoding alter event enrollment response: current state constructor */
|
||||
/* done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID altee_cur_state_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 1, altee_ttime_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* altee_ttime_cstr */
|
||||
/* Decoding alter event enrollment response: transition time constr */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID altee_ttime_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("altee_ttime_cstr");
|
||||
|
||||
_ms_get_mms_evtime (aCtx, &rsp_info->trans_time, altee_ttime_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* altee_ttime_done */
|
||||
/* Decoding alter event enrollment response: transition time has been */
|
||||
/* obtained. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID altee_ttime_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("altee_ttime_done");
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = altee_ttime_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* altee_ttime_cstr_done */
|
||||
/* Decoding alter event enrollment response: transition time constr */
|
||||
/* done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID altee_ttime_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_altee */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the alter event enrollment request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_altee (ST_INT chan, ALTEE_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_ALT_EE,
|
||||
M_CAST_MK_FUN (_ms_mk_altee_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_altee */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the alter event enrollment request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_altee (ALTEE_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_ALT_EE,
|
||||
M_CAST_MK_FUN (_ms_mk_altee_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_altee_req */
|
||||
/* ENCODE a alter event enrollment REQUEST: */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_altee_req (ASN1_ENC_CTXT *aCtx, ALTEE_REQ_INFO *info)
|
||||
{
|
||||
if (info->alarm_ack_rule_pres)
|
||||
{
|
||||
asn1r_wr_i16 (aCtx, info->alarm_ack_rule);
|
||||
asn1r_fin_prim (aCtx, 2, CTX);
|
||||
}
|
||||
|
||||
if (info->ec_transitions_pres)
|
||||
{
|
||||
asn1r_wr_bitstr (aCtx, &info->ec_transitions, 7);
|
||||
asn1r_fin_prim (aCtx, 1, CTX);
|
||||
}
|
||||
|
||||
asn1r_strt_constr (aCtx); /* start ctx tag 0 constructor */
|
||||
_ms_wr_mms_objname (aCtx, &info->evenroll_name);/* write event enrollment name */
|
||||
asn1r_fin_constr (aCtx, 0,CTX,DEF); /* context specific tag 0 */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_ALT_EE,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
122
mmslib/mmsle/rq_crepi.c
Normal file
122
mmslib/mmsle/rq_crepi.c
Normal file
@@ -0,0 +1,122 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_crepi.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of create program */
|
||||
/* invocation. It decodes the create program invocation response */
|
||||
/* (confirm) & encodes the create program invocation request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/20/01 JRB 02 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 06/15/98 MDE 01 Changes to allow compile under C++ */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pprg.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_create_pi_rsp */
|
||||
/* NOTE: Since the mms_create_pi_rsp is a NULL PDU, the decode is */
|
||||
/* continued by '_mms_null_pdu_dec', which simply sets decode done = 1 */
|
||||
/* and sets the decode done function to point to the general decode */
|
||||
/* done fun. See mmsdec.c for the general functions. */
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_crepi */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the create program invocation request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_crepi (ST_INT chan, CREPI_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_CREATE_PI,
|
||||
M_CAST_MK_FUN (_ms_mk_crepi_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_crepi */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the create program invocation request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_crepi (CREPI_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_CREATE_PI,
|
||||
M_CAST_MK_FUN (_ms_mk_crepi_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_crepi_req */
|
||||
/* construct a create program invocation request */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_crepi_req (ASN1_ENC_CTXT *aCtx, CREPI_REQ_INFO *info)
|
||||
{
|
||||
ST_INT i;
|
||||
ST_CHAR **dom_ptr;
|
||||
|
||||
if (info->monitor_pres)
|
||||
{
|
||||
asn1r_wr_bool (aCtx, info->monitor); /* write the monitor flag */
|
||||
asn1r_fin_prim (aCtx, 3,CTX); /* ctx tag 3 */
|
||||
}
|
||||
|
||||
if (!info->reusable) /* SD_TRUE is default */
|
||||
{
|
||||
asn1r_wr_bool (aCtx, info->reusable); /* write the re-usable flag */
|
||||
asn1r_fin_prim (aCtx, 2,CTX); /* ctx tag 2 */
|
||||
}
|
||||
/* Write list of Domain Names */
|
||||
asn1r_strt_constr (aCtx); /* start ctx tag 1 constructor */
|
||||
dom_ptr = (ST_CHAR **) (info + 1);
|
||||
dom_ptr += (info->num_of_dnames - 1); /* point to last domain name */
|
||||
for (i = 0; i < info->num_of_dnames; i++)
|
||||
{
|
||||
asn1r_wr_vstr (aCtx, *dom_ptr);
|
||||
asn1r_fin_prim (aCtx, VISTR_CODE, UNI);
|
||||
dom_ptr--;
|
||||
}
|
||||
asn1r_fin_constr (aCtx, 1,CTX,DEF); /* ctx tag 1 constructor */
|
||||
|
||||
asn1r_wr_vstr (aCtx, info->piname); /* write pgm invocation name */
|
||||
asn1r_fin_prim (aCtx, 0,CTX); /* ctx tag 0 */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_CREATE_PI,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
125
mmslib/mmsle/rq_defea.c
Normal file
125
mmslib/mmsle/rq_defea.c
Normal file
@@ -0,0 +1,125 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_defea.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of define event */
|
||||
/* action. It decodes the define event action response (confirm) */
|
||||
/* & encodes the define event action request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/20/01 JRB 02 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 06/15/98 MDE 01 Changes to allow compile under C++ */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pevn.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_defea_rsp */
|
||||
/* NOTE : Since the mms_defea_rsp is a NULL PDU, the decode is */
|
||||
/* continued by '_mms_null_pdu_dec', which simply sets decode done = 1 */
|
||||
/* and sets the decode done function to point to the general decode done*/
|
||||
/* fun. See mmsdec.c for the general functions. */
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_defea */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the define event action request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_defea (ST_INT chan, DEFEA_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_DEF_EA,
|
||||
M_CAST_MK_FUN (_ms_mk_defea_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_defea */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the define event action request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_defea (DEFEA_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_DEF_EA,
|
||||
M_CAST_MK_FUN (_ms_mk_defea_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_defea_req */
|
||||
/* ENCODE a define event action REQUEST: */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_defea_req (ASN1_ENC_CTXT *aCtx, DEFEA_REQ_INFO *info)
|
||||
{
|
||||
#ifdef MOD_SUPPORT
|
||||
MODIFIER *mod_ptr;
|
||||
#endif
|
||||
|
||||
#ifdef CS_SUPPORT /* if companion standards are supported */
|
||||
if (info->cs_rdetail_pres) /* check for CS request detail */
|
||||
{
|
||||
asn1r_strt_constr (aCtx); /* start ctx tag 79 constructor */
|
||||
asn1r_wr_delmnt (aCtx, info->cs_rdetail, info->cs_rdetail_len);
|
||||
asn1r_fin_constr (aCtx, 79, CTX, DEF); /* CS is cstr 79 */
|
||||
}
|
||||
#endif
|
||||
|
||||
asn1r_strt_constr (aCtx); /* start ctx tag 2 constructor */
|
||||
asn1r_wr_delmnt (aCtx, info->conf_serv_req,info->conf_serv_req_len);
|
||||
asn1r_fin_constr (aCtx, 2,CTX,DEF); /* finish ctx tag 2 constructor */
|
||||
|
||||
#ifdef MOD_SUPPORT
|
||||
if (info->modlist_pres)
|
||||
{
|
||||
mod_ptr = (MODIFIER *) (info + 1);
|
||||
asn1r_strt_constr (aCtx); /* start ctx tag 1 constructor */
|
||||
_ms_wr_mms_modlist (aCtx, mod_ptr, info->num_of_modifiers);
|
||||
asn1r_fin_constr (aCtx, 1,CTX,DEF); /* finish ctx tag 1 constructor */
|
||||
}
|
||||
#endif
|
||||
|
||||
asn1r_strt_constr (aCtx); /* start ctx tag 0 constructor */
|
||||
_ms_wr_mms_objname (aCtx, &info->evact_name); /* write event action name */
|
||||
asn1r_fin_constr (aCtx, 0,CTX,DEF); /* context specific tag 0 */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_DEF_EA,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
131
mmslib/mmsle/rq_defec.c
Normal file
131
mmslib/mmsle/rq_defec.c
Normal file
@@ -0,0 +1,131 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_defec.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of define event */
|
||||
/* condition. It decodes the define event condition response */
|
||||
/* (confirm) & encodes the define event condition request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/20/01 JRB 02 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 06/15/98 MDE 01 Changes to allow compile under C++ */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pevn.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_defec_rsp */
|
||||
/* NOTE : Since the mms_defec_rsp is a NULL PDU, the decode is */
|
||||
/* continued by '_mms_null_pdu_dec', which simply sets decode done = 1 */
|
||||
/* and sets the decode done function to point to the general decode done*/
|
||||
/* fun. See mmsdec.c for the general functions. */
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_defec */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the define event condition request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_defec (ST_INT chan, DEFEC_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_DEF_EC,
|
||||
M_CAST_MK_FUN (_ms_mk_defec_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_defec */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the define event condition request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_defec (DEFEC_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_DEF_EC,
|
||||
M_CAST_MK_FUN (_ms_mk_defec_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_defec_req */
|
||||
/* ENCODE a define event condition REQUEST: */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_defec_req (ASN1_ENC_CTXT *aCtx, DEFEC_REQ_INFO *info)
|
||||
{
|
||||
if (info->eval_int_pres)
|
||||
{
|
||||
asn1r_wr_u32 (aCtx, info->eval_interval); /* write evaluation interval */
|
||||
asn1r_fin_prim (aCtx, 7, CTX); /* ctx tag 7 */
|
||||
}
|
||||
|
||||
if (info->mon_var_pres)
|
||||
{ /* write variable specification */
|
||||
asn1r_strt_constr (aCtx); /* start ctx tag 6 constructor */
|
||||
_ms_wr_va_var_spec (aCtx, &info->var_ref);
|
||||
asn1r_fin_constr (aCtx, 6, CTX, DEF); /* finish ctx tag 6 */
|
||||
}
|
||||
|
||||
if (info->as_reports_pres)
|
||||
{
|
||||
asn1r_wr_bool (aCtx, info->as_reports); /* write alarm summary reports */
|
||||
asn1r_fin_prim (aCtx, 4, CTX); /* ctx tag 4 */
|
||||
}
|
||||
|
||||
if (info->severity != MMS_NORM_SEVERITY)
|
||||
{ /* not the default */
|
||||
asn1r_wr_u8 (aCtx, info->severity);
|
||||
asn1r_fin_prim (aCtx, 3, CTX);
|
||||
}
|
||||
|
||||
if (info->priority != MMS_NORM_PRIORITY)
|
||||
{ /* not the default */
|
||||
asn1r_wr_u8 (aCtx, info->priority);
|
||||
asn1r_fin_prim (aCtx, 2, CTX);
|
||||
}
|
||||
|
||||
asn1r_wr_i16 (aCtx, info->eclass);
|
||||
asn1r_fin_prim (aCtx, 1, CTX);
|
||||
|
||||
asn1r_strt_constr (aCtx); /* start ctx tag 0 constructor */
|
||||
_ms_wr_mms_objname (aCtx, &info->evcon_name); /* write event condition name */
|
||||
asn1r_fin_constr (aCtx, 0,CTX,DEF); /* context specific tag 0 */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_DEF_EC,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
100
mmslib/mmsle/rq_defsc.c
Normal file
100
mmslib/mmsle/rq_defsc.c
Normal file
@@ -0,0 +1,100 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_defscat.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of define scattered */
|
||||
/* access. It decodes the define scattered access response */
|
||||
/* (confirm) & encodes the define scattered access request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/20/01 JRB 02 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 06/15/98 MDE 01 Changes to allow compile under C++ */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pvar.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_def_scat_rsp */
|
||||
/* NOTE : Since the mms_def_scat_rsp is a NULL PDU, the decode is */
|
||||
/* continued by '_mms_null_pdu_dec', which simply sets decode done = 1 */
|
||||
/* and sets the decode done function to point to the general decode done*/
|
||||
/* fun. See mmsdec.c for the general functions. */
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_defscat */
|
||||
/* Create and send a define scattered access request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_defscat (ST_INT chan, DEFSCAT_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_DEF_SCAT,
|
||||
M_CAST_MK_FUN (_ms_mk_defscat_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_defscat */
|
||||
/* Create a define scattered access request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_defscat (DEFSCAT_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_DEF_SCAT,
|
||||
M_CAST_MK_FUN (_ms_mk_defscat_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_defscat_req */
|
||||
/* construct a define scattered access request */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_defscat_req (ASN1_ENC_CTXT *aCtx, DEFSCAT_REQ_INFO *info_ptr)
|
||||
{
|
||||
asn1r_strt_constr (aCtx); /* start context tag 1 cstr */
|
||||
_ms_wr_va_scat_access (aCtx, &info_ptr->sa_descr);
|
||||
asn1r_fin_constr (aCtx, 1, CTX, DEF); /* finish context tag 1 cstr */
|
||||
|
||||
asn1r_strt_constr (aCtx); /* start context tag 0 cstr */
|
||||
_ms_wr_mms_objname (aCtx, &info_ptr->sa_name);
|
||||
asn1r_fin_constr (aCtx, 0, CTX, DEF); /* finish context tag 0 cstr */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_DEF_SCAT,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
104
mmslib/mmsle/rq_defse.c
Normal file
104
mmslib/mmsle/rq_defse.c
Normal file
@@ -0,0 +1,104 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_defsem.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of the define */
|
||||
/* semaphore. It decodes the define semaphore response (confirm) */
|
||||
/* and encodes the define semaphore request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/20/01 JRB 02 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 06/15/98 MDE 01 Changes to allow compile under C++ */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_psem.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_defsem_rsp */
|
||||
/* NOTE : Since the mms_defsem_rsp is a NULL PDU, the decode is */
|
||||
/* continued by '_mms_null_pdu_dec', which simply sets decode done = 1 */
|
||||
/* and sets the decode done function to point to the general decode done*/
|
||||
/* fun. See mmsdec.c for the general functions. */
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_defsem */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the define semaphore request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_defsem (ST_INT chan, DEFSEM_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_DEFINE_SEM,
|
||||
M_CAST_MK_FUN (_ms_mk_defsem_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_defsem */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the define semaphore request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_defsem (DEFSEM_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_DEFINE_SEM,
|
||||
M_CAST_MK_FUN (_ms_mk_defsem_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_defsem_req */
|
||||
/* construct a define semaphore request */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_defsem_req (ASN1_ENC_CTXT *aCtx, DEFSEM_REQ_INFO *info)
|
||||
{
|
||||
asn1r_strt_constr (aCtx); /* start sequence constr */
|
||||
|
||||
asn1r_wr_u16 (aCtx, info->num_of_tokens); /* write number of named tokens */
|
||||
asn1r_fin_prim (aCtx, 1, CTX); /* context tag 1 */
|
||||
|
||||
asn1r_strt_constr (aCtx); /* object name constructor */
|
||||
|
||||
_ms_wr_mms_objname (aCtx, &info->sem_name); /* write the object name */
|
||||
|
||||
asn1r_fin_constr (aCtx, 0,CTX,DEF); /* context tag 0 */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_DEFINE_SEM,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
96
mmslib/mmsle/rq_defty.c
Normal file
96
mmslib/mmsle/rq_defty.c
Normal file
@@ -0,0 +1,96 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_deftype.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of define named */
|
||||
/* type. It decodes the define named type response (confirm) & */
|
||||
/* encodes the define named type request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/20/01 JRB 02 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 06/15/98 MDE 01 Changes to allow compile under C++ */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pvar.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_def_type_rsp */
|
||||
/* NOTE : Since the mms_def_type_rsp is a NULL PDU, the decode is */
|
||||
/* continued by '_mms_null_pdu_dec', which simply sets decode done = 1 */
|
||||
/* and sets the decode done function to point to the general decode done*/
|
||||
/* fun. See mmsdec.c for the general functions. */
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_deftype */
|
||||
/* Create and send a define named type request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_deftype (ST_INT chan, DEFTYPE_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_DEF_TYPE,
|
||||
M_CAST_MK_FUN (_ms_mk_deftype_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_deftype */
|
||||
/* Create a define named type request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_deftype (DEFTYPE_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_DEF_TYPE,
|
||||
M_CAST_MK_FUN (_ms_mk_deftype_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_deftype_req */
|
||||
/* construct a define type definition request */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_deftype_req (ASN1_ENC_CTXT *aCtx, DEFTYPE_REQ_INFO *info_ptr)
|
||||
{
|
||||
_ms_wr_va_type_spec (aCtx, &info_ptr->type_spec);
|
||||
|
||||
_ms_wr_mms_objname (aCtx, &info_ptr->type_name);
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_DEF_TYPE,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
100
mmslib/mmsle/rq_defva.c
Normal file
100
mmslib/mmsle/rq_defva.c
Normal file
@@ -0,0 +1,100 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_defvar.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of define named */
|
||||
/* variable. It decodes the define named variable response */
|
||||
/* (confirm) & encodes the define named variable request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* ST_VOID mms_def_var_rsp () */
|
||||
/* MMSREQ_PEND *mp_defvar (chan,info_ptr) */
|
||||
/* ST_INT16 mpl_defvar (info_ptr) - MMSEASE-LITE */
|
||||
/* ST_VOID _ms_mk_defvar_req (info) */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/20/01 JRB 02 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 06/15/98 MDE 01 Changes to allow compile under C++ */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pvar.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_defvar */
|
||||
/* Create and send a define named variable request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_defvar (ST_INT chan, DEFVAR_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_DEF_VAR,
|
||||
M_CAST_MK_FUN (_ms_mk_defvar_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_defvar */
|
||||
/* Create a define named variable request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_defvar (DEFVAR_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_DEF_VAR,
|
||||
M_CAST_MK_FUN (_ms_mk_defvar_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_defvar_req */
|
||||
/* construct a define named variable request */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_defvar_req (ASN1_ENC_CTXT *aCtx, DEFVAR_REQ_INFO *info_ptr)
|
||||
{
|
||||
if (info_ptr->type_spec_pres)
|
||||
{
|
||||
asn1r_strt_constr (aCtx); /* start context tag 2 cstr */
|
||||
_ms_wr_va_type_spec (aCtx, &info_ptr->type_spec);
|
||||
asn1r_fin_constr (aCtx, 2, CTX, DEF); /* finish context tag 2 cstr */
|
||||
}
|
||||
|
||||
asn1r_strt_constr (aCtx); /* start context tag 1 cstr */
|
||||
_ms_wr_va_address (aCtx, &info_ptr->address);
|
||||
asn1r_fin_constr (aCtx, 1, CTX, DEF); /* finish context tag 1 cstr */
|
||||
|
||||
asn1r_strt_constr (aCtx); /* start context tag 0 cstr */
|
||||
_ms_wr_mms_objname (aCtx, &info_ptr->name);
|
||||
asn1r_fin_constr (aCtx, 0, CTX, DEF); /* finish context tag 0 cstr */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_DEF_VAR,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
106
mmslib/mmsle/rq_defvl.c
Normal file
106
mmslib/mmsle/rq_defvl.c
Normal file
@@ -0,0 +1,106 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_defvlist.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of the define named */
|
||||
/* variable list. It decodes the get named variable list */
|
||||
/* response (confirm) & encodes the get named variable list */
|
||||
/* request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/20/01 JRB 02 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 06/15/98 MDE 01 Changes to allow compile under C++ */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pvar.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_def_vlist_rsp */
|
||||
/* NOTE : Since the mms_def_vlist_rsp is a NULL PDU, the decode is */
|
||||
/* continued by '_mms_null_pdu_dec', which simply sets decode done = 1 */
|
||||
/* and sets the decode done function to point to the general decode done*/
|
||||
/* fun. See mmsdec.c for the general functions. */
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_defvlist */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE & send the define named variable list request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_defvlist (ST_INT chan, DEFVLIST_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_DEF_VLIST,
|
||||
M_CAST_MK_FUN (_ms_mk_defvlist_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_defvlist */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the define named variable list request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_defvlist (DEFVLIST_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_DEF_VLIST,
|
||||
M_CAST_MK_FUN (_ms_mk_defvlist_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_defvlist_req */
|
||||
/* construct a define named variable list request */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_defvlist_req (ASN1_ENC_CTXT *aCtx, DEFVLIST_REQ_INFO *info)
|
||||
{
|
||||
VARIABLE_LIST *vl_ptr;
|
||||
|
||||
/* get ptr to list of variables */
|
||||
vl_ptr = (VARIABLE_LIST *) (info + 1);
|
||||
|
||||
asn1r_strt_constr (aCtx); /* start context tag 0 cstr */
|
||||
_ms_wr_va_var_list (aCtx, vl_ptr, info->num_of_variables);
|
||||
asn1r_fin_constr (aCtx, 0, CTX, DEF); /* finish context tag 0 cstr */
|
||||
|
||||
_ms_wr_mms_objname (aCtx, &info->vl_name); /* write the variable list name */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_DEF_VLIST,CTX,DEF); /* tag = opcode, ctx */
|
||||
}
|
||||
93
mmslib/mmsle/rq_deldo.c
Normal file
93
mmslib/mmsle/rq_deldo.c
Normal file
@@ -0,0 +1,93 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_deldom.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of delete domain. */
|
||||
/* It decodes the delete domain response (confirm) & encodes the */
|
||||
/* delete domain request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/20/01 JRB 02 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 06/15/98 MDE 01 Changes to allow compile under C++ */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pdom.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : NONE */
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_delete_domain_rsp */
|
||||
/* NOTE : Since the mms_delete_domain_rsp is a NULL PDU, the decode is */
|
||||
/* continued by '_mms_null_pdu_dec', which simply sets decode done = 1 */
|
||||
/* and sets the decode done function to point to the general decode done*/
|
||||
/* fun. See mmsdec.c for the general functions. */
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_deldom */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the delete domain request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_deldom (ST_INT chan, DELDOM_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_DELETE_DOMAIN,
|
||||
M_CAST_MK_FUN (_ms_mk_deldom_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_deldom */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the delete domain request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_deldom (DELDOM_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_DELETE_DOMAIN,
|
||||
M_CAST_MK_FUN (_ms_mk_deldom_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_deldom_req */
|
||||
/* construct a delete domain request */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_deldom_req (ASN1_ENC_CTXT *aCtx, DELDOM_REQ_INFO *info)
|
||||
{
|
||||
asn1r_wr_vstr (aCtx, info->dname); /* write the domain name */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_prim (aCtx, MMSOP_DELETE_DOMAIN,CTX); /* tag = opcode, ctx prim */
|
||||
}
|
||||
141
mmslib/mmsle/rq_delea.c
Normal file
141
mmslib/mmsle/rq_delea.c
Normal file
@@ -0,0 +1,141 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_delea.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of delete event */
|
||||
/* action. It decodes the delete event action response (confirm) */
|
||||
/* & encodes the delete event action request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 06 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 05 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 04 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 03 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 02 Changes to allow compile under C++ */
|
||||
/* 07/03/97 MDE 01 Op-specific info buffer handling changes */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pevn.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static DELEA_RESP_INFO *rsp_info;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_delea_rsp */
|
||||
/* This function is called from mmsdec when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_delea_rsp (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("Decoding : Delete Event Action Response");
|
||||
|
||||
/* get storage for request information */
|
||||
rsp_info = (DELEA_RESP_INFO *) _m_get_dec_buf (aCtx, sizeof (DELEA_RESP_INFO));
|
||||
if (asn1r_get_u32 (aCtx, &rsp_info->cand_not_deleted))
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
else
|
||||
{
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_delea */
|
||||
/* Create and send a delete event action request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_delea (ST_INT chan, DELEA_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_DEL_EA,
|
||||
M_CAST_MK_FUN (_ms_mk_delea_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_delea */
|
||||
/* Create a delete event action request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_delea (DELEA_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_DEL_EA,
|
||||
M_CAST_MK_FUN (_ms_mk_delea_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_delea_req */
|
||||
/* construct a delete event action request */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_delea_req (ASN1_ENC_CTXT *aCtx, DELEA_REQ_INFO *info_ptr)
|
||||
{
|
||||
ST_INT i;
|
||||
OBJECT_NAME *obj_ptr;
|
||||
|
||||
switch (info_ptr->req_tag)
|
||||
{
|
||||
case 4 :
|
||||
asn1r_fin_prim (aCtx, 4, CTX); /* ctx tag 4, vmd is null */
|
||||
break;
|
||||
|
||||
case 3 :
|
||||
asn1r_wr_vstr (aCtx, info_ptr->dname); /* write the domain name */
|
||||
asn1r_fin_prim (aCtx, 3,CTX); /* context tag 3 */
|
||||
break;
|
||||
|
||||
case 1 :
|
||||
asn1r_fin_prim (aCtx, 1, CTX); /* ctx tag 1, aa spec is null */
|
||||
break;
|
||||
|
||||
case 0 :
|
||||
asn1r_strt_constr (aCtx); /* start context tag 0 cstr */
|
||||
obj_ptr = (OBJECT_NAME *) (info_ptr + 1);
|
||||
obj_ptr +=info_ptr->num_of_names-1;/* point to last object name */
|
||||
for (i = 0; i < info_ptr->num_of_names; i++)
|
||||
{
|
||||
_ms_wr_mms_objname (aCtx, obj_ptr);
|
||||
obj_ptr--;
|
||||
}
|
||||
asn1r_fin_constr (aCtx, 0,CTX,DEF); /* finish context tag 0 cstr */
|
||||
break;
|
||||
}
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_DEL_EA,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
142
mmslib/mmsle/rq_delec.c
Normal file
142
mmslib/mmsle/rq_delec.c
Normal file
@@ -0,0 +1,142 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_delec.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of delete event */
|
||||
/* condition. It decodes the delete event condition response */
|
||||
/* (confirm) & encodes the delete event condition request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 06 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 05 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 04 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 03 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 02 Changes to allow compile under C++ */
|
||||
/* 07/03/97 MDE 01 Op-specific info buffer handling changes */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pevn.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static DELEC_RESP_INFO *rsp_info;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_delec_rsp */
|
||||
/* This function is called from mmsdec when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_delec_rsp (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("Decoding : Delete Event Condition Response");
|
||||
|
||||
/* get storage for request information */
|
||||
rsp_info = (DELEC_RESP_INFO *) _m_get_dec_buf (aCtx, sizeof (DELEC_RESP_INFO));
|
||||
|
||||
if (asn1r_get_u32 (aCtx, &rsp_info->cand_not_deleted))
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
else
|
||||
{
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_delec */
|
||||
/* Create and send a delete event condition request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_delec (ST_INT chan, DELEC_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_DEL_EC,
|
||||
M_CAST_MK_FUN (_ms_mk_delec_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_delec */
|
||||
/* Create a delete event condition request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_delec (DELEC_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_DEL_EC,
|
||||
M_CAST_MK_FUN (_ms_mk_delec_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_delec_req */
|
||||
/* construct a delete event condition request */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_delec_req (ASN1_ENC_CTXT *aCtx, DELEC_REQ_INFO *info_ptr)
|
||||
{
|
||||
ST_INT i;
|
||||
OBJECT_NAME *obj_ptr;
|
||||
|
||||
switch (info_ptr->req_tag)
|
||||
{
|
||||
case 3 :
|
||||
asn1r_fin_prim (aCtx, 3, CTX); /* ctx tag 3, vmd is null */
|
||||
break;
|
||||
|
||||
case 2 :
|
||||
asn1r_wr_vstr (aCtx, info_ptr->dname); /* write the domain name */
|
||||
asn1r_fin_prim (aCtx, 2,CTX); /* context tag 2 */
|
||||
break;
|
||||
|
||||
case 1 :
|
||||
asn1r_fin_prim (aCtx, 1, CTX); /* ctx tag 1, aa spec is null */
|
||||
break;
|
||||
|
||||
case 0 :
|
||||
asn1r_strt_constr (aCtx); /* start context tag 0 cstr */
|
||||
obj_ptr = (OBJECT_NAME *) (info_ptr + 1);
|
||||
obj_ptr +=info_ptr->num_of_names-1;/* point to last object name */
|
||||
for (i = 0; i < info_ptr->num_of_names; i++)
|
||||
{
|
||||
_ms_wr_mms_objname (aCtx, obj_ptr);
|
||||
obj_ptr--;
|
||||
}
|
||||
asn1r_fin_constr (aCtx, 0,CTX,DEF); /* finish context tag 0 cstr */
|
||||
break;
|
||||
}
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_DEL_EC,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
141
mmslib/mmsle/rq_delee.c
Normal file
141
mmslib/mmsle/rq_delee.c
Normal file
@@ -0,0 +1,141 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_delee.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of delete event */
|
||||
/* enrollment. It decodes the delete event enrollment response */
|
||||
/* (confirm) & encodes the delete event enrollment request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 06 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 05 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 04 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 03 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 02 Changes to allow compile under C++ */
|
||||
/* 07/03/97 MDE 01 Op-specific info buffer handling changes */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pevn.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static DELEE_RESP_INFO *rsp_info;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_delee_rsp */
|
||||
/* This function is called from mmsdec when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_delee_rsp (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("Delete Event Enrollment Response");
|
||||
|
||||
/* get storage for request information */
|
||||
rsp_info = (DELEE_RESP_INFO *) _m_get_dec_buf (aCtx, sizeof (DELEE_RESP_INFO));
|
||||
if (asn1r_get_u32 (aCtx, &rsp_info->cand_not_deleted))
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
else
|
||||
{
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_delee */
|
||||
/* Create and send a delete event enrollment request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_delee (ST_INT chan, DELEE_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_DEL_EE,
|
||||
M_CAST_MK_FUN (_ms_mk_delee_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_delee */
|
||||
/* Create a delete event enrollment request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_delee (DELEE_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_DEL_EE,
|
||||
M_CAST_MK_FUN (_ms_mk_delee_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_delee_req */
|
||||
/* construct a delete event enrollment request */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_delee_req (ASN1_ENC_CTXT *aCtx, DELEE_REQ_INFO *info_ptr)
|
||||
{
|
||||
ST_INT i;
|
||||
OBJECT_NAME *obj_ptr;
|
||||
|
||||
switch (info_ptr->req_tag)
|
||||
{
|
||||
case 2 : /* event action */
|
||||
asn1r_strt_constr (aCtx); /* start context tag 2 cstr */
|
||||
_ms_wr_mms_objname (aCtx, &info_ptr->sod.evact_name);
|
||||
asn1r_fin_constr (aCtx, 2,CTX,DEF); /* finish context tag 2 cstr */
|
||||
break;
|
||||
|
||||
case 1 : /* event condition */
|
||||
asn1r_strt_constr (aCtx); /* start context tag 1 cstr */
|
||||
_ms_wr_mms_objname (aCtx, &info_ptr->sod.evcon_name);
|
||||
asn1r_fin_constr (aCtx, 1,CTX,DEF); /* finish context tag 1 cstr */
|
||||
break;
|
||||
|
||||
case 0 : /* specific */
|
||||
asn1r_strt_constr (aCtx); /* start context tag 0 cstr */
|
||||
obj_ptr = (OBJECT_NAME *) (info_ptr + 1);
|
||||
/* point to last object name */
|
||||
obj_ptr +=info_ptr->sod.num_of_names-1;
|
||||
for (i = 0; i < info_ptr->sod.num_of_names; i++)
|
||||
{
|
||||
_ms_wr_mms_objname (aCtx, obj_ptr);
|
||||
obj_ptr--;
|
||||
}
|
||||
asn1r_fin_constr (aCtx, 0,CTX,DEF); /* finish context tag 0 cstr */
|
||||
break;
|
||||
}
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_DEL_EE,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
96
mmslib/mmsle/rq_delpi.c
Normal file
96
mmslib/mmsle/rq_delpi.c
Normal file
@@ -0,0 +1,96 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_delpi.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of delete program */
|
||||
/* invocation. It decodes the delete program invocation response */
|
||||
/* (confirm) & encodes the delete program invocation request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/20/01 JRB 02 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 06/15/98 MDE 01 Changes to allow compile under C++ */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pprg.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_delete_pi_rsp */
|
||||
/* NOTE: Since the mms_delete_pi_rsp is a NULL PDU, the decode is */
|
||||
/* continued by '_mms_null_pdu_dec', which simply sets decode done = 1 */
|
||||
/* and sets the decode done function to point to the general decode */
|
||||
/* done fun. See mmsdec.c for the general functions. */
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_delpi */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the delete program invocation request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_delpi (ST_INT chan, DELPI_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_DELETE_PI,
|
||||
M_CAST_MK_FUN (_ms_mk_delpi_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_delpi */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the delete program invocation request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_delpi (DELPI_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_DELETE_PI,
|
||||
M_CAST_MK_FUN (_ms_mk_delpi_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_delpi_req */
|
||||
/* construct a delete program invocation request */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_delpi_req (ASN1_ENC_CTXT *aCtx, DELPI_REQ_INFO *info)
|
||||
{
|
||||
|
||||
asn1r_wr_vstr (aCtx, info->piname); /* write pgm invocation name */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_prim (aCtx, MMSOP_DELETE_PI,CTX); /* tag = opcode, ctx prim */
|
||||
}
|
||||
97
mmslib/mmsle/rq_delse.c
Normal file
97
mmslib/mmsle/rq_delse.c
Normal file
@@ -0,0 +1,97 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_delsem.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of the delete */
|
||||
/* semaphore. It decodes the file delete semaphore response */
|
||||
/* (confirm) and encodes the delete semaphore request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/20/01 JRB 02 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 06/15/98 MDE 01 Changes to allow compile under C++ */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_psem.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_delsem_rsp */
|
||||
/* NOTE : Since the mms_delsem_rsp is a NULL PDU, the decode is */
|
||||
/* continued by '_mms_null_pdu_dec', which simply sets decode done = 1 */
|
||||
/* and sets the decode done function to point to the general decode done*/
|
||||
/* fun. See mmsdec.c for the general functions. */
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_delsem */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the delete semaphore request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_delsem (ST_INT chan, DELSEM_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_DELETE_SEM,
|
||||
M_CAST_MK_FUN (_ms_mk_delsem_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_delsem */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the delete semaphore request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_delsem (DELSEM_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_DELETE_SEM,
|
||||
M_CAST_MK_FUN (_ms_mk_delsem_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_delsem_req */
|
||||
/* construct a delete semaphore request */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_delsem_req (ASN1_ENC_CTXT *aCtx, DELSEM_REQ_INFO *info)
|
||||
{
|
||||
|
||||
_ms_wr_mms_objname (aCtx, &info->sem_name); /* write the object name */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_DELETE_SEM,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
169
mmslib/mmsle/rq_delty.c
Normal file
169
mmslib/mmsle/rq_delty.c
Normal file
@@ -0,0 +1,169 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_deltype.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of delete named */
|
||||
/* type. It decodes the delete named type response (confirm) & */
|
||||
/* encodes the delete named type request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 06 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 05 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 04 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 03 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 02 Changes to allow compile under C++ */
|
||||
/* 07/03/97 MDE 01 Op-specific info buffer handling changes */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pvar.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static DELTYPE_RESP_INFO *rsp_info;
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID deltyp_num_matched (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID deltyp_num_deleted (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_del_type_rsp */
|
||||
/* This function is called from mmsdec when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_del_type_rsp (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("Delete Type Response");
|
||||
|
||||
/* get storage for request information */
|
||||
rsp_info = (DELTYPE_RESP_INFO *) _m_get_dec_buf (aCtx, sizeof (DELTYPE_RESP_INFO));
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 0, deltyp_num_matched);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* deltyp_num_matched */
|
||||
/* number matched element encountered, read into info structure. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID deltyp_num_matched (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("deltyp_num_matched");
|
||||
|
||||
if (asn1r_get_u32 (aCtx, &rsp_info->num_matched))
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
else
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, deltyp_num_deleted);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* deltyp_num_deleted */
|
||||
/* number deleted element encountered, read into info structure. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID deltyp_num_deleted (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("deltyp_num_delete");
|
||||
|
||||
if (asn1r_get_u32 (aCtx, &rsp_info->num_deleted))
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
else
|
||||
{
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_deltype */
|
||||
/* Create and send a delete named type request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_deltype (ST_INT chan, DELTYPE_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_DEL_TYPE,
|
||||
M_CAST_MK_FUN (_ms_mk_deltype_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_deltype */
|
||||
/* Create and send a delete named type request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_deltype (DELTYPE_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_DEL_TYPE,
|
||||
M_CAST_MK_FUN (_ms_mk_deltype_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_deltype_req */
|
||||
/* construct a delete type definition request */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_deltype_req (ASN1_ENC_CTXT *aCtx, DELTYPE_REQ_INFO *info_ptr)
|
||||
{
|
||||
ST_INT i;
|
||||
OBJECT_NAME *obj_ptr;
|
||||
|
||||
if (info_ptr->dname_pres)
|
||||
{
|
||||
asn1r_wr_vstr (aCtx, info_ptr->dname); /* write the domain name */
|
||||
asn1r_fin_prim (aCtx, 2,CTX); /* context tag 2 */
|
||||
}
|
||||
|
||||
if (info_ptr->tnames_pres)
|
||||
{
|
||||
asn1r_strt_constr (aCtx); /* start context tag 1 cstr */
|
||||
obj_ptr = (OBJECT_NAME *) (info_ptr + 1);
|
||||
obj_ptr +=info_ptr->num_of_tnames-1;/* point to last type name */
|
||||
for (i = 0; i < info_ptr->num_of_tnames; i++)
|
||||
{
|
||||
_ms_wr_mms_objname (aCtx, obj_ptr);
|
||||
obj_ptr--;
|
||||
}
|
||||
asn1r_fin_constr (aCtx, 1,CTX,DEF); /* finish context tag 1 cstr */
|
||||
}
|
||||
|
||||
if (info_ptr->scope != 0) /* default is 0-specific */
|
||||
{ /* not the default, so */
|
||||
asn1r_wr_i16 (aCtx, info_ptr->scope); /* write the scope of delete */
|
||||
asn1r_fin_prim (aCtx, 0,CTX); /* context tag 0 */
|
||||
}
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_DEL_TYPE,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
168
mmslib/mmsle/rq_delva.c
Normal file
168
mmslib/mmsle/rq_delva.c
Normal file
@@ -0,0 +1,168 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_delvar.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of delete variable */
|
||||
/* access. It decodes the delete variable access response */
|
||||
/* (confirm) & encodes the delete variable access request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 06 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 05 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 04 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 03 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 02 Changes to allow compile under C++ */
|
||||
/* 07/03/97 MDE 01 Op-specific info buffer handling changes */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pvar.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static DELVAR_RESP_INFO *rsp_info;
|
||||
|
||||
static ST_VOID delvar_num_matched (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID delvar_num_deleted (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_del_var_rsp */
|
||||
/* This function is called from mmsdec when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_del_var_rsp (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("Delete Variable Access Response");
|
||||
|
||||
/* get storage for request information */
|
||||
rsp_info = (DELVAR_RESP_INFO *) _m_get_dec_buf (aCtx, sizeof (DELVAR_RESP_INFO));
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 0, delvar_num_matched);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* delvar_num_matched */
|
||||
/* number matched element encountered, read into info structure. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID delvar_num_matched (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("delvar_num_matched");
|
||||
|
||||
if (asn1r_get_u32 (aCtx, &rsp_info->num_matched))
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
else
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, delvar_num_deleted);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* delvar_num_deleted */
|
||||
/* number deleted element encountered, read into info structure. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID delvar_num_deleted (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("delvar_num_deleted");
|
||||
|
||||
if (asn1r_get_u32 (aCtx, &rsp_info->num_deleted))
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
else
|
||||
{
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_delvar */
|
||||
/* Create and send a delete named variable request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_delvar (ST_INT chan, DELVAR_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_DEL_VAR,
|
||||
M_CAST_MK_FUN (_ms_mk_delvar_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_delvar */
|
||||
/* Create and send a delete named variable request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_delvar (DELVAR_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_DEL_VAR,
|
||||
M_CAST_MK_FUN (_ms_mk_delvar_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_delvar_req */
|
||||
/* construct a delete variable access request */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_delvar_req (ASN1_ENC_CTXT *aCtx, DELVAR_REQ_INFO *info_ptr)
|
||||
{
|
||||
ST_INT i;
|
||||
OBJECT_NAME *obj_ptr;
|
||||
|
||||
if (info_ptr->dname_pres)
|
||||
{
|
||||
asn1r_wr_vstr (aCtx, info_ptr->dname); /* write the domain name */
|
||||
asn1r_fin_prim (aCtx, 2,CTX); /* context tag 2 */
|
||||
}
|
||||
|
||||
if (info_ptr->vnames_pres)
|
||||
{
|
||||
asn1r_strt_constr (aCtx); /* start context tag 1 cstr */
|
||||
obj_ptr = (OBJECT_NAME *) (info_ptr + 1);
|
||||
obj_ptr +=info_ptr->num_of_vnames-1;/* point to last variable name */
|
||||
for (i = 0; i < info_ptr->num_of_vnames; i++)
|
||||
{
|
||||
_ms_wr_mms_objname (aCtx, obj_ptr);
|
||||
obj_ptr--;
|
||||
}
|
||||
asn1r_fin_constr (aCtx, 1,CTX,DEF); /* finish context tag 1 cstr */
|
||||
}
|
||||
|
||||
if (info_ptr->scope != 0) /* default is 0-specific */
|
||||
{ /* not the default, so */
|
||||
asn1r_wr_i16 (aCtx, info_ptr->scope); /* write the scope of delete */
|
||||
asn1r_fin_prim (aCtx, 0,CTX); /* context tag 0 */
|
||||
}
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_DEL_VAR,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
171
mmslib/mmsle/rq_delvl.c
Normal file
171
mmslib/mmsle/rq_delvl.c
Normal file
@@ -0,0 +1,171 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_delvlist.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of delete named */
|
||||
/* variable list. It decodes the delete named variable list */
|
||||
/* response (confirm) & encodes the delete named variable list */
|
||||
/* request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 06 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 05 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 04 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 03 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 02 Changes to allow compile under C++ */
|
||||
/* 07/03/97 MDE 01 Op-specific info buffer handling changes */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pvar.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static DELVLIST_RESP_INFO *rsp_info;
|
||||
|
||||
static ST_VOID delvlist_num_matched (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID delvlist_num_deleted (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_del_vlist_rsp */
|
||||
/* This function is called from mmsdec when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_del_vlist_rsp (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("Delete Named Variable List Response");
|
||||
|
||||
/* get storage for request information */
|
||||
rsp_info = (DELVLIST_RESP_INFO *) _m_get_dec_buf (aCtx, sizeof (DELVLIST_RESP_INFO));
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 0, delvlist_num_matched);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* delvlist_num_matched */
|
||||
/* Decoding delete named variable list response: number matched was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID delvlist_num_matched (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("delvlist_num_matched");
|
||||
|
||||
if (asn1r_get_u32 (aCtx, &rsp_info->num_matched))
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
else
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, delvlist_num_deleted);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* delvlist_num_deleted */
|
||||
/* Decoding delete named variable list response: number deleted was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID delvlist_num_deleted (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("delvlist_num_deleted");
|
||||
|
||||
if (asn1r_get_u32 (aCtx, &rsp_info->num_deleted))
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
else
|
||||
{
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_delvlist */
|
||||
/* Create and send a delete named variable list request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_delvlist (ST_INT chan, DELVLIST_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_DEL_VLIST,
|
||||
M_CAST_MK_FUN (_ms_mk_delvlist_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_delvlist */
|
||||
/* Create a delete named variable list request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_delvlist (DELVLIST_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_DEL_VLIST,
|
||||
M_CAST_MK_FUN (_ms_mk_delvlist_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_delvlist_req */
|
||||
/* construct a delete named variable list request */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_delvlist_req (ASN1_ENC_CTXT *aCtx, DELVLIST_REQ_INFO *info_ptr)
|
||||
{
|
||||
ST_INT i;
|
||||
OBJECT_NAME *obj_ptr;
|
||||
|
||||
if (info_ptr->dname_pres)
|
||||
{
|
||||
asn1r_wr_vstr (aCtx, info_ptr->dname); /* write the domain name */
|
||||
asn1r_fin_prim (aCtx, 2,CTX); /* context tag 2 */
|
||||
}
|
||||
|
||||
if (info_ptr->vnames_pres)
|
||||
{
|
||||
asn1r_strt_constr (aCtx); /* start context tag 1 cstr */
|
||||
obj_ptr = (OBJECT_NAME *) (info_ptr + 1);
|
||||
obj_ptr +=info_ptr->num_of_vnames-1;/* point to last variable name */
|
||||
for (i = 0; i < info_ptr->num_of_vnames; i++)
|
||||
{
|
||||
_ms_wr_mms_objname (aCtx, obj_ptr);
|
||||
obj_ptr--;
|
||||
}
|
||||
asn1r_fin_constr (aCtx, 1,CTX,DEF); /* finish context tag 1 cstr */
|
||||
}
|
||||
|
||||
if (info_ptr->scope != 0) /* default is 0-specific */
|
||||
{ /* not the default, so */
|
||||
asn1r_wr_i16 (aCtx, info_ptr->scope); /* write the scope of delete */
|
||||
asn1r_fin_prim (aCtx, 0,CTX); /* context tag 0 */
|
||||
}
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_DEL_VLIST,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
214
mmslib/mmsle/rq_downl.c
Normal file
214
mmslib/mmsle/rq_downl.c
Normal file
@@ -0,0 +1,214 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_download.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of the download */
|
||||
/* segment. It decodes the download segment response (confirm) */
|
||||
/* & encodes the download segment request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 07 Remove "thisFileName" */
|
||||
/* 08/28/03 EJV 06 Corr spelling for 'receive'. */
|
||||
/* 12/20/01 JRB 05 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 04 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 03 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 02 Changes to allow compile under C++ */
|
||||
/* 07/03/97 MDE 01 Op-specific info buffer handling changes */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pdom.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static DOWNLOAD_RESP_INFO *rsp_info;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID download_get_more_follows (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID download_get_load_data (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID download_load_data_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID download_load_data_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID extern_done (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_download_rsp */
|
||||
/* This function is called from MMSDEC when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_download_rsp (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("Download Segment Response");
|
||||
|
||||
/* get storage for request information */
|
||||
rsp_info = (DOWNLOAD_RESP_INFO *) _m_get_dec_buf (aCtx, sizeof (DOWNLOAD_RESP_INFO));
|
||||
rsp_info->more_follows = SD_TRUE; /* set default value */
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 0, download_get_load_data);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 0, download_load_data_cstr);
|
||||
|
||||
/* If MMS IS, Check for CODED load data */
|
||||
#ifndef MMS_LITE
|
||||
if (mms_chan_info[_mmsdechan].version) /* IS */
|
||||
#else
|
||||
if (mmsl_version) /* IS */
|
||||
#endif
|
||||
_ms_chk_for_extern (aCtx, &rsp_info->load_data_len,
|
||||
&rsp_info->load_data,
|
||||
extern_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* download_get_load_data */
|
||||
/* Decoding download segment response: load data octets primitive was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID download_get_load_data (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("download_get_load_data");
|
||||
|
||||
/* decode load data onto itself, shifted by one character */
|
||||
rsp_info->load_data = aCtx->asn1r_field_ptr -1;
|
||||
/* read load data */
|
||||
if (asn1r_get_octstr (aCtx, rsp_info->load_data))
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
|
||||
rsp_info->load_data_type = LOAD_DATA_NON_CODED;
|
||||
rsp_info->load_data_len = aCtx->asn1r_octetcount; /* save the load data length */
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, download_get_more_follows);
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* download_load_data_cstr */
|
||||
/* Decoding download segment response: load data octets constructor was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID download_load_data_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("download_load_data_cstr");
|
||||
|
||||
/* decode entry id onto itself, shifted by one character */
|
||||
rsp_info->load_data = aCtx->asn1r_field_ptr - 1;
|
||||
|
||||
/* set up where to go when done decoding cstr */
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = download_load_data_cstr_done;
|
||||
|
||||
/* read load data from the received message */
|
||||
asn1r_get_octstr_cstr (aCtx, _mmsdec_msglen, rsp_info->load_data);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* download_load_data_cstr_done */
|
||||
/* Decoding download segment response: load data octets constructor */
|
||||
/* done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID download_load_data_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
rsp_info->load_data_len = aCtx->asn1r_octetcount; /* save the load data length */
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, download_get_more_follows);
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* extern_done */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID extern_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("extern_done");
|
||||
|
||||
rsp_info->load_data_type = LOAD_DATA_CODED;
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, download_get_more_follows);
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* download_get_more_follows */
|
||||
/* Decoding download segment response: more follows was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID download_get_more_follows (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("download_get_more_follows");
|
||||
/* read more follows */
|
||||
if (asn1r_get_bool (aCtx, &(rsp_info->more_follows)))
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_download */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the download segment request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_download (ST_INT chan, DOWNLOAD_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_DOWN_LOAD,
|
||||
M_CAST_MK_FUN (_ms_mk_download_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_download */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the download segment request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_download (DOWNLOAD_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_DOWN_LOAD,
|
||||
M_CAST_MK_FUN (_ms_mk_download_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* _ms_mk_download_req */
|
||||
/* construct a download segment request */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_download_req (ASN1_ENC_CTXT *aCtx, DOWNLOAD_REQ_INFO *info)
|
||||
{
|
||||
asn1r_wr_vstr (aCtx, info->dname); /* write the domain name */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_prim (aCtx, MMSOP_DOWN_LOAD,CTX); /* tag = opcode, ctx */
|
||||
}
|
||||
96
mmslib/mmsle/rq_fclos.c
Normal file
96
mmslib/mmsle/rq_fclos.c
Normal file
@@ -0,0 +1,96 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_fclose.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of the file close. */
|
||||
/* It decodes the file close response (confirm) & encodes the */
|
||||
/* file close request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/20/01 JRB 02 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 06/15/98 MDE 01 Changes to allow compile under C++ */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pfil.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_file_close_rsp */
|
||||
/* NOTE : Since the mms_file_close_rsp is a NULL PDU, the decode is */
|
||||
/* continued by '_mms_null_pdu_dec', which simply sets decode done = 1 */
|
||||
/* and sets the decode done function to point to the general decode done*/
|
||||
/* fun. See mmsdec.c for the general functions. */
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_fclose */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the file close request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_fclose (ST_INT chan, FCLOSE_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_FILE_CLOSE,
|
||||
M_CAST_MK_FUN (_ms_mk_fclose_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_fclose */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the file close request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_fclose (FCLOSE_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_FILE_CLOSE,
|
||||
M_CAST_MK_FUN (_ms_mk_fclose_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_fclose_req */
|
||||
/* construct a file close request */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_fclose_req (ASN1_ENC_CTXT *aCtx, FCLOSE_REQ_INFO *info)
|
||||
{
|
||||
|
||||
asn1r_wr_i32 (aCtx, info->frsmid); /* write the frsmid */
|
||||
|
||||
/* write the context specific tag for this opcode. */
|
||||
asn1r_fin_prim (aCtx, MMSOP_FILE_CLOSE,CTX);
|
||||
}
|
||||
97
mmslib/mmsle/rq_fdele.c
Normal file
97
mmslib/mmsle/rq_fdele.c
Normal file
@@ -0,0 +1,97 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_fdelete.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of the file delete. */
|
||||
/* It decodes the file delete response (confirm) & encodes the */
|
||||
/* file delete request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/20/01 JRB 02 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 06/15/98 MDE 01 Changes to allow compile under C++ */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pfil.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_file_delete_rsp */
|
||||
/* NOTE : Since the mms_file_delete_rsp is a NULL PDU, the decode is */
|
||||
/* continued by '_mms_null_pdu_dec', which simply sets decode done = 1 */
|
||||
/* and sets the decode done function to point to the general decode done*/
|
||||
/* fun. See mmsdec.c for the general functions. */
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_fdelete */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the file delete request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_fdelete (ST_INT chan, FDELETE_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_FILE_DELETE,
|
||||
M_CAST_MK_FUN (_ms_mk_fdelete_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_fdelete */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the file delete request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_fdelete (FDELETE_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_FILE_DELETE,
|
||||
M_CAST_MK_FUN (_ms_mk_fdelete_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_fdelete_req */
|
||||
/* construct a file delete request */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_fdelete_req (ASN1_ENC_CTXT *aCtx, FDELETE_REQ_INFO *info)
|
||||
{
|
||||
asn1r_strt_constr (aCtx);
|
||||
_ms_wr_mms_fname (aCtx, (FILE_NAME *)(info + 1),
|
||||
info -> num_of_fname);
|
||||
|
||||
/* write the context specific tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_FILE_DELETE,CTX,DEF);
|
||||
}
|
||||
351
mmslib/mmsle/rq_fdir.c
Normal file
351
mmslib/mmsle/rq_fdir.c
Normal file
@@ -0,0 +1,351 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_fdir.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of file directory. */
|
||||
/* It decodes the file directory response (confirm) & encodes the */
|
||||
/* file directory request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 06 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 05 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 04 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 03 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 02 Changes to allow compile under C++ */
|
||||
/* 07/03/97 MDE 01 Op-specific info buffer handling changes */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pfil.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static FDIR_RESP_INFO *fop_info;
|
||||
|
||||
static FDIR_DIR_ENT *ent_ptr;
|
||||
static FDIR_DIR_ENT *dir_ptr;
|
||||
static ST_INT max_dir_ents;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID fdir_dir_entry (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID fdir_more_follows (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID fdir_get_fil_mtim (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID fdir_dir_ent_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID fdir_get_fil_siz (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID fdir_get_fil_attr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID fdir_fname_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID fdir_fname_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID fdir_dir_list_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID fdir_dir_seq (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID fdir_dir_list (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_file_dir_rsp */
|
||||
/* This function is called from mmsdec when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_file_dir_rsp (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT rsp_size;
|
||||
|
||||
MLOG_CDEC0 ("File Directory Response");
|
||||
|
||||
|
||||
#if defined(FIXED_DECBUF)
|
||||
max_dir_ents = m_cl_max_file_directory;
|
||||
rsp_size = mmsl_dec_info_size;
|
||||
#else
|
||||
max_dir_ents = _mmsdec_msglen/8; /* determine maximum size */
|
||||
if (m_cl_max_file_directory && (max_dir_ents > m_cl_max_file_directory))
|
||||
max_dir_ents = m_cl_max_file_directory;
|
||||
|
||||
/* get storage for resp info */
|
||||
rsp_size = sizeof (FDIR_RESP_INFO)
|
||||
+ (max_dir_ents * (sizeof (FDIR_DIR_ENT)))
|
||||
+ (max_dir_ents * (sizeof (FILE_NAME)));
|
||||
#endif
|
||||
|
||||
/* get storage for request information */
|
||||
fop_info = (FDIR_RESP_INFO *) _m_get_dec_buf (aCtx, rsp_size);
|
||||
fop_info->num_dir_ent = 0; /* set default values */
|
||||
fop_info->more_follows = SD_FALSE;
|
||||
ent_ptr = (FDIR_DIR_ENT *) (fop_info + 1);
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 0, fdir_dir_list);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* fdir_dir_list */
|
||||
/* file directory response is being decoded: directory list constructor */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID fdir_dir_list (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("fdir_dir_list");
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, UNI | CONSTR, SEQ_CODE, fdir_dir_seq);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* fdir_dir_seq */
|
||||
/* file directory response is being decoded: directory entry constr */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID fdir_dir_seq (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("fdir_dir_seq");
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, UNI | CONSTR, SEQ_CODE, fdir_dir_entry);
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = NULL;
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level - 1] = fdir_dir_list_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* fdir_dir_entry */
|
||||
/* file directory response is being decoded: directory sequence was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID fdir_dir_entry (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("fdir_dir_entry");
|
||||
|
||||
fop_info->num_dir_ent++; /* increment directory entry count */
|
||||
if (fop_info->num_dir_ent > max_dir_ents)
|
||||
asn1r_set_dec_err (aCtx, RESP_UNSPECIFIED);
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX|CONSTR,0,fdir_fname_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* fdir_fname_cstr */
|
||||
/* request domain download request is being decoded: filename cstr was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID fdir_fname_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("fdir_fname_cstr");
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = fdir_fname_cstr_done;
|
||||
_ms_get_mms_fname (aCtx, (FILE_NAME *)(ent_ptr + 1),
|
||||
max_dir_ents, &ent_ptr->num_of_fname);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* fdir_fname_cstr_done */
|
||||
/* request domain download request is being decoded: file name list */
|
||||
/* constructor done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID fdir_fname_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 1, fdir_get_fil_attr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* fdir_get_fil_attr */
|
||||
/* file directory response is being decoded: file attributes constr was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID fdir_get_fil_attr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("fdir_get_fil_attr");
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 0, fdir_get_fil_siz);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* fdir_get_fil_siz */
|
||||
/* file directory response is being decoded: file size was found, */
|
||||
/* modified time can be next, or can be done. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID fdir_get_fil_siz (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("fdir_get_fil_si");
|
||||
|
||||
if (asn1r_get_u32 (aCtx, &(ent_ptr->fsize))) /* read the file size */
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX,1,fdir_get_fil_mtim);
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = NULL; /* ok for file attr to be done */
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level-1] = fdir_dir_ent_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* fdir_get_fil_mtim */
|
||||
/* file directory response is being decoded: directory entry was */
|
||||
/* encountered, and modified time was found; creator can be next. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID fdir_get_fil_mtim (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("fdir_get_fil_mtim");
|
||||
|
||||
ent_ptr->mtimpres = SD_TRUE; /* set modify time present */
|
||||
if (asn1r_get_time (aCtx, &ent_ptr->mtime)) /* read the last modified time */
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* fdir_dir_ent_done */
|
||||
/* DECODING file directory response: directory entry was completed. */
|
||||
/* Re-initialize the valid states. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID fdir_dir_ent_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("fdir_dir_ent_done");
|
||||
|
||||
/* point to where the next directory entry will start */
|
||||
|
||||
ent_ptr = (FDIR_DIR_ENT *)(((FILE_NAME *)(ent_ptr + 1))
|
||||
+ (ent_ptr -> num_of_fname));
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, UNI | CONSTR, SEQ_CODE, fdir_dir_entry);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* fdir_dir_list_done */
|
||||
/* DECODING file directory response: directory list was completed. */
|
||||
/* Re-initialize the valid states. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID fdir_dir_list_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT resp_size;
|
||||
ST_INT i;
|
||||
ST_INT fname_count;
|
||||
|
||||
MLOG_CDEC0 ("fdir_dir_list_done");
|
||||
|
||||
fname_count = 0;
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, fdir_more_follows);
|
||||
|
||||
/* find the exact size of the storage used */
|
||||
|
||||
dir_ptr = (FDIR_DIR_ENT *)(fop_info + 1);
|
||||
for (i=0; i < fop_info->num_dir_ent; ++i)
|
||||
{
|
||||
fname_count += dir_ptr->num_of_fname;
|
||||
dir_ptr = (FDIR_DIR_ENT *)(((FILE_NAME *)(dir_ptr + 1))
|
||||
+ (dir_ptr -> num_of_fname));
|
||||
}
|
||||
/* give back unused storage */
|
||||
resp_size = sizeof (FDIR_RESP_INFO)
|
||||
+ ((fop_info->num_dir_ent) * sizeof (FDIR_DIR_ENT))
|
||||
+ (fname_count * sizeof (FILE_NAME));
|
||||
_mms_dec_info = (*m_realloc_os_fun) (_mms_dec_info,resp_size);
|
||||
fop_info = (FDIR_RESP_INFO *) _mms_dec_info;
|
||||
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* fdir_more_follows */
|
||||
/* file directory response is being decoded: more follows indicator */
|
||||
/* has been encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID fdir_more_follows (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("fdir_more_follows");
|
||||
|
||||
if (asn1r_get_bool (aCtx, &(fop_info->more_follows))) /* read more follows */
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_fdir */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the file directory request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_fdir (ST_INT chan, FDIR_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_FILE_DIR,
|
||||
M_CAST_MK_FUN (_ms_mk_fdir_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_fdir */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the file directory request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_fdir (FDIR_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_FILE_DIR,
|
||||
M_CAST_MK_FUN (_ms_mk_fdir_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_fdir_req */
|
||||
/* ENCODE a file directory REQUEST: */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_fdir_req (ASN1_ENC_CTXT *aCtx, FDIR_REQ_INFO *info)
|
||||
{
|
||||
FILE_NAME *fname_idx;
|
||||
|
||||
if (info->cont_after_pres)
|
||||
{ /* write continue after name */
|
||||
asn1r_strt_constr (aCtx);
|
||||
fname_idx = (FILE_NAME *)(info + 1);
|
||||
fname_idx += info->num_of_fs_fname;
|
||||
_ms_wr_mms_fname (aCtx, fname_idx, info->num_of_ca_fname);
|
||||
asn1r_fin_constr (aCtx, 1,CTX,DEF); /* context specific tag 1 */
|
||||
}
|
||||
|
||||
if (info->filespec_pres)
|
||||
{ /* write the file specification */
|
||||
asn1r_strt_constr (aCtx);
|
||||
fname_idx = (FILE_NAME *)(info + 1);
|
||||
_ms_wr_mms_fname (aCtx, fname_idx, info->num_of_fs_fname);
|
||||
asn1r_fin_constr (aCtx, 0,CTX,DEF); /* context specific tag 0 */
|
||||
}
|
||||
|
||||
/* write the context specific tag for this opcode */
|
||||
asn1r_fin_constr (aCtx, MMSOP_FILE_DIR,CTX,DEF);
|
||||
}
|
||||
197
mmslib/mmsle/rq_fopen.c
Normal file
197
mmslib/mmsle/rq_fopen.c
Normal file
@@ -0,0 +1,197 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_fopen.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of the file open. */
|
||||
/* It decodes the file open response (confirm) & encodes the */
|
||||
/* file open request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 06 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 05 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 04 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 03 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 02 Changes to allow compile under C++ */
|
||||
/* 07/03/97 MDE 01 Op-specific info buffer handling changes */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pfil.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static FOPEN_RESP_INFO *fop_info;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID fopen_fil_attr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID fopen_get_fil_mtim (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID fopen_get_fil_siz (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID fopen_get_fil_attr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID fopen_get_frsmid (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_file_open_rsp */
|
||||
/* This function is called from mmsdec when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_file_open_rsp (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("File Open Response");
|
||||
|
||||
|
||||
/* get storage for request information */
|
||||
fop_info = (FOPEN_RESP_INFO *) _m_get_dec_buf (aCtx, sizeof (FOPEN_RESP_INFO));
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 0, fopen_get_frsmid);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* fopen_get_frsmid */
|
||||
/* file open response is being decoded: file read state machine id was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID fopen_get_frsmid (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("fopen_get_frsmid");
|
||||
|
||||
if (asn1r_get_i32 (aCtx, &(fop_info->frsmid))) /* read the frsmid */
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 1, fopen_get_fil_attr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* fopen_get_fil_attr */
|
||||
/* file open response is being decoded: file attributes constr was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID fopen_get_fil_attr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("fopen_get_fil_attr");
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 0, fopen_get_fil_siz);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* fopen_get_fil_siz */
|
||||
/* file open response is being decoded: file size was found, last */
|
||||
/* modified time can be next, or can be done. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID fopen_get_fil_siz (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("fopen_get_fil_siz");
|
||||
|
||||
if (asn1r_get_u32 (aCtx, &(fop_info->ent.fsize))) /* read the file size */
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX,1,fopen_get_fil_mtim);
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = fopen_fil_attr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* fopen_get_fil_mtim */
|
||||
/* file open response is being decoded: modified time was encountered, */
|
||||
/* must be done now. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID fopen_get_fil_mtim (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("fopen_get_fil_mtim");
|
||||
|
||||
fop_info->ent.mtimpres = SD_TRUE; /* set modify time present */
|
||||
if (asn1r_get_time (aCtx, &fop_info->ent.mtime)) /* read the last modified time */
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* fopen_fil_attr_done */
|
||||
/* DECODING file open response: file attribute constructor completed. */
|
||||
/* Set the valid state to done. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID fopen_fil_attr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("fopen_fil_attr_done");
|
||||
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_fopen */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the file open request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_fopen (ST_INT chan, FOPEN_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_FILE_OPEN,
|
||||
M_CAST_MK_FUN (_ms_mk_fopen_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_fopen */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the file open request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_fopen (FOPEN_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_FILE_OPEN,
|
||||
M_CAST_MK_FUN (_ms_mk_fopen_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_fopen_req */
|
||||
/* ENCODE a file openectory REQUEST: */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_fopen_req (ASN1_ENC_CTXT *aCtx, FOPEN_REQ_INFO *info)
|
||||
{
|
||||
|
||||
asn1r_wr_u32 (aCtx, info->init_pos); /* write the initial position */
|
||||
asn1r_fin_prim (aCtx, 1,CTX); /* context specific tag 1 */
|
||||
|
||||
asn1r_strt_constr (aCtx);
|
||||
_ms_wr_mms_fname (aCtx, (FILE_NAME *)(info + 1),
|
||||
info -> num_of_fname);
|
||||
asn1r_fin_constr (aCtx, 0,CTX,DEF); /* context specific tag 0 */
|
||||
|
||||
/* write the context specific tag for this opcode */
|
||||
asn1r_fin_constr (aCtx, MMSOP_FILE_OPEN,CTX,DEF);
|
||||
}
|
||||
190
mmslib/mmsle/rq_fread.c
Normal file
190
mmslib/mmsle/rq_fread.c
Normal file
@@ -0,0 +1,190 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_fread.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of the file read. */
|
||||
/* It decodes the file read response (confirm) & encodes the */
|
||||
/* file read request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 07 Remove "thisFileName" */
|
||||
/* 08/28/03 EJV 06 Corr spelling for 'receive'. */
|
||||
/* 12/20/01 JRB 05 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 04 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 03 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 02 Changes to allow compile under C++ */
|
||||
/* 07/03/97 MDE 01 Op-specific info buffer handling changes */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pfil.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static FREAD_RESP_INFO *fop_info;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/* static functions with multiple references */
|
||||
|
||||
static ST_VOID fread_file_data_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID fread_get_fd_prim (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID fread_get_fd_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID fread_get_more_follows (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
/************************************************************************/
|
||||
/* mms_file_read_rsp */
|
||||
/* This function is called from mmsdec when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_file_read_rsp (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("File Read Response");
|
||||
|
||||
|
||||
/* get storage for request information */
|
||||
fop_info = (FREAD_RESP_INFO *) _m_get_dec_buf (aCtx, sizeof (FREAD_RESP_INFO));
|
||||
fop_info->more_follows = SD_TRUE; /* set default value */
|
||||
ASN1R_TAG_ADD (aCtx, CTX,0, fread_get_fd_prim);
|
||||
ASN1R_TAG_ADD (aCtx, CTX|CONSTR, 0, fread_get_fd_cstr);
|
||||
}
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* fread_get_fd_prim */
|
||||
/* file read response is being decoded: file data was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID fread_get_fd_prim (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("fread_get_fd_prim");
|
||||
|
||||
/* decode file data back onto itself */
|
||||
fop_info->filedata = aCtx->asn1r_field_ptr;
|
||||
|
||||
if (asn1r_get_octstr (aCtx, fop_info->filedata)) /* read file data from message */
|
||||
asn1r_set_dec_err (aCtx, RESP_UNSPECIFIED);
|
||||
|
||||
fread_file_data_done (aCtx); /* save octet count, setup to continue */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* fread_get_fd_cstr */
|
||||
/* file read response is being decoded: file data was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID fread_get_fd_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("fread_get_fd_cstr");
|
||||
|
||||
/* decode file data back onto itself */
|
||||
fop_info->filedata = aCtx->asn1r_field_ptr;
|
||||
|
||||
/* set up done decoding octet cstr destination */
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = fread_file_data_done;
|
||||
|
||||
/* get file data from the received message */
|
||||
/* set maximum length to accept entire message */
|
||||
asn1r_get_octstr_cstr (aCtx, _mmsdec_msglen, fop_info->filedata);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* fread_file_data_done */
|
||||
/* file read response is being decoded: end of file data constructor */
|
||||
/* This is called directly from prim octet or from c_done fun. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID fread_file_data_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("data_don");
|
||||
|
||||
fop_info->fd_len = aCtx->asn1r_octetcount; /* save the file data length */
|
||||
/* set up done decoding file data cstr dest */
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, fread_get_more_follows);
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* fread_get_more_follows */
|
||||
/* file read response is being decoded: more data follows indicator was */
|
||||
/* encountered, must be done now. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID fread_get_more_follows (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("fread_get_more_follows");
|
||||
|
||||
if (asn1r_get_bool (aCtx, &(fop_info->more_follows))) /* read more follows */
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_fread */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the file read request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_fread (ST_INT chan, FREAD_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_FILE_READ,
|
||||
M_CAST_MK_FUN (_ms_mk_fread_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_fread */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the file read request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_fread (FREAD_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_FILE_READ,
|
||||
M_CAST_MK_FUN (_ms_mk_fread_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_fread_req */
|
||||
/* ENCODE a file readectory REQUEST: */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_fread_req (ASN1_ENC_CTXT *aCtx, FREAD_REQ_INFO *info)
|
||||
{
|
||||
asn1r_wr_i32 (aCtx, info->frsmid); /* write the frsmid */
|
||||
/* write the context specific tag for this opcode */
|
||||
asn1r_fin_prim (aCtx, MMSOP_FILE_READ,CTX);
|
||||
}
|
||||
108
mmslib/mmsle/rq_frena.c
Normal file
108
mmslib/mmsle/rq_frena.c
Normal file
@@ -0,0 +1,108 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_frename.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of the file rename. */
|
||||
/* It decodes the file rename response (confirm) & encodes the */
|
||||
/* file rename request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/20/01 JRB 02 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 06/15/98 MDE 01 Changes to allow compile under C++ */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pfil.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_file_rename_rsp */
|
||||
/* NOTE : Since the mms_file_rename_rsp is a NULL PDU, the decode is */
|
||||
/* continued by '_mms_null_pdu_dec', which simply sets decode done = 1 */
|
||||
/* and sets the decode done function to point to the general decode done*/
|
||||
/* fun. See mmsdec.c for the general functions. */
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_frename */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the file rename request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_frename (ST_INT chan, FRENAME_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_FILE_RENAME,
|
||||
M_CAST_MK_FUN (_ms_mk_frename_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_frename */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the file rename request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_frename (FRENAME_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_FILE_RENAME,
|
||||
M_CAST_MK_FUN (_ms_mk_frename_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_frename_req */
|
||||
/* construct a file rename request */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_frename_req (ASN1_ENC_CTXT *aCtx, FRENAME_REQ_INFO *info)
|
||||
{
|
||||
FILE_NAME *fname_idx;
|
||||
|
||||
/* write the new file name */
|
||||
asn1r_strt_constr (aCtx);
|
||||
fname_idx = (FILE_NAME *)(info + 1);
|
||||
fname_idx += info->num_of_cur_fname;
|
||||
_ms_wr_mms_fname (aCtx, fname_idx, info -> num_of_new_fname);
|
||||
asn1r_fin_constr (aCtx, 1,CTX,DEF); /* context specific tag 1 */
|
||||
|
||||
/* write the current file name */
|
||||
asn1r_strt_constr (aCtx);
|
||||
fname_idx = (FILE_NAME *)(info + 1);
|
||||
_ms_wr_mms_fname (aCtx, fname_idx, info -> num_of_cur_fname);
|
||||
asn1r_fin_constr (aCtx, 0,CTX,DEF); /* context specific tag 0 */
|
||||
|
||||
/* write the context specific tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_FILE_RENAME,CTX,DEF);
|
||||
}
|
||||
682
mmslib/mmsle/rq_getae.c
Normal file
682
mmslib/mmsle/rq_getae.c
Normal file
@@ -0,0 +1,682 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_getaes.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of get alarm */
|
||||
/* enrollment summary. It decodes the get alarm enrollment */
|
||||
/* summary response (confirm) & encodes the get alarm enrollment */
|
||||
/* summary request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 06 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 05 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 04/28/00 JRB 04 Lint cleanup */
|
||||
/* 09/13/99 MDE 03 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 02 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 01 Changes to allow compile under C++ */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pevn.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : NONE */
|
||||
|
||||
static GETAES_RESP_INFO *rsp_info;
|
||||
|
||||
static ALARM_ENROLL_SUMMARY *aes_ptr;
|
||||
static ST_INT max_enroll_sums;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID getaes_aes_list_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getaes_eename_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getaes_eename_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getaes_eename_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getaes_client_app_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getaes_client_app_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getaes_client_app_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getaes_get_severity (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getaes_get_cur_state (ASN1_DEC_CTXT *aCtx);
|
||||
#ifdef CS_SUPPORT
|
||||
static ST_VOID getaes_addl_detail_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getaes_addl_detail_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getaes_addl_detail_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
#endif
|
||||
static ST_VOID getaes_get_not_lost (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getaes_get_alarm_ack_rule (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getaes_get_ee_state (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getaes_tta_time_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getaes_tta_time_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getaes_tta_time_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getaes_aack_time_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getaes_aack_time_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getaes_aack_time_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getaes_tti_time_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getaes_tti_time_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getaes_tti_time_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getaes_iack_time_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getaes_iack_time_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getaes_alarm_esum_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getaes_alarm_esum_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getaes_aes_list_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getaes_get_more_follows (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_getaes_rsp */
|
||||
/* This function is called from MMSDEC when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_getaes_rsp (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT rsp_size;
|
||||
|
||||
MLOG_CDEC0 ("Get Alarm Enrollment Summary Response");
|
||||
|
||||
#if defined(FIXED_DECBUF)
|
||||
max_enroll_sums = m_cl_max_enrollment_summary;
|
||||
rsp_size = mmsl_dec_info_size;
|
||||
#else
|
||||
max_enroll_sums = _mmsdec_msglen/8; /* determine maximum size */
|
||||
if (m_cl_max_enrollment_summary && (max_enroll_sums > m_cl_max_enrollment_summary))
|
||||
max_enroll_sums = m_cl_max_enrollment_summary;
|
||||
rsp_size = sizeof (GETAES_RESP_INFO)
|
||||
+ (max_enroll_sums * (sizeof (ALARM_ENROLL_SUMMARY)));
|
||||
/* get storage for resp info */
|
||||
#endif
|
||||
|
||||
/* get storage for request information */
|
||||
rsp_info = (GETAES_RESP_INFO *) _m_get_dec_buf (aCtx, rsp_size);
|
||||
aes_ptr = (ALARM_ENROLL_SUMMARY *) (rsp_info + 1);
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 0, getaes_aes_list_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getaes_aes_list_cstr */
|
||||
/* decoding get alarm enrollment summary RESPONSE (confirm): */
|
||||
/* alarm enrollment summary list constructor was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getaes_aes_list_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getaes_aes_list_cstr");
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, UNI | CONSTR, SEQ_CODE, getaes_alarm_esum_cstr);
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = getaes_aes_list_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getaes_alarm_esum_cstr */
|
||||
/* decoding get alarm enrollment summary RESPONSE (confirm): */
|
||||
/* alarm enrollment summary was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getaes_alarm_esum_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getaes_alarm_esum_cstr");
|
||||
|
||||
rsp_info->num_of_alarm_esum++; /* inc alarm enrollment sum cnt */
|
||||
|
||||
if (rsp_info->num_of_alarm_esum > max_enroll_sums)
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 0, getaes_eename_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getaes_eename_cstr */
|
||||
/* decoding get alarm enrollment summary RESPONSE (confirm): */
|
||||
/* event enrollment name cstr was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getaes_eename_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getaes_eename_cstr");
|
||||
|
||||
_ms_get_mms_objname (aCtx, &aes_ptr->evenroll_name, getaes_eename_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getaes_eename_done */
|
||||
/* decoding get alarm enrollment summary RESPONSE (confirm): */
|
||||
/* event enrollment name has been obtained. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getaes_eename_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getaes_eename_done");
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = getaes_eename_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getaes_eename_cstr_done */
|
||||
/* decoding get alarm enrollment summary RESPONSE (confirm): */
|
||||
/* event enrollment name cstr done has been encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getaes_eename_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 2, getaes_client_app_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 3, getaes_get_severity);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getaes_client_app_cstr */
|
||||
/* decoding get alarm enrollment summary RESPONSE (confirm): */
|
||||
/* client application constructor was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getaes_client_app_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getaes_client_app_cstr");
|
||||
|
||||
aes_ptr->client_app_pres = SD_TRUE; /* set client app present */
|
||||
|
||||
_ms_get_mms_app_ref (aCtx, &aes_ptr->client_app,&aes_ptr->client_app_len,
|
||||
getaes_client_app_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getaes_client_app_done */
|
||||
/* decoding get alarm enrollment summary RESPONSE (confirm): */
|
||||
/* client application has been obtained. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getaes_client_app_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = getaes_client_app_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getaes_client_app_cstr_done */
|
||||
/* decoding get alarm enrollment summary RESPONSE (confirm): */
|
||||
/* client application constructor done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getaes_client_app_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 3, getaes_get_severity);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getaes_get_severity */
|
||||
/* decoding get alarm enrollment summary RESPONSE (confirm): */
|
||||
/* severity was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getaes_get_severity (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getaes_get_severity");
|
||||
|
||||
if (asn1r_get_u8 (aCtx, &aes_ptr->severity)) /* get the severity */
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 4, getaes_get_cur_state);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getaes_get_cur_state */
|
||||
/* decoding get alarm enrollment summary RESPONSE (confirm): */
|
||||
/* current state was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getaes_get_cur_state (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getaes_get_cur_state");
|
||||
|
||||
if (asn1r_get_i16 (aCtx, &aes_ptr->cur_state)) /* get current state */
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
else if ((aes_ptr->cur_state < 0) || (aes_ptr->cur_state > 2))
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef CS_SUPPORT
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 5, getaes_addl_detail_cstr);
|
||||
#endif
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 6, getaes_get_not_lost);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 7, getaes_get_alarm_ack_rule);
|
||||
}
|
||||
|
||||
#ifdef CS_SUPPORT
|
||||
/************************************************************************/
|
||||
/* getaes_addl_detail_cstr */
|
||||
/* decoding get alarm enrollment summary RESPONSE (confirm): */
|
||||
/* additional detail constructor was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getaes_addl_detail_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getaes_addl_detail_cstr");
|
||||
|
||||
aes_ptr->addl_detail_pres = SD_TRUE; /* set flag */
|
||||
aes_ptr->addl_detail = aCtx->asn1r_field_ptr;
|
||||
aes_ptr->addl_detail_len = aCtx->asn1r_elmnt_len;
|
||||
|
||||
asn1r_parse_next (aCtx, getaes_addl_detail_done); /* parse the contents */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getaes_addl_detail_done */
|
||||
/* decoding get alarm enrollment summary RESPONSE (confirm): */
|
||||
/* additional detail has been obtained. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getaes_addl_detail_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getaes_addl_detail_done");
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = getaes_addl_detail_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getaes_addl_detail_cstr_done */
|
||||
/* decoding get alarm enrollment summary RESPONSE (confirm): */
|
||||
/* additional detail constructor done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getaes_addl_detail_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 6, getaes_get_not_lost);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 7, getaes_get_alarm_ack_rule);
|
||||
}
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* getaes_get_not_lost */
|
||||
/* decoding get alarm enrollment summary RESPONSE (confirm): */
|
||||
/* notification lost was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getaes_get_not_lost (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getaes_get_not_lost");
|
||||
|
||||
if (asn1r_get_bool (aCtx, &(aes_ptr->not_lost))) /* get notification lost*/
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 7, getaes_get_alarm_ack_rule);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getaes_get_alarm_ack_rule */
|
||||
/* decoding get alarm enrollment summary RESPONSE (confirm): */
|
||||
/* alarm acknowledgment rule was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getaes_get_alarm_ack_rule (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getaes_get_alarm_ack_rule");
|
||||
/* read alarm ack rule */
|
||||
if (asn1r_get_i16 (aCtx, &(aes_ptr->alarm_ack_rule)))
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
else if ((aes_ptr->alarm_ack_rule < 0) || (aes_ptr->alarm_ack_rule > 3))
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 8, getaes_get_ee_state);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 9, getaes_tta_time_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR,10, getaes_aack_time_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR,11, getaes_tti_time_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR,12, getaes_iack_time_cstr);
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = getaes_alarm_esum_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getaes_get_ee_state */
|
||||
/* decoding get alarm enrollment summary RESPONSE (confirm): */
|
||||
/* event enrollment state was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getaes_get_ee_state (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getaes_get_ee_state");
|
||||
|
||||
aes_ptr->ee_state_pres = SD_TRUE; /* set event cond state pres */
|
||||
|
||||
if (asn1r_get_i16 (aCtx, &aes_ptr->ee_state)) /* get event cond state */
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
else if ((aes_ptr->ee_state < 0) || (aes_ptr->ee_state > 7))
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 9, getaes_tta_time_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR,10, getaes_aack_time_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR,11, getaes_tti_time_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR,12, getaes_iack_time_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getaes_tta_time_cstr */
|
||||
/* decoding get alarm enrollment summary RESPONSE (confirm): */
|
||||
/* transition to active time cstr was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getaes_tta_time_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getaes_tta_time_cstr");
|
||||
|
||||
aes_ptr->tta_time_pres = SD_TRUE; /* set tran to active present */
|
||||
|
||||
_ms_get_mms_evtime (aCtx, &aes_ptr->tta_time, getaes_tta_time_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getaes_tta_time_done */
|
||||
/* decoding get alarm enrollment summary RESPONSE (confirm): */
|
||||
/* transition to active time has been obtained. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getaes_tta_time_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getaes_tta_time_done");
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = getaes_tta_time_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getaes_tta_time_cstr_done */
|
||||
/* decoding get alarm enrollment summary RESPONSE (confirm): */
|
||||
/* transition to active time cstr done has been encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getaes_tta_time_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR,10, getaes_aack_time_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR,11, getaes_tti_time_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR,12, getaes_iack_time_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getaes_aack_time_cstr */
|
||||
/* decoding get alarm enrollment summary RESPONSE (confirm): */
|
||||
/* active acknowledgment time cstr was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getaes_aack_time_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getaes_aack_time_cstr");
|
||||
|
||||
aes_ptr->aack_time_pres = SD_TRUE; /* active acknowledgment pres */
|
||||
|
||||
_ms_get_mms_evtime (aCtx, &aes_ptr->aack_time, getaes_aack_time_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getaes_aack_time_done */
|
||||
/* decoding get alarm enrollment summary RESPONSE (confirm): */
|
||||
/* active acknowledgment time has been obtained. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getaes_aack_time_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getaes_aack_time_done");
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = getaes_aack_time_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getaes_aack_time_cstr_done */
|
||||
/* decoding get alarm enrollment summary RESPONSE (confirm): */
|
||||
/* active acknowledgment time cstr done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getaes_aack_time_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR,11, getaes_tti_time_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR,12, getaes_iack_time_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getaes_tti_time_cstr */
|
||||
/* decoding get alarm enrollment summary RESPONSE (confirm): */
|
||||
/* transition to idle time cstr was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getaes_tti_time_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getaes_tti_time_cstr");
|
||||
|
||||
aes_ptr->tti_time_pres = SD_TRUE; /* set tran to idle present */
|
||||
|
||||
_ms_get_mms_evtime (aCtx, &aes_ptr->tti_time, getaes_tti_time_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getaes_tti_time_done */
|
||||
/* decoding get alarm enrollment summary RESPONSE (confirm): */
|
||||
/* transition to idle time has been obtained. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getaes_tti_time_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getaes_tti_time_done");
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = getaes_tti_time_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getaes_tti_time_cstr_done */
|
||||
/* decoding get alarm enrollment summary RESPONSE (confirm): */
|
||||
/* transition to idle time cstr done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getaes_tti_time_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR,12, getaes_iack_time_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getaes_iack_time_cstr */
|
||||
/* decoding get alarm enrollment summary RESPONSE (confirm): */
|
||||
/* idle acknowledgment time cstr was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getaes_iack_time_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getaes_iack_time_cstr");
|
||||
|
||||
aes_ptr->iack_time_pres = SD_TRUE; /* idle acknowledgment present */
|
||||
|
||||
_ms_get_mms_evtime (aCtx, &aes_ptr->iack_time, getaes_iack_time_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getaes_iack_time_done */
|
||||
/* decoding get alarm enrollment summary RESPONSE (confirm): */
|
||||
/* idle acknowledgment time has been obtained. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getaes_iack_time_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getaes_iack_time_done");
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = NULL;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getaes_alarm_esum_cstr_done */
|
||||
/* decoding get alarm enrollment summary RESPONSE (confirm): alarm */
|
||||
/* summary constructor done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getaes_alarm_esum_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
aes_ptr++; /* point to where next will go */
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, UNI | CONSTR, SEQ_CODE, getaes_alarm_esum_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getaes_aes_list_cstr_done */
|
||||
/* decoding get alarm enrollment summary RESPONSE (confirm): alarm */
|
||||
/* summary list constructor done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getaes_aes_list_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT rsp_size;
|
||||
/* find actual size for response info */
|
||||
rsp_size = sizeof (GETAES_RESP_INFO)
|
||||
+ (sizeof (ALARM_ENROLL_SUMMARY) * rsp_info->num_of_alarm_esum);
|
||||
|
||||
/* give back unused storage */
|
||||
_mms_dec_info = (*m_realloc_os_fun) (_mms_dec_info,rsp_size);
|
||||
rsp_info = (GETAES_RESP_INFO *) _mms_dec_info;
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, getaes_get_more_follows);
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getaes_get_more_follows */
|
||||
/* decoding get alarm enrollment summary RESPONSE (confirm): more */
|
||||
/* follows indicator was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getaes_get_more_follows (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getaes_get_more_follows");
|
||||
|
||||
if (asn1r_get_bool (aCtx, &rsp_info->more_follows))
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_getaes */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the decoding get alarm enrollment summary */
|
||||
/* request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_getaes (ST_INT chan, GETAES_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_GET_ALARM_ESUM,
|
||||
M_CAST_MK_FUN (_ms_mk_getaes_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_getaes */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the decoding get alarm enrollment summary request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_getaes (GETAES_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_GET_ALARM_ESUM,
|
||||
M_CAST_MK_FUN (_ms_mk_getaes_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_getaes_req */
|
||||
/* ENCODE a decoding get alarm enrollment summary REQUEST: */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_getaes_req (ASN1_ENC_CTXT *aCtx, GETAES_REQ_INFO *info)
|
||||
{
|
||||
if (info->ca_name_pres)
|
||||
{
|
||||
asn1r_strt_constr (aCtx); /* start ctx tag 5 cstr */
|
||||
_ms_wr_mms_objname (aCtx, &info->ca_name); /* write continue after name */
|
||||
asn1r_fin_constr (aCtx, 5,CTX,DEF); /* finish ctx tag 5 cstr */
|
||||
}
|
||||
|
||||
if (info->least_sev_filter != 127 || /* not the defaults */
|
||||
info->most_sev_filter != 0)
|
||||
{
|
||||
asn1r_strt_constr (aCtx); /* start ctx tag 3 cstr */
|
||||
asn1r_wr_u8 (aCtx, info->least_sev_filter); /* write least severe filter */
|
||||
asn1r_fin_prim (aCtx, 1,CTX);
|
||||
|
||||
asn1r_wr_u8 (aCtx, info->most_sev_filter); /* write most severe filter */
|
||||
asn1r_fin_prim (aCtx, 0,CTX);
|
||||
asn1r_fin_constr (aCtx, 3,CTX,DEF); /* finish ctx tag 3 cstr */
|
||||
}
|
||||
|
||||
if (info->ack_filter != SD_FALSE)
|
||||
{
|
||||
asn1r_wr_i16 (aCtx, info->ack_filter); /* write acknowledge filter */
|
||||
asn1r_fin_prim (aCtx, 2,CTX);
|
||||
}
|
||||
|
||||
if (!info->act_alarms_only)
|
||||
{
|
||||
asn1r_wr_bool (aCtx, info->act_alarms_only); /* write active alarms only */
|
||||
asn1r_fin_prim (aCtx, 1,CTX);
|
||||
}
|
||||
|
||||
if (!info->enroll_only)
|
||||
{
|
||||
asn1r_wr_bool (aCtx, info->enroll_only); /* write enrollments only */
|
||||
asn1r_fin_prim (aCtx, 0,CTX);
|
||||
}
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_GET_ALARM_ESUM,CTX,DEF); /* tag = opcode, context */
|
||||
}
|
||||
498
mmslib/mmsle/rq_getas.c
Normal file
498
mmslib/mmsle/rq_getas.c
Normal file
@@ -0,0 +1,498 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_getas.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of get alarm */
|
||||
/* summary. It decodes the get alarm summary response (confirm) */
|
||||
/* & encodes the get alarm summary request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 06 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 05 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 04/28/00 JRB 04 Lint cleanup */
|
||||
/* 09/13/99 MDE 03 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 02 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 01 Changes to allow compile under C++ */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pevn.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : NONE */
|
||||
|
||||
static GETAS_RESP_INFO *rsp_info;
|
||||
|
||||
static ALARM_SUMMARY *as_ptr;
|
||||
static ST_INT max_summaries;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
/* static functions with multiple references */
|
||||
static ST_VOID getas_as_list_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getas_alarm_sum_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getas_cond_name_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getas_cond_name_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getas_cond_name_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getas_get_severity (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getas_get_state (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getas_get_unack_state (ASN1_DEC_CTXT *aCtx);
|
||||
#ifdef CS_SUPPORT
|
||||
static ST_VOID getas_addl_detail_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getas_addl_detail_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getas_addl_detail_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
#endif
|
||||
static ST_VOID getas_tta_time_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getas_tta_time_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getas_tta_time_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getas_tti_time_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getas_tti_time_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getas_alarm_sum_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getas_as_list_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getas_get_more_follows (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_getas_rsp */
|
||||
/* This function is called from MMSDEC when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_getas_rsp (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT rsp_size;
|
||||
|
||||
MLOG_CDEC0 ("Get Alarm Summary Response");
|
||||
|
||||
#if defined(FIXED_DECBUF)
|
||||
max_summaries = m_cl_max_alarm_summary;
|
||||
rsp_size = mmsl_dec_info_size;
|
||||
#else
|
||||
max_summaries = _mmsdec_msglen/8; /* determine maximum size */
|
||||
if (m_cl_max_alarm_summary && (max_summaries > m_cl_max_alarm_summary))
|
||||
max_summaries = m_cl_max_alarm_summary;
|
||||
|
||||
/* get storage for resp info */
|
||||
rsp_size = sizeof (GETAS_RESP_INFO)
|
||||
+ (max_summaries * (sizeof (ALARM_SUMMARY)));
|
||||
#endif
|
||||
|
||||
/* get storage for request information */
|
||||
rsp_info = (GETAS_RESP_INFO *) _m_get_dec_buf (aCtx, rsp_size);
|
||||
as_ptr = (ALARM_SUMMARY *) (rsp_info + 1);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 0, getas_as_list_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getas_as_list_cstr */
|
||||
/* get alarm summary RESPONSE (confirm) is being decoded: */
|
||||
/* alarm summary list constructor was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getas_as_list_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getas_as_list_cstr");
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, UNI | CONSTR, SEQ_CODE, getas_alarm_sum_cstr);
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = getas_as_list_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getas_alarm_sum_cstr */
|
||||
/* get alarm summary RESPONSE (confirm) is being decoded: */
|
||||
/* alarm summary was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getas_alarm_sum_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getas_alarm_sum_cstr");
|
||||
|
||||
rsp_info->num_of_alarm_sum++; /* increment alarm summary cnt */
|
||||
|
||||
if (rsp_info->num_of_alarm_sum > max_summaries)
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 0, getas_cond_name_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getas_cond_name_cstr */
|
||||
/* get alarm summary RESPONSE (confirm) is being decoded: */
|
||||
/* event condition name cstr was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getas_cond_name_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getas_cond_name_cstr");
|
||||
|
||||
_ms_get_mms_objname (aCtx, &as_ptr->evcon_name, getas_cond_name_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getas_cond_name_done */
|
||||
/* get alarm summary RESPONSE (confirm) is being decoded: */
|
||||
/* event condition name has been obtained. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getas_cond_name_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getas_cond_name_done");
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = getas_cond_name_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getas_cond_name_cstr_done */
|
||||
/* get alarm summary RESPONSE (confirm) is being decoded: */
|
||||
/* event condition name cstr done has been encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getas_cond_name_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, getas_get_severity);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getas_get_severity */
|
||||
/* get alarm summary RESPONSE (confirm) is being decoded: */
|
||||
/* severity was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getas_get_severity (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getas_get_severity");
|
||||
|
||||
if (asn1r_get_u8 (aCtx, &as_ptr->severity)) /* get the severity */
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 2, getas_get_state);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getas_get_state */
|
||||
/* get alarm summary RESPONSE (confirm) is being decoded: */
|
||||
/* current state was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getas_get_state (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getas_get_state");
|
||||
|
||||
if (asn1r_get_i16 (aCtx, &as_ptr->cur_state)) /* get current state */
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
else if ((as_ptr->cur_state < 0) || (as_ptr->cur_state > 2))
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 3, getas_get_unack_state);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getas_get_unack_state */
|
||||
/* get alarm summary RESPONSE (confirm) is being decoded: */
|
||||
/* unack state was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getas_get_unack_state (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getas_get_unack_state");
|
||||
|
||||
if (asn1r_get_i16 (aCtx, &as_ptr->unack_state)) /* get unack state */
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
else if ((as_ptr->unack_state < 0) || (as_ptr->unack_state > 3))
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef CS_SUPPORT
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 4, getas_addl_detail_cstr);
|
||||
#endif
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 5, getas_tta_time_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 6, getas_tti_time_cstr);
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = getas_alarm_sum_cstr_done;
|
||||
}
|
||||
|
||||
#ifdef CS_SUPPORT
|
||||
/************************************************************************/
|
||||
/* getas_addl_detail_cstr */
|
||||
/* get alarm summary RESPONSE (confirm) is being decoded: additional */
|
||||
/* detail was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getas_addl_detail_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getas_addl_detail_cstr");
|
||||
|
||||
as_ptr->addl_detail_pres = SD_TRUE; /* set add'nl detail present */
|
||||
|
||||
/* leave additional detail in place; just parse it. */
|
||||
as_ptr->addl_detail = aCtx->asn1r_field_ptr;
|
||||
asn1r_parse_next (aCtx, getas_addl_detail_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getas_addl_detail_done */
|
||||
/* get alarm summary RESPONSE (confirm) is being decoded: additional */
|
||||
/* detail has been parsed. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getas_addl_detail_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
as_ptr->addl_detail_len = aCtx->asn1r_octetcount; /* save length */
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = getas_addl_detail_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getas_addl_detail_cstr_done */
|
||||
/* get alarm summary RESPONSE (confirm) is being decoded: additional */
|
||||
/* detail cstr done has been encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getas_addl_detail_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 5, getas_tta_time_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 6, getas_tti_time_cstr);
|
||||
}
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* getas_tta_time_cstr */
|
||||
/* get alarm summary RESPONSE (confirm) is being decoded: */
|
||||
/* transition to active time cstr was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getas_tta_time_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getas_tta_time_cstr");
|
||||
|
||||
as_ptr->tta_time_pres = SD_TRUE; /* set tran to active present */
|
||||
|
||||
_ms_get_mms_evtime (aCtx, &as_ptr->tta_time, getas_tta_time_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getas_tta_time_done */
|
||||
/* get alarm summary RESPONSE (confirm) is being decoded: */
|
||||
/* transition to active time has been obtained. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getas_tta_time_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getas_tta_time_done");
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = getas_tta_time_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getas_tta_time_cstr_done */
|
||||
/* get alarm summary RESPONSE (confirm) is being decoded: */
|
||||
/* transition to active time cstr done has been encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getas_tta_time_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 6, getas_tti_time_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getas_tti_time_cstr */
|
||||
/* get alarm summary RESPONSE (confirm) is being decoded: */
|
||||
/* transition to idle time cstr was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getas_tti_time_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getas_tti_time_cstr");
|
||||
|
||||
as_ptr->tti_time_pres = SD_TRUE; /* set tran to active present */
|
||||
|
||||
_ms_get_mms_evtime (aCtx, &as_ptr->tti_time, getas_tti_time_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getas_tti_time_done */
|
||||
/* get alarm summary RESPONSE (confirm) is being decoded: */
|
||||
/* transition to idle time has been obtained. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getas_tti_time_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getas_tti_time_done");
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = NULL;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getas_alarm_sum_cstr_done */
|
||||
/* get alarm summary RESPONSE (confirm) is being decoded: alarm */
|
||||
/* summary constructor done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getas_alarm_sum_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
as_ptr++; /* point to where next will go */
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, UNI | CONSTR, SEQ_CODE, getas_alarm_sum_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getas_as_list_cstr_done */
|
||||
/* get alarm summary RESPONSE (confirm) is being decoded: alarm */
|
||||
/* summary list constructor done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getas_as_list_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT rsp_size;
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, getas_get_more_follows);
|
||||
/* find actual size for response info */
|
||||
rsp_size = sizeof (GETAS_RESP_INFO)
|
||||
+ (sizeof (ALARM_SUMMARY) * rsp_info->num_of_alarm_sum);
|
||||
|
||||
/* give back unused storage */
|
||||
_mms_dec_info = (*m_realloc_os_fun) (_mms_dec_info,rsp_size);
|
||||
rsp_info = (GETAS_RESP_INFO *) _mms_dec_info;
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getas_get_more_follows */
|
||||
/* get alarm summary RESPONSE (confirm) is being decoded: more */
|
||||
/* follows indicator was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getas_get_more_follows (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getas_get_more_follows");
|
||||
|
||||
if (asn1r_get_bool (aCtx, &rsp_info->more_follows))
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_getas */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the get alarm summary request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_getas (ST_INT chan, GETAS_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_GET_ALARM_SUM,
|
||||
M_CAST_MK_FUN (_ms_mk_getas_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_getas */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the get alarm summary request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_getas (GETAS_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_GET_ALARM_SUM,
|
||||
M_CAST_MK_FUN (_ms_mk_getas_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_getas_req */
|
||||
/* ENCODE a get alarm summary REQUEST: */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_getas_req (ASN1_ENC_CTXT *aCtx, GETAS_REQ_INFO *info)
|
||||
{
|
||||
if (info->ca_pres)
|
||||
{
|
||||
asn1r_strt_constr (aCtx); /* start ctx tag 5 cstr */
|
||||
_ms_wr_mms_objname (aCtx, &info->ca_name); /* write continue after name */
|
||||
asn1r_fin_constr (aCtx, 5,CTX,DEF); /* finish ctx tag 5 cstr */
|
||||
}
|
||||
|
||||
if (info->least_sev_filter != 127 || /* not the defaults */
|
||||
info->most_sev_filter != 0)
|
||||
{
|
||||
asn1r_strt_constr (aCtx); /* start ctx tag 3 cstr */
|
||||
asn1r_wr_u8 (aCtx, info->least_sev_filter); /* write least severe filter */
|
||||
asn1r_fin_prim (aCtx, 1,CTX);
|
||||
|
||||
asn1r_wr_u8 (aCtx, info->most_sev_filter); /* write most severe filter */
|
||||
asn1r_fin_prim (aCtx, 0,CTX);
|
||||
asn1r_fin_constr (aCtx, 3,CTX,DEF); /* finish ctx tag 3 cstr */
|
||||
}
|
||||
|
||||
if (info->ack_filter != SD_FALSE)
|
||||
{
|
||||
asn1r_wr_i16 (aCtx, info->ack_filter); /* write acknowledge filter */
|
||||
asn1r_fin_prim (aCtx, 2,CTX);
|
||||
}
|
||||
|
||||
if (!info->act_alarms_only)
|
||||
{
|
||||
asn1r_wr_bool (aCtx, info->act_alarms_only); /* write active alarms only */
|
||||
asn1r_fin_prim (aCtx, 1,CTX);
|
||||
}
|
||||
|
||||
if (!info->enroll_only)
|
||||
{
|
||||
asn1r_wr_bool (aCtx, info->enroll_only); /* write enrollments only */
|
||||
asn1r_fin_prim (aCtx, 0,CTX);
|
||||
}
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_GET_ALARM_SUM,CTX,DEF); /* tag = opcode, context */
|
||||
}
|
||||
168
mmslib/mmsle/rq_getsc.c
Normal file
168
mmslib/mmsle/rq_getsc.c
Normal file
@@ -0,0 +1,168 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_getscat.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of the get scattered */
|
||||
/* access attributes. It decodes the get scattered access */
|
||||
/* attributes response (confirm) & encodes the get scattered */
|
||||
/* access attributes request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 06 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 05 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 04 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 03 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 02 Changes to allow compile under C++ */
|
||||
/* 07/03/97 MDE 01 Op-specific info buffer handling changes */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pvar.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static GETSCAT_RESP_INFO *rsp_info;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID getscat_scat_acc_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getscat_scat_acc_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getscat_scat_acc_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getscat_get_mms_deletable (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_get_scat_rsp */
|
||||
/* This function is called from MMSDEC when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_get_scat_rsp (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("Get Scattered Access Attributes Response");
|
||||
|
||||
/* get storage for request information */
|
||||
rsp_info = (GETSCAT_RESP_INFO *) _m_get_dec_buf (aCtx, sizeof (GETSCAT_RESP_INFO));
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 0, getscat_get_mms_deletable);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getscat_get_mms_deletable */
|
||||
/* Decoding get scattered access attributes response: mms deletable was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getscat_get_mms_deletable (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getscat_get_mms_deletable");
|
||||
/* read mms deletable */
|
||||
if (asn1r_get_bool (aCtx, &(rsp_info->mms_deletable)))
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 1, getscat_scat_acc_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getscat_scat_acc_cstr */
|
||||
/* get scattered access attributes request: scattered access constr was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getscat_scat_acc_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getscat_scat_acc_cstr");
|
||||
|
||||
_ms_get_va_scat_access (aCtx, &rsp_info->sa_descr, getscat_scat_acc_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getscat_scat_acc_done */
|
||||
/* get scattered access attributes request: scattered access has been */
|
||||
/* decoded. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getscat_scat_acc_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getscat_scat_acc_done");
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = getscat_scat_acc_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getscat_scat_acc_cstr_done */
|
||||
/* get scattered access attributes request: scattered access constr */
|
||||
/* done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getscat_scat_acc_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_getscat */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE & send the get scattered access attributes request */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_getscat (ST_INT chan, GETSCAT_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_GET_SCAT,
|
||||
M_CAST_MK_FUN (_ms_mk_getscat_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_getscat */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the get scattered access attributes request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_getscat (GETSCAT_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_GET_SCAT,
|
||||
M_CAST_MK_FUN (_ms_mk_getscat_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_getscat_req */
|
||||
/* construct a get scattered access attributes request */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_getscat_req (ASN1_ENC_CTXT *aCtx, GETSCAT_REQ_INFO *info)
|
||||
{
|
||||
_ms_wr_mms_objname (aCtx, &info->sa_name); /* write scattered access name */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_GET_SCAT,CTX,DEF); /* tag = opcode, ctx */
|
||||
}
|
||||
146
mmslib/mmsle/rq_initd.c
Normal file
146
mmslib/mmsle/rq_initd.c
Normal file
@@ -0,0 +1,146 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_initdown.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of initiate download */
|
||||
/* sequence. It decodes the initiate download sequence response */
|
||||
/* (confirm) & encodes the initiate download sequence request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 04 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 03 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 02 Added SD_CONST modifiers */
|
||||
/* 06/15/98 MDE 01 Changes to allow compile under C++ */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pdom.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID init_download_null (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_init_download_rsp */
|
||||
/* This function is called from MMSDEC when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_init_download_rsp (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("Initiate Download Sequence Response");
|
||||
|
||||
#ifndef MMS_LITE
|
||||
if (mms_chan_info[_mmsdechan].version) /* IS */
|
||||
#else
|
||||
if (mmsl_version) /* IS */
|
||||
#endif
|
||||
_mms_null_pdu_dec (aCtx); /* IS PDU is NULL */
|
||||
else /* DIS */
|
||||
{
|
||||
aCtx->asn1r_decode_method = ASN1_TAG_METHOD; /* Set decode method to TAG */
|
||||
ASN1R_TAG_ADD (aCtx, UNI, NULL_CODE, init_download_null);
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* init_download_null */
|
||||
/* This function is called from MMSDEC when the NULL contents of this */
|
||||
/* response is found. No action required. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID init_download_null (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("init_download_null");
|
||||
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_initdown */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the initiate download sequence. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_initdown (ST_INT chan, INITDOWN_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_INIT_DOWNLOAD,
|
||||
M_CAST_MK_FUN (_ms_mk_initdown_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_initdown */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the initiate download sequence. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_initdown (INITDOWN_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_INIT_DOWNLOAD,
|
||||
M_CAST_MK_FUN (_ms_mk_initdown_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_initdown_req */
|
||||
/* ENCODE an initiate download sequence REQUEST: */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_initdown_req (ASN1_ENC_CTXT *aCtx, INITDOWN_REQ_INFO *info)
|
||||
{
|
||||
ST_INT16 i;
|
||||
ST_CHAR **cap_ptr;
|
||||
|
||||
asn1r_wr_bool (aCtx, info->sharable); /* write 'sharable' element */
|
||||
asn1r_fin_prim (aCtx, 2,CTX);
|
||||
|
||||
/* Write the list of capabilities */
|
||||
|
||||
asn1r_strt_constr (aCtx); /* start ctx tag 1 constructor */
|
||||
cap_ptr = (ST_CHAR **) (info + 1);
|
||||
cap_ptr += info->num_of_capab - 1; /* point to last capability */
|
||||
for (i = 0; i < info->num_of_capab; i++)
|
||||
{
|
||||
asn1r_wr_vstr (aCtx, *cap_ptr); /* write the capability */
|
||||
asn1r_fin_prim (aCtx, VISTR_CODE,UNI); /* universal string */
|
||||
cap_ptr--;
|
||||
}
|
||||
asn1r_fin_constr (aCtx, 1,CTX,DEF); /* ctx tag 1 constructor done */
|
||||
|
||||
asn1r_wr_vstr (aCtx, info->dname); /* write the domain name */
|
||||
asn1r_fin_prim (aCtx, 0,CTX); /* context specific tag 0 */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_INIT_DOWNLOAD,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
|
||||
215
mmslib/mmsle/rq_initu.c
Normal file
215
mmslib/mmsle/rq_initu.c
Normal file
@@ -0,0 +1,215 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_initupl.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of initiate upload */
|
||||
/* sequence. It decodes the initiate upload sequence response */
|
||||
/* (confirm) & encodes the initiate upload sequence request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 06 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 05 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 04 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 03 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 02 Changes to allow compile under C++ */
|
||||
/* 07/03/97 MDE 01 Op-specific info buffer handling changes */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pdom.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : NONE */
|
||||
|
||||
static INITUPL_RESP_INFO *rsp_info;
|
||||
|
||||
static ST_CHAR **cap_ptr;
|
||||
static ST_INT max_capabilities;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID initupl_get_cap (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID initupl_cap_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID initupl_cap_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID initupl_get_ulsmid (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_init_upload_rsp */
|
||||
/* This function is called from MMSDEC when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_init_upload_rsp (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT rsp_size;
|
||||
|
||||
MLOG_CDEC0 ("Initiate Upload Sequence Response");
|
||||
|
||||
#if defined(FIXED_DECBUF)
|
||||
max_capabilities = m_cl_max_initupl_cap;
|
||||
rsp_size = mmsl_dec_info_size;
|
||||
#else
|
||||
max_capabilities = _mmsdec_msglen/2; /* determine maximum size */
|
||||
if (m_cl_max_initupl_cap && (max_capabilities > m_cl_max_initupl_cap))
|
||||
max_capabilities = m_cl_max_initupl_cap;
|
||||
rsp_size = sizeof (INITUPL_RESP_INFO)
|
||||
+ (max_capabilities * (sizeof (ST_CHAR *)));
|
||||
#endif
|
||||
|
||||
/* get storage for request information */
|
||||
rsp_info = (INITUPL_RESP_INFO *) _m_get_dec_buf (aCtx, rsp_size);
|
||||
cap_ptr = (ST_CHAR **) (rsp_info + 1);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 0, initupl_get_ulsmid); /* ulsm id is next */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* initupl_get_ulsmid */
|
||||
/* initiate upload sequence RESPONSE (confirm) is being decoded: */
|
||||
/* decode the upload state machine id. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID initupl_get_ulsmid (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("initupl_get_ulsmid");
|
||||
|
||||
if (asn1r_get_i32 (aCtx, &(rsp_info->ulsmid))) /* get upload state machine id */
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 1, initupl_cap_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* initupl_cap_cstr */
|
||||
/* initiate upload sequence RESPONSE (confirm) is being decoded: */
|
||||
/* capability list constructor was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID initupl_cap_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("initupl_cap_cstr");
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, UNI, VISTR_CODE, initupl_get_cap);
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = initupl_cap_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* initupl_get_cap */
|
||||
/* initiate upload sequence RESPONSE (confirm) is being decoded: */
|
||||
/* capability was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID initupl_get_cap (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("initupl_get_cap");
|
||||
|
||||
rsp_info->num_of_capab++; /* increment # of capabilities */
|
||||
if (rsp_info->num_of_capab > max_capabilities)
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
/* copy capability back onto itself shifted by one character */
|
||||
*cap_ptr = (ST_CHAR *) aCtx->asn1r_field_ptr - 1;
|
||||
if (asn1r_get_vstr (aCtx, *cap_ptr))
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
cap_ptr++;
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, UNI, VISTR_CODE, initupl_get_cap);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* initupl_cap_cstr_done */
|
||||
/* initiate upload sequence RESPONSE (confirm) is being decoded: */
|
||||
/* capability list constructor done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID initupl_cap_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT rsp_size;
|
||||
|
||||
/* OK to be done, or may have upload detail */
|
||||
|
||||
/* find actual size for response info */
|
||||
rsp_size = sizeof (INITUPL_RESP_INFO)
|
||||
+ (sizeof (ST_CHAR *) * rsp_info->num_of_capab);
|
||||
|
||||
/* give back unused storage */
|
||||
_mms_dec_info = (*m_realloc_os_fun) (_mms_dec_info,rsp_size);
|
||||
rsp_info = (INITUPL_RESP_INFO *) _mms_dec_info;
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_initupl */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the initiate upload sequence. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_initupl (ST_INT chan, INITUPL_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_INIT_UPLOAD,
|
||||
M_CAST_MK_FUN (_ms_mk_initupl_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_initupl */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the initiate upload sequence. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_initupl (INITUPL_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_INIT_UPLOAD,
|
||||
M_CAST_MK_FUN (_ms_mk_initupl_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_initupl_req */
|
||||
/* ENCODE an initiate upload sequence REQUEST: */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_initupl_req (ASN1_ENC_CTXT *aCtx, INITUPL_REQ_INFO *info)
|
||||
{
|
||||
asn1r_wr_vstr (aCtx, info->dname); /* write the domain name */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_prim (aCtx, MMSOP_INIT_UPLOAD,CTX); /* tag = opcode, context */
|
||||
}
|
||||
146
mmslib/mmsle/rq_input.c
Normal file
146
mmslib/mmsle/rq_input.c
Normal file
@@ -0,0 +1,146 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_input.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the responder portion of the input */
|
||||
/* operation. It decodes the input request (indication) and */
|
||||
/* encodes the input response. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 06 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 05 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 04 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 03 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 02 Changes to allow compile under C++ */
|
||||
/* 07/03/97 MDE 01 Op-specific info buffer handling changes */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pocs.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static INPUT_RESP_INFO *rsp_info;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_input_rsp */
|
||||
/* This function is called from mmsdec when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_input_rsp (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("Input Response");
|
||||
|
||||
|
||||
/* get storage for request information */
|
||||
rsp_info = (INPUT_RESP_INFO *) _m_get_dec_buf (aCtx, sizeof (INPUT_RESP_INFO));
|
||||
rsp_info->input_resp = (ST_CHAR *) aCtx->asn1r_field_ptr - 1; /* set ptr to in rsp*/
|
||||
if (asn1r_get_vstr (aCtx, rsp_info->input_resp))
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_input */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the input request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_input (ST_INT chan, INPUT_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_INPUT,
|
||||
M_CAST_MK_FUN (_ms_mk_input_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_input */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the input request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_input (INPUT_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_INPUT,
|
||||
M_CAST_MK_FUN (_ms_mk_input_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_input_req */
|
||||
/* ENCODE an input REQUEST: */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_input_req (ASN1_ENC_CTXT *aCtx, INPUT_REQ_INFO *info)
|
||||
{
|
||||
ST_INT i;
|
||||
ST_CHAR **prompt_data;
|
||||
|
||||
asn1r_strt_constr (aCtx); /* start sequence constructor */
|
||||
|
||||
if (info->timeout_pres)
|
||||
{
|
||||
asn1r_wr_u32 (aCtx, info->timeout); /* write input timeout */
|
||||
asn1r_fin_prim (aCtx, 3,CTX); /* context specific tag 3 */
|
||||
}
|
||||
|
||||
if (info->prompt_pres)
|
||||
{
|
||||
asn1r_strt_constr (aCtx); /* start prompt data list cstr */
|
||||
prompt_data = (ST_CHAR **) (info + 1);/* point to first prompt data */
|
||||
prompt_data += info->prompt_count -1; /* point to last prompt data */
|
||||
for (i = 0; i < info->prompt_count; i++)
|
||||
{
|
||||
asn1r_wr_vstr (aCtx, *prompt_data); /* write the prompt data */
|
||||
asn1r_fin_prim (aCtx, VISTR_CODE,UNI); /* universal string */
|
||||
prompt_data--;
|
||||
}
|
||||
asn1r_fin_constr (aCtx, 2,CTX,DEF); /* context specific tag 2 */
|
||||
}
|
||||
|
||||
if (!info->echo)
|
||||
{ /* different from default */
|
||||
asn1r_wr_bool (aCtx, info->echo); /* write the echo */
|
||||
asn1r_fin_prim (aCtx, 1,CTX); /* context tag 1 */
|
||||
}
|
||||
|
||||
asn1r_wr_vstr (aCtx, info->station_name); /* write the station name */
|
||||
asn1r_fin_prim (aCtx, 0,CTX); /* context tag 0 */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_INPUT,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
97
mmslib/mmsle/rq_jcrea.c
Normal file
97
mmslib/mmsle/rq_jcrea.c
Normal file
@@ -0,0 +1,97 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_jcreate.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of create journal. */
|
||||
/* It decodes the create journal response (confirm) & encodes the */
|
||||
/* create journal request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/20/01 JRB 02 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 06/15/98 MDE 01 Changes to allow compile under C++ */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pjou.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_jcreate_rsp */
|
||||
/* NOTE : Since the mms_jcreate_rsp is a NULL PDU, the decode is */
|
||||
/* continued by '_mms_null_pdu_dec', which simply sets decode done = 1 */
|
||||
/* and sets the decode done function to point to the general decode done*/
|
||||
/* fun. See mmsdec.c for the general functions. */
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_jcreate */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the create journal request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_jcreate (ST_INT chan, JCREATE_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_CREATE_JOURNAL,
|
||||
M_CAST_MK_FUN (_ms_mk_jcreate_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_jcreate */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the create journal request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_jcreate (JCREATE_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_CREATE_JOURNAL,
|
||||
M_CAST_MK_FUN (_ms_mk_jcreate_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_jcreate_req */
|
||||
/* ENCODE a create journal REQUEST: */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_jcreate_req (ASN1_ENC_CTXT *aCtx, JCREATE_REQ_INFO *info)
|
||||
{
|
||||
asn1r_strt_constr (aCtx); /* start ctx tag 0 constructor */
|
||||
_ms_wr_mms_objname (aCtx, &info->jou_name); /* write the journal name */
|
||||
asn1r_fin_constr (aCtx, 0,CTX,DEF); /* context specific tag 0 */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_CREATE_JOURNAL,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
97
mmslib/mmsle/rq_jdele.c
Normal file
97
mmslib/mmsle/rq_jdele.c
Normal file
@@ -0,0 +1,97 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_jdelete.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of delete journal. */
|
||||
/* It decodes the delete journal response (confirm) & encodes the */
|
||||
/* delete journal request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/20/01 JRB 02 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 06/15/98 MDE 01 Changes to allow compile under C++ */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pjou.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_jdelete_rsp */
|
||||
/* NOTE : Since the mms_jdelete_rsp is a NULL PDU, the decode is */
|
||||
/* continued by '_mms_null_pdu_dec', which simply sets decode done = 1 */
|
||||
/* and sets the decode done function to point to the general decode done*/
|
||||
/* fun. See mmsdec.c for the general functions. */
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_jdelete */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the delete journal request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_jdelete (ST_INT chan, JDELETE_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_DELETE_JOURNAL,
|
||||
M_CAST_MK_FUN (_ms_mk_jdelete_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_jdelete */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the delete journal request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_jdelete (JDELETE_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_DELETE_JOURNAL,
|
||||
M_CAST_MK_FUN (_ms_mk_jdelete_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_jdelete_req */
|
||||
/* ENCODE a delete journal REQUEST: */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_jdelete_req (ASN1_ENC_CTXT *aCtx, JDELETE_REQ_INFO *info)
|
||||
{
|
||||
asn1r_strt_constr (aCtx); /* start ctx tag 0 constructor */
|
||||
_ms_wr_mms_objname (aCtx, &info->jou_name); /* write the journal name */
|
||||
asn1r_fin_constr (aCtx, 0,CTX,DEF); /* context specific tag 0 */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_DELETE_JOURNAL,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
130
mmslib/mmsle/rq_jinit.c
Normal file
130
mmslib/mmsle/rq_jinit.c
Normal file
@@ -0,0 +1,130 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_jinit.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requestor portion of initialize */
|
||||
/* journal. It decodes the initialize journal response (confirm) */
|
||||
/* and encodes the initialize journal request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 07 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 06 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 05 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 04 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 03 Changes to allow compile under C++ */
|
||||
/* 08/15/97 MDE 02 BTOD handling changes */
|
||||
/* 07/03/97 MDE 01 Op-specific info buffer handling changes */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pjou.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static JINIT_RESP_INFO *rsp_info;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_jinit_rsp */
|
||||
/* This function is called from mmsdec when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_jinit_rsp (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("Initialize Journal Response");
|
||||
|
||||
|
||||
/* get storage for request information */
|
||||
rsp_info = (JINIT_RESP_INFO *) _m_get_dec_buf (aCtx, sizeof (JINIT_RESP_INFO));
|
||||
if (asn1r_get_u32 (aCtx, &rsp_info->del_entries))
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_jinit */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the initialize journal request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_jinit (ST_INT chan, JINIT_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_INIT_JOURNAL,
|
||||
M_CAST_MK_FUN (_ms_mk_jinit_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_jinit */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the initialize journal request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_jinit (JINIT_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_INIT_JOURNAL,
|
||||
M_CAST_MK_FUN (_ms_mk_jinit_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_jinit_req */
|
||||
/* ENCODE an initialize journal REQUEST: */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_jinit_req (ASN1_ENC_CTXT *aCtx, JINIT_REQ_INFO *info)
|
||||
{
|
||||
|
||||
if (info->limit_spec_pres)
|
||||
{ /* write limit specification */
|
||||
asn1r_strt_constr (aCtx); /* start context tag 1 cstr */
|
||||
if (info->limit_entry_pres)
|
||||
{ /* write limiting entry */
|
||||
asn1r_wr_octstr (aCtx, info->limit_entry, info->limit_entry_len);
|
||||
asn1r_fin_prim (aCtx, 1,CTX);
|
||||
}
|
||||
asn1r_wr_btod (aCtx, &info->limit_time);
|
||||
asn1r_fin_prim (aCtx, 0,CTX);
|
||||
asn1r_fin_constr (aCtx, 1,CTX,DEF); /* finish context tag 1 cstr */
|
||||
}
|
||||
|
||||
asn1r_strt_constr (aCtx); /* start context tag 0 cstr */
|
||||
_ms_wr_mms_objname (aCtx, &info->jou_name); /* write the journal name */
|
||||
asn1r_fin_constr (aCtx, 0,CTX,DEF); /* finish context tag 0 cstr */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_INIT_JOURNAL,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
431
mmslib/mmsle/rq_jread.c
Normal file
431
mmslib/mmsle/rq_jread.c
Normal file
@@ -0,0 +1,431 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_jread.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of read journal. */
|
||||
/* It decodes the read journal response (confirm) & encodes the */
|
||||
/* read journal request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 07 Remove "thisFileName" */
|
||||
/* 08/28/03 EJV 06 Corr spelling for 'receive'. */
|
||||
/* 12/20/01 JRB 05 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 04 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 03 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 02 Changes to allow compile under C++ */
|
||||
/* 08/15/97 MDE 01 BTOD handling changes */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pjou.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static JREAD_RESP_INFO *rsp_info;
|
||||
|
||||
static JOURNAL_ENTRY *je_ptr;
|
||||
static ST_INT max_jou_ent;
|
||||
static ST_INT max_ec_vars;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID jread_get_orig_ae (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jread_jou_entry_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jread_get_more_follows (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jread_jou_entry_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jread_ec_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jread_ec_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jread_orig_ae_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jread_orig_ae_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jread_entry_id_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jread_entry_id_prim (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jread_entry_id_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jread_list_of_je_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jread_list_of_je_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_jread_rsp */
|
||||
/* This function is called from MMSDEC when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_jread_rsp (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT rsp_size;
|
||||
|
||||
MLOG_CDEC0 ("Read Journal Response");
|
||||
|
||||
#if defined(FIXED_DECBUF)
|
||||
max_jou_ent = m_cl_max_journal_entries;
|
||||
max_ec_vars = m_cl_max_entry_content;
|
||||
rsp_size = mmsl_dec_info_size;
|
||||
#else
|
||||
/* determine maximum storage - this over-estimates the maximum */
|
||||
/* required storage, storage for the maximum number of journal */
|
||||
/* entries would be sufficient. */
|
||||
max_jou_ent = _mmsdec_msglen/10;
|
||||
max_ec_vars = _mmsdec_msglen/4;
|
||||
|
||||
if (m_cl_max_journal_entries && (max_jou_ent > m_cl_max_journal_entries))
|
||||
max_jou_ent = m_cl_max_journal_entries;
|
||||
if (m_cl_max_entry_content && (max_ec_vars > m_cl_max_entry_content))
|
||||
max_ec_vars = m_cl_max_entry_content;
|
||||
rsp_size = sizeof (JREAD_RESP_INFO)
|
||||
+ (sizeof (JOURNAL_ENTRY) * max_jou_ent)
|
||||
+ (sizeof (VAR_INFO) * max_ec_vars);
|
||||
#endif
|
||||
|
||||
/* get storage for request information */
|
||||
rsp_info = (JREAD_RESP_INFO *) _m_get_dec_buf (aCtx, rsp_size);
|
||||
je_ptr = (JOURNAL_ENTRY *) (rsp_info + 1);
|
||||
rsp_info->more_follows = SD_FALSE; /* set default value */
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 0, jread_list_of_je_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jread_list_of_je_cstr */
|
||||
/* read journal RESPONSE (confirm) is being decoded: list of journal */
|
||||
/* entry constructor was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jread_list_of_je_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jread_list_of_je_cstr");
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, UNI | CONSTR, SEQ_CODE, jread_jou_entry_cstr);
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = jread_list_of_je_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jread_jou_entry_cstr */
|
||||
/* read journal response is being decoded: journal entry cstr was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jread_jou_entry_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jread_jou_entry_cstr");
|
||||
|
||||
rsp_info->num_of_jou_entry++; /* increment # of journal entry */
|
||||
if (rsp_info->num_of_jou_entry > max_jou_ent)
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 0, jread_entry_id_prim);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 0, jread_entry_id_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jread_entry_id_prim */
|
||||
/* read journal response is being decoded: entry id primitive was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jread_entry_id_prim (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jread_entry_id_prim");
|
||||
|
||||
/* decode entry id back onto itself */
|
||||
je_ptr->entry_id = aCtx->asn1r_field_ptr;
|
||||
|
||||
if (asn1r_get_octstr (aCtx, je_ptr->entry_id)) /* read entry id */
|
||||
asn1r_set_dec_err (aCtx, RESP_UNSPECIFIED);
|
||||
|
||||
je_ptr->entry_id_len = aCtx->asn1r_octetcount;
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 1, jread_get_orig_ae);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jread_entry_id_cstr */
|
||||
/* read journal response is being decoded: entry id constructor was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jread_entry_id_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jread_entry_id_cstr");
|
||||
|
||||
/* decode entry id back onto itself */
|
||||
je_ptr->entry_id = aCtx->asn1r_field_ptr;
|
||||
|
||||
/* set up done decoding octet cstr destination */
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = jread_entry_id_cstr_done;
|
||||
|
||||
/* get entry id from the received message */
|
||||
/* set maximum length to accept entire message */
|
||||
asn1r_get_octstr_cstr (aCtx, _mmsdec_msglen, je_ptr->entry_id);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jread_entry_id_cstr_done */
|
||||
/* read journal response is being decoded: entry id constructor done */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jread_entry_id_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
je_ptr->entry_id_len = aCtx->asn1r_octetcount; /* save entry id len */
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 1, jread_get_orig_ae);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jread_get_orig_ae */
|
||||
/* read journal response is being decoded: originating ae cstr was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jread_get_orig_ae (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jread_get_orig_ae");
|
||||
|
||||
_ms_get_mms_app_ref (aCtx, &je_ptr->orig_ae, &je_ptr->orig_ae_len, jread_orig_ae_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jread_orig_ae_done */
|
||||
/* read journal response is being decoded: originating ae cstr done was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jread_orig_ae_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
aCtx->asn1r_c_done_fun[aCtx->asn1r_msg_level] = jread_orig_ae_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jread_orig_ae_cstr_done */
|
||||
/* read journal response is being decoded: originating ae cstr done was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jread_orig_ae_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 2, jread_ec_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jread_ec_cstr */
|
||||
/* read journal response is being decoded: entry content constructor */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jread_ec_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jread_ec_cstr");
|
||||
|
||||
_ms_get_jou_ent_cont (aCtx, &je_ptr->ent_content, max_ec_vars, jread_ec_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jread_ec_done */
|
||||
/* read journal response is being decoded: entry content has been */
|
||||
/* obtained. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jread_ec_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
VAR_INFO *vi_ptr;
|
||||
|
||||
MLOG_CDEC0 ("jread_ec_done");
|
||||
|
||||
/* point to where next will go */
|
||||
if (je_ptr->ent_content.entry_form_tag == 2 &&
|
||||
je_ptr->ent_content.ef.data.list_of_var_pres)
|
||||
{
|
||||
vi_ptr = (VAR_INFO *) (je_ptr + 1);
|
||||
je_ptr = (JOURNAL_ENTRY *)
|
||||
(vi_ptr + je_ptr->ent_content.ef.data.num_of_var);
|
||||
}
|
||||
else
|
||||
je_ptr++;
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = jread_jou_entry_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jread_jou_entry_cstr_done */
|
||||
/* read journal response is being decoded: journal entry constructor */
|
||||
/* done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jread_jou_entry_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, UNI | CONSTR, SEQ_CODE, jread_jou_entry_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jread_list_of_je_cstr_done */
|
||||
/* read journal response is being decoded: list of journal entry cstr */
|
||||
/* done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jread_list_of_je_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT rsp_size;
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, jread_get_more_follows);
|
||||
/* find actual size for response info */
|
||||
rsp_size = (char *) je_ptr - (char *) rsp_info;
|
||||
|
||||
/* give back unused storage */
|
||||
_mms_dec_info = (*m_realloc_os_fun) (_mms_dec_info,rsp_size);
|
||||
rsp_info = (JREAD_RESP_INFO *) _mms_dec_info;
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jread_get_more_follows */
|
||||
/* read journal response is being decoded: more follows indicator */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jread_get_more_follows (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jread_get_more_follows");
|
||||
|
||||
if (asn1r_get_bool (aCtx, &rsp_info->more_follows)) /* read more follows */
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_jread */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the read journal request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_jread (ST_INT chan, JREAD_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_READ_JOURNAL,
|
||||
M_CAST_MK_FUN (_ms_mk_jread_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_jread */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the read journal request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_jread (JREAD_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_READ_JOURNAL,
|
||||
M_CAST_MK_FUN (_ms_mk_jread_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_jread_req */
|
||||
/* ENCODE a read journal REQUEST: */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_jread_req (ASN1_ENC_CTXT *aCtx, JREAD_REQ_INFO *info)
|
||||
{
|
||||
ST_INT i;
|
||||
ST_CHAR **var_ptr;
|
||||
|
||||
asn1r_strt_constr (aCtx); /* start sequence constructor */
|
||||
|
||||
if (info->sa_entry_pres)
|
||||
{ /* write start after entry */
|
||||
asn1r_strt_constr (aCtx); /* start context tag 5 cstr */
|
||||
asn1r_wr_octstr (aCtx, info->entry_spec, info->entry_spec_len);
|
||||
asn1r_fin_prim (aCtx, 1,CTX);
|
||||
asn1r_wr_btod (aCtx, &info->time_spec);
|
||||
asn1r_fin_prim (aCtx, 0,CTX);
|
||||
asn1r_fin_constr (aCtx, 5,CTX,DEF); /* finish context tag 5 cstr */
|
||||
}
|
||||
|
||||
if (info->list_of_var_pres)
|
||||
{ /* write list of variables */
|
||||
asn1r_strt_constr (aCtx); /* start context tag 4 cstr */
|
||||
var_ptr = (ST_CHAR **) (info + 1);
|
||||
var_ptr += info->num_of_var - 1; /* point to last entry */
|
||||
for (i = 0; i < info->num_of_var; i++)
|
||||
{
|
||||
asn1r_wr_vstr (aCtx, *var_ptr); /* write the variable */
|
||||
asn1r_fin_prim (aCtx, VISTR_CODE,UNI); /* universal string */
|
||||
var_ptr--;
|
||||
}
|
||||
asn1r_fin_constr (aCtx, 4,CTX,DEF); /* finish context tag 4 cstr */
|
||||
}
|
||||
|
||||
if (info->range_stop_pres)
|
||||
{ /* write range stop */
|
||||
asn1r_strt_constr (aCtx); /* start context tag 2 cstr */
|
||||
if (info->stop_tag == SD_TRUE)
|
||||
{ /* write the number of entries */
|
||||
asn1r_wr_i32 (aCtx, info->num_of_entries);
|
||||
asn1r_fin_prim (aCtx, 1,CTX);
|
||||
}
|
||||
else
|
||||
{ /* write the ending time */
|
||||
asn1r_wr_btod (aCtx, &info->end_time);
|
||||
asn1r_fin_prim (aCtx, 0,CTX);
|
||||
}
|
||||
asn1r_fin_constr (aCtx, 2,CTX,DEF); /* finish context tag 2 cstr */
|
||||
}
|
||||
|
||||
if (info->range_start_pres)
|
||||
{ /* write range start */
|
||||
asn1r_strt_constr (aCtx); /* start context tag 1 cstr */
|
||||
if (info->start_tag == 1)
|
||||
{ /* write the starting entry */
|
||||
asn1r_wr_octstr (aCtx, info->start_entry, info->start_entry_len);
|
||||
asn1r_fin_prim (aCtx, 1,CTX);
|
||||
}
|
||||
else
|
||||
{ /* write the starting time */
|
||||
asn1r_wr_btod (aCtx, &info->start_time);
|
||||
asn1r_fin_prim (aCtx, 0,CTX);
|
||||
}
|
||||
asn1r_fin_constr (aCtx, 1,CTX,DEF); /* finish context tag 1 cstr */
|
||||
}
|
||||
|
||||
asn1r_strt_constr (aCtx); /* start context tag 0 cstr */
|
||||
_ms_wr_mms_objname (aCtx, &info->jou_name); /* write the journal name */
|
||||
asn1r_fin_constr (aCtx, 0,CTX,DEF); /* finish context tag 0 cstr */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_READ_JOURNAL,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
144
mmslib/mmsle/rq_jstat.c
Normal file
144
mmslib/mmsle/rq_jstat.c
Normal file
@@ -0,0 +1,144 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_jstat.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requestor portion of report journal */
|
||||
/* status. It decodes the report journal status response (confirm) */
|
||||
/* and encodes the report journal status request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 06 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 05 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 04 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 03 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 02 Changes to allow compile under C++ */
|
||||
/* 07/03/97 MDE 01 Op-specific info buffer handling changes */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pjou.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static JSTAT_RESP_INFO *rsp_info;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID jstat_get_deletable (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jstat_get_cur_entries (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_jstat_rsp */
|
||||
/* This function is called from mmsdec when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_jstat_rsp (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("Report Journal Status Response");
|
||||
|
||||
/* get storage for request information */
|
||||
rsp_info = (JSTAT_RESP_INFO *) _m_get_dec_buf (aCtx, sizeof (JSTAT_RESP_INFO));
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 0, jstat_get_cur_entries);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jstat_get_cur_entries */
|
||||
/* report journal status response is being decoded: current entries */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jstat_get_cur_entries (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("Report journal status response");
|
||||
|
||||
if (asn1r_get_u32 (aCtx, &rsp_info->cur_entries))
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, jstat_get_deletable); /* deletable is next */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jstat_get_deletable */
|
||||
/* report journal status response is being decoded: current entries */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jstat_get_deletable (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jstat_get_deletable");
|
||||
|
||||
if (asn1r_get_bool (aCtx, &rsp_info->mms_deletable))
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_jstat */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the report journal status request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_jstat (ST_INT chan, JSTAT_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_STAT_JOURNAL,
|
||||
M_CAST_MK_FUN (_ms_mk_jstat_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_jstat */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the report journal status request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_jstat (JSTAT_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_STAT_JOURNAL,
|
||||
M_CAST_MK_FUN (_ms_mk_jstat_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_jstat_req */
|
||||
/* ENCODE a report journal status REQUEST: */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_jstat_req (ASN1_ENC_CTXT *aCtx, JSTAT_REQ_INFO *info)
|
||||
{
|
||||
_ms_wr_mms_objname (aCtx, &info->jou_name); /* write the journal name */
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_STAT_JOURNAL,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
144
mmslib/mmsle/rq_jwrit.c
Normal file
144
mmslib/mmsle/rq_jwrit.c
Normal file
@@ -0,0 +1,144 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_jwrite.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of write journal. */
|
||||
/* It decodes the write journal response (confirm) & encodes the */
|
||||
/* write journal request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/20/01 JRB 03 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 02 Added SD_CONST modifiers */
|
||||
/* 06/15/98 MDE 01 Changes to allow compile under C++ */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pjou.h"
|
||||
#include "asn1defs.h"
|
||||
#include "mem_chk.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* For debug version, use a static pointer to avoid duplication of */
|
||||
/* __FILE__ strings. */
|
||||
|
||||
#ifdef DEBUG_SISCO
|
||||
SD_CONST static ST_CHAR *SD_CONST thisFileName = __FILE__;
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_jwrite_rsp */
|
||||
/* NOTE : Since the mms_jwrite_rsp is a NULL PDU, the decode is */
|
||||
/* continued by '_mms_null_pdu_dec', which simply sets decode done = 1 */
|
||||
/* and sets the decode done function to point to the general decode done*/
|
||||
/* fun. See mmsdec.c for the general functions. */
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_jwrite */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the write journal request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_jwrite (ST_INT chan, JWRITE_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_WRITE_JOURNAL,
|
||||
M_CAST_MK_FUN (_ms_mk_jwrite_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_jwrite */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the write journal request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_jwrite (JWRITE_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_WRITE_JOURNAL,
|
||||
M_CAST_MK_FUN (_ms_mk_jwrite_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_jwrite_req */
|
||||
/* ENCODE a write journal REQUEST: */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_jwrite_req (ASN1_ENC_CTXT *aCtx, JWRITE_REQ_INFO *info)
|
||||
{
|
||||
ST_INT i;
|
||||
ENTRY_CONTENT **ec_list;
|
||||
ENTRY_CONTENT *ec_ptr;
|
||||
VAR_INFO *vi_ptr;
|
||||
ST_INT ecl_size;
|
||||
|
||||
ecl_size = sizeof (ENTRY_CONTENT *) * info->num_of_jou_entry;
|
||||
ec_list = (ENTRY_CONTENT **) chk_calloc (1, ecl_size);
|
||||
|
||||
/* find first entry content */
|
||||
ec_ptr = (ENTRY_CONTENT *) (info + 1);
|
||||
for (i = 0; i < info->num_of_jou_entry; i++)
|
||||
{ /* find ptrs to entry contents */
|
||||
/* if variable list follows */
|
||||
*(ec_list++) = ec_ptr;
|
||||
if (ec_ptr->entry_form_tag == 2 && ec_ptr->ef.data.list_of_var_pres)
|
||||
{
|
||||
vi_ptr = (VAR_INFO *) (ec_ptr + 1);
|
||||
vi_ptr += ec_ptr->ef.data.num_of_var;
|
||||
ec_ptr = (ENTRY_CONTENT *) vi_ptr;
|
||||
}
|
||||
else
|
||||
ec_ptr++; /* annoatation or no var list */
|
||||
|
||||
}
|
||||
|
||||
asn1r_strt_constr (aCtx); /* start context tag 1 cstr */
|
||||
for (i = 0; i < info->num_of_jou_entry; i++)
|
||||
{
|
||||
ec_ptr = *(--ec_list);
|
||||
asn1r_strt_constr (aCtx); /* start universal seq cstr */
|
||||
_ms_wr_jou_ent_cont (aCtx, ec_ptr); /* write the entry content */
|
||||
asn1r_fin_constr (aCtx, SEQ_CODE,UNI,DEF); /* finish universal seq cstr */
|
||||
}
|
||||
asn1r_fin_constr (aCtx, 1,CTX,DEF); /* finish context tag 1 cstr */
|
||||
chk_free (ec_list);
|
||||
|
||||
asn1r_strt_constr (aCtx); /* start ctx tag 0 constructor */
|
||||
_ms_wr_mms_objname (aCtx, &info->jou_name); /* write the journal name */
|
||||
asn1r_fin_constr (aCtx, 0,CTX,DEF); /* context specific tag 0 */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_WRITE_JOURNAL,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
96
mmslib/mmsle/rq_kill.c
Normal file
96
mmslib/mmsle/rq_kill.c
Normal file
@@ -0,0 +1,96 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_kill.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of the kill */
|
||||
/* operation. It decodes the kill response (confirm) & encodes */
|
||||
/* the kill request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/20/01 JRB 02 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 06/15/98 MDE 01 Changes to allow compile under C++ */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pprg.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_kill_rsp */
|
||||
/* NOTE : Since the mms_kill_rsp is a NULL PDU, the decode is continued */
|
||||
/* by '_mms_null_pdu_dec', which simply sets decode done = 1 and sets */
|
||||
/* the decode done function to point to the general decode done fun */
|
||||
/* See mmsdec.c for the general functions. */
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_kill */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the kill request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_kill (ST_INT chan, KILL_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_KILL,
|
||||
M_CAST_MK_FUN (_ms_mk_kill_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_kill */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the kill request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_kill (KILL_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_KILL,
|
||||
M_CAST_MK_FUN (_ms_mk_kill_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_kill_req */
|
||||
/* Construct a kill request */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_kill_req (ASN1_ENC_CTXT *aCtx, KILL_REQ_INFO *info)
|
||||
{
|
||||
asn1r_wr_vstr (aCtx, info->piname); /* write pgm invocation name */
|
||||
asn1r_fin_prim (aCtx, 0, CTX); /* context tag 0 */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_KILL,CTX,DEF); /* tag = opcode, ctx cstr */
|
||||
}
|
||||
126
mmslib/mmsle/rq_loadd.c
Normal file
126
mmslib/mmsle/rq_loadd.c
Normal file
@@ -0,0 +1,126 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_loaddom.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of load domain */
|
||||
/* content. It decodes the load domain content response (confirm) */
|
||||
/* & encodes the load domain content request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/20/01 JRB 02 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 06/15/98 MDE 01 Changes to allow compile under C++ */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pdom.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/* variables global to the DECODE portion : NONE */
|
||||
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_load_domain_rsp */
|
||||
/* NOTE : Since the mms_load_domain_rsp is a NULL PDU, the decode is */
|
||||
/* continued by '_mms_null_pdu_dec', which simply sets decode done = 1 */
|
||||
/* and sets the decode done function to point to the general decode done*/
|
||||
/* fun. See mmsdec.c for the general functions. */
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_loaddom */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the load domain content request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_loaddom (ST_INT chan, LOADDOM_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_LOAD_DOMAIN,
|
||||
M_CAST_MK_FUN (_ms_mk_loaddom_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_loaddom */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the load domain content request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_loaddom (LOADDOM_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_LOAD_DOMAIN,
|
||||
M_CAST_MK_FUN (_ms_mk_loaddom_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_loaddom_req */
|
||||
/* ENCODE a load domain content REQUEST: */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_loaddom_req (ASN1_ENC_CTXT *aCtx, LOADDOM_REQ_INFO *info)
|
||||
{
|
||||
ST_INT i;
|
||||
ST_CHAR **cap_ptr;
|
||||
FILE_NAME *fname_idx;
|
||||
|
||||
if (info->third_pty_pres)
|
||||
{
|
||||
asn1r_wr_delmnt (aCtx, info->third_pty, info->third_pty_len);
|
||||
*(aCtx->asn1r_field_ptr+1) = (ST_UCHAR) 0xA5;
|
||||
}
|
||||
|
||||
asn1r_strt_constr (aCtx);
|
||||
cap_ptr = (ST_CHAR **) (info + 1);
|
||||
cap_ptr += info->num_of_capab; /* point to first file_name */
|
||||
fname_idx = (FILE_NAME *)cap_ptr;
|
||||
_ms_wr_mms_fname (aCtx, fname_idx, info -> num_of_fname);
|
||||
asn1r_fin_constr (aCtx, 4,CTX,DEF); /* context specific tag 4 */
|
||||
|
||||
asn1r_wr_bool (aCtx, info->sharable); /* write the sharable flag */
|
||||
asn1r_fin_prim (aCtx, 2,CTX); /* context specific tag 2 */
|
||||
|
||||
asn1r_strt_constr (aCtx); /* start ctx tag 1 constructor */
|
||||
cap_ptr--; /* point to last capability */
|
||||
for (i = 0; i < info->num_of_capab; i++)
|
||||
{
|
||||
asn1r_wr_vstr (aCtx, *cap_ptr); /* write the capability */
|
||||
asn1r_fin_prim (aCtx, VISTR_CODE,UNI); /* universal string */
|
||||
cap_ptr--;
|
||||
}
|
||||
asn1r_fin_constr (aCtx, 1,CTX,DEF); /* ctx tag 1 constructor done */
|
||||
|
||||
asn1r_wr_vstr (aCtx, info->dname); /* write the domain name */
|
||||
asn1r_fin_prim (aCtx, 0,CTX); /* context specific tag 0 */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_LOAD_DOMAIN,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
|
||||
115
mmslib/mmsle/rq_obtfi.c
Normal file
115
mmslib/mmsle/rq_obtfi.c
Normal file
@@ -0,0 +1,115 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_obtfile.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of the obtain file. */
|
||||
/* It decodes the obtain file response (confirm) & encodes the */
|
||||
/* obtain file request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/20/01 JRB 02 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 06/15/98 MDE 01 Changes to allow compile under C++ */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pfil.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_obtain_file_rsp */
|
||||
/* NOTE : Since the mms_obtain_file_rsp is a NULL PDU, the decode is */
|
||||
/* continued by '_mms_null_pdu_dec', which simply sets decode done = 1 */
|
||||
/* and sets the decode done function to point to the general decode done*/
|
||||
/* fun. See mmsdec.c for the general functions. */
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_obtfile */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the obtain file request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_obtfile (ST_INT chan, OBTFILE_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_OBTAIN_FILE,
|
||||
M_CAST_MK_FUN (_ms_mk_obtfile_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_obtfile */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the obtain file request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_obtfile (OBTFILE_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_OBTAIN_FILE,
|
||||
M_CAST_MK_FUN (_ms_mk_obtfile_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_obtfile_req */
|
||||
/* construct an obtain file request */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_obtfile_req (ASN1_ENC_CTXT *aCtx, OBTFILE_REQ_INFO *info)
|
||||
{
|
||||
FILE_NAME *fname_idx;
|
||||
|
||||
/* write the destinaion file */
|
||||
asn1r_strt_constr (aCtx);
|
||||
fname_idx = (FILE_NAME *)(info + 1);
|
||||
fname_idx += info->num_of_src_fname;
|
||||
_ms_wr_mms_fname (aCtx, fname_idx, info->num_of_dest_fname);
|
||||
asn1r_fin_constr (aCtx, 2,CTX,DEF); /* context specific tag 2 */
|
||||
|
||||
/* write the source file */
|
||||
asn1r_strt_constr (aCtx);
|
||||
fname_idx = (FILE_NAME *)(info + 1);
|
||||
_ms_wr_mms_fname (aCtx, fname_idx, info->num_of_src_fname);
|
||||
asn1r_fin_constr (aCtx, 1,CTX,DEF); /* context specific tag 1 */
|
||||
|
||||
if (info->ar_title_pres)
|
||||
{
|
||||
asn1r_wr_delmnt (aCtx, info->ar_title, info->ar_len);
|
||||
*(aCtx->asn1r_field_ptr+1) = (ST_UCHAR) 0xA0;
|
||||
}
|
||||
|
||||
/* Obtain file request contents complete, finish the sequence by */
|
||||
/* writing the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_OBTAIN_FILE,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
110
mmslib/mmsle/rq_outpu.c
Normal file
110
mmslib/mmsle/rq_outpu.c
Normal file
@@ -0,0 +1,110 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_output.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of the output */
|
||||
/* operation. It decodes the output response (confirm) & encodes */
|
||||
/* the output request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/20/01 JRB 02 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 06/15/98 MDE 01 Changes to allow compile under C++ */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pocs.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_output_rsp */
|
||||
/* NOTE : Since the mms_output_rsp is a NULL PDU, the decode is */
|
||||
/* continued by '_mms_null_pdu_dec', which simply sets decode done = 1 */
|
||||
/* and sets the decode done function to point to the general decode done*/
|
||||
/* fun. See mmsdec.c for the general functions. */
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_output */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the output request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_output (ST_INT chan, OUTPUT_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_OUTPUT,
|
||||
M_CAST_MK_FUN (_ms_mk_output_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_output */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the output request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_output (OUTPUT_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_OUTPUT,
|
||||
M_CAST_MK_FUN (_ms_mk_output_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_output_req */
|
||||
/* construct an output request */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_output_req (ASN1_ENC_CTXT *aCtx, OUTPUT_REQ_INFO *info)
|
||||
{
|
||||
ST_INT i;
|
||||
ST_CHAR **output_data;
|
||||
|
||||
asn1r_strt_constr (aCtx); /* start sequence constr */
|
||||
output_data = (ST_CHAR **) (info + 1); /* point to first output string */
|
||||
output_data += info->data_count - 1; /* point to last output string */
|
||||
for (i = 0; i < info->data_count; i++)
|
||||
{
|
||||
asn1r_wr_vstr (aCtx, *output_data); /* write the output data */
|
||||
asn1r_fin_prim (aCtx, VISTR_CODE,UNI); /* universal string */
|
||||
output_data--; /* point to previous string */
|
||||
}
|
||||
asn1r_fin_constr (aCtx, 1, CTX, DEF); /* context tag 1 */
|
||||
|
||||
asn1r_wr_vstr (aCtx, info->station_name); /* write the station name */
|
||||
asn1r_fin_prim (aCtx, 0,CTX); /* universal string */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_OUTPUT,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
121
mmslib/mmsle/rq_rddwn.c
Normal file
121
mmslib/mmsle/rq_rddwn.c
Normal file
@@ -0,0 +1,121 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_rddwn.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of request domain */
|
||||
/* download. It decodes the request domain download response */
|
||||
/* (confirm) & encodes the request domain download request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/20/01 JRB 02 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 06/15/98 MDE 01 Changes to allow compile under C++ */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pdom.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_rddwn_rsp */
|
||||
/* NOTE : Since the mms_rddwn_rsp is a NULL PDU, the decode is continued*/
|
||||
/* by '_mms_null_pdu_dec', which simply sets decode done = 1 and sets the*/
|
||||
/* decode done function to point to the general decode done fun. See */
|
||||
/* mmsdec.c for the general functions. */
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_rddwn */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the request domain download request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_rddwn (ST_INT chan, RDDWN_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_REQ_DOM_DOWN,
|
||||
M_CAST_MK_FUN (_ms_mk_rddwn_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_rddwn */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the request domain download request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_rddwn (RDDWN_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_REQ_DOM_DOWN,
|
||||
M_CAST_MK_FUN (_ms_mk_rddwn_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_rddwn_req */
|
||||
/* ENCODE a request domain download REQUEST: */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_rddwn_req (ASN1_ENC_CTXT *aCtx, RDDWN_REQ_INFO *info)
|
||||
{
|
||||
ST_INT i;
|
||||
ST_CHAR **cap_ptr;
|
||||
FILE_NAME *fname_idx;
|
||||
|
||||
asn1r_strt_constr (aCtx);
|
||||
cap_ptr = (ST_CHAR **) (info + 1);
|
||||
cap_ptr += info->num_of_capab; /* point to first file_name */
|
||||
fname_idx = (FILE_NAME *)(cap_ptr);
|
||||
_ms_wr_mms_fname (aCtx, fname_idx, info->num_of_fname);
|
||||
asn1r_fin_constr (aCtx, 4,CTX,DEF); /* context specific tag 4 */
|
||||
|
||||
asn1r_wr_bool (aCtx, info->sharable); /* write 'sharable' element */
|
||||
asn1r_fin_prim (aCtx, 2,CTX);
|
||||
|
||||
/* Write the list of capabilities */
|
||||
|
||||
asn1r_strt_constr (aCtx); /* start ctx tag 1 constructor */
|
||||
cap_ptr--; /* point to last capability */
|
||||
for (i = 0; i < info->num_of_capab; i++)
|
||||
{
|
||||
asn1r_wr_vstr (aCtx, *cap_ptr); /* write the capability */
|
||||
asn1r_fin_prim (aCtx, VISTR_CODE,UNI); /* universal string */
|
||||
cap_ptr--;
|
||||
}
|
||||
asn1r_fin_constr (aCtx, 1,CTX,DEF); /* ctx tag 1 constructor done */
|
||||
|
||||
asn1r_wr_vstr (aCtx, info->dname); /* write the domain name */
|
||||
asn1r_fin_prim (aCtx, 0,CTX); /* context specific tag 0 */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_REQ_DOM_DOWN,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
|
||||
100
mmslib/mmsle/rq_rdupl.c
Normal file
100
mmslib/mmsle/rq_rdupl.c
Normal file
@@ -0,0 +1,100 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_rdupl.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of request domain */
|
||||
/* upload. It decodes the request domain upload response */
|
||||
/* (confirm) & encodes the request domain upload request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/20/01 JRB 02 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 06/15/98 MDE 01 Changes to allow compile under C++ */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pdom.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_rdupl_rsp */
|
||||
/* NOTE : Since the mms_rdupl_rsp is a NULL PDU, the decode is continued*/
|
||||
/* by '_mms_null_pdu_dec', which simply sets decode done = 1 and sets the*/
|
||||
/* decode done function to point to the general decode done fun. See */
|
||||
/* mmsdec.c for the general functions. */
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_rdupl */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the request domain upload request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_rdupl (ST_INT chan, RDUPL_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_REQ_DOM_UPL,
|
||||
M_CAST_MK_FUN (_ms_mk_rdupl_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_rdupl */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the request domain upload request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_rdupl (RDUPL_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_REQ_DOM_UPL,
|
||||
M_CAST_MK_FUN (_ms_mk_rdupl_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_rdupl_req */
|
||||
/* ENCODE a request domain upload REQUEST: */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_rdupl_req (ASN1_ENC_CTXT *aCtx, RDUPL_REQ_INFO *info)
|
||||
{
|
||||
asn1r_strt_constr (aCtx);
|
||||
_ms_wr_mms_fname (aCtx, (FILE_NAME *)(info + 1),
|
||||
info->num_of_fname);
|
||||
asn1r_fin_constr (aCtx, 1,CTX,DEF); /* context specific tag 1 */
|
||||
|
||||
asn1r_wr_vstr (aCtx, info->dname); /* write the domain name */
|
||||
asn1r_fin_prim (aCtx, 0,CTX); /* context specific tag 0 */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_REQ_DOM_UPL,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
|
||||
108
mmslib/mmsle/rq_relct.c
Normal file
108
mmslib/mmsle/rq_relct.c
Normal file
@@ -0,0 +1,108 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_relctrl.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of relinquish */
|
||||
/* semaphore control. It decodes the relinquish control response */
|
||||
/* (confirm) & encodes the relinguish control request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/20/01 JRB 02 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 06/15/98 MDE 01 Changes to allow compile under C++ */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_psem.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_relctrl_rsp */
|
||||
/* NOTE : Since the mms_relctrl_rsp is a NULL PDU, the decode is */
|
||||
/* continued by '_mms_null_pdu_dec', which simply sets decode done = 1 */
|
||||
/* and sets the decode done function to point to the general decode done*/
|
||||
/* fun. See mmsdec.c for the general functions. */
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_relctrl */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the relinquish control request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_relctrl (ST_INT chan, RELCTRL_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_REL_CONTROL,
|
||||
M_CAST_MK_FUN (_ms_mk_relctrl_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_relctrl */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the relinquish control request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_relctrl (RELCTRL_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_REL_CONTROL,
|
||||
M_CAST_MK_FUN (_ms_mk_relctrl_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_relctrl_req */
|
||||
/* construct a relinquish control request */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_relctrl_req (ASN1_ENC_CTXT *aCtx, RELCTRL_REQ_INFO *info)
|
||||
{
|
||||
|
||||
asn1r_strt_constr (aCtx); /* start sequence constr */
|
||||
|
||||
if (info->named_token_pres)
|
||||
{
|
||||
asn1r_wr_vstr (aCtx, info->named_token); /* write the named token */
|
||||
asn1r_fin_prim (aCtx, 1, CTX); /* context tag 1 */
|
||||
}
|
||||
|
||||
asn1r_strt_constr (aCtx); /* object name constructor */
|
||||
|
||||
_ms_wr_mms_objname (aCtx, &info->sem_name); /* write the object name */
|
||||
|
||||
asn1r_fin_constr (aCtx, 0,CTX,DEF); /* context tag 0 */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_REL_CONTROL,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
120
mmslib/mmsle/rq_renam.c
Normal file
120
mmslib/mmsle/rq_renam.c
Normal file
@@ -0,0 +1,120 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_rename.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of the rename */
|
||||
/* service. It decodes the rename response (indication) and */
|
||||
/* encodes the rename request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/20/01 JRB 02 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 06/15/98 MDE 01 Changes to allow compile under C++ */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pvmd.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_rename_rsp */
|
||||
/* NOTE : Since the mms_rename_rsp is a NULL PDU, the decode is */
|
||||
/* continued by '_mms_null_pdu_dec', which simply sets decode done = 1 */
|
||||
/* and sets the decode done function to point to the general decode done*/
|
||||
/* fun. See mmsdec.c for the general functions. */
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_rename */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send a rename REQUEST: */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_rename (ST_INT chan, RENAME_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_RENAME,
|
||||
M_CAST_MK_FUN (_ms_mk_rename_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_rename */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE a rename REQUEST: */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_rename (RENAME_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_RENAME,
|
||||
M_CAST_MK_FUN (_ms_mk_rename_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_rename_req */
|
||||
/* ENCODE a rename REQUEST: */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_rename_req (ASN1_ENC_CTXT *aCtx, RENAME_REQ_INFO *info_ptr)
|
||||
{
|
||||
asn1r_wr_vstr (aCtx, info_ptr->new_ident); /* write the new identifier */
|
||||
asn1r_fin_prim (aCtx, 2,CTX); /* context specific tag 2 */
|
||||
|
||||
asn1r_strt_constr (aCtx); /* start ctx tag 1 constructor */
|
||||
_ms_wr_mms_objname (aCtx, &info_ptr->cur_name); /* write the current name */
|
||||
asn1r_fin_constr (aCtx, 1,CTX,DEF); /* context specific tag 1 */
|
||||
|
||||
asn1r_strt_constr (aCtx); /* start extendedObjectClass */
|
||||
#ifdef CS_SUPPORT
|
||||
if (info_ptr->cs_objclass_pres) /* if companion standard */
|
||||
{
|
||||
asn1r_strt_constr (aCtx); /* start cs ObjectClass cstr */
|
||||
asn1r_wr_octstr (aCtx, info_ptr->obj.cs.cs_class,info_ptr->obj.cs.len);
|
||||
asn1r_fin_constr (aCtx, 1,CTX,DEF);
|
||||
}
|
||||
else
|
||||
{
|
||||
asn1r_wr_i16 (aCtx, info_ptr->obj.mms_class); /* write the object scope */
|
||||
asn1r_fin_prim (aCtx, 0,CTX);
|
||||
}
|
||||
#else
|
||||
asn1r_wr_i16 (aCtx, info_ptr->obj.mms_class); /* write the object scope */
|
||||
asn1r_fin_prim (aCtx, 0,CTX);
|
||||
#endif
|
||||
asn1r_fin_constr (aCtx, 0,CTX,DEF); /* finish the extendedObjClass */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_RENAME,CTX,DEF); /* complete rename req */
|
||||
}
|
||||
96
mmslib/mmsle/rq_reset.c
Normal file
96
mmslib/mmsle/rq_reset.c
Normal file
@@ -0,0 +1,96 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_reset.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of the reset */
|
||||
/* operation. It decodes the reset response (confirm) & encodes */
|
||||
/* the reset request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/20/01 JRB 02 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 06/15/98 MDE 01 Changes to allow compile under C++ */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pprg.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_reset_rsp */
|
||||
/* NOTE: Since the mms_reset_ rsp is a NULL PDU, the decode is continued*/
|
||||
/* by '_mms_null_pdu_dec', which simply sets decode done = 1 and sets */
|
||||
/* the decode done function to point to the general decode done fun */
|
||||
/* See mmsdec.c for the general functions. */
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_reset */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the reset request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_reset (ST_INT chan, RESET_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_RESET,
|
||||
M_CAST_MK_FUN (_ms_mk_reset_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_reset */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the reset request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_reset (RESET_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_RESET,
|
||||
M_CAST_MK_FUN (_ms_mk_reset_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_reset_req */
|
||||
/* construct a reset request */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_reset_req (ASN1_ENC_CTXT *aCtx, RESET_REQ_INFO *info)
|
||||
{
|
||||
asn1r_wr_vstr (aCtx, info->piname); /* write pgm invocation name */
|
||||
asn1r_fin_prim (aCtx, 0, CTX); /* context tag 0 */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_RESET,CTX,DEF); /* tag = opcode, ctx cstr */
|
||||
}
|
||||
107
mmslib/mmsle/rq_resum.c
Normal file
107
mmslib/mmsle/rq_resum.c
Normal file
@@ -0,0 +1,107 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_resume.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of the resume */
|
||||
/* operation. It decodes the resume response (confirm) & encodes */
|
||||
/* the resume request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/20/01 JRB 02 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 06/15/98 MDE 01 Changes to allow compile under C++ */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pprg.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_resume_rsp */
|
||||
/* NOTE: Since the mms_resume_rsp is a NULL PDU, the decode is continued*/
|
||||
/* by '_mms_null_pdu_dec', which simply sets decode done = 1 and sets */
|
||||
/* the decode done function to point to the general decode done fun */
|
||||
/* See mmsdec.c for the general functions. */
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_resume */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the resume request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_resume (ST_INT chan, RESUME_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_RESUME,
|
||||
M_CAST_MK_FUN (_ms_mk_resume_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_resume */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the resume request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_resume (RESUME_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_RESUME,
|
||||
M_CAST_MK_FUN (_ms_mk_resume_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_resume_req */
|
||||
/* construct a resume request */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_resume_req (ASN1_ENC_CTXT *aCtx, RESUME_REQ_INFO *info)
|
||||
{
|
||||
if (info->resume_arg_pres)
|
||||
{
|
||||
if (info->resume_arg_type == ARG_TYPE_SIMPLE)
|
||||
{
|
||||
asn1r_wr_vstr (aCtx, (ST_CHAR *)info->resume_arg); /* write the resume argument */
|
||||
asn1r_fin_prim (aCtx, 1, CTX); /* context tag 1 */
|
||||
}
|
||||
else /* ENCODED data, write as complete ASN.1 EXTERNAL */
|
||||
asn1r_wr_delmnt (aCtx, info->resume_arg,info->resume_arg_len);
|
||||
}
|
||||
|
||||
asn1r_wr_vstr (aCtx, info->piname); /* write pgm invocation name */
|
||||
asn1r_fin_prim (aCtx, 0, CTX); /* context tag 0 */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_RESUME,CTX,DEF); /* tag = opcode, ctx cstr */
|
||||
}
|
||||
457
mmslib/mmsle/rq_rsent.c
Normal file
457
mmslib/mmsle/rq_rsent.c
Normal file
@@ -0,0 +1,457 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_rsentry.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of report semaphore */
|
||||
/* entry status. It decodes the report semaphore entry status */
|
||||
/* response (confirm) & encodes the report semaphore entry status */
|
||||
/* request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 06 Remove "thisFileName" */
|
||||
/* 08/28/03 EJV 05 Corr spelling for 'receive'. */
|
||||
/* 12/20/01 JRB 04 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 03 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 02 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 01 Changes to allow compile under C++ */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_psem.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static RSENTRY_RESP_INFO *rsp_info;
|
||||
|
||||
static SEMAPHORE_ENTRY *sent_ptr;
|
||||
static ST_INT max_sem_entries;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID rsentry_get_entry_class (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID rsentry_app_ref_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID rsentry_get_priority (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID rsentry_get_rem_timeout (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID rsentry_get_abrt_timeout (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID rsentry_get_rel_conn_lost (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID rsentry_entry_seq_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID rsentry_get_named_token (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID rsentry_entry_seq_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID app_ref_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID app_ref_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID rsentry_entry_id_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID rsentry_get_entry_id (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID rsentry_entry_id_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID rsentry_sem_entry_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID rsentry_sem_entry_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID rsentry_get_more_follows (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_rsentry_rsp */
|
||||
/* This function is called from mmsdec when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_rsentry_rsp (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT rsp_size;
|
||||
|
||||
MLOG_CDEC0 ("Report Semaphore Entry Status Response");
|
||||
|
||||
#if defined(FIXED_DECBUF)
|
||||
max_sem_entries = m_cl_max_semaphore_entries;
|
||||
rsp_size = mmsl_dec_info_size;
|
||||
#else
|
||||
max_sem_entries = _mmsdec_msglen / 6; /* find maximum size of response info */
|
||||
if (m_cl_max_semaphore_entries && (max_sem_entries > m_cl_max_semaphore_entries))
|
||||
max_sem_entries = m_cl_max_semaphore_entries;
|
||||
rsp_size = sizeof (RSENTRY_RESP_INFO)
|
||||
+ (sizeof (SEMAPHORE_ENTRY) * max_sem_entries);
|
||||
#endif
|
||||
|
||||
/* get storage for request information */
|
||||
rsp_info = (RSENTRY_RESP_INFO *) _m_get_dec_buf (aCtx, rsp_size);
|
||||
sent_ptr = (SEMAPHORE_ENTRY *) (rsp_info + 1);
|
||||
|
||||
rsp_info->more_follows = SD_TRUE;/* set default value for more follows */
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 0, rsentry_sem_entry_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* rsentry_sem_entry_cstr */
|
||||
/* Decoding report semaphore entry status request: semaphore entry list */
|
||||
/* constructor was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID rsentry_sem_entry_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("rsentry_sem_entry_cstr");
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, UNI | CONSTR, SEQ_CODE, rsentry_entry_seq_cstr);
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = rsentry_sem_entry_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* rsentry_entry_seq_cstr */
|
||||
/* Decoding report semaphore entry status request: semaphore entry */
|
||||
/* sequence constructor was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID rsentry_entry_seq_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("rsentry_entry_seq_cstr");
|
||||
|
||||
rsp_info->num_of_sent++; /* increment number of entries */
|
||||
if (rsp_info->num_of_sent > max_sem_entries)
|
||||
{ /* too many semaphore entries */
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
sent_ptr->priority = MMS_NORM_PRIORITY; /* set defaults */
|
||||
sent_ptr->rel_conn_lost = SD_TRUE;
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 0, rsentry_get_entry_id);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 0, rsentry_entry_id_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* rsentry_get_entry_id */
|
||||
/* Decoding report semaphore entry status request: entry id primitive */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID rsentry_get_entry_id (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("txdwn_get_entry_id");
|
||||
|
||||
/* decode entry id onto itself, shifted by one character */
|
||||
sent_ptr->entry_id = aCtx->asn1r_field_ptr - 1;
|
||||
|
||||
/* read entry id from message */
|
||||
if (asn1r_get_octstr (aCtx, sent_ptr->entry_id))
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
|
||||
sent_ptr->ei_len = aCtx->asn1r_octetcount; /* save the entry id length */
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, rsentry_get_entry_class);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* rsentry_entry_id_cstr */
|
||||
/* Decoding report semaphore entry status request: entry id constructor */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID rsentry_entry_id_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("rsentry_entry_id_cstr");
|
||||
|
||||
/* decode entry id onto itself, shifted by one character */
|
||||
sent_ptr->entry_id = aCtx->asn1r_field_ptr - 1;
|
||||
|
||||
/* set up where to go when done decoding cstr */
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = rsentry_entry_id_cstr_done;
|
||||
|
||||
/* read entry id from the received message */
|
||||
asn1r_get_octstr_cstr (aCtx, _mmsdec_msglen, sent_ptr->entry_id);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* rsentry_entry_id_cstr_done */
|
||||
/* Decoding report semaphore entry status request: entry id constructor */
|
||||
/* done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID rsentry_entry_id_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
sent_ptr->ei_len = aCtx->asn1r_octetcount; /* save the entry id length */
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, rsentry_get_entry_class);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* rsentry_get_entry_class */
|
||||
/* Decoding report semaphore entry status request: entry class */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID rsentry_get_entry_class (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("rsentry_get_entry_class");
|
||||
|
||||
if (asn1r_get_i8 (aCtx, &sent_ptr->entry_class))
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 2, rsentry_app_ref_cstr);
|
||||
}
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* rsentry_app_ref_cstr */
|
||||
/* Decoding report semaphore entry status request: application */
|
||||
/* reference constructor was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID rsentry_app_ref_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("rsentry_app_ref_cstr");
|
||||
|
||||
_ms_get_mms_app_ref (aCtx, &sent_ptr->app_ref,&sent_ptr->app_ref_len,
|
||||
app_ref_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* app_ref_done */
|
||||
/* Decoding report semaphore entry status request: application */
|
||||
/* reference constructor has ben read, OK for CTX 2 to be done. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID app_ref_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = app_ref_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* app_ref_cstr_done */
|
||||
/* Decoding report semaphore entry status request: application */
|
||||
/* reference constructor done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID app_ref_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 3, rsentry_get_named_token );
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 4, rsentry_get_priority);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 5, rsentry_get_rem_timeout);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 6, rsentry_get_abrt_timeout);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 7, rsentry_get_rel_conn_lost);
|
||||
|
||||
/* Was last mandatory SemaphoreEntry Parameter, OK for it to be done */
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = rsentry_entry_seq_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* rsentry_get_named_token */
|
||||
/* Decoding report semaphore entry status request: named token */
|
||||
/* primitve was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID rsentry_get_named_token (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("rsentry_get_named_token");
|
||||
|
||||
if (aCtx->asn1r_elmnt_len > MAX_IDENT_LEN)
|
||||
{ /* named token is too ST_INT32 */
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
/* read named token from the received message */
|
||||
sent_ptr->named_token_pres = SD_TRUE;
|
||||
if (asn1r_get_vstr (aCtx, sent_ptr->named_token))
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 4, rsentry_get_priority);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 5, rsentry_get_rem_timeout);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 6, rsentry_get_abrt_timeout);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 7, rsentry_get_rel_conn_lost);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* rsentry_get_priority */
|
||||
/* Decoding report semaphore entry status request: priority primitive */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID rsentry_get_priority (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("rsentry_get_priority");
|
||||
|
||||
/* read priority from the received message */
|
||||
if (asn1r_get_u8 (aCtx, &(sent_ptr->priority)))
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 5, rsentry_get_rem_timeout);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 6, rsentry_get_abrt_timeout);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 7, rsentry_get_rel_conn_lost);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* rsentry_get_rem_timeout */
|
||||
/* Decoding report semaphore entry status request: remaining timeout */
|
||||
/* primitve was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID rsentry_get_rem_timeout (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("rsentry_get_rem_timeout");
|
||||
/* read remaining timeout from received message */
|
||||
sent_ptr->rem_timeout_pres = SD_TRUE;
|
||||
if (asn1r_get_u32 (aCtx, &(sent_ptr->rem_timeout)))
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 6, rsentry_get_abrt_timeout);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 7, rsentry_get_rel_conn_lost);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* rsentry_get_abrt_timeout */
|
||||
/* Decoding report semaphore entry status request: relinquish if */
|
||||
/* connection lost primitve was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID rsentry_get_abrt_timeout (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("rsentry_get_abrt_timeout");
|
||||
/* read abort on timeout */
|
||||
sent_ptr->abrt_on_timeout_pres = SD_TRUE;
|
||||
if (asn1r_get_bool (aCtx, &sent_ptr->abrt_on_timeout))
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 7, rsentry_get_rel_conn_lost);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* rsentry_get_rel_conn_lost */
|
||||
/* Decoding report semaphore entry status request: relinquish if */
|
||||
/* connection lost primitve was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID rsentry_get_rel_conn_lost (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("rsentry_get_rel_conn_lost");
|
||||
/* read relinquish if conn lost from message */
|
||||
if (asn1r_get_bool (aCtx, &(sent_ptr->rel_conn_lost)))
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* rsentry_entry_seq_cstr_done */
|
||||
/* Decoding report semaphore entry status request: semaphore entry */
|
||||
/* sequence constructor done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID rsentry_entry_seq_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
sent_ptr++; /* point to where next will go */
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, UNI | CONSTR, SEQ_CODE, rsentry_entry_seq_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* rsentry_sem_entry_cstr_done */
|
||||
/* Decoding report semaphore entry status request: semaphore entry */
|
||||
/* constructor done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID rsentry_sem_entry_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, rsentry_get_more_follows);
|
||||
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* rsentry_get_more_follows */
|
||||
/* Decoding report semaphore entry status request: more follows */
|
||||
/* indicator was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID rsentry_get_more_follows (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("rsentry_get_more_follows");
|
||||
/* read more follows indicator from message */
|
||||
if (asn1r_get_bool (aCtx, &(rsp_info->more_follows)))
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_rsentry */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the report semaphore entry status request.*/
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_rsentry (ST_INT chan, RSENTRY_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_REP_SEMENTRY,
|
||||
M_CAST_MK_FUN (_ms_mk_rsentry_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_rsentry */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the report semaphore entry status request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_rsentry (RSENTRY_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_REP_SEMENTRY,
|
||||
M_CAST_MK_FUN (_ms_mk_rsentry_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_rsentry_req */
|
||||
/* construct a report semaphore entry status request */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_rsentry_req (ASN1_ENC_CTXT *aCtx, RSENTRY_REQ_INFO *info)
|
||||
{
|
||||
|
||||
asn1r_strt_constr (aCtx); /* start sequence constructor */
|
||||
|
||||
if (info->start_after_pres)
|
||||
{ /* write app to start after */
|
||||
asn1r_wr_octstr (aCtx, info->start_after, info->sa_len);
|
||||
asn1r_fin_prim (aCtx, 2, CTX); /* context tag 2 */
|
||||
}
|
||||
|
||||
asn1r_wr_i16 (aCtx, info->state); /* write the semaphore state */
|
||||
asn1r_fin_prim (aCtx, 1, CTX); /* context tag 1 */
|
||||
|
||||
asn1r_strt_constr (aCtx); /* start object name constr */
|
||||
|
||||
_ms_wr_mms_objname (aCtx, &info->sem_name); /* write the object name */
|
||||
|
||||
asn1r_fin_constr (aCtx, 0,CTX,DEF); /* context tag 0 */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_REP_SEMENTRY,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
221
mmslib/mmsle/rq_rspoo.c
Normal file
221
mmslib/mmsle/rq_rspoo.c
Normal file
@@ -0,0 +1,221 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_rspool.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of report pool */
|
||||
/* semaphore status. It decodes the report pool semaphore status */
|
||||
/* response (confirm) & encodes the report pool semahpore status */
|
||||
/* request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 06 Remove "thisFileName" */
|
||||
/* 08/28/03 EJV 05 Corr spelling for 'receive'. */
|
||||
/* 12/20/01 JRB 04 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 03 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 02 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 01 Changes to allow compile under C++ */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_psem.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static RSPOOL_RESP_INFO *rsp_info;
|
||||
|
||||
|
||||
static TOKEN_ID *token_ptr;
|
||||
static ST_INT max_named_tokens;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID rspool_get_named_token (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID rspool_named_token_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID rspool_named_token_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID rspool_get_more_follows (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_rspool_rsp */
|
||||
/* This function is called from mmsdec when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_rspool_rsp (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT rsp_size;
|
||||
|
||||
MLOG_CDEC0 ("Report Pool Semaphore Status Response");
|
||||
|
||||
#if defined(FIXED_DECBUF)
|
||||
max_named_tokens = m_cl_max_named_tokens;
|
||||
rsp_size = mmsl_dec_info_size;
|
||||
#else
|
||||
max_named_tokens = _mmsdec_msglen / 2; /* find maximum size */
|
||||
if (m_cl_max_named_tokens && (max_named_tokens > m_cl_max_named_tokens))
|
||||
max_named_tokens = m_cl_max_named_tokens;
|
||||
rsp_size = sizeof (RSPOOL_RESP_INFO)
|
||||
+ (sizeof (TOKEN_ID) * max_named_tokens);
|
||||
#endif
|
||||
|
||||
/* get storage for request information */
|
||||
rsp_info = (RSPOOL_RESP_INFO *) _m_get_dec_buf (aCtx, rsp_size);
|
||||
token_ptr = (TOKEN_ID *) (rsp_info + 1);
|
||||
|
||||
rsp_info->num_of_tokens = 0; /* initialize number of named tokens */
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 0, rspool_named_token_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* rspool_named_token_cstr */
|
||||
/* Decoding report pool semaphore status request: named token list */
|
||||
/* constructor was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID rspool_named_token_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("rspool_named_token_cstr");
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 0, rspool_get_named_token);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, rspool_get_named_token);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 2, rspool_get_named_token);
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = rspool_named_token_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* rspool_get_named_token */
|
||||
/* Decoding report pool semaphore status request: named token was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID rspool_get_named_token (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("rspool_get_named_token");
|
||||
|
||||
rsp_info->num_of_tokens++;
|
||||
if (rsp_info->num_of_tokens > max_named_tokens)
|
||||
{ /* too many named tokens */
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
token_ptr->token_tag = aCtx->asn1r_elmnt_id;
|
||||
|
||||
#if defined(USE_COMPACT_MMS_STRUCTS)
|
||||
token_ptr->named_token = (ST_CHAR *) (aCtx->asn1r_field_ptr - 1);
|
||||
#endif
|
||||
|
||||
/* read free token from the received message */
|
||||
if (asn1r_get_identifier (aCtx, token_ptr->named_token))
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
|
||||
token_ptr++; /* point to where next named token will go */
|
||||
asn1r_tag_restore (aCtx);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* rspool_named_token_cstr_done */
|
||||
/* Decoding report pool semaphore status request: named token constr */
|
||||
/* done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID rspool_named_token_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, rspool_get_more_follows);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* rspool_get_more_follows */
|
||||
/* Decoding report pool semaphore status request: more follows indicator*/
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID rspool_get_more_follows (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("rspool_get_more_follows");
|
||||
/* read more follows indicator from message */
|
||||
if (asn1r_get_bool (aCtx, &(rsp_info->more_follows)))
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_rspool */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the report pool semaphore status request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_rspool (ST_INT chan, RSPOOL_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_REP_SEMPOOL,
|
||||
M_CAST_MK_FUN (_ms_mk_rspool_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_rspool */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the report pool semaphore status request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_rspool (RSPOOL_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_REP_SEMPOOL,
|
||||
M_CAST_MK_FUN (_ms_mk_rspool_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_rspool_req */
|
||||
/* construct a report pool semaphore status request */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_rspool_req (ASN1_ENC_CTXT *aCtx, RSPOOL_REQ_INFO *info)
|
||||
{
|
||||
|
||||
if (info->start_after_pres)
|
||||
{
|
||||
asn1r_wr_vstr (aCtx, info->start_after); /* write app to start after */
|
||||
asn1r_fin_prim (aCtx, 1, CTX); /* context tag 1 */
|
||||
}
|
||||
|
||||
asn1r_strt_constr (aCtx); /* start object name constr */
|
||||
|
||||
_ms_wr_mms_objname (aCtx, &info->sem_name); /* write the object name */
|
||||
|
||||
asn1r_fin_constr (aCtx, 0,CTX,DEF); /* context tag 0 */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_REP_SEMPOOL,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
198
mmslib/mmsle/rq_rssta.c
Normal file
198
mmslib/mmsle/rq_rssta.c
Normal file
@@ -0,0 +1,198 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_rsstat.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of report semaphore */
|
||||
/* status. It decodes the report semaphore status response */
|
||||
/* (confirm) and encodes the report semaphore status request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 07 Remove "thisFileName" */
|
||||
/* 09/30/03 EJV 06 Corr spelling for 'receive' */
|
||||
/* 12/20/01 JRB 05 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 04 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 03 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 02 Changes to allow compile under C++ */
|
||||
/* 07/03/97 MDE 01 Op-specific info buffer handling changes */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_psem.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
|
||||
static RSSTAT_RESP_INFO *rsp_info;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID rsstat_get_num_of_owned (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID rsstat_get_num_of_tokens (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID rsstat_get_class (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID rsstat_get_mms_deletable (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID rsstat_get_num_of_hung (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_rsstat_rsp */
|
||||
/* This function is called from mmsdec when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_rsstat_rsp (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("Report Semaphore Status Response");
|
||||
|
||||
/* get storage for request information */
|
||||
rsp_info = (RSSTAT_RESP_INFO *) _m_get_dec_buf (aCtx, sizeof (RSSTAT_RESP_INFO));
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 0, rsstat_get_mms_deletable);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* rsstat_get_mms_deletable */
|
||||
/* Decoding report semaphore status request: mms deletable name was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID rsstat_get_mms_deletable (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("rsstat_get_mms_deletable");
|
||||
/* read mms deletable from received message */
|
||||
if (asn1r_get_bool (aCtx, &(rsp_info->mms_deletable)))
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, rsstat_get_class);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* rsstat_get_class */
|
||||
/* Decoding report semaphore status request: class was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID rsstat_get_class (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("rsstat_get_class");
|
||||
/* read the class from the received message */
|
||||
if (asn1r_get_i16 (aCtx, &(rsp_info->tclass)))
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
|
||||
if ((rsp_info->tclass < 0) || (rsp_info->tclass > 1))
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 2, rsstat_get_num_of_tokens);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* rsstat_get_num_of_tokens */
|
||||
/* Decoding report semaphore status request: number of tokens was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID rsstat_get_num_of_tokens (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("rsstat_get_num_of_tokens");
|
||||
/* read number of tokens from received message */
|
||||
if (asn1r_get_u16 (aCtx, &(rsp_info->num_of_tokens)))
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 3, rsstat_get_num_of_owned);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* rsstat_get_num_of_owned */
|
||||
/* Decoding report semaphore status request: number of owned tokens was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID rsstat_get_num_of_owned (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("rsstat_get_num_of_owned");
|
||||
/* read number of owned tokens from message */
|
||||
if (asn1r_get_u16 (aCtx, &(rsp_info->num_of_owned)))
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 4, rsstat_get_num_of_hung);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* rsstat_get_num_of_hung */
|
||||
/* Decoding report semaphore status request: number of hung tokens was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID rsstat_get_num_of_hung (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("rsstat_get_num_of_hung");
|
||||
/* read number of hung tokens from message */
|
||||
if (asn1r_get_u16 (aCtx, &(rsp_info->num_of_hung)))
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_rsstat */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the report semaphore status request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_rsstat (ST_INT chan, RSSTAT_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_REP_SEMSTAT,
|
||||
M_CAST_MK_FUN (_ms_mk_rsstat_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_rsstat */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the report semaphore status request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_rsstat (RSSTAT_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_REP_SEMSTAT,
|
||||
M_CAST_MK_FUN (_ms_mk_rsstat_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_rsstat_req */
|
||||
/* construct a report semaphore status request */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_rsstat_req (ASN1_ENC_CTXT *aCtx, RSSTAT_REQ_INFO *info)
|
||||
{
|
||||
|
||||
_ms_wr_mms_objname (aCtx, &info->sem_name); /* write the object name */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_REP_SEMSTAT,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
108
mmslib/mmsle/rq_start.c
Normal file
108
mmslib/mmsle/rq_start.c
Normal file
@@ -0,0 +1,108 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_start.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of the start */
|
||||
/* operation. It decodes the start response (confirm) & encodes */
|
||||
/* the start request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/20/01 JRB 02 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 06/15/98 MDE 01 Changes to allow compile under C++ */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pprg.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_start_resp */
|
||||
/* NOTE : Since the start resp is a NULL PDU, the decode is continued */
|
||||
/* by '_mms_null_pdu_dec', which simply sets decode done = 1 and sets */
|
||||
/* the decode done function to point to the general decode done fun */
|
||||
/* See mmsdec.c for the general functions. */
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_start */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the start request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_start (ST_INT chan, START_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_START,
|
||||
M_CAST_MK_FUN (_ms_mk_start_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_start */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the start request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_start (START_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_START,
|
||||
M_CAST_MK_FUN (_ms_mk_start_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_start_req */
|
||||
/* construct a start request */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_start_req (ASN1_ENC_CTXT *aCtx, START_REQ_INFO *info)
|
||||
{
|
||||
|
||||
if (info->start_arg_pres)
|
||||
{
|
||||
if (info->start_arg_type == ARG_TYPE_SIMPLE)
|
||||
{
|
||||
asn1r_wr_vstr (aCtx, (ST_CHAR *)info->start_arg); /* write the start argument */
|
||||
asn1r_fin_prim (aCtx, 1, CTX); /* context tag 1 */
|
||||
}
|
||||
else /* ENCODED data, write as complete ASN.1 EXTERNAL */
|
||||
asn1r_wr_delmnt (aCtx, info->start_arg,info->start_arg_len);
|
||||
}
|
||||
|
||||
asn1r_wr_vstr (aCtx, info->piname); /* write pgm invocation name */
|
||||
asn1r_fin_prim (aCtx, 0, CTX); /* context tag 0 */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_START,CTX,DEF); /* tag = opcode, ctx cstr */
|
||||
}
|
||||
96
mmslib/mmsle/rq_stop.c
Normal file
96
mmslib/mmsle/rq_stop.c
Normal file
@@ -0,0 +1,96 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_stop.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of the stop */
|
||||
/* operation. It decodes the stop response (confirm) & encodes */
|
||||
/* the stop request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/20/01 JRB 02 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 06/15/98 MDE 01 Changes to allow compile under C++ */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pprg.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_stop_rsp */
|
||||
/* NOTE : Since the mms_stop_rsp is a NULL PDU, the decode is continued */
|
||||
/* by '_mms_null_pdu_dec', which simply sets decode done = 1 and sets */
|
||||
/* the decode done function to point to the general decode done fun */
|
||||
/* See mmsdec.c for the general functions. */
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_stop */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the stop request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_stop (ST_INT chan, STOP_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_STOP,
|
||||
M_CAST_MK_FUN (_ms_mk_stop_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_stop */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the stop request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_stop (STOP_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_STOP,
|
||||
M_CAST_MK_FUN (_ms_mk_stop_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_stop_req */
|
||||
/* construct a stop request */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_stop_req (ASN1_ENC_CTXT *aCtx, STOP_REQ_INFO *info)
|
||||
{
|
||||
asn1r_wr_vstr (aCtx, info->piname); /* write pgm invocation name */
|
||||
asn1r_fin_prim (aCtx, 0, CTX); /* context tag 0 */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_STOP,CTX,DEF); /* tag = opcode, ctx cstr */
|
||||
}
|
||||
108
mmslib/mmsle/rq_store.c
Normal file
108
mmslib/mmsle/rq_store.c
Normal file
@@ -0,0 +1,108 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_storedom.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of store domain */
|
||||
/* content. It decodes the store domain content response (confirm) */
|
||||
/* & encodes the store domain content request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/20/01 JRB 02 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 06/15/98 MDE 01 Changes to allow compile under C++ */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pdom.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : NONE */
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_store_domain_rsp */
|
||||
/* NOTE : Since the mms_store_domain_rsp is a NULL PDU, the decode is */
|
||||
/* continued by '_mms_null_pdu_dec', which simply sets decode done = 1 */
|
||||
/* and sets the decode done function to point to the general decode done*/
|
||||
/* fun. See mmsdec.c for the general functions. */
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_storedom */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the store domain content request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_storedom (ST_INT chan, STOREDOM_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_STORE_DOMAIN,
|
||||
M_CAST_MK_FUN (_ms_mk_storedom_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_storedom */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the store domain content request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_storedom (STOREDOM_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_STORE_DOMAIN,
|
||||
M_CAST_MK_FUN (_ms_mk_storedom_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_storedom_req */
|
||||
/* ENCODE a store domain content REQUEST: */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_storedom_req (ASN1_ENC_CTXT *aCtx, STOREDOM_REQ_INFO *info)
|
||||
{
|
||||
asn1r_strt_constr (aCtx); /* start sequence constructor */
|
||||
|
||||
if (info->third_pty_pres)
|
||||
{
|
||||
asn1r_wr_delmnt (aCtx, info->third_pty, info->third_pty_len);
|
||||
*(aCtx->asn1r_field_ptr+1) = (ST_UCHAR) 0xA2;
|
||||
}
|
||||
|
||||
asn1r_strt_constr (aCtx);
|
||||
_ms_wr_mms_fname (aCtx, (FILE_NAME *)(info + 1),
|
||||
info -> num_of_fname);
|
||||
asn1r_fin_constr (aCtx, 1,CTX,DEF); /* context specific tag 1 */
|
||||
|
||||
asn1r_wr_vstr (aCtx, info->dname); /* write the domain name */
|
||||
asn1r_fin_prim (aCtx, 0,CTX); /* context specific tag 0 */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_STORE_DOMAIN,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
|
||||
192
mmslib/mmsle/rq_takec.c
Normal file
192
mmslib/mmsle/rq_takec.c
Normal file
@@ -0,0 +1,192 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_takectrl.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of take semahpore */
|
||||
/* control. It decodes the take control response (confirm) & */
|
||||
/* encodes the take control request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 06 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 05 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 04 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 03 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 02 Changes to allow compile under C++ */
|
||||
/* 07/03/97 MDE 01 Op-specific info buffer handling changes */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_psem.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static TAKECTRL_RESP_INFO *info;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID takectrl_get_named_token (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID takectrl_get_null (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_takectrl_rsp */
|
||||
/* This function is called from mmsdec when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_takectrl_rsp (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("Take Control Response");
|
||||
|
||||
/* get storage for request information */
|
||||
info = (TAKECTRL_RESP_INFO *) _m_get_dec_buf (aCtx, sizeof (TAKECTRL_RESP_INFO));
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 0, takectrl_get_null);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, takectrl_get_named_token);
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* takectrl_get_null */
|
||||
/* take control response is being decoded: ctx 0 was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID takectrl_get_null (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("takectrl_get_null");
|
||||
|
||||
info->resp_tag = SD_FALSE; /* set tag to NULL response */
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* takectrl_get_named_token */
|
||||
/* take control response is being decoded: ctx 1 was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID takectrl_get_named_token (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("takectrl_get_named_token");
|
||||
|
||||
info->resp_tag = SD_TRUE; /* set tag to named token resp */
|
||||
|
||||
if (asn1r_get_identifier (aCtx, info->named_token))
|
||||
{ /* not a visible string */
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_takectrl */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the take control request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_takectrl (ST_INT chan, TAKECTRL_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_TAKE_CONTROL,
|
||||
M_CAST_MK_FUN (_ms_mk_takectrl_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_takectrl */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the take control request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_takectrl (TAKECTRL_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_TAKE_CONTROL,
|
||||
M_CAST_MK_FUN (_ms_mk_takectrl_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_takectrl_req */
|
||||
/* construct a take control request */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_takectrl_req (ASN1_ENC_CTXT *aCtx, TAKECTRL_REQ_INFO *info_ptr)
|
||||
{
|
||||
if (info_ptr->app_preempt_pres)
|
||||
{
|
||||
asn1r_wr_delmnt (aCtx, info_ptr->app_preempt, info_ptr->app_len);
|
||||
*(aCtx->asn1r_field_ptr+1) = (ST_UCHAR) 0xA7;
|
||||
}
|
||||
|
||||
if (!info_ptr->rel_conn_lost)
|
||||
{ /* NOT the default */
|
||||
asn1r_wr_bool (aCtx, info_ptr->rel_conn_lost); /* write the rel if conn lost */
|
||||
asn1r_fin_prim (aCtx, 6, CTX); /* context tag 6 */
|
||||
}
|
||||
|
||||
if (info_ptr->abrt_on_timeout_pres)
|
||||
{
|
||||
asn1r_wr_bool (aCtx, info_ptr->abrt_on_timeout);/* write the abort on timeout */
|
||||
asn1r_fin_prim (aCtx, 5, CTX); /* context tag 5 */
|
||||
}
|
||||
|
||||
if (info_ptr->ctrl_timeout_pres)
|
||||
{
|
||||
asn1r_wr_u32 (aCtx, info_ptr->ctrl_timeout); /* write the control timeout */
|
||||
asn1r_fin_prim (aCtx, 4, CTX); /* context tag 4 */
|
||||
}
|
||||
|
||||
if (info_ptr->acc_delay_pres)
|
||||
{
|
||||
asn1r_wr_u32 (aCtx, info_ptr->acc_delay); /* write the acceptable delay */
|
||||
asn1r_fin_prim (aCtx, 3, CTX); /* context tag 3 */
|
||||
}
|
||||
|
||||
if (info_ptr->priority != MMS_NORM_PRIORITY)
|
||||
{ /* NOT the default */
|
||||
asn1r_wr_bool (aCtx, info_ptr->priority); /* write the priority */
|
||||
asn1r_fin_prim (aCtx, 2, CTX); /* context tag 2 */
|
||||
}
|
||||
|
||||
if (info_ptr->named_token_pres)
|
||||
{
|
||||
asn1r_wr_vstr (aCtx, info_ptr->named_token); /* write the named token */
|
||||
asn1r_fin_prim (aCtx, 1, CTX); /* context tag 1 */
|
||||
}
|
||||
|
||||
asn1r_strt_constr (aCtx); /* object name constructor */
|
||||
|
||||
_ms_wr_mms_objname (aCtx, &info_ptr->sem_name); /* write the object name */
|
||||
|
||||
asn1r_fin_constr (aCtx, 0,CTX,DEF); /* context tag 0 */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_TAKE_CONTROL,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
143
mmslib/mmsle/rq_termd.c
Normal file
143
mmslib/mmsle/rq_termd.c
Normal file
@@ -0,0 +1,143 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2005, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_termdown.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of the terminate */
|
||||
/* download sequence. It decodes the terminate download sequence */
|
||||
/* response (confirm) & encodes the terminate download sequence */
|
||||
/* request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 08/09/05 EJV 06 MMS_LITE does not need thisFileName. */
|
||||
/* 03/17/04 RKR 05 Changed thisFileName */
|
||||
/* 03/11/04 GLB 04 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 03 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 02 Added SD_CONST modifiers */
|
||||
/* 06/15/98 MDE 01 Changes to allow compile under C++ */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
#include "glbsem.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pdom.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* For debug version, use a static pointer to avoid duplication of */
|
||||
/* __FILE__ strings. */
|
||||
|
||||
#if defined(DEBUG_SISCO) && (defined(S_MT_SUPPORT) && !defined(MMS_LITE))
|
||||
SD_CONST static ST_CHAR *SD_CONST thisFileName = __FILE__;
|
||||
#endif
|
||||
|
||||
/* variables global to the DECODE portion : NONE */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/* variables global to the ENCODE portion : */
|
||||
static ST_INT channel;
|
||||
#else
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_term_download_rsp */
|
||||
/* NOTE : Since the mms_term_download_rsp is a NULL PDU, the decode is */
|
||||
/* continued by '_mms_null_pdu_dec', which simply sets decode done = 1 */
|
||||
/* and sets the decode done function to point to the general decode done*/
|
||||
/* fun. See mmsdec.c for the general functions. */
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_termdown */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the terminate download sequence request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_termdown (ST_INT chan, TERMDOWN_REQ_INFO *info_ptr)
|
||||
{
|
||||
MMSREQ_PEND *ret;
|
||||
|
||||
S_LOCK_COMMON_RESOURCES ();
|
||||
channel = chan; /* save for mk function to use */
|
||||
ret = _mms_req_send (MMSOP_TERM_DOWNLOAD,
|
||||
M_CAST_MK_FUN (_ms_mk_termdown_req),
|
||||
|
||||
chan, (ST_CHAR *)info_ptr);
|
||||
S_UNLOCK_COMMON_RESOURCES ();
|
||||
return (ret);
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_termdown */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the terminate download sequence request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_termdown (TERMDOWN_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_TERM_DOWNLOAD,
|
||||
M_CAST_MK_FUN (_ms_mk_termdown_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_termdown_req */
|
||||
/* construct a terminate download sequence request */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_termdown_req (ASN1_ENC_CTXT *aCtx, TERMDOWN_REQ_INFO *info)
|
||||
{
|
||||
asn1r_strt_constr (aCtx); /* start sequence constr */
|
||||
|
||||
if (info->discarded)
|
||||
{ /* NOT the default (SD_FALSE) */
|
||||
#ifndef MMS_LITE
|
||||
if (mms_chan_info[channel].version) /* IS */
|
||||
#else
|
||||
if (mmsl_version) /* IS */
|
||||
#endif
|
||||
{
|
||||
_ms_wr_service_err (aCtx, (info->err)->eclass,(info->err)->code,
|
||||
&(info->err)->adtnl);
|
||||
asn1r_fin_constr (aCtx, 1,CTX,DEF);
|
||||
}
|
||||
else /* DIS */
|
||||
{
|
||||
asn1r_wr_bool (aCtx, info->discarded); /* write the discard flag */
|
||||
asn1r_fin_prim (aCtx, 1, CTX); /* context tag 1 */
|
||||
}
|
||||
}
|
||||
|
||||
asn1r_wr_vstr (aCtx, info->dname); /* write the domain name */
|
||||
asn1r_fin_prim (aCtx, 0, CTX); /* context tag 0 */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_TERM_DOWNLOAD,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
|
||||
94
mmslib/mmsle/rq_termu.c
Normal file
94
mmslib/mmsle/rq_termu.c
Normal file
@@ -0,0 +1,94 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_termupl.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of terminate upload */
|
||||
/* sequence. It decodes the terminate upload sequence response */
|
||||
/* (confirm) & encodes the terminate upload sequence request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/20/01 JRB 02 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 06/15/98 MDE 01 Changes to allow compile under C++ */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pdom.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/* variables global to the DECODE portion : NONE */
|
||||
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_term_upload_rsp */
|
||||
/* NOTE : Since the mms_term_upload_rsp is a NULL PDU, the decode is */
|
||||
/* continued by '_mms_null_pdu_dec', which simply sets decode done = 1 */
|
||||
/* and sets the decode done function to point to the general decode done*/
|
||||
/* fun. See mmsdec.c for the general functions. */
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_termupl */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the terminate upload sequence request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_termupl (ST_INT chan, TERMUPL_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_TERM_UPLOAD,
|
||||
M_CAST_MK_FUN (_ms_mk_termupl_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_termupl */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the terminate upload sequence request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_termupl (TERMUPL_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_TERM_UPLOAD,
|
||||
M_CAST_MK_FUN (_ms_mk_termupl_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_termupl_req */
|
||||
/* construct a terminate upload sequence request */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_termupl_req (ASN1_ENC_CTXT *aCtx, TERMUPL_REQ_INFO *info)
|
||||
{
|
||||
asn1r_wr_i32 (aCtx, info->ulsmid); /* write upload state machind id*/
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_prim (aCtx, MMSOP_TERM_UPLOAD,CTX); /* tag = opcode, ctx prim */
|
||||
}
|
||||
216
mmslib/mmsle/rq_uploa.c
Normal file
216
mmslib/mmsle/rq_uploa.c
Normal file
@@ -0,0 +1,216 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rq_upload.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the requester portion of upload segment. */
|
||||
/* It decodes the upload segment response (confirm) & encodes the */
|
||||
/* upload segment request. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 07 Remove "thisFileName" */
|
||||
/* 08/28/03 EJV 06 Corr spelling for 'receive'. */
|
||||
/* 12/20/01 JRB 05 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 04 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 03 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 02 Changes to allow compile under C++ */
|
||||
/* 07/03/97 MDE 01 Op-specific info buffer handling changes */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pdom.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : NONE */
|
||||
|
||||
static UPLOAD_RESP_INFO *rsp_info;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID upload_get_more_follows (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID upload_load_data_prim (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID upload_load_data_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID upload_load_data_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID extern_done (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_upload_rsp */
|
||||
/* This function is called from MMSDEC when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_upload_rsp (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("Upload Segment Response");
|
||||
|
||||
|
||||
/* get storage for request information */
|
||||
rsp_info = (UPLOAD_RESP_INFO *) _m_get_dec_buf (aCtx, sizeof (UPLOAD_RESP_INFO));
|
||||
rsp_info->more_follows = SD_TRUE; /* set default value */
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 0, upload_load_data_prim);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 0, upload_load_data_cstr);
|
||||
|
||||
/* If MMS IS, Check for CODED load data */
|
||||
#ifndef MMS_LITE
|
||||
if (mms_chan_info[_mmsdechan].version) /* IS */
|
||||
#else
|
||||
if (mmsl_version) /* IS */
|
||||
#endif
|
||||
_ms_chk_for_extern (aCtx, &rsp_info->load_data_len,
|
||||
&rsp_info->load_data,
|
||||
extern_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* upload_load_data_prim */
|
||||
/* upload segment response: decode the load data primitive */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID upload_load_data_prim (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("upload_load_data_pri");
|
||||
|
||||
/* decode load data back onto itself, shifted by one character */
|
||||
rsp_info->load_data = aCtx->asn1r_field_ptr - 1;
|
||||
|
||||
/* read load data from message */
|
||||
if (asn1r_get_octstr (aCtx, rsp_info->load_data))
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
|
||||
rsp_info->load_data_len = aCtx->asn1r_octetcount;
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, upload_get_more_follows);
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* upload_load_data_cstr */
|
||||
/* upload segment response: decode load data constructor */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID upload_load_data_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("upload_load_data_cstr");
|
||||
|
||||
/* decode load data back onto itself, shifted by one character */
|
||||
rsp_info->load_data = aCtx->asn1r_field_ptr - 1;
|
||||
|
||||
/* set up where to go when done decoding cstr */
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = upload_load_data_cstr_done;
|
||||
|
||||
/* get load data from the received message */
|
||||
asn1r_get_octstr_cstr (aCtx, _mmsdec_msglen, rsp_info->load_data);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* upload_load_data_cstr_done */
|
||||
/* upload segment response: load data constructor is done */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID upload_load_data_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
rsp_info->load_data_len = aCtx->asn1r_octetcount; /* save the load data length */
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, upload_get_more_follows);
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* extern_done */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID extern_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("extern_done");
|
||||
|
||||
rsp_info->load_data_type = LOAD_DATA_CODED;
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, upload_get_more_follows);
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* upload_get_more_follows */
|
||||
/* upload segment response: decode the more follows flag */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID upload_get_more_follows (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("upload_get_more_follows");
|
||||
/* read end of pgm from message */
|
||||
if (asn1r_get_bool (aCtx, &(rsp_info->more_follows)))
|
||||
asn1r_set_dec_err (aCtx, RESP_BAD_VALUE);
|
||||
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_upload */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the upload segment request. */
|
||||
/************************************************************************/
|
||||
|
||||
MMSREQ_PEND *mp_upload (ST_INT chan, UPLOAD_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_send (MMSOP_UP_LOAD,
|
||||
M_CAST_MK_FUN (_ms_mk_upload_req),
|
||||
chan,(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_upload */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the upload segment request. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_upload (UPLOAD_REQ_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_req_fin (MMSOP_UP_LOAD,
|
||||
M_CAST_MK_FUN (_ms_mk_upload_req),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_upload_req */
|
||||
/* construct an upload segment request */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_upload_req (ASN1_ENC_CTXT *aCtx, UPLOAD_REQ_INFO *info)
|
||||
{
|
||||
asn1r_strt_constr (aCtx); /* start sequence constr */
|
||||
|
||||
asn1r_wr_i32 (aCtx, info->ulsmid); /* write upload state machine id*/
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_prim (aCtx, MMSOP_UP_LOAD,CTX); /* tag = opcode, ctx */
|
||||
}
|
||||
226
mmslib/mmsle/rs_altec.c
Normal file
226
mmslib/mmsle/rs_altec.c
Normal file
@@ -0,0 +1,226 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rs_altecm.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the responder portion of alter event */
|
||||
/* condition monitoring. It decodes the alter event condition */
|
||||
/* monitoring request (indication) & encodes the alter event */
|
||||
/* condition monitoring response. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------ */
|
||||
/* 03/11/04 GLB 06 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 05 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 04 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 03 Changes to decode buffer allocation scheme */
|
||||
/* 07/03/97 MDE 02 Op-specific info buffer handling changes */
|
||||
/* 06/09/97 MDE 01 Changed op specific buffer allocation */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pevn.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static ALTECM_REQ_INFO *req_info;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID altecm_name_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID altecm_name_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID altecm_name_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID altecm_get_enabled (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID altecm_get_priority (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID altecm_get_as_reports (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID altecm_get_eval_int (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_altecm_req */
|
||||
/* This function is called from MMSDEC when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_altecm_req (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("Alter Event Condition Monitoring Request");
|
||||
|
||||
|
||||
/* get storage for request information */
|
||||
req_info = (ALTECM_REQ_INFO *) _m_get_dec_buf (aCtx, sizeof (ALTECM_REQ_INFO));
|
||||
|
||||
/* req_info->enabled_pres = SD_FALSE; set default values */
|
||||
/* req_info->priority_pres = SD_FALSE; */
|
||||
/* req_info->as_reports_pres = SD_FALSE; */
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 0, altecm_name_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* altecm_name_cstr */
|
||||
/* alter event condition monitoring request is being decoded: event */
|
||||
/* condition name constructor was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID altecm_name_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("altecm_name_cstr");
|
||||
|
||||
_ms_get_mms_objname (aCtx, &req_info->evcon_name, altecm_name_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* altecm_name_done */
|
||||
/* alter event condition monitoring request is being decoded: event */
|
||||
/* condition name has been obtained. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID altecm_name_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("altecm_name_done");
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = altecm_name_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* altecm_name_cstr_done */
|
||||
/* alter event condition monitoring request is being decoded: event */
|
||||
/* condition name constructor done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID altecm_name_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, altecm_get_enabled);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 2, altecm_get_priority);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 3, altecm_get_as_reports);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 4, altecm_get_eval_int);
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* altecm_get_enabled */
|
||||
/* Decoding alter event condition monitoring request: enabled was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID altecm_get_enabled (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("altecm_get_enabled");
|
||||
|
||||
req_info->enabled_pres = SD_TRUE;
|
||||
|
||||
if (asn1r_get_bool (aCtx, &(req_info->enabled))) /* read enabled */
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 2, altecm_get_priority);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 3, altecm_get_as_reports);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 4, altecm_get_eval_int);
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* altecm_get_priority */
|
||||
/* Decoding alter event condition monitoring request: priority was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID altecm_get_priority (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("altecm_get_priority");
|
||||
|
||||
req_info->priority_pres = SD_TRUE;
|
||||
|
||||
if (asn1r_get_u8 (aCtx, &(req_info->priority))) /* read priority */
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 3, altecm_get_as_reports);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 4, altecm_get_eval_int);
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* altecm_get_as_reports */
|
||||
/* Decoding alter event condition monitoring request: alarm summary */
|
||||
/* reports was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID altecm_get_as_reports (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("altecm_get_as_reports");
|
||||
|
||||
req_info->as_reports_pres = SD_TRUE; /* set present flag */
|
||||
/* read alarm summary reports */
|
||||
if (asn1r_get_bool (aCtx, &(req_info->as_reports)))
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 4, altecm_get_eval_int);
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* altecm_get_eval_int */
|
||||
/* Decoding alter event condition monitoring request: evaluation */
|
||||
/* interval was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID altecm_get_eval_int (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("altecm_get_eval_int");
|
||||
|
||||
req_info->eval_int_pres = SD_TRUE;
|
||||
|
||||
if (asn1r_get_u32 (aCtx, &(req_info->eval_int))) /* read evaluation int */
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_altecm_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the alter event condition monitoring */
|
||||
/* response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mp_altecm_resp (MMSREQ_IND *indptr)
|
||||
{
|
||||
return (_mms_send_null_resp (indptr,MMSOP_ALT_EC_MON));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_altecm_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the alter event condition monitoring response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_altecm_resp (ST_UINT32 invoke_id)
|
||||
{
|
||||
return (_mms_fin_null_resp (invoke_id,MMSOP_ALT_EC_MON));
|
||||
}
|
||||
#endif
|
||||
256
mmslib/mmsle/rs_altee.c
Normal file
256
mmslib/mmsle/rs_altee.c
Normal file
@@ -0,0 +1,256 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rs_altee.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the responder portion of alter event */
|
||||
/* enrollment. It decodes the alter event enrollment request */
|
||||
/* (indication) & encodes the alter event enrollment response. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 07 Remove "thisFileName" */
|
||||
/* 03/31/03 JRB 06 asn1r_get_bitstr: add max_bits arg. */
|
||||
/* 12/20/01 JRB 05 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 04 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 03 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 02 Changes to allow compile under C++ */
|
||||
/* 07/03/97 MDE 01 Op-specific info buffer handling changes */
|
||||
/* 06/09/97 MDE 01 Changed op specific buffer allocation */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pevn.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static ALTEE_REQ_INFO *req_info;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID altee_eename_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID altee_eename_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID altee_eename_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID altee_get_ect_prim (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID altee_get_ect_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID altee_get_ect_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID altee_get_alarm_ack_rule (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_altee_req */
|
||||
/* This function is called from MMSDEC when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_altee_req (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("Alter Event Enrollment Request");
|
||||
|
||||
|
||||
/* get storage for request information */
|
||||
req_info = (ALTEE_REQ_INFO *) _m_get_dec_buf (aCtx, sizeof (ALTEE_REQ_INFO));
|
||||
|
||||
/* req_info->ec_transitions_pres = SD_FALSE; */
|
||||
/* req_info->alarm_ack_rule_pres = SD_FALSE; */
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 0, altee_eename_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* altee_eename_cstr */
|
||||
/* alter event enrollment request is being decoded: event enrollment */
|
||||
/* name constructor was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID altee_eename_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("altee_eename_cstr");
|
||||
|
||||
_ms_get_mms_objname (aCtx, &req_info->evenroll_name, altee_eename_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* altee_eename_done */
|
||||
/* alter event enrollment request is being decoded: event enrollment */
|
||||
/* name has been obtained. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID altee_eename_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("altee_eename_done");
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = altee_eename_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* altee_eename_cstr_done */
|
||||
/* alter event enrollment request is being decoded: event enrollment */
|
||||
/* name constructor done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID altee_eename_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, altee_get_ect_prim);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 1, altee_get_ect_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 2, altee_get_alarm_ack_rule);
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* altee_get_ect_prim */
|
||||
/* alter event enrollment request is being decoded: event condition */
|
||||
/* transitions primitive was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID altee_get_ect_prim (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("altee_get_ect_prim");
|
||||
/* check length before moving bitstring */
|
||||
if (!asn1r_get_bitstr (aCtx, &req_info->ec_transitions, 7))
|
||||
altee_get_ect_done (aCtx); /* set up for the next data element */
|
||||
else
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* altee_get_ect_cstr */
|
||||
/* alter event enrollment request is being decoded: event condition */
|
||||
/* transitions constructor was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID altee_get_ect_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("altee_get_ect_cstr");
|
||||
/* set up bitstring cstr done function */
|
||||
aCtx->asn1r_c_done_fun[aCtx->asn1r_msg_level] = altee_get_ect_done;
|
||||
|
||||
asn1r_get_bitstr_cstr (aCtx, 7,&req_info->ec_transitions);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* altee_get_ect_done */
|
||||
/* alter event enrollment request is being decoded: event condition */
|
||||
/* transitions constructor done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID altee_get_ect_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("altee_get_ect_done");
|
||||
|
||||
req_info->ec_transitions_pres = SD_TRUE; /* set present flag */
|
||||
|
||||
/* Check aCtx->asn1r_bitcount for correct # of bits */
|
||||
if (aCtx->asn1r_bitcount != 7) /* should be 7 bits */
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
else /* now get alarm ack rule */
|
||||
{
|
||||
ASN1R_TAG_ADD (aCtx, CTX,2,altee_get_alarm_ack_rule);
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* altee_get_alarm_ack_rule */
|
||||
/* Decoding alter event enrollment request: alarm acknowledgment rule */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID altee_get_alarm_ack_rule (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("altee_get_alarm_ack_rule");
|
||||
|
||||
req_info->alarm_ack_rule_pres = SD_TRUE;
|
||||
/* read alarm ack rule */
|
||||
if (asn1r_get_i16 (aCtx, &(req_info->alarm_ack_rule)))
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
else if ((req_info->alarm_ack_rule < 0) || (req_info->alarm_ack_rule > 3))
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_altee_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the alter event enrollment response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mp_altee_resp (MMSREQ_IND *indptr, ALTEE_RESP_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_resp_send (MMSOP_ALT_EE,indptr,
|
||||
M_CAST_MK_FUN (_ms_mk_altee_resp),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_altee_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the alter event enrollment response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_altee_resp (ST_UINT32 invoke_id, ALTEE_RESP_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_resp_fin (MMSOP_ALT_EE,invoke_id,
|
||||
M_CAST_MK_FUN (_ms_mk_altee_resp),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_altee_resp */
|
||||
/* ENCODE an alter event enrollment RESPONSE: */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_altee_resp (ASN1_ENC_CTXT *aCtx, ALTEE_RESP_INFO *info)
|
||||
{
|
||||
asn1r_strt_constr (aCtx); /* start ctx tag 1 constructor */
|
||||
_ms_wr_mms_evtime (aCtx, &info->trans_time);
|
||||
asn1r_fin_constr (aCtx, 1,CTX,DEF); /* finish ctx tag 1 constructor */
|
||||
|
||||
asn1r_strt_constr (aCtx); /* start ctx tag 0 constructor */
|
||||
if (info->cur_state_tag == 1)
|
||||
asn1r_fin_prim (aCtx, 1, CTX); /* write undefined */
|
||||
else
|
||||
{
|
||||
asn1r_wr_i16 (aCtx, info->state); /* write state */
|
||||
asn1r_fin_prim (aCtx, 0, CTX);
|
||||
}
|
||||
asn1r_fin_constr (aCtx, 0,CTX,DEF); /* finish ctx tag 0 constructor */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_ALT_EE,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
242
mmslib/mmsle/rs_crepi.c
Normal file
242
mmslib/mmsle/rs_crepi.c
Normal file
@@ -0,0 +1,242 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rs_crepi.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the responder portion of create program */
|
||||
/* invocation. It decodes the create program invocation request */
|
||||
/* (indication) & encodes the create program invocation response. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 05 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 04 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 03 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 02 Changes to decode buffer allocation scheme */
|
||||
/* 06/09/97 MDE 01 Changed op specific buffer allocation */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pprg.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static CREPI_REQ_INFO *req_info;
|
||||
|
||||
static ST_CHAR **dom_ptr;
|
||||
static ST_INT max_vstr;
|
||||
static ST_INT num_vstr;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID crepi_get_reusable (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID crepi_get_monitor (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID crepi_get_domain_name (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID crepi_domain_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID crepi_domain_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID crepi_get_piname (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_create_pi_req */
|
||||
/* This function is called from MMSDEC when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_create_pi_req (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT req_size;
|
||||
|
||||
MLOG_CDEC0 ("Create Program Invocation Request");
|
||||
|
||||
#if defined(FIXED_DECBUF)
|
||||
max_vstr = m_sv_max_vstr;
|
||||
req_size = mmsl_dec_info_size;
|
||||
#else
|
||||
max_vstr = _mmsdec_msglen/2; /* determine maximum size */
|
||||
if (m_sv_max_vstr && (max_vstr > m_sv_max_vstr))
|
||||
max_vstr = m_sv_max_vstr;
|
||||
|
||||
req_size = sizeof (CREPI_REQ_INFO) + (sizeof (ST_CHAR *)*max_vstr);
|
||||
#endif
|
||||
|
||||
/* get storage for request information */
|
||||
req_info = (CREPI_REQ_INFO *) _m_get_dec_buf (aCtx, req_size);
|
||||
dom_ptr = (ST_CHAR **) (req_info + 1); /* point to where first will go */
|
||||
num_vstr = 0;
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 0, crepi_get_piname); /* pi name is next */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* crepi_get_piname */
|
||||
/* create program invocation REQUEST (indication) is being decoded: */
|
||||
/* decode the state. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID crepi_get_piname (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("crepi_get_piname");
|
||||
|
||||
if (asn1r_get_identifier (aCtx, req_info->piname))/* read the pgm invocation name */
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 1, crepi_domain_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* crepi_domain_cstr */
|
||||
/* create program invocation REQUEST (indication) is being decoded: */
|
||||
/* domain name list constructor was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID crepi_domain_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("crepi_domain_cstr");
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, UNI, VISTR_CODE, crepi_get_domain_name);
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = crepi_domain_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* crepi_get_domain_name */
|
||||
/* create program invocation REQUEST (indication) is being decoded: */
|
||||
/* domain name was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID crepi_get_domain_name (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("crepi_get_domain_name");
|
||||
|
||||
req_info->num_of_dnames++; /* increment # of domain names */
|
||||
|
||||
num_vstr++; /* increment number of vstr */
|
||||
if (num_vstr > max_vstr)
|
||||
{ /* too many visible strings */
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
/* copy domain name back onto itself shifted by one character */
|
||||
*dom_ptr = (ST_CHAR *) aCtx->asn1r_field_ptr - 1;
|
||||
if (asn1r_get_identifier (aCtx, *dom_ptr))
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
dom_ptr++; /* point to where next will go */
|
||||
|
||||
asn1r_tag_restore (aCtx);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* crepi_domain_cstr_done */
|
||||
/* create program invocation REQUEST (indication) is being decoded: */
|
||||
/* domain name list constructor done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID crepi_domain_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT req_size;
|
||||
|
||||
req_info->reusable = SD_TRUE; /* SD_TRUE us default value */
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 2, crepi_get_reusable);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 3, crepi_get_monitor);
|
||||
|
||||
/* find actual size for request info */
|
||||
req_size = (ST_CHAR *)dom_ptr - ((ST_CHAR *) req_info) + 1;
|
||||
/* give back unused storage */
|
||||
_mms_dec_info = (*m_realloc_os_fun) (_mms_dec_info,req_size);
|
||||
req_info = (CREPI_REQ_INFO *) _mms_dec_info;
|
||||
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* crepi_get_reusable */
|
||||
/* create program invocation REQUEST (indication) is being decoded: */
|
||||
/* decode the reusable flag. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID crepi_get_reusable (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("crepi_get_reusable");
|
||||
|
||||
if (asn1r_get_bool (aCtx, &(req_info->reusable))) /* read reusable from message */
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 3, crepi_get_monitor);
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* crepi_get_monitor */
|
||||
/* create program invocation REQUEST (indication) is being decoded: */
|
||||
/* decode the monitor flag. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID crepi_get_monitor (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("crepi_get_monitor");
|
||||
|
||||
req_info->monitor_pres = SD_TRUE; /* set monitor present */
|
||||
|
||||
if (asn1r_get_bool (aCtx, &(req_info->monitor))) /* read monitor from message */
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_crepi_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the create program invocation response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mp_crepi_resp (MMSREQ_IND *indptr)
|
||||
{
|
||||
return (_mms_send_null_resp (indptr,MMSOP_CREATE_PI));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_crepi_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the create program invocation response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_crepi_resp (ST_UINT32 invoke_id)
|
||||
{
|
||||
return (_mms_fin_null_resp (invoke_id,MMSOP_CREATE_PI));
|
||||
}
|
||||
#endif
|
||||
315
mmslib/mmsle/rs_defea.c
Normal file
315
mmslib/mmsle/rs_defea.c
Normal file
@@ -0,0 +1,315 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rs_defea.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the responder portion of define event */
|
||||
/* action. It decodes the define event action request */
|
||||
/* (indication) & encodes the define event action response. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 06 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 05 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 04/28/00 JRB 04 Lint cleanup */
|
||||
/* 09/13/99 MDE 03 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 02 Changes to decode buffer allocation scheme */
|
||||
/* 07/03/97 MDE 01 Op-specific info buffer handling changes */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pevn.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static DEFEA_REQ_INFO *req_info;
|
||||
|
||||
#ifdef MOD_SUPPORT
|
||||
static MODIFIER *mod_ptr;
|
||||
static ST_INT max_modifiers;
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
/* static functions with multiple references */
|
||||
static ST_VOID defea_name_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID defea_name_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID defea_name_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
#ifdef MOD_SUPPORT
|
||||
static ST_VOID defea_get_modlist (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID defea_modlist_done (ASN1_DEC_CTXT *aCtx);
|
||||
#endif
|
||||
static ST_VOID defea_get_conf_serv_req (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID defea_conf_serv_req_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID defea_conf_serv_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
#ifdef CS_SUPPORT
|
||||
static ST_VOID defea_cs_rdetail_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID defea_cs_rdetail_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID defea_cs_rdetail_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_defea_req */
|
||||
/* This function is called from MMSDEC when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_defea_req (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT req_size;
|
||||
|
||||
MLOG_CDEC0 ("Define Event Action Request");
|
||||
/* find maximum size for request info */
|
||||
|
||||
#if defined(FIXED_DECBUF)
|
||||
max_modifiers = 0;
|
||||
req_size = sizeof (DEFEA_REQ_INFO);
|
||||
#else
|
||||
#ifdef MOD_SUPPORT
|
||||
max_modifiers = _mmsdec_msglen / 2;
|
||||
req_size = sizeof (DEFEA_REQ_INFO)
|
||||
+ (sizeof (MODIFIER) * max_modifiers);
|
||||
#else
|
||||
req_size = sizeof (DEFEA_REQ_INFO);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* get storage for request information */
|
||||
req_info = (DEFEA_REQ_INFO *) _m_get_dec_buf (aCtx, req_size);
|
||||
|
||||
|
||||
/* req_info->modlist_pres = SD_FALSE; set default values */
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 0, defea_name_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* defea_name_cstr */
|
||||
/* define event action request is being decoded: event action name */
|
||||
/* constructor was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defea_name_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("defea_name_cstr");
|
||||
|
||||
_ms_get_mms_objname (aCtx, &req_info->evact_name, defea_name_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* defea_name_done */
|
||||
/* define event action request is being decoded: event action name */
|
||||
/* has been obtained. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defea_name_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = defea_name_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* defea_name_cstr_done */
|
||||
/* define event action request is being decoded: event action name */
|
||||
/* constructor done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defea_name_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
#ifdef MOD_SUPPORT
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 1, defea_get_modlist);
|
||||
#endif
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 2, defea_get_conf_serv_req);
|
||||
#ifdef CS_SUPPORT
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR,79, defea_cs_rdetail_cstr);
|
||||
#endif
|
||||
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
#ifdef MOD_SUPPORT
|
||||
/************************************************************************/
|
||||
/* defea_get_modlist */
|
||||
/* Decoding define event action request: list of modifiers constructor */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defea_get_modlist (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("defea_get_modlist");
|
||||
|
||||
req_info->modlist_pres = SD_TRUE; /* list of modifiers present */
|
||||
|
||||
mod_ptr = (MODIFIER *) (req_info + 1);
|
||||
|
||||
_ms_get_mms_modlist (aCtx, mod_ptr, &req_info->num_of_modifiers,
|
||||
max_modifiers, defea_modlist_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* defea_modlist_done */
|
||||
/* Decoding define event action request: list of modifiers constructor */
|
||||
/* done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defea_modlist_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("defea_modlist_done");
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 2, defea_get_conf_serv_req);
|
||||
#ifdef CS_SUPPORT
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR,79, defea_cs_rdetail_cstr);
|
||||
#endif
|
||||
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* defea_get_conf_serv_req */
|
||||
/* Decoding define event action request: confirmed service request */
|
||||
/* constructor was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defea_get_conf_serv_req (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
#ifdef MOD_SUPPORT
|
||||
ST_INT req_size;
|
||||
#endif
|
||||
|
||||
MLOG_CDEC0 ("defea_get_conf_serv_req");
|
||||
/* find actual size for request info */
|
||||
#ifdef MOD_SUPPORT
|
||||
req_size = sizeof (DEFEA_REQ_INFO)
|
||||
+ (sizeof (MODIFIER)*req_info->num_of_modifiers);
|
||||
|
||||
/* give back unused storage */
|
||||
_mms_dec_info = (*m_realloc_os_fun) (_mms_dec_info, req_size);
|
||||
req_info = (DEFEA_REQ_INFO *) _mms_dec_info;
|
||||
#endif
|
||||
|
||||
/* get the confirmed service request */
|
||||
req_info->conf_serv_req = aCtx->asn1r_field_ptr;
|
||||
|
||||
asn1r_parse_next (aCtx, defea_conf_serv_req_done); /* parse the contents */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* defea_conf_serv_req_done */
|
||||
/* Decoding define event action request: confirmed service request */
|
||||
/* has been obtained. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defea_conf_serv_req_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
req_info->conf_serv_req_len = aCtx->asn1r_octetcount; /* save length */
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = defea_conf_serv_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* defea_conf_serv_cstr_done */
|
||||
/* Decoding define event action request: confirmed service request */
|
||||
/* constructor done has been encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defea_conf_serv_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
#ifdef CS_SUPPORT
|
||||
/* check for Companion Standard request detail */
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 79, defea_cs_rdetail_cstr);
|
||||
#endif
|
||||
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
#ifdef CS_SUPPORT
|
||||
/************************************************************************/
|
||||
/* defea_cs_rdetail_cstr */
|
||||
/* Decoding define event action request: companion standard request */
|
||||
/* detail constructor has been encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defea_cs_rdetail_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("defea_cs_rdetail_cstr");
|
||||
|
||||
req_info->cs_rdetail_pres = SD_TRUE; /* set the present flag */
|
||||
|
||||
/* leave CS response detail in place; just parse it. */
|
||||
req_info->cs_rdetail = aCtx->asn1r_field_ptr;
|
||||
asn1r_parse_next (aCtx, defea_cs_rdetail_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* defea_cs_rdetail_done */
|
||||
/* event notification request is being decoded: action result success: */
|
||||
/* companion standard response detail has been parsed. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defea_cs_rdetail_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
req_info->cs_rdetail_len = aCtx->asn1r_octetcount; /* save length */
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = defea_cs_rdetail_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* defea_cs_rdetail_cstr_done */
|
||||
/* event notification request is being decoded: action result success: */
|
||||
/* confirmed service response cstr done has been encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defea_cs_rdetail_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_defea_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the define event action response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mp_defea_resp (MMSREQ_IND *indptr)
|
||||
{
|
||||
return (_mms_send_null_resp (indptr,MMSOP_DEF_EA));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_defea_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the define event action response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_defea_resp (ST_UINT32 invoke_id)
|
||||
{
|
||||
return (_mms_fin_null_resp (invoke_id,MMSOP_DEF_EA));
|
||||
}
|
||||
#endif
|
||||
290
mmslib/mmsle/rs_defec.c
Normal file
290
mmslib/mmsle/rs_defec.c
Normal file
@@ -0,0 +1,290 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rs_defec.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the responder portion of define event */
|
||||
/* condition. It decodes the define event condition request */
|
||||
/* (indication) & encodes the define event condition response. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 05 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 04 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 03 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 02 Changes to decode buffer allocation scheme */
|
||||
/* 07/03/97 MDE 01 Op-specific info buffer handling changes */
|
||||
/* 06/09/97 MDE 01 Changed op specific buffer allocation */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pevn.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static DEFEC_REQ_INFO *req_info;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID defec_get_severity (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID defec_get_as_reports (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID defec_monitored_var_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID defec_get_eval_int (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID defec_monitored_var_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID defec_var_spec_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID defec_get_priority (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID defec_get_ec_class (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID defec_name_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID defec_name_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID defec_name_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_defec_req */
|
||||
/* This function is called from MMSDEC when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_defec_req (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("Define Event Condition Request");
|
||||
|
||||
|
||||
/* get storage for request information */
|
||||
req_info = (DEFEC_REQ_INFO *) _m_get_dec_buf (aCtx, sizeof (DEFEC_REQ_INFO));
|
||||
|
||||
req_info->priority = MMS_NORM_PRIORITY; /* set default value */
|
||||
req_info->severity = MMS_NORM_SEVERITY;
|
||||
/* req_info->as_reports = SD_FALSE; */
|
||||
/* req_info->addl_detail_pres = SD_FALSE; */
|
||||
/* req_info->mon_var_pres = SD_FALSE; */
|
||||
/* req_info->eval_int_pres = SD_FALSE; */
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 0, defec_name_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* defec_name_cstr */
|
||||
/* define event condition request is being decoded: event condition */
|
||||
/* name constructor was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defec_name_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("defec_name_cstr");
|
||||
|
||||
_ms_get_mms_objname (aCtx, &req_info->evcon_name, defec_name_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* defec_name_done */
|
||||
/* define event condition request is being decoded: event condition */
|
||||
/* name has been obtained. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defec_name_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("defec_name_done");
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = defec_name_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* defec_name_cstr_done */
|
||||
/* define event condition request is being decoded: event condition */
|
||||
/* name constructor done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defec_name_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, defec_get_ec_class);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* defec_get_ec_class */
|
||||
/* Decoding define event condition request: ec class was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defec_get_ec_class (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("defec_get_ec_class");
|
||||
/* read event condition class */
|
||||
if (asn1r_get_i16 (aCtx, &(req_info->eclass)))
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
else if ((req_info->eclass < 0) || (req_info->eclass > 1))
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 2, defec_get_priority);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 3, defec_get_severity);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 4, defec_get_as_reports);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 6, defec_monitored_var_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 7, defec_get_eval_int);
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* defec_get_priority */
|
||||
/* Decoding define event condition request: priority was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defec_get_priority (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("defec_get_priority");
|
||||
/* read priority */
|
||||
if (asn1r_get_u8 (aCtx, &(req_info->priority)))
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 3, defec_get_severity);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 4, defec_get_as_reports);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 6, defec_monitored_var_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 7, defec_get_eval_int);
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* defec_get_severity */
|
||||
/* Decoding define event condition request: severity was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defec_get_severity (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("defec_get_severity");
|
||||
/* read severity */
|
||||
if (asn1r_get_u8 (aCtx, &(req_info->severity)))
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 4, defec_get_as_reports);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 6, defec_monitored_var_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 7, defec_get_eval_int);
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* defec_get_as_reports */
|
||||
/* Decoding define event condition request: alarm summary reports was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defec_get_as_reports (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("defec_get_as_reports");
|
||||
|
||||
req_info->as_reports_pres = SD_TRUE; /* set present flag */
|
||||
/* read alarm summary reports */
|
||||
if (asn1r_get_bool (aCtx, &(req_info->as_reports)))
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 6, defec_monitored_var_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 7, defec_get_eval_int);
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* defec_monitored_var_cstr */
|
||||
/* Decoding define event condition request: monitored variable was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defec_monitored_var_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("defec_monitored_var_cstr");
|
||||
|
||||
req_info->mon_var_pres = SD_TRUE; /* set present flag */
|
||||
|
||||
_ms_get_va_var_spec (aCtx, &req_info->var_ref, defec_var_spec_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* defec_var_spec_done */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defec_var_spec_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("defec_var_spec_done");
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = defec_monitored_var_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* defec_monitored_var_cstr_done */
|
||||
/* Decoding define event condition request: monitored variable constr */
|
||||
/* done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defec_monitored_var_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 7, defec_get_eval_int);
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* defec_get_eval_int */
|
||||
/* Decoding define event condition request: evaluation interval was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defec_get_eval_int (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("defec_get_eval_int");
|
||||
|
||||
req_info->eval_int_pres = SD_TRUE;
|
||||
/* read evaluation interval */
|
||||
if (asn1r_get_u32 (aCtx, &(req_info->eval_interval)))
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_defec_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the define event condition response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mp_defec_resp (MMSREQ_IND *indptr)
|
||||
{
|
||||
return (_mms_send_null_resp (indptr,MMSOP_DEF_EC));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_defec_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the define event condition response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_defec_resp (ST_UINT32 invoke_id)
|
||||
{
|
||||
return (_mms_fin_null_resp (invoke_id,MMSOP_DEF_EC));
|
||||
}
|
||||
#endif
|
||||
169
mmslib/mmsle/rs_defsc.c
Normal file
169
mmslib/mmsle/rs_defsc.c
Normal file
@@ -0,0 +1,169 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rs_defscat.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the responder portion of define scattered */
|
||||
/* access. It decodes the define scattered access request */
|
||||
/* (indication) and encodes the define scattered access response. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 05 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 04 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 03 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 02 Changes to decode buffer allocation scheme */
|
||||
/* 07/03/97 MDE 01 Op-specific info buffer handling changes */
|
||||
/* 06/09/97 MDE 01 Changed op specific buffer allocation */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pvar.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static DEFSCAT_REQ_INFO *req_info;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID defscat_scat_acc_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID defscat_scat_acc_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID defscat_scat_acc_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID defscat_name_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID defscat_objname_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID defscat_name_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_def_scat_req */
|
||||
/* This function is called from mmsdec when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_def_scat_req (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("Define Scattered Access Request");
|
||||
|
||||
/* get storage for request information */
|
||||
req_info = (DEFSCAT_REQ_INFO *) _m_get_dec_buf (aCtx, sizeof (DEFSCAT_REQ_INFO));
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 0, defscat_name_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* defscat_name_cstr */
|
||||
/* define scattered access request: scattered access name constr was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defscat_name_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("defscat_name_cstr");
|
||||
|
||||
_ms_get_mms_objname (aCtx, &req_info->sa_name, defscat_objname_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* defscat_objname_done */
|
||||
/* define scattered access request: scattered access name has been */
|
||||
/* decoded. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defscat_objname_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("defscat_objname_done");
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = defscat_name_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* defscat_name_cstr_done */
|
||||
/* define scattered access request: scattered access name constructor */
|
||||
/* done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defscat_name_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 1, defscat_scat_acc_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* defscat_address_cstr */
|
||||
/* define scattered access request: scattered access constructor was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defscat_scat_acc_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("defscat_scat_acc_cstr");
|
||||
|
||||
_ms_get_va_scat_access (aCtx, &req_info->sa_descr, defscat_scat_acc_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* defscat_scat_acc_done */
|
||||
/* define scattered access request: scattered access has been decoded. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defscat_scat_acc_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("defscat_scat_acc_done");
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = defscat_scat_acc_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* defscat_scat_acc_cstr_done */
|
||||
/* define scattered access request: scattered access constr done was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defscat_scat_acc_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_defscat_resp */
|
||||
/* Create and send a define scattered access response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mp_defscat_resp (MMSREQ_IND *indptr)
|
||||
{
|
||||
return (_mms_send_null_resp (indptr,MMSOP_DEF_SCAT));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_defscat_resp */
|
||||
/* Create a define scattered access response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_defscat_resp (ST_UINT32 invoke_id)
|
||||
{
|
||||
return (_mms_fin_null_resp (invoke_id,MMSOP_DEF_SCAT));
|
||||
}
|
||||
#endif
|
||||
147
mmslib/mmsle/rs_defse.c
Normal file
147
mmslib/mmsle/rs_defse.c
Normal file
@@ -0,0 +1,147 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rs_defsem.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the responder portion of the define */
|
||||
/* semaphore operation. It decodes the define semaphore request */
|
||||
/* (indication) and encodes the define semaphore response. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 06 Remove "thisFileName" */
|
||||
/* 08/28/03 EJV 05 Corr spelling for 'receive'. */
|
||||
/* 12/20/01 JRB 04 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 03 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 02 Changes to decode buffer allocation scheme */
|
||||
/* 07/03/97 MDE 01 Op-specific info buffer handling changes */
|
||||
/* 06/09/97 MDE 01 Changed op specific buffer allocation */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_psem.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static DEFSEM_REQ_INFO *req_info;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID defsem_sem_name_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID defsem_objname_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID defsem_sem_name_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID defsem_get_num_of_tokens (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_defsem_req */
|
||||
/* This function is called from mmsdec when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_defsem_req (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("Define Semaphore Request");
|
||||
|
||||
/* get storage for request information */
|
||||
req_info = (DEFSEM_REQ_INFO *) _m_get_dec_buf (aCtx, sizeof (DEFSEM_REQ_INFO));
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 0, defsem_sem_name_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* defsem_sem_name_cstr */
|
||||
/* Decoding define semaphore request: semaphore name constructor was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defsem_sem_name_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("Define Semaphore Request");
|
||||
_ms_get_mms_objname (aCtx, &req_info->sem_name, defsem_objname_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* defsem_objname_done */
|
||||
/* Decoding Define Semaphore Request: Semaphore name has been obtained. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defsem_objname_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = defsem_sem_name_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* defsem_sem_name_cstr_done */
|
||||
/* Decoding define semaphore request: semaphore name contructor done */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defsem_sem_name_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, defsem_get_num_of_tokens);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* defsem_get_num_of_tokens */
|
||||
/* Decoding define semaphore request: number of tokens name was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defsem_get_num_of_tokens (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("defsem_get_num_of_tokens");
|
||||
|
||||
/* read number of tokens from received message */
|
||||
if (asn1r_get_u16 (aCtx, &(req_info->num_of_tokens)))
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_defsem_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the define semaphore response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mp_defsem_resp (MMSREQ_IND *indptr)
|
||||
{
|
||||
return (_mms_send_null_resp (indptr,MMSOP_DEFINE_SEM));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_defsem_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the define semaphore response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_defsem_resp (ST_UINT32 invoke_id)
|
||||
{
|
||||
return (_mms_fin_null_resp (invoke_id,MMSOP_DEFINE_SEM));
|
||||
}
|
||||
#endif
|
||||
116
mmslib/mmsle/rs_defty.c
Normal file
116
mmslib/mmsle/rs_defty.c
Normal file
@@ -0,0 +1,116 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rs_deftype.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the responder portion of define named */
|
||||
/* type. It decodes the define named type request (indication) */
|
||||
/* and encodes the define named type response. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 05 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 04 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 03 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 02 Changes to decode buffer allocation scheme */
|
||||
/* 07/03/97 MDE 01 Op-specific info buffer handling changes */
|
||||
/* 06/09/97 MDE 01 Changed op specific buffer allocation */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pvar.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static DEFTYPE_REQ_INFO *req_info;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID deftype_typespec_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID deftype_objname_done (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_def_type_req */
|
||||
/* This function is called from mmsdec when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_def_type_req (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("Define Named Type Request");
|
||||
|
||||
/* get storage for request information */
|
||||
req_info = (DEFTYPE_REQ_INFO *) _m_get_dec_buf (aCtx, sizeof (DEFTYPE_REQ_INFO));
|
||||
|
||||
_ms_get_mms_objname (aCtx, &req_info->type_name, deftype_objname_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* deftype_objname_done */
|
||||
/* define named type request: type name has been decoded. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID deftype_objname_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("deftype_objname_done");
|
||||
|
||||
_ms_get_va_type_spec (aCtx, &req_info->type_spec, deftype_typespec_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* deftype_typespec_done */
|
||||
/* define named type request: type specification has been decoded. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID deftype_typespec_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("deftype_typespec_done");
|
||||
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_deftype_resp */
|
||||
/* Create and send a define named type response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mp_deftype_resp (MMSREQ_IND *indptr)
|
||||
{
|
||||
return (_mms_send_null_resp (indptr,MMSOP_DEF_TYPE));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_deftype_resp */
|
||||
/* Create a define named type response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_deftype_resp (ST_UINT32 invoke_id)
|
||||
{
|
||||
return (_mms_fin_null_resp (invoke_id,MMSOP_DEF_TYPE));
|
||||
}
|
||||
#endif
|
||||
198
mmslib/mmsle/rs_defva.c
Normal file
198
mmslib/mmsle/rs_defva.c
Normal file
@@ -0,0 +1,198 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rs_defvar.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the responder portion of define named */
|
||||
/* variable. It decodes the define named variable request */
|
||||
/* (indication) and encodes the define named variable response. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 05 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 04 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 03 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 02 Changes to decode buffer allocation scheme */
|
||||
/* 07/03/97 MDE 01 Op-specific info buffer handling changes */
|
||||
/* 06/09/97 MDE 01 Changed op specific buffer allocation */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pvar.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static DEFVAR_REQ_INFO *req_info;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID defvar_typespec_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID defvar_address_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID defvar_address_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID defvar_address_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID defvar_name_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID defvar_objname_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID defvar_name_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID defvar_typespec_done (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_def_var_req */
|
||||
/* This function is called from mmsdec when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_def_var_req (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("Define Named Variable Request");
|
||||
|
||||
/* get storage for request information */
|
||||
req_info = (DEFVAR_REQ_INFO *) _m_get_dec_buf (aCtx, sizeof (DEFVAR_REQ_INFO));
|
||||
req_info->type_spec_pres = SD_FALSE; /* set default value */
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 0, defvar_name_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* defvar_name_cstr */
|
||||
/* define named variable request: variable name constructor was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defvar_name_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("defvar_name_cstr");
|
||||
|
||||
_ms_get_mms_objname (aCtx, &req_info->name, defvar_objname_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* defvar_objname_done */
|
||||
/* define named variable request: variable name has been decoded. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defvar_objname_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("defvar_objname_done");
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = defvar_name_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* defvar_name_cstr_done */
|
||||
/* define named variable request: variable name constructor done was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defvar_name_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 1, defvar_address_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* defvar_address_cstr */
|
||||
/* define named variable request: address constructor was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defvar_address_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("defvar_address_cstr");
|
||||
|
||||
_ms_get_va_address (aCtx, &req_info->address, defvar_address_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* defvar_address_done */
|
||||
/* define named variable request: address has been decoded. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defvar_address_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("defvar_address_done");
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = defvar_address_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* defvar_address_cstr_done */
|
||||
/* define named variable request: address constructor done was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defvar_address_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 2, defvar_typespec_cstr);
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* defvar_typespec_cstr */
|
||||
/* define named variable request: type spec constructor was encountered */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defvar_typespec_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("defvar_typespec_cstr");
|
||||
|
||||
req_info->type_spec_pres = SD_TRUE; /* set type specification pres */
|
||||
|
||||
_ms_get_va_type_spec (aCtx, &req_info->type_spec, defvar_typespec_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* defvar_typespec_done */
|
||||
/* define named type request: type specification has been decoded. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defvar_typespec_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("defvar_typespec_done");
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_defvar_resp */
|
||||
/* Create and send a define named variable response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mp_defvar_resp (MMSREQ_IND *indptr)
|
||||
{
|
||||
return (_mms_send_null_resp (indptr,MMSOP_DEF_VAR));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_defvar_resp */
|
||||
/* Create a define named variable response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_defvar_resp (ST_UINT32 invoke_id)
|
||||
{
|
||||
return (_mms_fin_null_resp (invoke_id,MMSOP_DEF_VAR));
|
||||
}
|
||||
#endif
|
||||
177
mmslib/mmsle/rs_defvl.c
Normal file
177
mmslib/mmsle/rs_defvl.c
Normal file
@@ -0,0 +1,177 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rs_defvlist.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the responder portion of define named */
|
||||
/* variable list. It decodes the define named variable list */
|
||||
/* request (indication) & encodes the define named variable list */
|
||||
/* response. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 08 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 07 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 08/21/01 JRB 06 Don't allow compile if INT_MAX not defined. */
|
||||
/* 06/22/01 RKR 05 Added limits.h */
|
||||
/* 04/27/00 MDE 04 Lint cleanup */
|
||||
/* 09/13/99 MDE 03 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 02 Changes to decode buffer allocation scheme */
|
||||
/* 07/03/97 MDE 01 Op-specific info buffer handling changes */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
#include <limits.h>
|
||||
#ifndef INT_MAX
|
||||
#error INT_MAX must be defined. Usually defined in limits.h
|
||||
#endif
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pvar.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static VARIABLE_LIST *vlist_ptr;
|
||||
static ST_INT max_num_vars;
|
||||
|
||||
static DEFVLIST_REQ_INFO *req_info;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID defvlist_list_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID defvlist_get_varlist (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID defvlist_name_done (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_def_vlist_req */
|
||||
/* This function is called from MMSDEC when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
/* This is used to restrict the maximum buffer size to 0xFF00, which is */
|
||||
/* close to the max allowed for the chk_xxx series for 16 bit systems */
|
||||
#define MAX_ALLOWED_VARS ((0xFF00 - sizeof (DEFVLIST_REQ_INFO)) / sizeof (VARIABLE_LIST))
|
||||
|
||||
|
||||
ST_VOID mms_def_vlist_req (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT req_size;
|
||||
|
||||
MLOG_CDEC0 ("Define Named Variable List Request");
|
||||
|
||||
#if defined(FIXED_DECBUF)
|
||||
max_num_vars = m_sv_max_num_vars;
|
||||
req_size = mmsl_dec_info_size;
|
||||
#else
|
||||
max_num_vars = _mmsdec_msglen / 2;
|
||||
if (m_sv_max_num_vars && (max_num_vars > m_sv_max_num_vars))
|
||||
max_num_vars = m_sv_max_num_vars;
|
||||
|
||||
/* verify buffer size is allocatable */
|
||||
#if (INT_MAX <= 0x7FFF)
|
||||
if (max_num_vars > MAX_ALLOWED_VARS)
|
||||
max_num_vars = MAX_ALLOWED_VARS;
|
||||
#endif
|
||||
|
||||
req_size = sizeof(DEFVLIST_REQ_INFO) +
|
||||
(sizeof(VARIABLE_LIST) * max_num_vars);
|
||||
#endif
|
||||
|
||||
/* get storage for request information */
|
||||
req_info = (DEFVLIST_REQ_INFO *) _m_get_dec_buf (aCtx, req_size);
|
||||
vlist_ptr = (VARIABLE_LIST *) (req_info + 1);
|
||||
|
||||
_ms_get_mms_objname (aCtx, &req_info->vl_name, defvlist_name_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* defvlist_name_done */
|
||||
/* decoding define named variable list request: variable list name has */
|
||||
/* been obtained. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defvlist_name_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 0, defvlist_get_varlist);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* defvlist_get_varlist */
|
||||
/* decoding define named variable list request: list of variables */
|
||||
/* constructor has been obtained. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defvlist_get_varlist (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
req_info->num_of_variables = 0;
|
||||
_ms_get_va_var_list (aCtx, vlist_ptr, &req_info->num_of_variables,
|
||||
max_num_vars, defvlist_list_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* defvlist_list_done */
|
||||
/* decoding define named variable list request: list of variables has */
|
||||
/* been obtained. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID defvlist_list_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT req_size;
|
||||
|
||||
/* find actual size for request info */
|
||||
req_size = sizeof (DEFVLIST_REQ_INFO)
|
||||
+ (sizeof (VARIABLE_LIST)*req_info->num_of_variables);
|
||||
|
||||
/* give back unused storage */
|
||||
_mms_dec_info = (*m_realloc_os_fun) (_mms_dec_info, req_size);
|
||||
req_info = (DEFVLIST_REQ_INFO *) _mms_dec_info;
|
||||
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_defvlist_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the define named variable list response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mp_defvlist_resp (MMSREQ_IND *indptr)
|
||||
{
|
||||
return (_mms_send_null_resp (indptr,MMSOP_DEF_VLIST));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_defvlist_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the define named variable list response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_defvlist_resp (ST_UINT32 invoke_id)
|
||||
{
|
||||
return (_mms_fin_null_resp (invoke_id,MMSOP_DEF_VLIST));
|
||||
}
|
||||
#endif
|
||||
96
mmslib/mmsle/rs_deldo.c
Normal file
96
mmslib/mmsle/rs_deldo.c
Normal file
@@ -0,0 +1,96 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rs_deldom.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the responder portion of delete domain. */
|
||||
/* It decodes the delete domain request (indication) & encodes */
|
||||
/* the delete domain response. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 06 Remove "thisFileName" */
|
||||
/* 08/28/03 EJV 05 Corr spelling for 'receive'. */
|
||||
/* 12/20/01 JRB 04 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 03 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 02 Changes to decode buffer allocation scheme */
|
||||
/* 07/03/97 MDE 01 Op-specific info buffer handling changes */
|
||||
/* 06/09/97 MDE 01 Changed op specific buffer allocation */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pdom.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : NONE */
|
||||
|
||||
static DELDOM_REQ_INFO *req_info;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_delete_domain_req */
|
||||
/* This function is called from MMSDEC when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_delete_domain_req (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("Delete Domain Request");
|
||||
|
||||
|
||||
/* get storage for request information */
|
||||
req_info = (DELDOM_REQ_INFO *) _m_get_dec_buf (aCtx, sizeof (DELDOM_REQ_INFO));
|
||||
/* read doamin name from received message */
|
||||
if (asn1r_get_identifier (aCtx, req_info->dname))
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_deldom_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the delete domain response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mp_deldom_resp (MMSREQ_IND *indptr)
|
||||
{
|
||||
return (_mms_send_null_resp (indptr,MMSOP_DELETE_DOMAIN));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_deldom_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the delete domain response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_deldom_resp (ST_UINT32 invoke_id)
|
||||
{
|
||||
return (_mms_fin_null_resp (invoke_id,MMSOP_DELETE_DOMAIN));
|
||||
}
|
||||
#endif
|
||||
250
mmslib/mmsle/rs_delea.c
Normal file
250
mmslib/mmsle/rs_delea.c
Normal file
@@ -0,0 +1,250 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rs_delea.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the responder portion of delete event */
|
||||
/* action. It decodes the delete event action request */
|
||||
/* (indication) and encodes the delete event action response. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 06 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 05 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 04 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 03 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 02 Changes to allow compile under C++ */
|
||||
/* 06/09/97 MDE 01 Changed op specific buffer allocation */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pevn.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static DELEA_REQ_INFO *req_info;
|
||||
|
||||
static OBJECT_NAME *obj_ptr;
|
||||
static ST_INT max_obj_name;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID delea_name_list_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID delea_objname_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID delea_name_list_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID delea_get_aa_spec (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID delea_get_domain (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID delea_get_vmd (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID delea_dec_done (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_delea_req */
|
||||
/* This function is called from mmsdec when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_delea_req (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT req_size;
|
||||
|
||||
MLOG_CDEC0 ("Delete Event Action Request");
|
||||
|
||||
#if defined(FIXED_DECBUF)
|
||||
max_obj_name = m_sv_max_obj_name;
|
||||
req_size = mmsl_dec_info_size;
|
||||
#else
|
||||
max_obj_name = _mmsdec_msglen / 2; /* find maximum size */
|
||||
if (m_sv_max_obj_name && (max_obj_name > m_sv_max_obj_name))
|
||||
max_obj_name = m_sv_max_obj_name;
|
||||
req_size = sizeof (DELEA_REQ_INFO) + (sizeof (OBJECT_NAME) * max_obj_name);
|
||||
#endif
|
||||
|
||||
/* get storage for request information */
|
||||
req_info = (DELEA_REQ_INFO *) _m_get_dec_buf (aCtx, req_size);
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 0, delea_name_list_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, delea_get_aa_spec);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 3, delea_get_domain);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 4, delea_get_vmd);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* delea_name_list_cstr */
|
||||
/* decoding delete event action request: decode the specific name list */
|
||||
/* constructor. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID delea_name_list_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("delea_name_list_cstr");
|
||||
|
||||
req_info->req_tag = 0; /* set tag to specific */
|
||||
obj_ptr = (OBJECT_NAME *) (req_info + 1);
|
||||
|
||||
_ms_get_mms_objname (aCtx, obj_ptr, delea_objname_done);
|
||||
|
||||
/* set the cstr done function */
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = delea_name_list_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* delea_objname_done */
|
||||
/* decoding delete event action request: object name has been */
|
||||
/* decoded. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID delea_objname_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("delea_objname_done");
|
||||
|
||||
req_info->num_of_names++; /* inc # of variable names */
|
||||
if (req_info->num_of_names > max_obj_name)
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
else
|
||||
{
|
||||
obj_ptr++; /* point to where next will go */
|
||||
_ms_get_mms_objname (aCtx, obj_ptr, delea_objname_done);
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* delea_name_list_cstr_done */
|
||||
/* decoding delete event action request: specific name list constr */
|
||||
/* done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID delea_name_list_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
aCtx->asn1r_decode_done_fun = delea_dec_done;
|
||||
_ms_set_cs_check2 (aCtx);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* delea_get_aa_spec */
|
||||
/* decoding delete event action request: aa specific was encountered */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID delea_get_aa_spec (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("delea_get_aa_spec");
|
||||
|
||||
req_info->req_tag = 1; /* set tag to aa specific */
|
||||
aCtx->asn1r_decode_done_fun = delea_dec_done;
|
||||
_ms_set_cs_check2 (aCtx);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* delea_get_domain */
|
||||
/* decoding delete event action request: domain was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID delea_get_domain (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("delea_get_domain");
|
||||
|
||||
req_info->req_tag = 3; /* set tag to domain */
|
||||
|
||||
if (asn1r_get_identifier (aCtx, req_info->dname))/* read the domain name */
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
|
||||
aCtx->asn1r_decode_done_fun = delea_dec_done;
|
||||
_ms_set_cs_check2 (aCtx);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* delea_get_vmd */
|
||||
/* decoding delete event action request: vmd was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID delea_get_vmd (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("delea_get_vmd");
|
||||
|
||||
req_info->req_tag = 4; /* set tag to vmd */
|
||||
aCtx->asn1r_decode_done_fun = delea_dec_done;
|
||||
_ms_set_cs_check2 (aCtx);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* delea_dec_done */
|
||||
/* decode done, realloc the structure to desired size */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID delea_dec_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT req_size;
|
||||
/* find actual size for request info */
|
||||
req_size = sizeof (DELEA_REQ_INFO)
|
||||
+ (sizeof (OBJECT_NAME) * req_info->num_of_names);
|
||||
|
||||
/* give back unused storage */
|
||||
_mms_dec_info = (*m_realloc_os_fun) (_mms_dec_info,req_size);
|
||||
req_info = (DELEA_REQ_INFO *) _mms_dec_info;
|
||||
|
||||
_mms_dec_done_ok (aCtx);
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_delea_resp */
|
||||
/* Create and send a delete event action response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mp_delea_resp (MMSREQ_IND *indptr, DELEA_RESP_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_resp_send (MMSOP_DEL_EA,indptr,
|
||||
M_CAST_MK_FUN (_ms_mk_delea_resp),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_delea_resp */
|
||||
/* Create a delete event action response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_delea_resp (ST_UINT32 invoke_id, DELEA_RESP_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_resp_fin (MMSOP_DEL_EA,invoke_id,
|
||||
M_CAST_MK_FUN (_ms_mk_delea_resp),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_delea_resp */
|
||||
/* construct a delete event action response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_delea_resp (ASN1_ENC_CTXT *aCtx, DELEA_RESP_INFO *info)
|
||||
{
|
||||
asn1r_wr_u32 (aCtx, info->cand_not_deleted); /* canditates not deleted */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_prim (aCtx, MMSOP_DEL_EA,CTX); /* tag = opcode, ctx primitive */
|
||||
}
|
||||
250
mmslib/mmsle/rs_delec.c
Normal file
250
mmslib/mmsle/rs_delec.c
Normal file
@@ -0,0 +1,250 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rs_delec.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the responder portion of delete event */
|
||||
/* condition. It decodes the delete event condition request */
|
||||
/* (indication) and encodes the delete event condition response. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 06 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 05 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 04 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 03 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 02 Changes to allow compile under C++ */
|
||||
/* 06/09/97 MDE 01 Changed op specific buffer allocation */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pevn.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static DELEC_REQ_INFO *req_info;
|
||||
|
||||
static OBJECT_NAME *obj_ptr;
|
||||
static ST_INT max_obj_name;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID delec_dec_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID delec_name_list_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID delec_objname_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID delec_name_list_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID delec_get_aa_spec (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID delec_get_domain (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID delec_get_vmd (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_delec_req */
|
||||
/* This function is called from mmsdec when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_delec_req (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT req_size;
|
||||
|
||||
MLOG_CDEC0 ("Delete Event Condition Request");
|
||||
|
||||
#if defined(FIXED_DECBUF)
|
||||
max_obj_name = m_sv_max_obj_name;
|
||||
req_size = mmsl_dec_info_size;
|
||||
#else
|
||||
max_obj_name = _mmsdec_msglen / 2; /* find maximum size */
|
||||
if (m_sv_max_obj_name && (max_obj_name > m_sv_max_obj_name))
|
||||
max_obj_name = m_sv_max_obj_name;
|
||||
req_size = sizeof (DELEC_REQ_INFO) + (sizeof (OBJECT_NAME) * max_obj_name);
|
||||
#endif
|
||||
|
||||
/* get storage for request information */
|
||||
req_info = (DELEC_REQ_INFO *) _m_get_dec_buf (aCtx, req_size);
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 0, delec_name_list_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, delec_get_aa_spec);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 2, delec_get_domain);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 3, delec_get_vmd);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* delec_name_list_cstr */
|
||||
/* decoding delete event condition request: decode the specific */
|
||||
/* name list constructor. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID delec_name_list_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("delec_name_list_cstr");
|
||||
|
||||
req_info->req_tag = 0; /* set tag to specific */
|
||||
obj_ptr = (OBJECT_NAME *) (req_info + 1);
|
||||
|
||||
_ms_get_mms_objname (aCtx, obj_ptr, delec_objname_done);
|
||||
|
||||
/* set the cstr done function */
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = delec_name_list_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* delec_objname_done */
|
||||
/* decoding delete event condition request: object name has been */
|
||||
/* decoded. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID delec_objname_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("delec_objname_done");
|
||||
|
||||
req_info->num_of_names++; /* inc # of variable names */
|
||||
if (req_info->num_of_names > max_obj_name)
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
else
|
||||
{
|
||||
obj_ptr++; /* point to where next will go */
|
||||
_ms_get_mms_objname (aCtx, obj_ptr, delec_objname_done);
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* delec_name_list_cstr_done */
|
||||
/* decoding delete event condition request: specific name list constr */
|
||||
/* done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID delec_name_list_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
aCtx->asn1r_decode_done_fun = delec_dec_done;
|
||||
_ms_set_cs_check2 (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* delec_get_aa_spec */
|
||||
/* decoding delete event condition request: aa specific was encountered */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID delec_get_aa_spec (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("delec_get_aa_spec");
|
||||
|
||||
req_info->req_tag = 1; /* set tag to aa specific */
|
||||
aCtx->asn1r_decode_done_fun = delec_dec_done;
|
||||
_ms_set_cs_check2 (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* delec_get_domain */
|
||||
/* decoding delete event condition request: domain was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID delec_get_domain (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("delec_get_domain");
|
||||
|
||||
req_info->req_tag = 2; /* set tag to domain */
|
||||
|
||||
if (asn1r_get_identifier (aCtx, req_info->dname))/* read the domain name */
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
|
||||
aCtx->asn1r_decode_done_fun = delec_dec_done;
|
||||
_ms_set_cs_check2 (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* delec_get_vmd */
|
||||
/* decoding delete event condition request: vmd was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID delec_get_vmd (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("delec_get_vmd");
|
||||
|
||||
req_info->req_tag = 3; /* set tag to vmd */
|
||||
aCtx->asn1r_decode_done_fun = delec_dec_done;
|
||||
_ms_set_cs_check2 (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* delec_dec_done */
|
||||
/* decode done, realloc the structure to desired size */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID delec_dec_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT req_size;
|
||||
/* find actual size for request info */
|
||||
req_size = sizeof (DELEC_REQ_INFO)
|
||||
+ (sizeof (OBJECT_NAME) * req_info->num_of_names);
|
||||
|
||||
/* give back unused storage */
|
||||
_mms_dec_info = (*m_realloc_os_fun) (_mms_dec_info,req_size);
|
||||
req_info = (DELEC_REQ_INFO *) _mms_dec_info;
|
||||
|
||||
_mms_dec_done_ok (aCtx);
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_delec_resp */
|
||||
/* Create and send a delete event condition response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mp_delec_resp (MMSREQ_IND *indptr, DELEC_RESP_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_resp_send (MMSOP_DEL_EC,indptr,
|
||||
M_CAST_MK_FUN (_ms_mk_delec_resp),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_delec_resp */
|
||||
/* Create a delete event condition response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_delec_resp (ST_UINT32 invoke_id, DELEC_RESP_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_resp_fin (MMSOP_DEL_EC,invoke_id,
|
||||
M_CAST_MK_FUN (_ms_mk_delec_resp),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_delec_resp */
|
||||
/* construct a delete event condition response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_delec_resp (ASN1_ENC_CTXT *aCtx, DELEC_RESP_INFO *info)
|
||||
{
|
||||
asn1r_wr_u32 (aCtx, info->cand_not_deleted); /* canditates not deleted */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_prim (aCtx, MMSOP_DEL_EC,CTX); /* tag = opcode, ctx primitive */
|
||||
}
|
||||
286
mmslib/mmsle/rs_delee.c
Normal file
286
mmslib/mmsle/rs_delee.c
Normal file
@@ -0,0 +1,286 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rs_delee.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the responder portion of delete event */
|
||||
/* enrollment. It decodes the delete event enrollment request */
|
||||
/* (indication) and encodes the delete event enrollment response. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 06 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 05 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 04 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 03 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 02 Changes to allow compile under C++ */
|
||||
/* 06/09/97 MDE 01 Changed op specific buffer allocation */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pevn.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static DELEE_REQ_INFO *req_info;
|
||||
|
||||
static OBJECT_NAME *obj_ptr;
|
||||
static ST_INT max_obj_name;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID delee_dec_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID delee_eaname_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID delee_eaname_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID delee_ecname_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID delee_ecname_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID delee_objname_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID delee_name_list_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID delee_name_list_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID delee_ecname_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID delee_eaname_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_delee_req */
|
||||
/* This function is called from mmsdec when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_delee_req (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT req_size;
|
||||
|
||||
MLOG_CDEC0 ("Delete Event Enrollment Request");
|
||||
|
||||
#if defined(FIXED_DECBUF)
|
||||
max_obj_name = m_sv_max_obj_name;
|
||||
req_size = mmsl_dec_info_size;
|
||||
#else
|
||||
max_obj_name = _mmsdec_msglen / 2; /* find maximum size */
|
||||
if (m_sv_max_obj_name && (max_obj_name > m_sv_max_obj_name))
|
||||
max_obj_name = m_sv_max_obj_name;
|
||||
req_size = sizeof (DELEE_REQ_INFO) + (sizeof (OBJECT_NAME) * max_obj_name);
|
||||
#endif
|
||||
|
||||
/* get storage for request information */
|
||||
req_info = (DELEE_REQ_INFO *) _m_get_dec_buf (aCtx, req_size);
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 0, delee_name_list_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 1, delee_ecname_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 2, delee_eaname_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* delee_name_list_cstr */
|
||||
/* decoding delete event enrollment request: decode the specific name */
|
||||
/* list constructor. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID delee_name_list_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("delee_name_list_cstr");
|
||||
|
||||
req_info->req_tag = 0; /* set tag to specific */
|
||||
obj_ptr = (OBJECT_NAME *) (req_info + 1);
|
||||
|
||||
_ms_get_mms_objname (aCtx, obj_ptr, delee_objname_done);
|
||||
|
||||
/* set the cstr done function */
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = delee_name_list_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* delee_objname_done */
|
||||
/* decoding delete event enrollment request: object name has been */
|
||||
/* decoded. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID delee_objname_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("delee_objname_done");
|
||||
|
||||
req_info->sod.num_of_names++; /* inc # of object names */
|
||||
if (req_info->sod.num_of_names > max_obj_name)
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
else
|
||||
{
|
||||
obj_ptr++; /* point to where next will go */
|
||||
_ms_get_mms_objname (aCtx, obj_ptr, delee_objname_done);
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* delee_name_list_cstr_done */
|
||||
/* decoding delete event enrollment request: specific name list constr */
|
||||
/* done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID delee_name_list_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
aCtx->asn1r_decode_done_fun = delee_dec_done;
|
||||
_ms_set_cs_check2 (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* delee_ecname_cstr */
|
||||
/* decoding delete event enrollment request: event condition name cstr */
|
||||
/* was encountered */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID delee_ecname_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("delee_ecname_cstr");
|
||||
|
||||
req_info->req_tag = 1; /* set tag to event condition */
|
||||
|
||||
_ms_get_mms_objname (aCtx, &req_info->sod.evcon_name, delee_ecname_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* delee_ecname_done */
|
||||
/* delete event enrollment request is being decoded: event condition */
|
||||
/* name has been obtained. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID delee_ecname_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("delee_ecname_done");
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = delee_ecname_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* delee_ecname_cstr_done */
|
||||
/* delete event enrollment request is being decoded: event condition */
|
||||
/* name constructor done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID delee_ecname_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
aCtx->asn1r_decode_done_fun = delee_dec_done;
|
||||
_ms_set_cs_check2 (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* delee_eaname_cstr */
|
||||
/* decoding delete event enrollment request: event action name cstr */
|
||||
/* was encountered */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID delee_eaname_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("delee_eaname_cstr");
|
||||
|
||||
req_info->req_tag = 2; /* set tag to event action */
|
||||
|
||||
_ms_get_mms_objname (aCtx, &req_info->sod.evact_name, delee_eaname_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* delee_eaname_done */
|
||||
/* delete event enrollment request is being decoded: event action */
|
||||
/* name has been obtained. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID delee_eaname_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("delee_eaname_done");
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = delee_eaname_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* delee_eaname_cstr_done */
|
||||
/* delete event enrollment request is being decoded: event action */
|
||||
/* name constructor done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID delee_eaname_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
_ms_set_cs_check2 (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* delee_dec_done */
|
||||
/* decode done, realloc the structure to desired size */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID delee_dec_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT req_size;
|
||||
/* find actual size for request info */
|
||||
req_size = sizeof (DELEE_REQ_INFO)
|
||||
+ (sizeof (OBJECT_NAME) * req_info->sod.num_of_names);
|
||||
|
||||
/* give back unused storage */
|
||||
_mms_dec_info = (*m_realloc_os_fun) (_mms_dec_info,req_size);
|
||||
req_info = (DELEE_REQ_INFO *) _mms_dec_info;
|
||||
|
||||
_mmsdec_rslt->data_pres = SD_TRUE;
|
||||
_mmsdec_rslt->data_ptr = (ST_CHAR *) req_info;
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_delee_resp */
|
||||
/* Create and send a delete event enrollment response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mp_delee_resp (MMSREQ_IND *indptr, DELEE_RESP_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_resp_send (MMSOP_DEL_EE,indptr,
|
||||
M_CAST_MK_FUN (_ms_mk_delee_resp),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_delee_resp */
|
||||
/* Create a delete event enrollment response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_delee_resp (ST_UINT32 invoke_id, DELEE_RESP_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_resp_fin (MMSOP_DEL_EE,invoke_id,
|
||||
M_CAST_MK_FUN (_ms_mk_delee_resp),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_delee_resp */
|
||||
/* construct a delete event enrollment response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_delee_resp (ASN1_ENC_CTXT *aCtx, DELEE_RESP_INFO *info)
|
||||
{
|
||||
asn1r_wr_u32 (aCtx, info->cand_not_deleted); /* canditates not deleted */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_prim (aCtx, MMSOP_DEL_EE,CTX); /* tag = opcode, ctx primitive */
|
||||
}
|
||||
95
mmslib/mmsle/rs_delpi.c
Normal file
95
mmslib/mmsle/rs_delpi.c
Normal file
@@ -0,0 +1,95 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rs_delpi.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the responder portion of delete program */
|
||||
/* invocation. It decodes the delete program invocation request */
|
||||
/* (indication) & encodes the delete program invocation response. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 05 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 04 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 03 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 02 Changes to decode buffer allocation scheme */
|
||||
/* 07/03/97 MDE 01 Op-specific info buffer handling changes */
|
||||
/* 06/09/97 MDE 01 Changed op specific buffer allocation */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pprg.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static DELPI_REQ_INFO *req_info;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_delete_pi_req */
|
||||
/* This function is called from MMSDEC when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_delete_pi_req (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("Delete Program Invocation Request");
|
||||
|
||||
|
||||
/* get storage for request information */
|
||||
req_info = (DELPI_REQ_INFO *) _m_get_dec_buf (aCtx, sizeof (DELPI_REQ_INFO));
|
||||
/* read program invocation name from message */
|
||||
if (asn1r_get_identifier (aCtx, req_info->piname))
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_delpi_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the delete program invocation response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mp_delpi_resp (MMSREQ_IND *indptr)
|
||||
{
|
||||
return (_mms_send_null_resp (indptr,MMSOP_DELETE_PI));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_delpi_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the delete program invocation response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_delpi_resp (ST_UINT32 invoke_id)
|
||||
{
|
||||
return (_mms_fin_null_resp (invoke_id,MMSOP_DELETE_PI));
|
||||
}
|
||||
#endif
|
||||
102
mmslib/mmsle/rs_delse.c
Normal file
102
mmslib/mmsle/rs_delse.c
Normal file
@@ -0,0 +1,102 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rs_delsem.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the responder portion of the delete */
|
||||
/* semaphore. It decodes the delete semaphore request (indication) */
|
||||
/* and encodes the delete semaphore response. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 05 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 04 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 03 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 02 Changes to decode buffer allocation scheme */
|
||||
/* 07/03/97 MDE 01 Op-specific info buffer handling changes */
|
||||
/* 06/09/97 MDE 01 Changed op specific buffer allocation */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_psem.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static DELSEM_REQ_INFO *req_info;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID delsem_objname_done (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_delsem_req */
|
||||
/* This function is called from mmsdec when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_delsem_req (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("Delete Semaphore Request");
|
||||
|
||||
/* get storage for request information */
|
||||
req_info = (DELSEM_REQ_INFO *) _m_get_dec_buf (aCtx, sizeof (DELSEM_REQ_INFO));
|
||||
_ms_get_mms_objname (aCtx, &req_info->sem_name, delsem_objname_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* delsem_objname_done */
|
||||
/* Decoding delete semaphore request: semaphore name obtained */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID delsem_objname_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_delsem_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the delete semaphore response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mp_delsem_resp (MMSREQ_IND *indptr)
|
||||
{
|
||||
return (_mms_send_null_resp (indptr,MMSOP_DELETE_SEM));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_delsem_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the delete semaphore response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_delsem_resp (ST_UINT32 invoke_id)
|
||||
{
|
||||
return (_mms_fin_null_resp (invoke_id,MMSOP_DELETE_SEM));
|
||||
}
|
||||
#endif
|
||||
251
mmslib/mmsle/rs_delty.c
Normal file
251
mmslib/mmsle/rs_delty.c
Normal file
@@ -0,0 +1,251 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rs_deltype.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the responder portion of delete named */
|
||||
/* type. It decodes the delete named type request (indication) */
|
||||
/* and encodes the delete named type response. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 06 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 05 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 04 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 03 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 02 Changes to allow compile under C++ */
|
||||
/* 06/09/97 MDE 01 Changed op specific buffer allocation */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pvar.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static DELTYPE_REQ_INFO *req_info;
|
||||
|
||||
static OBJECT_NAME *obj_ptr;
|
||||
static ST_INT max_obj_name;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
/* static functions with multiple references */
|
||||
|
||||
static ST_VOID deltype_get_dname (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID deltype_name_list_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID deltype_objname_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID deltype_name_list_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID deltype_dec_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID deltype_get_scope (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_del_type_req */
|
||||
/* This function is called from mmsdec when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_del_type_req (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT req_size;
|
||||
|
||||
MLOG_CDEC0 ("Delete Named Type Request");
|
||||
|
||||
#if defined(FIXED_DECBUF)
|
||||
max_obj_name = m_sv_max_obj_name;
|
||||
req_size = mmsl_dec_info_size;
|
||||
#else
|
||||
max_obj_name = _mmsdec_msglen / 2; /* find maximum size */
|
||||
if (m_sv_max_obj_name && (max_obj_name > m_sv_max_obj_name))
|
||||
max_obj_name = m_sv_max_obj_name;
|
||||
req_size = sizeof (DELTYPE_REQ_INFO) + (sizeof (OBJECT_NAME) * max_obj_name);
|
||||
#endif
|
||||
|
||||
/* get storage for request information */
|
||||
req_info = (DELTYPE_REQ_INFO *) _m_get_dec_buf (aCtx, req_size);
|
||||
|
||||
/* req_info->tnames_pres = SD_FALSE; */
|
||||
/* req_info->num_of_tnames = ZERO_ENTRIES; */
|
||||
/* req_info->dname_pres = SD_FALSE; */
|
||||
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 0, deltype_get_scope);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 1, deltype_name_list_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 2, deltype_get_dname);
|
||||
_ms_set_cs_check2 (aCtx); /* check for Companion Standard info */
|
||||
|
||||
asn1r_set_all_cstr_done (aCtx); /* clear cstr done functions */
|
||||
aCtx->asn1r_decode_done_fun = deltype_dec_done; /* ok to be done, set done fun */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* deltype_get_scope */
|
||||
/* delete named type request: decode the scope. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID deltype_get_scope (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("deltype_get_scope");
|
||||
/* read scope from message */
|
||||
if (asn1r_get_i16 (aCtx, &req_info->scope))
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
|
||||
if ((req_info->scope < 0) || (req_info->scope > 3))
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE); /* validate range of scope [0..3] */
|
||||
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 1, deltype_name_list_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 2, deltype_get_dname);
|
||||
_ms_set_cs_check2 (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* deltype_name_list_cstr */
|
||||
/* delete named type request: decode the type name constructor */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID deltype_name_list_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("deltype_name_list_cstr");
|
||||
|
||||
req_info->tnames_pres = SD_TRUE; /* set type name list present */
|
||||
|
||||
obj_ptr = (OBJECT_NAME *) (req_info + 1);
|
||||
|
||||
_ms_get_mms_objname (aCtx, obj_ptr, deltype_objname_done);
|
||||
|
||||
/* set the cstr done function */
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = deltype_name_list_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* deltype_objname_done */
|
||||
/* delete named type request: type name has been decoded. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID deltype_objname_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("deltype_objname_done");
|
||||
|
||||
req_info->num_of_tnames++; /* increment # of type names */
|
||||
if ((req_info->num_of_tnames + 1) <= max_obj_name)
|
||||
{
|
||||
obj_ptr++; /* point to where next will go */
|
||||
_ms_get_mms_objname (aCtx, obj_ptr, deltype_objname_done);
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* deltype_name_list_cstr_done */
|
||||
/* delete named type request: end of the type name list constructor was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID deltype_name_list_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 2, deltype_get_dname);
|
||||
_ms_set_cs_check2 (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* deltype_get_dname */
|
||||
/* delete named type request: domain name was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID deltype_get_dname (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("deltype_get_dname");
|
||||
|
||||
req_info->dname_pres = SD_TRUE; /* set domain name present */
|
||||
|
||||
if (asn1r_get_identifier (aCtx, req_info->dname))/* read the domain name */
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
|
||||
_ms_set_cs_check2 (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* deltype_dec_done */
|
||||
/* decode done, realloc the structure to desired size */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID deltype_dec_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT req_size;
|
||||
|
||||
/* find actual size for request info */
|
||||
req_size = sizeof (DELTYPE_REQ_INFO)
|
||||
+ (sizeof (OBJECT_NAME) * req_info->num_of_tnames);
|
||||
|
||||
/* give back unused storage */
|
||||
_mms_dec_info = (*m_realloc_os_fun) (_mms_dec_info,req_size);
|
||||
req_info = (DELTYPE_REQ_INFO *) _mms_dec_info;
|
||||
_mms_dec_done_ok (aCtx); /* decode done, set done, etc */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_deltype_resp */
|
||||
/* Create and send a delete type response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mp_deltype_resp (MMSREQ_IND *indptr, DELTYPE_RESP_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_resp_send (MMSOP_DEL_TYPE,indptr,
|
||||
M_CAST_MK_FUN (_ms_mk_deltype_resp),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_deltype_resp */
|
||||
/* Create a delete type response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_deltype_resp (ST_UINT32 invoke_id, DELTYPE_RESP_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_resp_fin (MMSOP_DEL_TYPE,invoke_id,
|
||||
M_CAST_MK_FUN (_ms_mk_deltype_resp),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_deltype_resp */
|
||||
/* construct a delete type response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_deltype_resp (ASN1_ENC_CTXT *aCtx, DELTYPE_RESP_INFO *info)
|
||||
{
|
||||
asn1r_wr_u32 (aCtx, info->num_deleted); /* write # deleted */
|
||||
asn1r_fin_prim (aCtx, 1,CTX);
|
||||
|
||||
asn1r_wr_u32 (aCtx, info->num_matched); /* write # matched */
|
||||
asn1r_fin_prim (aCtx, 0,CTX);
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_DEL_TYPE,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
101
mmslib/mmsle/rs_delva.c
Normal file
101
mmslib/mmsle/rs_delva.c
Normal file
@@ -0,0 +1,101 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rs_delvar.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the responder portion of delete variable */
|
||||
/* access. It decodes the delete variable access request */
|
||||
/* (indication) and encodes the delete variable access response. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/20/01 JRB 02 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 06/15/98 MDE 01 Changes to allow compile under C++ */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pvar.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_del_var_req */
|
||||
/* This function is called from mmsdec when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_del_var_req (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
mms_del_type_req (aCtx);
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_delvar_resp */
|
||||
/* Create and send a delete variable access response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mp_delvar_resp (MMSREQ_IND *indptr, DELVAR_RESP_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_resp_send (MMSOP_DEL_VAR,indptr,
|
||||
M_CAST_MK_FUN (_ms_mk_delvar_resp),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_delvar_resp */
|
||||
/* Create a delete variable access response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_delvar_resp (ST_UINT32 invoke_id, DELVAR_RESP_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_resp_fin (MMSOP_DEL_VAR,invoke_id,
|
||||
M_CAST_MK_FUN (_ms_mk_delvar_resp),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_delvar_resp */
|
||||
/* construct a delete variable access response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_delvar_resp (ASN1_ENC_CTXT *aCtx, DELVAR_RESP_INFO *info)
|
||||
{
|
||||
asn1r_wr_u32 (aCtx, info->num_deleted); /* write # deleted */
|
||||
asn1r_fin_prim (aCtx, 1,CTX);
|
||||
|
||||
asn1r_wr_u32 (aCtx, info->num_matched); /* write # matched */
|
||||
asn1r_fin_prim (aCtx, 0,CTX);
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_DEL_VAR,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
103
mmslib/mmsle/rs_delvl.c
Normal file
103
mmslib/mmsle/rs_delvl.c
Normal file
@@ -0,0 +1,103 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rs_delvlist.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the responder portion of delete named */
|
||||
/* variable list. It decodes the delete named variable list */
|
||||
/* request (indication) and encodes the delete named variable */
|
||||
/* list response. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/20/01 JRB 02 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 06/15/98 MDE 01 Changes to allow compile under C++ */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pvar.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_del_vlist_req */
|
||||
/* This function is called from mmsdec when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_del_vlist_req (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
mms_del_type_req (aCtx);
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_delvlist_resp */
|
||||
/* Create and send a delete named variable list response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mp_delvlist_resp (MMSREQ_IND *indptr, DELVLIST_RESP_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_resp_send (MMSOP_DEL_VLIST,indptr,
|
||||
M_CAST_MK_FUN (_ms_mk_delvlist_resp),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_delvlist_resp */
|
||||
/* Create a delete named variable list response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_delvlist_resp (ST_UINT32 invoke_id,
|
||||
DELVLIST_RESP_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_resp_fin (MMSOP_DEL_VLIST,invoke_id,
|
||||
M_CAST_MK_FUN (_ms_mk_delvlist_resp),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_delvlist_resp */
|
||||
/* construct a delete named variable list response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_delvlist_resp (ASN1_ENC_CTXT *aCtx, DELVLIST_RESP_INFO *info)
|
||||
{
|
||||
asn1r_wr_u32 (aCtx, info->num_deleted); /* write # deleted */
|
||||
asn1r_fin_prim (aCtx, 1,CTX);
|
||||
|
||||
asn1r_wr_u32 (aCtx, info->num_matched); /* write # matched */
|
||||
asn1r_fin_prim (aCtx, 0,CTX);
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_DEL_VLIST,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
130
mmslib/mmsle/rs_downl.c
Normal file
130
mmslib/mmsle/rs_downl.c
Normal file
@@ -0,0 +1,130 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rs_download.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the responder portion of download segment. */
|
||||
/* It decodes the download segment request (indication) & encodes */
|
||||
/* the download segment response. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 08 Remove "thisFileName" */
|
||||
/* 08/28/03 EJV 07 Corr spelling for 'receive'. */
|
||||
/* 12/20/01 JRB 06 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 05 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 04 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 03 Changes to allow compile under C++ */
|
||||
/* 07/03/97 MDE 02 Op-specific info buffer handling changes */
|
||||
/* 06/09/97 MDE 01 Changed op specific buffer allocation */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pdom.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static DOWNLOAD_REQ_INFO *req_info;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_download_req */
|
||||
/* This function is called from MMSDEC when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_download_req (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("Download Segment Request");
|
||||
|
||||
/* get storage for request information */
|
||||
req_info = (DOWNLOAD_REQ_INFO *) _m_get_dec_buf (aCtx, sizeof (DOWNLOAD_REQ_INFO));
|
||||
/* read domain name from the received message */
|
||||
if (asn1r_get_identifier (aCtx, req_info->dname))
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_download_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the download segment response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mp_download_resp (MMSREQ_IND *indptr,DOWNLOAD_RESP_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_resp_send (MMSOP_DOWN_LOAD,indptr,
|
||||
M_CAST_MK_FUN (_ms_mk_download_resp),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_download_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the download segment response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_download_resp (ST_UINT32 invoke_id,
|
||||
DOWNLOAD_RESP_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_resp_fin (MMSOP_DOWN_LOAD,invoke_id,
|
||||
M_CAST_MK_FUN (_ms_mk_download_resp),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_download_resp */
|
||||
/* Construct a download segment response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_download_resp (ASN1_ENC_CTXT *aCtx, DOWNLOAD_RESP_INFO *info)
|
||||
{
|
||||
asn1r_strt_constr (aCtx); /* start the sequence constr */
|
||||
if (!info->more_follows)
|
||||
{ /* NOT the default (SD_TRUE) */
|
||||
asn1r_wr_bool (aCtx, info->more_follows); /* write more follows indicator */
|
||||
asn1r_fin_prim (aCtx, 1,CTX); /* context tag 1 */
|
||||
}
|
||||
|
||||
if (info->load_data_type == LOAD_DATA_NON_CODED)
|
||||
{
|
||||
asn1r_wr_octstr (aCtx, info->load_data,info->load_data_len);
|
||||
asn1r_fin_prim (aCtx, 0,CTX); /* context tag 0 */
|
||||
}
|
||||
else /* CODED data, write as complete ASN.1 EXTERNAL */
|
||||
asn1r_wr_delmnt (aCtx, info->load_data,info->load_data_len);
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_DOWN_LOAD,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
|
||||
101
mmslib/mmsle/rs_fclos.c
Normal file
101
mmslib/mmsle/rs_fclos.c
Normal file
@@ -0,0 +1,101 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rs_fclose.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the responder portion of the file close. */
|
||||
/* It decodes the file close request (indication) and encodes */
|
||||
/* the file close response. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* ST_VOID mms_file_close_req () */
|
||||
/* ST_INT16 mp_fclose_resp (indptr) */
|
||||
/* ST_INT16 mpl_fclose_resp (invoke_id) - MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 07 Remove "thisFileName" */
|
||||
/* 08/28/03 EJV 06 Corr spelling for 'receive'. */
|
||||
/* 12/20/01 JRB 05 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 04 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 03 Changes to decode buffer allocation scheme */
|
||||
/* 07/03/97 MDE 02 Op-specific info buffer handling changes */
|
||||
/* 06/09/97 MDE 01 Changed op specific buffer allocation */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pfil.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static FCLOSE_REQ_INFO *fop_info;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_file_close_req */
|
||||
/* This function is called from mmsdec when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_file_close_req (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("File Close Request");
|
||||
|
||||
|
||||
/* get storage for request information */
|
||||
fop_info = (FCLOSE_REQ_INFO *) _m_get_dec_buf (aCtx, sizeof (FCLOSE_REQ_INFO));
|
||||
|
||||
/* read frsmid from the received message */
|
||||
if (asn1r_get_i32 (aCtx, &(fop_info->frsmid)))
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_fclose_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the file close response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mp_fclose_resp (MMSREQ_IND *indptr)
|
||||
{
|
||||
return (_mms_send_null_resp (indptr,MMSOP_FILE_CLOSE));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_fclose_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the file close response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_fclose_resp (ST_UINT32 invoke_id)
|
||||
{
|
||||
return (_mms_fin_null_resp (invoke_id,MMSOP_FILE_CLOSE));
|
||||
}
|
||||
#endif
|
||||
134
mmslib/mmsle/rs_fdele.c
Normal file
134
mmslib/mmsle/rs_fdele.c
Normal file
@@ -0,0 +1,134 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rs_fdelete.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the responder portion of the file delete. */
|
||||
/* It decodes the file delete request (indication) and encodes */
|
||||
/* the file delete response. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 05 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 04 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 03 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 02 Changes to decode buffer allocation scheme */
|
||||
/* 06/09/97 MDE 01 Changed op specific buffer allocation */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pfil.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static FDELETE_REQ_INFO *info;
|
||||
|
||||
static ST_INT max_fnames;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID fdelete_fname_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_file_delete_req */
|
||||
/* This function is called from mmsdec when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/* file delete request: decode the file name. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_file_delete_req (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT req_size;
|
||||
|
||||
MLOG_CDEC0 ("File Delete Request");
|
||||
|
||||
|
||||
if (aCtx->asn1r_elmnt_len > MAX_FILE_NAME)
|
||||
{ /* delete file name is too ST_INT32 */
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
#if defined(FIXED_DECBUF)
|
||||
max_fnames = m_sv_max_file_names;
|
||||
req_size = mmsl_dec_info_size;
|
||||
#else
|
||||
max_fnames = (_mmsdec_msglen/2);
|
||||
if (m_sv_max_file_names && (max_fnames > m_sv_max_file_names))
|
||||
max_fnames = m_sv_max_file_names;
|
||||
req_size = sizeof (FDELETE_REQ_INFO) + (max_fnames * sizeof (FILE_NAME));
|
||||
#endif
|
||||
|
||||
/* get storage for request information */
|
||||
info = (FDELETE_REQ_INFO *) _m_get_dec_buf (aCtx, req_size);
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = fdelete_fname_cstr_done;
|
||||
_ms_get_mms_fname (aCtx, (FILE_NAME *)(info + 1), max_fnames, &info->num_of_fname);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* fdelete_fname_cstr_done */
|
||||
/* file delete request is being decoded: file name list constructor */
|
||||
/* done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID fdelete_fname_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT req_size;
|
||||
|
||||
/* find actual size for request info */
|
||||
req_size = sizeof (FDELETE_REQ_INFO)
|
||||
+ (sizeof (FILE_NAME) * info->num_of_fname);
|
||||
|
||||
/* give back unused storage */
|
||||
_mms_dec_info = (*m_realloc_os_fun) (_mms_dec_info,req_size);
|
||||
info = (FDELETE_REQ_INFO *) _mms_dec_info;
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_fdelete_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the file delete response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mp_fdelete_resp (MMSREQ_IND *indptr)
|
||||
{
|
||||
return (_mms_send_null_resp (indptr,MMSOP_FILE_DELETE));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_fdelete_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the file delete response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_fdelete_resp (ST_UINT32 invoke_id)
|
||||
{
|
||||
return (_mms_fin_null_resp (invoke_id,MMSOP_FILE_DELETE));
|
||||
}
|
||||
#endif
|
||||
298
mmslib/mmsle/rs_fdir.c
Normal file
298
mmslib/mmsle/rs_fdir.c
Normal file
@@ -0,0 +1,298 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rs_fdir.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the responder portion of file directory. */
|
||||
/* It decodes the file directory request (indication) and encodes */
|
||||
/* the file directory response. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/20/01 JRB 05 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 04 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 03 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 02 Changes to allow compile under C++ */
|
||||
/* 06/09/97 MDE 01 Changed op specific buffer allocation */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pfil.h"
|
||||
#include "asn1defs.h"
|
||||
#include "mem_chk.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* For debug version, use a static pointer to avoid duplication of */
|
||||
/* __FILE__ strings. */
|
||||
|
||||
#ifdef DEBUG_SISCO
|
||||
SD_CONST static ST_CHAR *SD_CONST thisFileName = __FILE__;
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static FDIR_REQ_INFO *fop_info;
|
||||
|
||||
static ST_INT max_fnames;
|
||||
static FILE_NAME *fname_idx;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID fdir_fs_fname_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID fdir_ca_fname_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID fdir_ca_fname_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID fdir_fs_fname_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID fdir_dec_done_ok (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_file_dir_req */
|
||||
/* This function is called from mmsdec when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_file_dir_req (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT req_size;
|
||||
|
||||
MLOG_CDEC0 ("File Directory Request");
|
||||
|
||||
#if defined(FIXED_DECBUF)
|
||||
max_fnames = m_sv_max_file_names;
|
||||
req_size = mmsl_dec_info_size;
|
||||
#else
|
||||
max_fnames = (_mmsdec_msglen/2);
|
||||
if (m_sv_max_file_names && (max_fnames > m_sv_max_file_names))
|
||||
max_fnames = m_sv_max_file_names;
|
||||
req_size = sizeof (FDIR_REQ_INFO) + (max_fnames * sizeof (FILE_NAME));
|
||||
#endif
|
||||
|
||||
/* get storage for request information */
|
||||
fop_info = (FDIR_REQ_INFO *) _m_get_dec_buf (aCtx, req_size);
|
||||
if (aCtx->asn1r_elmnt_len > 0) /* a constructor is present */
|
||||
{
|
||||
fname_idx = (FILE_NAME *)(fop_info + 1);
|
||||
ASN1R_TAG_ADD (aCtx, CTX|CONSTR, 0, fdir_fs_fname_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX|CONSTR, 1, fdir_ca_fname_cstr);
|
||||
}
|
||||
else /* all optional constructors were excluded */
|
||||
{
|
||||
fop_info->filespec_pres = SD_FALSE; /* reset filespec present */
|
||||
fop_info->cont_after_pres = SD_FALSE; /* reset continue after present */
|
||||
}
|
||||
aCtx->asn1r_decode_done_fun = fdir_dec_done_ok;
|
||||
_ms_set_cs_check2 (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* fdir_fs_fname_cstr */
|
||||
/* file directory request is being decoded: file specification filename */
|
||||
/* cstr was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID fdir_fs_fname_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("fdir_fs_fname_cstr");
|
||||
|
||||
fop_info->filespec_pres = SD_TRUE; /* set file spec present */
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = fdir_fs_fname_cstr_done;
|
||||
_ms_get_mms_fname (aCtx, fname_idx, max_fnames, &fop_info->num_of_fs_fname);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* fdir_fs_fname_cstr_done */
|
||||
/* file directory request is being decoded: file specification file */
|
||||
/* name list constructor done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID fdir_fs_fname_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ASN1R_TAG_ADD (aCtx, CTX|CONSTR, 1, fdir_ca_fname_cstr);
|
||||
_ms_set_cs_check2 (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* fdir_ca_fname_cstr */
|
||||
/* file directory request is being decoded: continue after filename */
|
||||
/* cstr was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID fdir_ca_fname_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("fdir_ca_fname_cstr");
|
||||
|
||||
fop_info->cont_after_pres = SD_TRUE; /* set continue name present */
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = fdir_ca_fname_cstr_done;
|
||||
fname_idx += fop_info -> num_of_fs_fname;
|
||||
_ms_get_mms_fname (aCtx, fname_idx, max_fnames, &fop_info->num_of_ca_fname);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* fdir_ca_fname_cstr_done */
|
||||
/* file directory request is being decoded: continue after file name */
|
||||
/* list constructor done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID fdir_ca_fname_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("fdir_ca_fname_cstr_done");
|
||||
|
||||
_ms_set_cs_check2 (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* fdir_dec_done_ok */
|
||||
/* file directory request is completely done. Any extra storage is */
|
||||
/* given back. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID fdir_dec_done_ok (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT req_size;
|
||||
/* find actual size for request info */
|
||||
req_size = sizeof (FDIR_REQ_INFO)
|
||||
+ (sizeof (FILE_NAME) * fop_info->num_of_fs_fname)
|
||||
+ (sizeof (FILE_NAME) * fop_info->num_of_ca_fname);
|
||||
|
||||
/* give back unused storage */
|
||||
_mms_dec_info = (*m_realloc_os_fun) (_mms_dec_info,req_size);
|
||||
fop_info = (FDIR_REQ_INFO *) _mms_dec_info;
|
||||
|
||||
_mms_dec_done_ok (aCtx);
|
||||
|
||||
MLOG_PAUSEDEC (NULL);
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_fdir_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the file directory response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mp_fdir_resp (MMSREQ_IND *indptr, FDIR_RESP_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_resp_send (MMSOP_FILE_DIR,indptr,
|
||||
M_CAST_MK_FUN (_ms_mk_fdir_resp),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_fdir_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the file directory response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_fdir_resp (ST_UINT32 invoke_id, FDIR_RESP_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_resp_fin (MMSOP_FILE_DIR,invoke_id,
|
||||
M_CAST_MK_FUN (_ms_mk_fdir_resp),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_fdir_resp */
|
||||
/* ENCODE a file directory RESPONSE: */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_fdir_resp (ASN1_ENC_CTXT *aCtx, FDIR_RESP_INFO *info_ptr)
|
||||
{
|
||||
FDIR_DIR_ENT *ent_ptr;
|
||||
ST_INT i;
|
||||
ST_INT tab_size;
|
||||
FDIR_DIR_ENT **dir_ent_tab;
|
||||
FDIR_DIR_ENT *dir_ptr;
|
||||
ST_INT dir_ent_idx;
|
||||
|
||||
/* allocate an array of fdir_dir_ent pointers */
|
||||
|
||||
tab_size = info_ptr->num_dir_ent * sizeof (FDIR_DIR_ENT *);
|
||||
tab_size++; /* make sure not 0 */
|
||||
|
||||
dir_ent_tab = (FDIR_DIR_ENT **)chk_calloc (1, tab_size);
|
||||
|
||||
dir_ptr = (FDIR_DIR_ENT *)(info_ptr + 1);
|
||||
|
||||
for (i=0; i < info_ptr->num_dir_ent; ++i)
|
||||
{
|
||||
dir_ent_tab[ i ] = dir_ptr;
|
||||
dir_ptr = (FDIR_DIR_ENT *)
|
||||
((FILE_NAME *) (dir_ptr + 1) + dir_ptr -> num_of_fname);
|
||||
}
|
||||
|
||||
asn1r_strt_constr (aCtx); /* start the fdir seq constr */
|
||||
|
||||
if (info_ptr->more_follows)
|
||||
{ /* NOT the default value - */
|
||||
asn1r_wr_bool (aCtx, info_ptr->more_follows); /* encode more follows */
|
||||
asn1r_fin_prim (aCtx, 1,CTX); /* finish the primitive */
|
||||
}
|
||||
|
||||
asn1r_strt_constr (aCtx); /* start list of dir ent constr */
|
||||
asn1r_strt_constr (aCtx); /* start seq of dir ent constr */
|
||||
|
||||
if (info_ptr->num_dir_ent > 0) /* if data is to be included - */
|
||||
{
|
||||
/* point to last dir entry */
|
||||
dir_ent_idx = info_ptr->num_dir_ent - 1;
|
||||
ent_ptr = dir_ent_tab[ dir_ent_idx ];
|
||||
for (i = 0; i < info_ptr->num_dir_ent; ++i)
|
||||
{
|
||||
asn1r_strt_constr (aCtx); /* start the dir entry constr */
|
||||
|
||||
asn1r_strt_constr (aCtx); /* start the file attr constr */
|
||||
if (ent_ptr->mtimpres)
|
||||
{
|
||||
asn1r_wr_time (aCtx, ent_ptr->mtime); /* write the last modified time */
|
||||
asn1r_fin_prim (aCtx, 1,CTX);
|
||||
}
|
||||
asn1r_wr_u32 (aCtx, ent_ptr->fsize); /* write the file size */
|
||||
asn1r_fin_prim (aCtx, 0,CTX);
|
||||
asn1r_fin_constr (aCtx, 1,CTX,DEF); /* close file attr constructor */
|
||||
|
||||
/* write the file name */
|
||||
asn1r_strt_constr (aCtx);
|
||||
_ms_wr_mms_fname (aCtx, (FILE_NAME *)(ent_ptr + 1),
|
||||
ent_ptr->num_of_fname);
|
||||
asn1r_fin_constr (aCtx, 0,CTX,DEF); /* context specific tag 0 */
|
||||
|
||||
asn1r_fin_constr (aCtx, SEQ_CODE,UNI,DEF); /* close dir entry constructor */
|
||||
dir_ent_idx--;
|
||||
ent_ptr = dir_ent_tab[ dir_ent_idx ];
|
||||
}
|
||||
}
|
||||
|
||||
asn1r_fin_constr (aCtx, SEQ_CODE,UNI,DEF); /* finish seq of dir ents cstr */
|
||||
asn1r_fin_constr (aCtx, 0,CTX,DEF); /* finish list of dir ents cstr */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
|
||||
asn1r_fin_constr (aCtx, MMSOP_FILE_DIR,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
chk_free (dir_ent_tab);
|
||||
}
|
||||
190
mmslib/mmsle/rs_fopen.c
Normal file
190
mmslib/mmsle/rs_fopen.c
Normal file
@@ -0,0 +1,190 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rs_fopen.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the responder portion of the file open. */
|
||||
/* It decodes the file open request (indication) and encodes */
|
||||
/* the file open response. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 06 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 05 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 04 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 03 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 02 Changes to allow compile under C++ */
|
||||
/* 06/09/97 MDE 01 Changed op specific buffer allocation */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pfil.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static FOPEN_REQ_INFO *fop_info;
|
||||
|
||||
static ST_INT max_fnames;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID fopen_fname_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID fopen_fname_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID fopen_get_init_pos (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
/************************************************************************/
|
||||
/* mms_file_open_req */
|
||||
/* This function is called from mmsdec when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_file_open_req (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT req_size;
|
||||
|
||||
MLOG_CDEC0 ("File Open Request");
|
||||
|
||||
#if defined(FIXED_DECBUF)
|
||||
max_fnames = m_sv_max_file_names;
|
||||
req_size = mmsl_dec_info_size;
|
||||
#else
|
||||
max_fnames = (_mmsdec_msglen/2);
|
||||
if (m_sv_max_file_names && (max_fnames > m_sv_max_file_names))
|
||||
max_fnames = m_sv_max_file_names;
|
||||
req_size = sizeof (FOPEN_REQ_INFO) + (max_fnames * (sizeof (FILE_NAME)));
|
||||
#endif
|
||||
|
||||
/* get storage for request information */
|
||||
fop_info = (FOPEN_REQ_INFO *) _m_get_dec_buf (aCtx, req_size);
|
||||
ASN1R_TAG_ADD (aCtx, CTX|CONSTR,0,fopen_fname_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* fopen_fname_cstr */
|
||||
/* file open request is being decoded: filename cstr was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID fopen_fname_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("fopen_fname_cstr");
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = fopen_fname_cstr_done;
|
||||
_ms_get_mms_fname (aCtx, (FILE_NAME *)(fop_info + 1), max_fnames,
|
||||
&fop_info->num_of_fname);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* fopen_fname_cstr_done */
|
||||
/* file open request is being decoded: file name list constructor done */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID fopen_fname_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, fopen_get_init_pos);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* fopen_get_init_pos */
|
||||
/* file open request is being decoded: initial position was encountered */
|
||||
/* this must be all. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID fopen_get_init_pos (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT req_size;
|
||||
|
||||
MLOG_CDEC0 ("fopen_get_init_pos");
|
||||
|
||||
if (asn1r_get_u32 (aCtx, &(fop_info->init_pos))) /* read the initial position */
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
|
||||
/* find actual size for request info */
|
||||
req_size = sizeof (FOPEN_REQ_INFO)
|
||||
+ (sizeof (FILE_NAME) * fop_info->num_of_fname);
|
||||
|
||||
/* give back unused storage */
|
||||
_mms_dec_info = (*m_realloc_os_fun) (_mms_dec_info,req_size);
|
||||
fop_info = (FOPEN_REQ_INFO *) _mms_dec_info;
|
||||
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_fopen_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the file open response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mp_fopen_resp (MMSREQ_IND *indptr, FOPEN_RESP_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_resp_send (MMSOP_FILE_OPEN,indptr,
|
||||
M_CAST_MK_FUN (_ms_mk_fopen_resp),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_fopen_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the file open response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_fopen_resp (ST_UINT32 invoke_id, FOPEN_RESP_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_resp_fin (MMSOP_FILE_OPEN,invoke_id,
|
||||
M_CAST_MK_FUN (_ms_mk_fopen_resp),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_fopen_resp */
|
||||
/* ENCODE a file open RESPONSE: */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_fopen_resp (ASN1_ENC_CTXT *aCtx, FOPEN_RESP_INFO *info_ptr)
|
||||
{
|
||||
asn1r_strt_constr (aCtx); /* start the file attr constr */
|
||||
if (info_ptr->ent.mtimpres) /* if data is to be included - */
|
||||
{
|
||||
asn1r_wr_time (aCtx, info_ptr->ent.mtime); /* write the last modified time */
|
||||
asn1r_fin_prim (aCtx, 1,CTX);
|
||||
}
|
||||
|
||||
asn1r_wr_u32 (aCtx, info_ptr->ent.fsize); /* write the file size */
|
||||
asn1r_fin_prim (aCtx, 0,CTX);
|
||||
|
||||
asn1r_fin_constr (aCtx, 1,CTX,DEF); /* close file attr constructor */
|
||||
|
||||
asn1r_wr_i32 (aCtx, info_ptr->frsmid); /* write the frsmid */
|
||||
asn1r_fin_prim (aCtx, 0,CTX);
|
||||
|
||||
/* write the context specific tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_FILE_OPEN,CTX,DEF);
|
||||
}
|
||||
122
mmslib/mmsle/rs_fread.c
Normal file
122
mmslib/mmsle/rs_fread.c
Normal file
@@ -0,0 +1,122 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rs_fread.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the responder portion of the file read. */
|
||||
/* It decodes the file read request (indication) and encodes */
|
||||
/* the file read response. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 06 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 05 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 04 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 03 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 02 Changes to allow compile under C++ */
|
||||
/* 07/03/97 MDE 01 Op-specific info buffer handling changes */
|
||||
/* 06/09/97 MDE 01 Changed op specific buffer allocation */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pfil.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static FREAD_REQ_INFO *fop_info;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_file_read_req */
|
||||
/* This function is called from mmsdec when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_file_read_req (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("File Read Request");
|
||||
|
||||
/* get storage for request information */
|
||||
fop_info = (FREAD_REQ_INFO *) _m_get_dec_buf (aCtx, sizeof (FREAD_REQ_INFO));
|
||||
if (asn1r_get_i32 (aCtx, &(fop_info->frsmid))) /* read the frsmid */
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_fread_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the file read response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mp_fread_resp (MMSREQ_IND *indptr, FREAD_RESP_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_resp_send (MMSOP_FILE_READ,indptr,
|
||||
M_CAST_MK_FUN (_ms_mk_fread_resp),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_fread_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the file read response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_fread_resp (ST_UINT32 invoke_id, FREAD_RESP_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_resp_fin (MMSOP_FILE_READ,invoke_id,
|
||||
M_CAST_MK_FUN (_ms_mk_fread_resp),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_fread_resp */
|
||||
/* ENCODE a file read RESPONSE: */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_fread_resp (ASN1_ENC_CTXT *aCtx, FREAD_RESP_INFO *info_ptr)
|
||||
{
|
||||
|
||||
if (!info_ptr->more_follows) /* if data is to be included - */
|
||||
{ /* different from the default */
|
||||
asn1r_wr_bool (aCtx, info_ptr->more_follows); /* write more follows indicator */
|
||||
asn1r_fin_prim (aCtx, 1,CTX);
|
||||
}
|
||||
|
||||
/* write the file data octets */
|
||||
asn1r_wr_octstr (aCtx, info_ptr->filedata, info_ptr->fd_len);
|
||||
asn1r_fin_prim (aCtx, 0,CTX);
|
||||
|
||||
/* write the context specific tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_FILE_READ,CTX,DEF);
|
||||
}
|
||||
172
mmslib/mmsle/rs_frena.c
Normal file
172
mmslib/mmsle/rs_frena.c
Normal file
@@ -0,0 +1,172 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rs_frena.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the responder portion of the file rename. */
|
||||
/* It decodes the file rename request (indication) and encodes */
|
||||
/* the file rename response. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 05 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 04 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 03 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 02 Changes to decode buffer allocation scheme */
|
||||
/* 06/09/97 MDE 01 Changed op specific buffer allocation */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pfil.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static FRENAME_REQ_INFO *fop_info;
|
||||
|
||||
static ST_INT max_fnames;
|
||||
static FILE_NAME *fname_idx;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID frename_new_fname_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID frename_new_fname_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID frename_cur_fname_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID frename_cur_fname_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_file_rename_req */
|
||||
/* This function is called from mmsdec when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_file_rename_req (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT req_size;
|
||||
|
||||
MLOG_CDEC0 ("File Rename Request");
|
||||
|
||||
#if defined(FIXED_DECBUF)
|
||||
max_fnames = m_sv_max_file_names;
|
||||
req_size = mmsl_dec_info_size;
|
||||
#else
|
||||
max_fnames = (_mmsdec_msglen/2);
|
||||
if (m_sv_max_file_names && (max_fnames > m_sv_max_file_names))
|
||||
max_fnames = m_sv_max_file_names;
|
||||
req_size = sizeof (FRENAME_REQ_INFO) + (max_fnames * sizeof (FILE_NAME));
|
||||
#endif
|
||||
|
||||
/* get storage for request information */
|
||||
fop_info = (FRENAME_REQ_INFO *) _m_get_dec_buf (aCtx, req_size);
|
||||
fname_idx = (FILE_NAME *)(fop_info + 1);
|
||||
ASN1R_TAG_ADD (aCtx, CTX|CONSTR, 0, frename_cur_fname_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* frename_cur_fname_cstr */
|
||||
/* request domain download request is being decoded: filename cstr was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID frename_cur_fname_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("frename_cur_fname_cstr");
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = frename_cur_fname_cstr_done;
|
||||
_ms_get_mms_fname (aCtx, fname_idx, max_fnames, &fop_info->num_of_cur_fname);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* frename_cur_fname_cstr_done */
|
||||
/* file rename request is being decoded: file name list constructor */
|
||||
/* done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID frename_cur_fname_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX|CONSTR, 1, frename_new_fname_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* frename_new_fname_cstr */
|
||||
/* request domain download request is being decoded: filename cstr was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID frename_new_fname_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("frename_new_fname_cstr");
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = frename_new_fname_cstr_done;
|
||||
fname_idx += fop_info -> num_of_cur_fname;
|
||||
_ms_get_mms_fname (aCtx, fname_idx, max_fnames, &fop_info->num_of_new_fname);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* frename_new_fname_cstr_done */
|
||||
/* request domain download request is being decoded: file name list */
|
||||
/* constructor done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID frename_new_fname_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT req_size;
|
||||
|
||||
/* find actual size for request info */
|
||||
req_size = sizeof (FRENAME_REQ_INFO)
|
||||
+ (sizeof (FILE_NAME) * fop_info->num_of_cur_fname)
|
||||
+ (sizeof (FILE_NAME) * fop_info->num_of_new_fname);
|
||||
|
||||
/* give back unused storage */
|
||||
_mms_dec_info = (*m_realloc_os_fun) (_mms_dec_info,req_size);
|
||||
fop_info = (FRENAME_REQ_INFO *) _mms_dec_info;
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_frename_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the file rename response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mp_frename_resp (MMSREQ_IND *indptr)
|
||||
{
|
||||
return (_mms_send_null_resp (indptr,MMSOP_FILE_RENAME));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_frename_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the file rename response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_frename_resp (ST_UINT32 invoke_id)
|
||||
{
|
||||
return (_mms_fin_null_resp (invoke_id,MMSOP_FILE_RENAME));
|
||||
}
|
||||
#endif
|
||||
378
mmslib/mmsle/rs_getae.c
Normal file
378
mmslib/mmsle/rs_getae.c
Normal file
@@ -0,0 +1,378 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rs_getaes.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the responder portion of get alarm */
|
||||
/* enrollment summary. It decodes the get alarm enrollment */
|
||||
/* summary request (indication) & encodes the get alarm */
|
||||
/* enrollment summary response. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 04/21/08 JRB 08 Use asn1r_wr_bool to write aes_ptr->not_lost.*/
|
||||
/* 03/11/04 GLB 07 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 06 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 05 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 04 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 03 Changes to allow compile under C++ */
|
||||
/* 07/03/97 MDE 02 Op-specific info buffer handling changes */
|
||||
/* 06/09/97 MDE 01 Changed op specific buffer allocation */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pevn.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static GETAES_REQ_INFO *req_info;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID getaes_get_enrolls_only (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getaes_get_act_alarms_only (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getaes_get_ack_filter (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getaes_sev_filter_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getaes_get_most_sev (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getaes_get_least_sev (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getaes_sev_filter_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getaes_ca_name_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getaes_ca_name_done (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_getaes_req */
|
||||
/* This function is called from MMSDEC when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_getaes_req (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("Get Alarm Enrollment Summary Request");
|
||||
|
||||
|
||||
/* get storage for request information */
|
||||
req_info = (GETAES_REQ_INFO *) _m_get_dec_buf (aCtx, sizeof (GETAES_REQ_INFO));
|
||||
req_info->enroll_only = SD_TRUE; /* set default values */
|
||||
req_info->act_alarms_only = SD_TRUE;
|
||||
|
||||
/* Done by calloc */
|
||||
/* req_info->ack_filter = 0; */
|
||||
/* req_info->most_sev_filter = 0; */
|
||||
req_info->least_sev_filter = 127;
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 0, getaes_get_enrolls_only);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, getaes_get_act_alarms_only);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 2, getaes_get_ack_filter);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 3, getaes_sev_filter_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 5, getaes_ca_name_cstr);
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getaes_get_enrolls_only */
|
||||
/* get alarm enrollment summary REQUEST (indication) is being decoded: */
|
||||
/* enrollments only was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getaes_get_enrolls_only (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getaes_get_enrolls_only");
|
||||
|
||||
if (asn1r_get_bool (aCtx, &req_info->enroll_only)) /* get enrollments only */
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, getaes_get_act_alarms_only);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 2, getaes_get_ack_filter);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 3, getaes_sev_filter_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 5, getaes_ca_name_cstr);
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getaes_get_act_alarms_only */
|
||||
/* get alarm enrollment summary REQUEST is being decoded: active */
|
||||
/* enrollments only was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getaes_get_act_alarms_only (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getaes_get_act_alarms_only");
|
||||
|
||||
if (asn1r_get_bool (aCtx, &req_info->act_alarms_only)) /* active enrollments */
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 2, getaes_get_ack_filter);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 3, getaes_sev_filter_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 5, getaes_ca_name_cstr);
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getaes_get_ack_filter */
|
||||
/* get alarm enrollment summary REQUEST is being decoded: ack filter */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getaes_get_ack_filter (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getaes_get_ack_filter");
|
||||
|
||||
if (asn1r_get_i16 (aCtx, &req_info->ack_filter)) /* get ack filter */
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
else if ((req_info->ack_filter < 0) || (req_info->ack_filter > 2))
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 3, getaes_sev_filter_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 5, getaes_ca_name_cstr);
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getaes_sev_filter_cstr */
|
||||
/* get alarm enrollment summary REQUEST is being decoded: severity */
|
||||
/* filter constructor was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getaes_sev_filter_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getaes_sev_filter_cstr");
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 0, getaes_get_most_sev);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, getaes_get_least_sev);
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = getaes_sev_filter_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getaes_get_most_sev */
|
||||
/* get alarm enrollment summary REQUEST is being decoded: most severe */
|
||||
/* filter was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getaes_get_most_sev (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getaes_get_most_sev");
|
||||
|
||||
if (asn1r_get_u8 (aCtx, &req_info->most_sev_filter)) /* most severe filter */
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, getaes_get_least_sev);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getaes_get_least_sev */
|
||||
/* get alarm enrollment summary REQUEST is being decoded: least severe */
|
||||
/* filter was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getaes_get_least_sev (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getaes_get_least_sev");
|
||||
|
||||
if (asn1r_get_u8 (aCtx, &req_info->least_sev_filter)) /* least severe filter */
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getaes_sev_filter_cstr_done */
|
||||
/* get alarm enrollment summary REQUEST is being decoded: severity */
|
||||
/* filter constructor done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getaes_sev_filter_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 5, getaes_ca_name_cstr);
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getaes_ca_name_cstr */
|
||||
/* get alarm enrollment summary REQUEST is being decoded: continue */
|
||||
/* after name constructor was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getaes_ca_name_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getaes_ca_name_cstr");
|
||||
|
||||
req_info->ca_name_pres = SD_TRUE; /* continue after name present */
|
||||
|
||||
_ms_get_mms_objname (aCtx, &req_info->ca_name, getaes_ca_name_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getaes_ca_name_done */
|
||||
/* get alarm enrollment summary RESPONSE (confirm) is being decoded: */
|
||||
/* continue after name has been obtained. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getaes_ca_name_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getaes_ca_name_done");
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_getaes_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the get alarm enrollment summary response */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mp_getaes_resp (MMSREQ_IND *indptr, GETAES_RESP_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_resp_send (MMSOP_GET_ALARM_ESUM,indptr,
|
||||
M_CAST_MK_FUN (_ms_mk_getaes_resp),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_getaes_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the get alarm enrollment summary response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_getaes_resp (ST_UINT32 invoke_id, GETAES_RESP_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_resp_fin (MMSOP_GET_ALARM_ESUM,invoke_id,
|
||||
M_CAST_MK_FUN (_ms_mk_getaes_resp),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_getaes_resp */
|
||||
/* ENCODE a get alarm enrollment summary RESPONSE: */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_getaes_resp (ASN1_ENC_CTXT *aCtx, GETAES_RESP_INFO *info)
|
||||
{
|
||||
ST_INT i;
|
||||
ALARM_ENROLL_SUMMARY *aes_ptr;
|
||||
|
||||
if (info->more_follows)
|
||||
{ /* not the default */
|
||||
asn1r_wr_bool (aCtx, info->more_follows); /* write more follows indicator */
|
||||
asn1r_fin_prim (aCtx, 1, CTX); /* ctx tag 1 */
|
||||
}
|
||||
|
||||
asn1r_strt_constr (aCtx); /* start ctx tag 0 constructor */
|
||||
aes_ptr = (ALARM_ENROLL_SUMMARY *) (info + 1);
|
||||
/* point to last alarm enrollment summary */
|
||||
aes_ptr += (info->num_of_alarm_esum-1);
|
||||
for (i = 0; i < info->num_of_alarm_esum; i++)
|
||||
{
|
||||
asn1r_strt_constr (aCtx); /* start universal seq cstr */
|
||||
if (aes_ptr->iack_time_pres)
|
||||
{ /* write idle acknowlegment time*/
|
||||
asn1r_strt_constr (aCtx); /* start ctx tag 12 constructor */
|
||||
_ms_wr_mms_evtime (aCtx, &aes_ptr->iack_time);
|
||||
asn1r_fin_constr (aCtx, 12,CTX,DEF); /* finish ctx tag 12 constructor */
|
||||
}
|
||||
if (aes_ptr->tti_time_pres)
|
||||
{ /* write tran to idle time */
|
||||
asn1r_strt_constr (aCtx); /* start ctx tag 11 constructor */
|
||||
_ms_wr_mms_evtime (aCtx, &aes_ptr->tti_time);
|
||||
asn1r_fin_constr (aCtx, 11,CTX,DEF); /* finish ctx tag 11 constructor */
|
||||
}
|
||||
if (aes_ptr->aack_time_pres)
|
||||
{ /* write active acknowledge time*/
|
||||
asn1r_strt_constr (aCtx); /* start ctx tag 10 constructor */
|
||||
_ms_wr_mms_evtime (aCtx, &aes_ptr->aack_time);
|
||||
asn1r_fin_constr (aCtx, 10,CTX,DEF); /* finish ctx tag 10 constructor */
|
||||
}
|
||||
if (aes_ptr->tta_time_pres)
|
||||
{ /* write tran to active time */
|
||||
asn1r_strt_constr (aCtx); /* start ctx tag 9 constructor */
|
||||
_ms_wr_mms_evtime (aCtx, &aes_ptr->tta_time);
|
||||
asn1r_fin_constr (aCtx, 9,CTX,DEF); /* finish ctx tag 9 constructor */
|
||||
}
|
||||
if (aes_ptr->ee_state_pres)
|
||||
{ /* write event enroll state */
|
||||
asn1r_wr_i16 (aCtx, aes_ptr->ee_state);
|
||||
asn1r_fin_prim (aCtx, 8, CTX);
|
||||
}
|
||||
asn1r_wr_i16 (aCtx, aes_ptr->alarm_ack_rule);
|
||||
asn1r_fin_prim (aCtx, 7, CTX);
|
||||
|
||||
if (aes_ptr->not_lost)
|
||||
{ /* not the default of SD_FALSE */
|
||||
asn1r_wr_bool (aCtx, aes_ptr->not_lost); /* write notification lost */
|
||||
asn1r_fin_prim (aCtx, 6, CTX);
|
||||
}
|
||||
#ifdef CS_SUPPORT
|
||||
if (aes_ptr->addl_detail_pres)
|
||||
{ /* write additional detail */
|
||||
asn1r_strt_constr (aCtx); /* start ctx tag 5 constructor */
|
||||
asn1r_wr_delmnt (aCtx, aes_ptr->addl_detail,aes_ptr->addl_detail_len);
|
||||
asn1r_fin_constr (aCtx, 5,CTX,DEF); /* finish ctx tag 5 constructor */
|
||||
}
|
||||
#endif
|
||||
asn1r_wr_i16 (aCtx, aes_ptr->cur_state);
|
||||
asn1r_fin_prim (aCtx, 4, CTX);
|
||||
|
||||
asn1r_wr_u8 (aCtx, aes_ptr->severity);
|
||||
asn1r_fin_prim (aCtx, 3, CTX);
|
||||
|
||||
if (aes_ptr->client_app_pres)
|
||||
{
|
||||
asn1r_strt_constr (aCtx); /* start ctx tag 2 constructor */
|
||||
asn1r_wr_delmnt (aCtx, aes_ptr->client_app,aes_ptr->client_app_len);
|
||||
asn1r_fin_constr (aCtx, 2,CTX,DEF); /* finish ctx tag 2 constructor */
|
||||
}
|
||||
asn1r_strt_constr (aCtx); /* start ctx tag 0 constructor */
|
||||
_ms_wr_mms_objname (aCtx, &aes_ptr->evenroll_name);
|
||||
asn1r_fin_constr (aCtx, 0,CTX,DEF); /* finish ctx tag 0 constructor */
|
||||
|
||||
asn1r_fin_constr (aCtx, SEQ_CODE,UNI,DEF); /* finish universal seq cstr */
|
||||
aes_ptr--;
|
||||
}
|
||||
asn1r_fin_constr (aCtx, 0,CTX,DEF); /* ctx tag 0 constructor */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_GET_ALARM_ESUM,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
348
mmslib/mmsle/rs_getas.c
Normal file
348
mmslib/mmsle/rs_getas.c
Normal file
@@ -0,0 +1,348 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rs_getas.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the responder portion of get alarm */
|
||||
/* summary. It decodes the get alarm summary request (indication) */
|
||||
/* & encodes the get alarm summary response. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 07 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 06 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 05 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 04 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 03 Changes to allow compile under C++ */
|
||||
/* 07/03/97 MDE 02 Op-specific info buffer handling changes */
|
||||
/* 06/09/97 MDE 01 Changed op specific buffer allocation */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pevn.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static GETAS_REQ_INFO *req_info;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID getas_get_enrolls_only (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getas_get_act_alarms_only (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getas_get_ack_filter (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getas_sev_filter_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getas_get_most_sev (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getas_get_least_sev (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getas_sev_filter_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getas_ca_name_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID getas_ca_name_done (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_getas_req */
|
||||
/* This function is called from MMSDEC when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_getas_req (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("Get Alarm Summary Request");
|
||||
|
||||
|
||||
/* get storage for request information */
|
||||
req_info = (GETAS_REQ_INFO *) _m_get_dec_buf (aCtx, sizeof (GETAS_REQ_INFO));
|
||||
req_info->enroll_only = SD_TRUE; /* set default values */
|
||||
req_info->act_alarms_only = SD_TRUE;
|
||||
|
||||
/* Done by calloc */
|
||||
/* req_info->ack_filter = 0; */
|
||||
/* req_info->most_sev_filter = 0; */
|
||||
req_info->least_sev_filter = 127;
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 0, getas_get_enrolls_only);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, getas_get_act_alarms_only);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 2, getas_get_ack_filter);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 3, getas_sev_filter_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 5, getas_ca_name_cstr);
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getas_get_enrolls_only */
|
||||
/* get alarm summary REQUEST (indication) is being decoded: */
|
||||
/* enrollments only was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getas_get_enrolls_only (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getas_get_enrolls_only");
|
||||
|
||||
if (asn1r_get_bool (aCtx, &req_info->enroll_only)) /* get enrollments only */
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, getas_get_act_alarms_only);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 2, getas_get_ack_filter);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 3, getas_sev_filter_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 5, getas_ca_name_cstr);
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getas_get_act_alarms_only */
|
||||
/* get alarm summary REQUEST is being decoded: active enrollments only */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getas_get_act_alarms_only (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getas_get_act_alarms_only");
|
||||
|
||||
if (asn1r_get_bool (aCtx, &req_info->act_alarms_only)) /* active enrollments */
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 2, getas_get_ack_filter);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 3, getas_sev_filter_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 5, getas_ca_name_cstr);
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getas_get_ack_filter */
|
||||
/* get alarm summary REQUEST is being decoded: ack filter was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getas_get_ack_filter (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getas_get_ack_filter");
|
||||
|
||||
if (asn1r_get_i16 (aCtx, &req_info->ack_filter)) /* get ack filter */
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
else if ((req_info->ack_filter < 0) || (req_info->ack_filter > 2))
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 3, getas_sev_filter_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 5, getas_ca_name_cstr);
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getas_sev_filter_cstr */
|
||||
/* get alarm summary REQUEST is being decoded: severity filter cstr was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getas_sev_filter_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getas_sev_filter_cstr");
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 0, getas_get_most_sev);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, getas_get_least_sev);
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = getas_sev_filter_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getas_get_most_sev */
|
||||
/* get alarm summary REQUEST is being decoded: most severe filter was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getas_get_most_sev (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getas_get_most_sev");
|
||||
|
||||
if (asn1r_get_u8 (aCtx, &req_info->most_sev_filter)) /* most severe filter */
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, getas_get_least_sev);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getas_get_least_sev */
|
||||
/* get alarm summary REQUEST is being decoded: least severe filter was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getas_get_least_sev (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getas_get_least_sev");
|
||||
|
||||
if (asn1r_get_u8 (aCtx, &req_info->least_sev_filter)) /* least severe filter */
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getas_sev_filter_cstr_done */
|
||||
/* get alarm summary REQUEST is being decoded: severity filter cstr */
|
||||
/* done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getas_sev_filter_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 5, getas_ca_name_cstr);
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getas_ca_name_cstr */
|
||||
/* get alarm summary REQUEST is being decoded: continue after name */
|
||||
/* constructor was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getas_ca_name_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getas_ca_name_cstr");
|
||||
|
||||
req_info->ca_pres = SD_TRUE;
|
||||
_ms_get_mms_objname (aCtx, &req_info->ca_name, getas_ca_name_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getas_ca_name_done */
|
||||
/* get alarm summary RESPONSE (confirm) is being decoded: */
|
||||
/* continue after name has been obtained. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getas_ca_name_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("getas_ca_name_done");
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = NULL; /* clear cstr done functions */
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_getas_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the get alarm summary response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mp_getas_resp (MMSREQ_IND *indptr, GETAS_RESP_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_resp_send (MMSOP_GET_ALARM_SUM,indptr,
|
||||
M_CAST_MK_FUN (_ms_mk_getas_resp),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_getas_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the get alarm summary response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_getas_resp (ST_UINT32 invoke_id, GETAS_RESP_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_resp_fin (MMSOP_GET_ALARM_SUM,invoke_id,
|
||||
M_CAST_MK_FUN (_ms_mk_getas_resp),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_getas_resp */
|
||||
/* ENCODE a get alarm summary RESPONSE: */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_getas_resp (ASN1_ENC_CTXT *aCtx, GETAS_RESP_INFO *info)
|
||||
{
|
||||
ST_INT i;
|
||||
ALARM_SUMMARY *as_ptr;
|
||||
|
||||
if (info->more_follows)
|
||||
{ /* not the default */
|
||||
asn1r_wr_bool (aCtx, info->more_follows); /* write more follows indicator */
|
||||
asn1r_fin_prim (aCtx, 1, CTX); /* ctx tag 1 */
|
||||
}
|
||||
|
||||
asn1r_strt_constr (aCtx); /* start ctx tag 0 constructor */
|
||||
as_ptr = (ALARM_SUMMARY *) (info + 1);
|
||||
as_ptr += (info->num_of_alarm_sum-1); /* point to last alarm summary */
|
||||
for (i = 0; i < info->num_of_alarm_sum; i++)
|
||||
{
|
||||
asn1r_strt_constr (aCtx); /* start universal seq cstr */
|
||||
if (as_ptr->tti_time_pres)
|
||||
{ /* write tran to idle time */
|
||||
asn1r_strt_constr (aCtx); /* start ctx tag 6 constructor */
|
||||
_ms_wr_mms_evtime (aCtx, &as_ptr->tti_time);
|
||||
asn1r_fin_constr (aCtx, 6,CTX,DEF); /* finish ctx tag 6 constructor */
|
||||
}
|
||||
if (as_ptr->tta_time_pres)
|
||||
{ /* write tran to active time */
|
||||
asn1r_strt_constr (aCtx); /* start ctx tag 5 constructor */
|
||||
_ms_wr_mms_evtime (aCtx, &as_ptr->tta_time);
|
||||
asn1r_fin_constr (aCtx, 5,CTX,DEF); /* finish ctx tag 5 constructor */
|
||||
}
|
||||
#ifdef CS_SUPPORT
|
||||
if (as_ptr->addl_detail_pres)
|
||||
{ /* write additional detail */
|
||||
asn1r_strt_constr (aCtx); /* start ctx tag 4 constructor */
|
||||
asn1r_wr_delmnt (aCtx, as_ptr->addl_detail,as_ptr->addl_detail_len);
|
||||
asn1r_fin_constr (aCtx, 4,CTX,DEF); /* finish ctx tag 4 constructor */
|
||||
}
|
||||
#endif
|
||||
asn1r_wr_i16 (aCtx, as_ptr->unack_state);
|
||||
asn1r_fin_prim (aCtx, 3, CTX);
|
||||
|
||||
asn1r_wr_i16 (aCtx, as_ptr->cur_state);
|
||||
asn1r_fin_prim (aCtx, 2, CTX);
|
||||
|
||||
asn1r_wr_u8 (aCtx, as_ptr->severity);
|
||||
asn1r_fin_prim (aCtx, 1, CTX);
|
||||
|
||||
asn1r_strt_constr (aCtx); /* start ctx tag 0 constructor */
|
||||
_ms_wr_mms_objname (aCtx, &as_ptr->evcon_name);
|
||||
asn1r_fin_constr (aCtx, 0,CTX,DEF); /* finish ctx tag 0 constructor */
|
||||
|
||||
asn1r_fin_constr (aCtx, SEQ_CODE,UNI,DEF); /* finish universal seq cstr */
|
||||
as_ptr--;
|
||||
}
|
||||
asn1r_fin_constr (aCtx, 0,CTX,DEF); /* ctx tag 0 constructor */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_GET_ALARM_SUM,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
135
mmslib/mmsle/rs_getsc.c
Normal file
135
mmslib/mmsle/rs_getsc.c
Normal file
@@ -0,0 +1,135 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rs_getscat.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the responder portion of get scattered */
|
||||
/* access attributes. It decodes the get scattered access */
|
||||
/* attributes request (indication) & encodes the get scattered */
|
||||
/* access attributes response. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 07 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 06 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 05 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 04 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 03 Changes to allow compile under C++ */
|
||||
/* 07/03/97 MDE 02 Op-specific info buffer handling changes */
|
||||
/* 06/09/97 MDE 01 Changed op specific buffer allocation */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pvar.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static GETSCAT_REQ_INFO *req_info;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/* static functions with multiple references */
|
||||
|
||||
static ST_VOID getscat_name_done (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_get_scat_req */
|
||||
/* This function is called from MMSDEC when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_get_scat_req (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("Get Scattered Access Attributes Request");
|
||||
|
||||
/* get storage for request information */
|
||||
req_info = (GETSCAT_REQ_INFO *) _m_get_dec_buf (aCtx, sizeof (GETSCAT_REQ_INFO));
|
||||
_ms_get_mms_objname (aCtx, &req_info->sa_name, getscat_name_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* getscat_name_done */
|
||||
/* decoding get scattered access attributes request: scattered access */
|
||||
/* name has been obtained. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID getscat_name_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
asn1r_set_all_cstr_done (aCtx); /* clear cstr done functions */
|
||||
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_getscat_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE & send the get scattered access attributes */
|
||||
/* response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mp_getscat_resp (MMSREQ_IND *indptr, GETSCAT_RESP_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_resp_send (MMSOP_GET_SCAT,indptr,
|
||||
M_CAST_MK_FUN (_ms_mk_getscat_resp),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_getscat_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the get scattered access attributes response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_getscat_resp (ST_UINT32 invoke_id, GETSCAT_RESP_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_resp_fin (MMSOP_GET_SCAT,invoke_id,
|
||||
M_CAST_MK_FUN (_ms_mk_getscat_resp),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_getscat_resp */
|
||||
/* Construct a get scattered access attributes response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_getscat_resp (ASN1_ENC_CTXT *aCtx, GETSCAT_RESP_INFO *info)
|
||||
{
|
||||
asn1r_strt_constr (aCtx); /* start context tag 1 cstr */
|
||||
_ms_wr_va_scat_access (aCtx, &info->sa_descr); /* write scattered access descr */
|
||||
asn1r_fin_constr (aCtx, 1, CTX, DEF); /* finish context tag 1 cstr */
|
||||
|
||||
asn1r_wr_bool (aCtx, info->mms_deletable); /* write mms deletable flag */
|
||||
asn1r_fin_prim (aCtx, 0,CTX); /* context tag 0 */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_GET_SCAT,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
240
mmslib/mmsle/rs_initd.c
Normal file
240
mmslib/mmsle/rs_initd.c
Normal file
@@ -0,0 +1,240 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rs_initdown.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the responder portion of initiate download */
|
||||
/* sequence. It decodes the initiate download sequence request */
|
||||
/* (indication) & encodes the initiate download sequence response. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 06 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 05 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* _ms_mk_initdown_resp:added ST_VOID *dummyInfo*/
|
||||
/* 09/13/99 MDE 04 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 03 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 02 Changes to allow compile under C++ */
|
||||
/* 06/09/97 MDE 01 Changed op specific buffer allocation */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pdom.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static INITDOWN_REQ_INFO *req_info;
|
||||
|
||||
static ST_CHAR **cap_ptr;
|
||||
static ST_INT max_capabilities;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID initdown_get_sharable (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID initdown_get_cap (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID initdown_cap_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID initdown_cap_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID initdown_get_dname (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_init_download_req */
|
||||
/* This function is called from MMSDEC when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_init_download_req (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT req_size;
|
||||
|
||||
MLOG_CDEC0 ("Initiate Download Sequence Request");
|
||||
|
||||
#if defined(FIXED_DECBUF)
|
||||
max_capabilities = m_sv_max_initdnld_cap;
|
||||
req_size = mmsl_dec_info_size;
|
||||
#else
|
||||
max_capabilities = (_mmsdec_msglen/2);
|
||||
if (m_sv_max_initdnld_cap && (max_capabilities > m_sv_max_initdnld_cap))
|
||||
max_capabilities = m_sv_max_initdnld_cap;
|
||||
req_size = sizeof (INITDOWN_REQ_INFO) + (max_capabilities * sizeof (ST_CHAR *));
|
||||
#endif
|
||||
|
||||
/* get storage for request information */
|
||||
req_info = (INITDOWN_REQ_INFO *) _m_get_dec_buf (aCtx, req_size);
|
||||
cap_ptr = (ST_CHAR **) (req_info + 1);
|
||||
aCtx->asn1r_err_fun = _mms_dec_buf_free;
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 0,initdown_get_dname);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* initdown_get_dname */
|
||||
/* initiate download sequence request is being decoded: domain name */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID initdown_get_dname (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("initdown_get_dname");
|
||||
|
||||
if (asn1r_get_identifier (aCtx, req_info->dname)) /* read the domain name */
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 1, initdown_cap_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* initdown_cap_cstr */
|
||||
/* initiate download sequence request is being decoded: capability */
|
||||
/* list constructor was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID initdown_cap_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("initdown_cap_cstr");
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, UNI,VISTR_CODE,initdown_get_cap);
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = initdown_cap_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* initdown_get_cap */
|
||||
/* initiate download sequence request is being decoded: capability */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID initdown_get_cap (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("initdown_get_cap");
|
||||
|
||||
req_info->num_of_capab++; /* increment # of capabilities */
|
||||
if (req_info->num_of_capab > max_capabilities)
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
/* copy capability back onto itself shifted by one character */
|
||||
*cap_ptr = (ST_CHAR *) aCtx->asn1r_field_ptr - 1;
|
||||
if (asn1r_get_vstr (aCtx, *cap_ptr))
|
||||
{ /* capability is too ST_INT32 */
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
cap_ptr++; /* point to where next will go */
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, UNI,VISTR_CODE,initdown_get_cap);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* initdown_cap_cstr_done */
|
||||
/* initiate download sequence request is being decoded: capability */
|
||||
/* list constructor done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID initdown_cap_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX,2,initdown_get_sharable);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* initdown_get_sharable */
|
||||
/* initiate download sequence request is being decoded: sharable */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID initdown_get_sharable (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT req_size;
|
||||
|
||||
MLOG_CDEC0 ("initdown_get_sharable");
|
||||
|
||||
/* read sharable from the received message */
|
||||
if (asn1r_get_bool (aCtx, &(req_info->sharable)))
|
||||
{ /* sharable is too ST_INT32 */
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
/* find actual size for request info */
|
||||
req_size = sizeof (INITDOWN_REQ_INFO)
|
||||
+ (sizeof (ST_CHAR *) * req_info->num_of_capab);
|
||||
|
||||
/* give back unused storage */
|
||||
_mms_dec_info = (*m_realloc_os_fun) (_mms_dec_info,req_size);
|
||||
req_info = (INITDOWN_REQ_INFO *) _mms_dec_info;
|
||||
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_initdown_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the initiate download sequence response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mp_initdown_resp (MMSREQ_IND *indptr)
|
||||
{
|
||||
if (mms_chan_info[_mmsdechan].version) /* IS */
|
||||
return (_mms_send_null_resp (indptr,MMSOP_INIT_DOWNLOAD));
|
||||
else /* DIS */
|
||||
return (_mms_resp_send (MMSOP_INIT_DOWNLOAD,indptr,
|
||||
M_CAST_MK_FUN (_ms_mk_initdown_resp),
|
||||
NULL));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_initdown_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the initiate download sequence response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_initdown_resp (ST_UINT32 invoke_id)
|
||||
{
|
||||
if (mmsl_version) /* IS */
|
||||
return (_mms_fin_null_resp (invoke_id,MMSOP_INIT_DOWNLOAD));
|
||||
else /* DIS */
|
||||
return (_mms_resp_fin (MMSOP_INIT_DOWNLOAD,invoke_id,
|
||||
M_CAST_MK_FUN (_ms_mk_initdown_resp),
|
||||
NULL));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_initdown_resp */
|
||||
/* ENCODE an initiate download RESPONSE: */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_initdown_resp (ASN1_ENC_CTXT *aCtx, ST_VOID *dummyInfo)
|
||||
{
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
|
||||
asn1r_fin_prim (aCtx, NULL_CODE,0); /* Write NULL field */
|
||||
asn1r_fin_constr (aCtx, MMSOP_INIT_DOWNLOAD,CTX,DEF); /* tag = opcode, ctx cstr */
|
||||
}
|
||||
132
mmslib/mmsle/rs_initu.c
Normal file
132
mmslib/mmsle/rs_initu.c
Normal file
@@ -0,0 +1,132 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rs_initupl.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the responder portion of initiate upload */
|
||||
/* sequence. It decodes the initiate upload sequence request */
|
||||
/* (indication) & encodes the initiate upload sequence response. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 07 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 06 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 05 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 04 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 03 Changes to allow compile under C++ */
|
||||
/* 07/03/97 MDE 02 Op-specific info buffer handling changes */
|
||||
/* 06/09/97 MDE 01 Changed op specific buffer allocation */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pdom.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static INITUPL_REQ_INFO *req_info;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_init_upload_req */
|
||||
/* This function is called from MMSDEC when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_init_upload_req (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("Initiate Upload Sequence Request");
|
||||
|
||||
|
||||
/* get storage for request information */
|
||||
req_info = (INITUPL_REQ_INFO *) _m_get_dec_buf (aCtx, sizeof (INITUPL_REQ_INFO));
|
||||
aCtx->asn1r_err_fun = _mms_dec_buf_free;
|
||||
|
||||
if (asn1r_get_identifier (aCtx, req_info->dname)) /* read the domain name */
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_initupl_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the initiate upload sequence response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mp_initupl_resp (MMSREQ_IND *indptr, INITUPL_RESP_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_resp_send (MMSOP_INIT_UPLOAD,indptr,
|
||||
M_CAST_MK_FUN (_ms_mk_initupl_resp),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_initupl_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the initiate upload sequence response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_initupl_resp (ST_UINT32 invoke_id, INITUPL_RESP_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_resp_fin (MMSOP_INIT_UPLOAD,invoke_id,
|
||||
M_CAST_MK_FUN (_ms_mk_initupl_resp),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_initupl_resp */
|
||||
/* ENCODE an initiate upload sequence RESPONSE: */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_initupl_resp (ASN1_ENC_CTXT *aCtx, INITUPL_RESP_INFO *info)
|
||||
{
|
||||
ST_INT i;
|
||||
ST_CHAR **cap_ptr;
|
||||
|
||||
asn1r_strt_constr (aCtx); /* start ctx tag 1 constructor */
|
||||
|
||||
cap_ptr = (ST_CHAR **) (info + 1);
|
||||
cap_ptr += (info->num_of_capab - 1); /* point to last capability */
|
||||
for (i = 0; i < info->num_of_capab; i++)
|
||||
{
|
||||
asn1r_wr_vstr (aCtx, *cap_ptr);
|
||||
asn1r_fin_prim (aCtx, VISTR_CODE, UNI);
|
||||
cap_ptr--;
|
||||
}
|
||||
asn1r_fin_constr (aCtx, 1,CTX,DEF); /* ctx tag 1 constructor */
|
||||
|
||||
asn1r_wr_i32 (aCtx, info->ulsmid); /* write upload state machine id*/
|
||||
asn1r_fin_prim (aCtx, 0,CTX); /* ctx tag 0 */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_INIT_UPLOAD,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
251
mmslib/mmsle/rs_input.c
Normal file
251
mmslib/mmsle/rs_input.c
Normal file
@@ -0,0 +1,251 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rs_input.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the responder portion of the input */
|
||||
/* operation. It decodes the input request (indication) and */
|
||||
/* encodes the input response. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 06 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 05 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 04 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 03 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 02 Changes to allow compile under C++ */
|
||||
/* 06/09/97 MDE 01 Changed op specific buffer allocation */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pocs.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static INPUT_REQ_INFO *req_info;
|
||||
|
||||
static ST_INT max_prompt_count;
|
||||
static ST_CHAR **prompt_ptr;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID input_prompt_data_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID input_get_timeout (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID input_get_prompt_data (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID input_prompt_data_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID input_get_echo (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID input_get_station_name (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_input_req */
|
||||
/* This function is called from mmsdec when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_input_req (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT req_size;
|
||||
|
||||
MLOG_CDEC0 ("Input Request");
|
||||
|
||||
#if defined(FIXED_DECBUF)
|
||||
max_prompt_count = m_sv_max_prompt_count;
|
||||
req_size = mmsl_dec_info_size;
|
||||
#else
|
||||
max_prompt_count = _mmsdec_msglen / 2; /* find maximum size */
|
||||
if (m_sv_max_prompt_count && (max_prompt_count > m_sv_max_prompt_count))
|
||||
max_prompt_count = m_sv_max_prompt_count;
|
||||
req_size = sizeof (INPUT_REQ_INFO) + (sizeof (ST_CHAR *) * max_prompt_count);
|
||||
#endif
|
||||
|
||||
/* get storage for request information */
|
||||
req_info = (INPUT_REQ_INFO *) _m_get_dec_buf (aCtx, req_size);
|
||||
prompt_ptr = (ST_CHAR **) (req_info + 1);
|
||||
req_info->echo = SD_TRUE;
|
||||
req_info->timeout_pres = SD_FALSE;
|
||||
req_info->prompt_count = 0;
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 0, input_get_station_name);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* input_get_station_name */
|
||||
/* input request is being decoded: get the station name. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID input_get_station_name (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("input_get_station_name");
|
||||
|
||||
if (asn1r_get_identifier (aCtx, req_info->station_name)) /* read station name */
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, input_get_echo);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 2, input_prompt_data_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 3, input_get_timeout);
|
||||
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* input_get_echo */
|
||||
/* input request is being decoded: input echo was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID input_get_echo (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("input_get_echo");
|
||||
|
||||
if (asn1r_get_bool (aCtx, &req_info->echo)) /* read input echo */
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 2, input_prompt_data_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 3, input_get_timeout);
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* input_prompt_data_cstr */
|
||||
/* input request is being decoded: prompt data list constructor was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID input_prompt_data_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("input_prompt_data_cstr");
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, UNI, VISTR_CODE, input_get_prompt_data);
|
||||
req_info->prompt_pres = SD_TRUE;
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = input_prompt_data_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* input_get_prompt_data */
|
||||
/* input request is being decoded: prompt data was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID input_get_prompt_data (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("input_get_prompt_dat");
|
||||
|
||||
req_info->prompt_count++; /* increment prompt data count */
|
||||
if (req_info->prompt_count > max_prompt_count)
|
||||
{ /* too many prompt data strings */
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
*prompt_ptr = (ST_CHAR *) aCtx->asn1r_field_ptr-1; /* set prompt data pointer */
|
||||
if (asn1r_get_vstr (aCtx, *prompt_ptr)) /* shift prompt data left */
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
|
||||
prompt_ptr++; /* point to where next will go */
|
||||
ASN1R_TAG_ADD (aCtx, UNI, VISTR_CODE, input_get_prompt_data);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* input_prompt_data_cstr_done */
|
||||
/* input request is being decoded: prompt data list constructor done */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID input_prompt_data_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT req_size;
|
||||
|
||||
/* find actual size for request info */
|
||||
req_size = sizeof (INPUT_REQ_INFO)
|
||||
+ (sizeof (ST_CHAR *) * req_info->prompt_count);
|
||||
|
||||
/* give back unused storage */
|
||||
_mms_dec_info = (*m_realloc_os_fun) (_mms_dec_info,req_size);
|
||||
req_info = (INPUT_REQ_INFO *) _mms_dec_info;
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 3, input_get_timeout);
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* input_get_timeout */
|
||||
/* input request is being decoded: input timeout was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID input_get_timeout (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("input_get_timeou");
|
||||
|
||||
req_info->timeout_pres = SD_TRUE; /* set input timeout present */
|
||||
|
||||
if (asn1r_get_u32 (aCtx, &req_info->timeout))
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_input_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the input response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mp_input_resp (MMSREQ_IND *indptr, INPUT_RESP_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_resp_send (MMSOP_INPUT,indptr,
|
||||
M_CAST_MK_FUN (_ms_mk_input_resp),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_input_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the input response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_input_resp (ST_UINT32 invoke_id, INPUT_RESP_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_resp_fin (MMSOP_INPUT,invoke_id,
|
||||
M_CAST_MK_FUN (_ms_mk_input_resp),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_input_resp */
|
||||
/* ENCODE an input RESPONSE: */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_input_resp (ASN1_ENC_CTXT *aCtx, INPUT_RESP_INFO *info_ptr)
|
||||
{
|
||||
asn1r_wr_vstr (aCtx, info_ptr->input_resp); /* encode the input response */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_prim (aCtx, MMSOP_INPUT,CTX); /* tag = opcode, ctx */
|
||||
}
|
||||
133
mmslib/mmsle/rs_jcrea.c
Normal file
133
mmslib/mmsle/rs_jcrea.c
Normal file
@@ -0,0 +1,133 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rs_jcreate.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the responder portion of create journal. */
|
||||
/* It decodes the create journal request (indication) & encodes */
|
||||
/* the create journal response. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 05 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 04 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 03 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 02 Changes to decode buffer allocation scheme */
|
||||
/* 07/03/97 MDE 01 Op-specific info buffer handling changes */
|
||||
/* 06/09/97 MDE 01 Changed op specific buffer allocation */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pjou.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static JCREATE_REQ_INFO *req_info;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID jcreate_jname_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jcreate_jname_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jcreate_jname_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_jcreate_req */
|
||||
/* This function is called from MMSDEC when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_jcreate_req (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("Create Journal Request");
|
||||
|
||||
|
||||
/* get storage for request information */
|
||||
req_info = (JCREATE_REQ_INFO *) _m_get_dec_buf (aCtx, sizeof (JCREATE_REQ_INFO));
|
||||
aCtx->asn1r_err_fun = _mms_dec_buf_free;
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 0, jcreate_jname_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jcreate_jname_cstr */
|
||||
/* create journal request is being decoded: journal name constructor */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jcreate_jname_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jcreate_jname_cstr");
|
||||
|
||||
_ms_get_mms_objname (aCtx, &req_info->jou_name, jcreate_jname_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jcreate_jname_done */
|
||||
/* create journal request is being decoded: journal name has been */
|
||||
/* obtained. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jcreate_jname_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jcreate_jname_done");
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = jcreate_jname_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jcreate_jname_cstr_done */
|
||||
/* create journal request is being decoded: journal name cstr done was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jcreate_jname_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_jcreate_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the create journal response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mp_jcreate_resp (MMSREQ_IND *indptr)
|
||||
{
|
||||
return (_mms_send_null_resp (indptr,MMSOP_CREATE_JOURNAL));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_jcreate_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the create journal response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_jcreate_resp (ST_UINT32 invoke_id)
|
||||
{
|
||||
return (_mms_fin_null_resp (invoke_id,MMSOP_CREATE_JOURNAL));
|
||||
}
|
||||
#endif
|
||||
132
mmslib/mmsle/rs_jdele.c
Normal file
132
mmslib/mmsle/rs_jdele.c
Normal file
@@ -0,0 +1,132 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rs_jdelete.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the responder portion of delete journal. */
|
||||
/* It decodes the delete journal request (indication) & encodes */
|
||||
/* the delete journal response. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 05 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 04 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 03 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 02 Changes to decode buffer allocation scheme */
|
||||
/* 07/03/97 MDE 01 Op-specific info buffer handling changes */
|
||||
/* 06/09/97 MDE 01 Changed op specific buffer allocation */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pjou.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static JDELETE_REQ_INFO *req_info;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID jdelete_jname_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jdelete_jname_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jdelete_jname_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_jdelete_req */
|
||||
/* This function is called from MMSDEC when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_jdelete_req (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("Delete Journal Request");
|
||||
|
||||
|
||||
/* get storage for request information */
|
||||
req_info = (JDELETE_REQ_INFO *) _m_get_dec_buf (aCtx, sizeof (JDELETE_REQ_INFO));
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 0, jdelete_jname_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jdelete_jname_cstr */
|
||||
/* delete journal request is being decoded: journal name constructor */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jdelete_jname_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jdelete_jname_cstr");
|
||||
|
||||
_ms_get_mms_objname (aCtx, &req_info->jou_name, jdelete_jname_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jdelete_jname_done */
|
||||
/* delete journal request is being decoded: journal name has been */
|
||||
/* obtained. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jdelete_jname_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jdelete_jname_done");
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = jdelete_jname_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jdelete_jname_cstr_done */
|
||||
/* delete journal request is being decoded: journal name cstr done was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jdelete_jname_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_jdelete_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the delete journal response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mp_jdelete_resp (MMSREQ_IND *indptr)
|
||||
{
|
||||
return (_mms_send_null_resp (indptr,MMSOP_DELETE_JOURNAL));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_jdelete_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the delete journal response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_jdelete_resp (ST_UINT32 invoke_id)
|
||||
{
|
||||
return (_mms_fin_null_resp (invoke_id,MMSOP_DELETE_JOURNAL));
|
||||
}
|
||||
#endif
|
||||
260
mmslib/mmsle/rs_jinit.c
Normal file
260
mmslib/mmsle/rs_jinit.c
Normal file
@@ -0,0 +1,260 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rs_jinit.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the responder portion of initialize */
|
||||
/* journal. It decodes the initialize journal request (indication) */
|
||||
/* & encodes the initialize journal response. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 09 Remove "thisFileName" */
|
||||
/* 08/28/03 EJV 08 Corr spelling for 'receive'. */
|
||||
/* 12/20/01 JRB 07 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 06 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 05 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 04 Changes to allow compile under C++ */
|
||||
/* 08/15/97 MDE 03 BTOD handling changes */
|
||||
/* 07/03/97 MDE 02 Op-specific info buffer handling changes */
|
||||
/* 06/09/97 MDE 01 Changed op specific buffer allocation */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pjou.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static JINIT_REQ_INFO *req_info;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID jinit_limit_spec_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jinit_le_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jinit_get_le_prim (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jinit_get_le_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jinit_get_limit_time (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jinit_limit_spec_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jinit_jou_name_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jinit_jn_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jinit_jou_name_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_jinit_req */
|
||||
/* This function is called from mmsdec when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_jinit_req (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("Initialize Journal Request");
|
||||
|
||||
/* get storage for request information */
|
||||
req_info = (JINIT_REQ_INFO *) _m_get_dec_buf (aCtx, sizeof (JINIT_REQ_INFO));
|
||||
req_info->limit_spec_pres = SD_FALSE;
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 0, jinit_jou_name_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jinit_jou_name_cstr */
|
||||
/* initialize journal request is being decoded: journal name cstr */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jinit_jou_name_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jinit_jou_name_cstr");
|
||||
_ms_get_mms_objname (aCtx, &req_info->jou_name, jinit_jn_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jinit_jn_done */
|
||||
/* initialize journal request is being decoded: journal name has been */
|
||||
/* obtained. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jinit_jn_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jinit_jn_done");
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = jinit_jou_name_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jinit_jou_name_cstr_done */
|
||||
/* initialize journal request is being decoded: journal name cstr done */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jinit_jou_name_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 1, jinit_limit_spec_cstr);
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jinit_limit_spec_cstr */
|
||||
/* initialize journal request is being decoded: limit specification */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jinit_limit_spec_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jinit_limit_spec_cstr");
|
||||
|
||||
req_info->limit_spec_pres = SD_TRUE;
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 0, jinit_get_limit_time);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jinit_get_limit_time */
|
||||
/* initialize journal request is being decoded: limit time was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jinit_get_limit_time (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jinit_get_limit_tim");
|
||||
|
||||
if (asn1r_get_btod (aCtx, &req_info->limit_time)) /* get limiting time */
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, jinit_get_le_prim);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 1, jinit_get_le_cstr);
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = jinit_limit_spec_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jinit_get_le_prim */
|
||||
/* initialize journal request is being decoded: limit entry primitive */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jinit_get_le_prim (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jinit_get_le_prim");
|
||||
/* decode limit entry back onto itself */
|
||||
|
||||
req_info->limit_entry_pres = SD_TRUE;
|
||||
req_info->limit_entry = aCtx->asn1r_field_ptr;
|
||||
|
||||
if (asn1r_get_octstr (aCtx, req_info->limit_entry)) /* read limit entry */
|
||||
asn1r_set_dec_err (aCtx, REQ_UNSPECIFIED);
|
||||
|
||||
req_info->limit_entry_len = aCtx->asn1r_octetcount;
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = jinit_limit_spec_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jinit_get_le_cstr */
|
||||
/* initialize journal request is being decoded: limit entry cstr */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jinit_get_le_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jinit_get_le_cstr");
|
||||
|
||||
/* decode limit entry back onto itself */
|
||||
req_info->limit_entry_pres = SD_TRUE;
|
||||
req_info->limit_entry = aCtx->asn1r_field_ptr;
|
||||
|
||||
/* set up done decoding octet cstr destination */
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = jinit_le_cstr_done;
|
||||
|
||||
/* get limit entry from the received message */
|
||||
/* set maximum length to accept entire message */
|
||||
asn1r_get_octstr_cstr (aCtx, _mmsdec_msglen, req_info->limit_entry);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jinit_le_cstr_done */
|
||||
/* initialize journal request is being decoded: limit entry cstr done */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jinit_le_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
req_info->limit_entry_len = aCtx->asn1r_octetcount; /* save limit entry len */
|
||||
/* cstr done already set*/
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jinit_limit_spec_cstr_done */
|
||||
/* initialize journal request is being decoded: limit specification */
|
||||
/* cstr done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jinit_limit_spec_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_jinit_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the initialize journal response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mp_jinit_resp (MMSREQ_IND *indptr, JINIT_RESP_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_resp_send (MMSOP_INIT_JOURNAL,indptr,
|
||||
M_CAST_MK_FUN (_ms_mk_jinit_resp),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_jinit_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the initialize journal response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_jinit_resp (ST_UINT32 invoke_id, JINIT_RESP_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_resp_fin (MMSOP_INIT_JOURNAL,invoke_id,
|
||||
M_CAST_MK_FUN (_ms_mk_jinit_resp),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_jinit_resp */
|
||||
/* ENCODE an initialize journal RESPONSE: */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_jinit_resp (ASN1_ENC_CTXT *aCtx, JINIT_RESP_INFO *info_ptr)
|
||||
{
|
||||
asn1r_wr_u32 (aCtx, info_ptr->del_entries); /* encode deleted entries */
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_prim (aCtx, MMSOP_INIT_JOURNAL,CTX); /* tag = opcode, ctx */
|
||||
}
|
||||
620
mmslib/mmsle/rs_jread.c
Normal file
620
mmslib/mmsle/rs_jread.c
Normal file
@@ -0,0 +1,620 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rs_jread.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the responder portion of read journal. */
|
||||
/* It decodes the read journal request (indication) & encodes */
|
||||
/* the read journal response. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 08/28/03 EJV 07 Corr spelling for 'receive'. */
|
||||
/* 12/20/01 JRB 06 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 05 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 04 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 03 Changes to allow compile under C++ */
|
||||
/* 08/15/97 MDE 02 BTOD handling changes */
|
||||
/* 06/09/97 MDE 01 Changed op specific buffer allocation */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pjou.h"
|
||||
#include "asn1defs.h"
|
||||
#include "mem_chk.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* For debug version, use a static pointer to avoid duplication of */
|
||||
/* __FILE__ strings. */
|
||||
|
||||
#ifdef DEBUG_SISCO
|
||||
SD_CONST static ST_CHAR *SD_CONST thisFileName = __FILE__;
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static JREAD_REQ_INFO *req_info;
|
||||
|
||||
static ST_CHAR **var_ptr;
|
||||
static ST_INT max_vars;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID jread_range_stop_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jread_list_of_var_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jread_sa_entry_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jread_range_start_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jread_range_stop_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jread_sa_entry_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jread_entry_spec_prim (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jread_entry_spec_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jread_get_time_spec (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jread_get_var (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jread_list_of_var_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jread_get_stop_time (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jread_get_num_of_ent (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jread_start_entry_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jread_get_start_time (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jread_start_entry_prim (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jread_start_entry_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jread_range_start_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jread_jname_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jread_jname_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jread_jname_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jread_entry_spec_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jread_dec_done (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_jread_req */
|
||||
/* This function is called from MMSDEC when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_jread_req (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT req_size;
|
||||
|
||||
MLOG_CDEC0 ("Read Journal Request");
|
||||
|
||||
#if defined(FIXED_DECBUF)
|
||||
max_vars = m_sv_max_jread_vars;
|
||||
req_size = mmsl_dec_info_size;
|
||||
#else
|
||||
max_vars = (_mmsdec_msglen/2);
|
||||
if (m_sv_max_jread_vars && (max_vars > m_sv_max_jread_vars))
|
||||
max_vars = m_sv_max_jread_vars;
|
||||
|
||||
req_size = sizeof (JREAD_REQ_INFO) + (max_vars * sizeof (ST_CHAR *));
|
||||
#endif
|
||||
|
||||
/* get storage for request information */
|
||||
req_info = (JREAD_REQ_INFO *) _m_get_dec_buf (aCtx, req_size);
|
||||
var_ptr = (ST_CHAR **) (req_info + 1);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 0, jread_jname_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jread_jname_cstr */
|
||||
/* read journal request is being decoded: journal name constructor */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jread_jname_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jread_jname_cstr");
|
||||
|
||||
_ms_get_mms_objname (aCtx, &req_info->jou_name, jread_jname_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jread_jname_done */
|
||||
/* read journal request is being decoded: journal name has been */
|
||||
/* obtained. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jread_jname_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jread_jname_done");
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = jread_jname_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jread_jname_cstr_done */
|
||||
/* read journal request is being decoded: journal name constructor */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jread_jname_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 1, jread_range_start_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 2, jread_range_stop_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 4, jread_list_of_var_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 5, jread_sa_entry_cstr);
|
||||
|
||||
aCtx->asn1r_decode_done_fun = jread_dec_done; /* ok to be done, set done fun */
|
||||
_ms_set_cs_check2 (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jread_range_start_cstr */
|
||||
/* read journal request is being decoded: range start constructor */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jread_range_start_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jread_range_start_cstr");
|
||||
|
||||
req_info->range_start_pres = SD_TRUE;
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 0, jread_get_start_time);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, jread_start_entry_prim);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 1, jread_start_entry_cstr);
|
||||
_ms_set_cs_check2 (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jread_get_start_time */
|
||||
/* initialize journal request is being decoded: start time was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jread_get_start_time (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jread_get_start_tim");
|
||||
|
||||
req_info->start_tag = SD_SUCCESS; /* set start time */
|
||||
|
||||
if (asn1r_get_btod (aCtx, &req_info->start_time)) /* get start time */
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = jread_range_start_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jread_start_entry_prim */
|
||||
/* read journal request is being decoded: start entry primitive was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jread_start_entry_prim (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jread_start_entry_prim");
|
||||
|
||||
req_info->start_tag = SD_TRUE; /* set start entry */
|
||||
|
||||
/* decode start entry back onto itself */
|
||||
req_info->start_entry = aCtx->asn1r_field_ptr;
|
||||
|
||||
if (asn1r_get_octstr (aCtx, req_info->start_entry)) /* read start entry */
|
||||
asn1r_set_dec_err (aCtx, REQ_UNSPECIFIED);
|
||||
|
||||
req_info->start_entry_len = aCtx->asn1r_octetcount;
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = jread_range_start_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jread_start_entry_cstr */
|
||||
/* read journal request is being decoded: start entry constructor */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jread_start_entry_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jread_start_entry_cstr");
|
||||
|
||||
req_info->start_tag = SD_TRUE; /* set start entry */
|
||||
|
||||
/* decode start entry back onto itself */
|
||||
req_info->start_entry = aCtx->asn1r_field_ptr;
|
||||
|
||||
/* set up done decoding octet cstr destination */
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = jread_start_entry_cstr_done;
|
||||
|
||||
/* get start entry from the received message */
|
||||
/* set maximum length to accept entire message */
|
||||
asn1r_get_octstr_cstr (aCtx, _mmsdec_msglen, req_info->start_entry);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jread_start_entry_cstr_done */
|
||||
/* read journal request is being decoded: start entry constructor done */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jread_start_entry_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
req_info->start_entry_len = aCtx->asn1r_octetcount; /* save start entry len */
|
||||
|
||||
/* set up done decoding start spec cstr dest */
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = jread_range_start_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jread_range_start_cstr_done */
|
||||
/* read journal request is being decoded: range start constructor */
|
||||
/* done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jread_range_start_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 2, jread_range_stop_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 4, jread_list_of_var_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 5, jread_sa_entry_cstr);
|
||||
_ms_set_cs_check2 (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jread_range_stop_cstr */
|
||||
/* read journal request is being decoded: range stop constructor */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jread_range_stop_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jread_range_stop_cstr");
|
||||
|
||||
req_info->range_stop_pres = SD_TRUE;
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 0, jread_get_stop_time);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, jread_get_num_of_ent);
|
||||
_ms_set_cs_check2 (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jread_get_stop_time */
|
||||
/* initialize journal request is being decoded: ending time was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jread_get_stop_time (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jread_get_stop_tim");
|
||||
|
||||
req_info->stop_tag = SD_SUCCESS; /* set ending time */
|
||||
|
||||
if (asn1r_get_btod (aCtx, &req_info->end_time)) /* get ending time */
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = jread_range_stop_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jread_get_num_of_ent */
|
||||
/* read journal request is being decoded: number of entries was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jread_get_num_of_ent (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jread_get_num_of_ent");
|
||||
|
||||
req_info->stop_tag = SD_TRUE; /* set num of entries */
|
||||
|
||||
if (asn1r_get_i32 (aCtx, &req_info->num_of_entries)) /* read number of entry */
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = jread_range_stop_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jread_range_stop_cstr_done */
|
||||
/* read journal request is being decoded: range stop constructor */
|
||||
/* done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jread_range_stop_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 4, jread_list_of_var_cstr);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 5, jread_sa_entry_cstr);
|
||||
_ms_set_cs_check2 (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jread_list_of_var_cstr */
|
||||
/* read journal request is being decoded: list of variables constructor */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jread_list_of_var_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jread_list_of_var_cstr");
|
||||
|
||||
req_info->list_of_var_pres = SD_TRUE;
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, UNI, VISTR_CODE, jread_get_var);
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = jread_list_of_var_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jread_get_var */
|
||||
/* read journal request is being decoded: variable was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jread_get_var (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jread_get_var");
|
||||
|
||||
req_info->num_of_var++; /* increment # of var */
|
||||
if (req_info->num_of_var > max_vars)
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
/* copy variable back onto itself shifted by one character */
|
||||
*var_ptr = (ST_CHAR *) aCtx->asn1r_field_ptr - 1;
|
||||
if (asn1r_get_vstr (aCtx, *var_ptr))
|
||||
{ /* variable is too ST_INT32 */
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
var_ptr++; /* point to where next will go */
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, UNI, VISTR_CODE, jread_get_var);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jread_list_of_var_cstr_done */
|
||||
/* read journal request is being decoded: list of variable constructor */
|
||||
/* done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jread_list_of_var_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 5, jread_sa_entry_cstr);
|
||||
_ms_set_cs_check2 (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jread_sa_entry_cstr */
|
||||
/* read journal request is being decoded: start after entry constructor */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jread_sa_entry_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jread_sa_entry_cstr");
|
||||
|
||||
req_info->sa_entry_pres = SD_TRUE;
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 0, jread_get_time_spec);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jread_get_time_spec */
|
||||
/* initialize journal request is being decoded: time specification was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jread_get_time_spec (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jread_get_time_spec");
|
||||
|
||||
if (asn1r_get_btod (aCtx, &req_info->time_spec)) /* get time spec */
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 1, jread_entry_spec_prim);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 1, jread_entry_spec_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jread_entry_spec_prim */
|
||||
/* read journal request is being decoded: entry specification prim was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jread_entry_spec_prim (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jread_entry_spec_prim");
|
||||
|
||||
/* decode entry spec back onto itself */
|
||||
req_info->entry_spec = aCtx->asn1r_field_ptr;
|
||||
|
||||
if (asn1r_get_octstr (aCtx, req_info->entry_spec)) /* read entry spec */
|
||||
asn1r_set_dec_err (aCtx, REQ_UNSPECIFIED);
|
||||
|
||||
req_info->entry_spec_len = aCtx->asn1r_octetcount;
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = jread_sa_entry_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jread_entry_spec_cstr */
|
||||
/* read journal request is being decoded: entry specification cstr */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jread_entry_spec_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jread_entry_spec_cstr");
|
||||
|
||||
/* decode entry spec back onto itself */
|
||||
req_info->entry_spec = aCtx->asn1r_field_ptr;
|
||||
|
||||
/* set up done decoding octet cstr destination */
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = jread_entry_spec_cstr_done;
|
||||
|
||||
/* get entry spec from the received message */
|
||||
/* set maximum length to accept entire message */
|
||||
asn1r_get_octstr_cstr (aCtx, _mmsdec_msglen, req_info->entry_spec);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jread_entry_spec_cstr_done */
|
||||
/* read journal request is being decoded: entry spec constructor done */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jread_entry_spec_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
req_info->entry_spec_len = aCtx->asn1r_octetcount; /* save entry spec len */
|
||||
|
||||
/* set up done decoding entry spec cstr dest */
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = jread_sa_entry_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jread_sa_entry_cstr_done */
|
||||
/* read journal request is being decoded: start after entry constructor */
|
||||
/* done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jread_sa_entry_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
_ms_set_cs_check2 (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jread_dec_done */
|
||||
/* read journal request is completely done. Any extra storage is */
|
||||
/* given back. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jread_dec_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT req_size;
|
||||
|
||||
/* find actual size for request info */
|
||||
req_size = sizeof (JREAD_REQ_INFO)
|
||||
+ (sizeof (ST_CHAR *) * req_info->num_of_var);
|
||||
|
||||
/* give back unused storage */
|
||||
_mms_dec_info = (*m_realloc_os_fun) (_mms_dec_info,req_size);
|
||||
req_info = (JREAD_REQ_INFO *) _mms_dec_info;
|
||||
|
||||
_mms_dec_done_ok (aCtx);
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_jread_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the read journal response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mp_jread_resp (MMSREQ_IND *indptr, JREAD_RESP_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_resp_send (MMSOP_READ_JOURNAL,indptr,
|
||||
M_CAST_MK_FUN (_ms_mk_jread_resp),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_jread_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the read journal response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_jread_resp (ST_UINT32 invoke_id, JREAD_RESP_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_resp_fin (MMSOP_READ_JOURNAL,invoke_id,
|
||||
M_CAST_MK_FUN (_ms_mk_jread_resp),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_jread_resp */
|
||||
/* ENCODE a read journal RESPONSE: */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_jread_resp (ASN1_ENC_CTXT *aCtx, JREAD_RESP_INFO *info_ptr)
|
||||
{
|
||||
ST_INT i;
|
||||
ST_INT jel_size;
|
||||
JOURNAL_ENTRY **je_list;
|
||||
JOURNAL_ENTRY **je_list_save;
|
||||
JOURNAL_ENTRY *je_ptr;
|
||||
VAR_INFO *vi_ptr;
|
||||
|
||||
if (info_ptr->more_follows)
|
||||
|
||||
{ /* not the default */
|
||||
asn1r_wr_bool (aCtx, info_ptr->more_follows);
|
||||
asn1r_fin_prim (aCtx, 1,CTX); /* context tag 1 */
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* allocate storage for ec ptrs */
|
||||
jel_size = sizeof (JOURNAL_ENTRY *) * (info_ptr->num_of_jou_entry+1);
|
||||
je_list = (JOURNAL_ENTRY **) chk_calloc (1, jel_size);
|
||||
je_list_save = je_list; /* save the ptr list pointer */
|
||||
/* find first journal entry */
|
||||
je_ptr = (JOURNAL_ENTRY *) (info_ptr + 1);
|
||||
*(je_list) = je_ptr;
|
||||
for (i = 1; i < info_ptr->num_of_jou_entry; i++)
|
||||
{ /* find ptrs to journal entries */
|
||||
if (je_ptr->ent_content.entry_form_tag == 2 &&
|
||||
je_ptr->ent_content.ef.data.list_of_var_pres)
|
||||
{
|
||||
vi_ptr = (VAR_INFO *) (je_ptr + 1);
|
||||
vi_ptr += je_ptr->ent_content.ef.data.num_of_var;
|
||||
je_ptr = (JOURNAL_ENTRY *) vi_ptr;
|
||||
}
|
||||
else
|
||||
je_ptr++;
|
||||
|
||||
*(++je_list) = je_ptr;
|
||||
}
|
||||
|
||||
asn1r_strt_constr (aCtx); /* start context tag 0 cstr */
|
||||
for (i=0; i < info_ptr->num_of_jou_entry; i++)
|
||||
{
|
||||
asn1r_strt_constr (aCtx); /* start journal entry cstr */
|
||||
je_ptr = *(je_list--);
|
||||
asn1r_strt_constr (aCtx); /* start context tag 2 cstr */
|
||||
_ms_wr_jou_ent_cont (aCtx, &je_ptr->ent_content);
|
||||
asn1r_fin_constr (aCtx, 2,CTX,DEF); /* finish context tag 2 cstr */
|
||||
asn1r_strt_constr (aCtx); /* start originating ae cstr */
|
||||
asn1r_wr_delmnt (aCtx, je_ptr->orig_ae,je_ptr->orig_ae_len);
|
||||
asn1r_fin_constr (aCtx, 1,CTX,DEF); /* finish context tag 1 cstr */
|
||||
asn1r_wr_octstr (aCtx, je_ptr->entry_id, je_ptr->entry_id_len);
|
||||
asn1r_fin_prim (aCtx, 0,CTX); /* finish context tag 0 */
|
||||
asn1r_fin_constr (aCtx, SEQ_CODE,UNI,DEF); /* finish journal entry cstr */
|
||||
}
|
||||
asn1r_fin_constr (aCtx, 0,CTX,DEF); /* finish context tag 0 cstr */
|
||||
chk_free (je_list_save); /* free the list pointer */
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_READ_JOURNAL,CTX,DEF); /* tag = opcode, ctx constr */
|
||||
}
|
||||
130
mmslib/mmsle/rs_jstat.c
Normal file
130
mmslib/mmsle/rs_jstat.c
Normal file
@@ -0,0 +1,130 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rs_jstat.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the responder portion of report journal */
|
||||
/* status. It decodes the report journal status request */
|
||||
/* (indication) & encodes the report journal status response. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 07 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 06 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 05 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 04 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 03 Changes to allow compile under C++ */
|
||||
/* 07/03/97 MDE 02 Op-specific info buffer handling changes */
|
||||
/* 06/09/97 MDE 01 Changed op specific buffer allocation */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pjou.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static JSTAT_REQ_INFO *req_info;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID jstat_jn_done (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_jstat_req */
|
||||
/* This function is called from mmsdec when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_jstat_req (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("Report Journal Status Request");
|
||||
|
||||
|
||||
/* get storage for request information */
|
||||
req_info = (JSTAT_REQ_INFO *) _m_get_dec_buf (aCtx, sizeof (JSTAT_REQ_INFO));
|
||||
_ms_get_mms_objname (aCtx, &req_info->jou_name, jstat_jn_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jstat_jn_done */
|
||||
/* report journal status request is being decoded: journal name has */
|
||||
/* been obtained. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jstat_jn_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jstat_jn_done");
|
||||
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_jstat_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the report journal status response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mp_jstat_resp (MMSREQ_IND *indptr, JSTAT_RESP_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_resp_send (MMSOP_STAT_JOURNAL,indptr,
|
||||
M_CAST_MK_FUN (_ms_mk_jstat_resp),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_jstat_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the report journal status response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_jstat_resp (ST_UINT32 invoke_id, JSTAT_RESP_INFO *info_ptr)
|
||||
{
|
||||
return (_mms_resp_fin (MMSOP_STAT_JOURNAL,invoke_id,
|
||||
M_CAST_MK_FUN (_ms_mk_jstat_resp),
|
||||
(ST_CHAR *)info_ptr));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mk_jstat_resp */
|
||||
/* ENCODE a report journal status RESPONSE: */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_mk_jstat_resp (ASN1_ENC_CTXT *aCtx, JSTAT_RESP_INFO *info_ptr)
|
||||
{
|
||||
asn1r_wr_bool (aCtx, info_ptr->mms_deletable); /* write the deletable param */
|
||||
asn1r_fin_prim (aCtx, 1,CTX);
|
||||
|
||||
asn1r_wr_u32 (aCtx, info_ptr->cur_entries); /* encode current entries */
|
||||
asn1r_fin_prim (aCtx, 0,CTX);
|
||||
|
||||
/* write the context specific explicit tag for this opcode. */
|
||||
asn1r_fin_constr (aCtx, MMSOP_STAT_JOURNAL,CTX,DEF); /* tag = opcode, ctx */
|
||||
}
|
||||
241
mmslib/mmsle/rs_jwrit.c
Normal file
241
mmslib/mmsle/rs_jwrit.c
Normal file
@@ -0,0 +1,241 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rs_jwrite.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the responder portion of write journal. */
|
||||
/* It decodes the write journal request (indication) & encodes */
|
||||
/* the write journal response. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 05 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 04 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 03 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 02 Changes to decode buffer allocation scheme */
|
||||
/* 06/09/97 MDE 01 Changed op specific buffer allocation */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pjou.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static JWRITE_REQ_INFO *req_info;
|
||||
|
||||
static ENTRY_CONTENT *ec_ptr;
|
||||
static ST_INT max_entries;
|
||||
static ST_INT max_data_vars;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
/************************************************************************/
|
||||
/* static functions with multiple references */
|
||||
|
||||
static ST_VOID jwrite_jou_entry_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jwrite_je_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jwrite_list_of_je_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jwrite_list_of_je_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jwrite_jname_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jwrite_jname_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID jwrite_jname_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_jwrite_req */
|
||||
/* This function is called from MMSDEC when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_jwrite_req (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT req_size;
|
||||
|
||||
MLOG_CDEC0 ("Write Journal Request");
|
||||
|
||||
#if defined(FIXED_DECBUF)
|
||||
max_entries = m_sv_max_entry_content;
|
||||
max_data_vars = m_sv_max_data_vars;
|
||||
req_size = mmsl_dec_info_size;
|
||||
#else
|
||||
max_entries = (_mmsdec_msglen/4);
|
||||
max_data_vars = (_mmsdec_msglen/6);
|
||||
if (m_sv_max_entry_content && (max_entries > m_sv_max_entry_content))
|
||||
max_entries = m_sv_max_entry_content;
|
||||
if (m_sv_max_data_vars && (max_data_vars > m_sv_max_data_vars))
|
||||
max_data_vars = m_sv_max_data_vars;
|
||||
|
||||
req_size = sizeof (JWRITE_REQ_INFO)
|
||||
+ (max_entries * sizeof (ENTRY_CONTENT))
|
||||
+ (max_data_vars * sizeof (VAR_INFO));
|
||||
#endif
|
||||
|
||||
/* get storage for request information */
|
||||
req_info = (JWRITE_REQ_INFO *) _m_get_dec_buf (aCtx, req_size);
|
||||
ec_ptr = (ENTRY_CONTENT *) (req_info + 1);
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 0, jwrite_jname_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jwrite_jname_cstr */
|
||||
/* write journal request is being decoded: journal name constructor */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jwrite_jname_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jwrite_jname_cstr");
|
||||
|
||||
_ms_get_mms_objname (aCtx, &req_info->jou_name, jwrite_jname_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jwrite_jname_done */
|
||||
/* write journal request is being decoded: journal name has been */
|
||||
/* obtained. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jwrite_jname_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jwrite_jname_done");
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = jwrite_jname_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jwrite_jname_cstr_done */
|
||||
/* write journal request is being decoded: journal name cstr done was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jwrite_jname_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 1, jwrite_list_of_je_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jwrite_list_of_je_cstr */
|
||||
/* write journal request is being decoded: list of journal entry cstr */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jwrite_list_of_je_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jwrite_list_of_je_cstr");
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, UNI | CONSTR, SEQ_CODE, jwrite_jou_entry_cstr);
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = jwrite_list_of_je_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jwrite_jou_entry_cstr */
|
||||
/* write journal request is being decoded: journal entry cstr was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jwrite_jou_entry_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("jwrite_jou_entry_cstr");
|
||||
|
||||
req_info->num_of_jou_entry++; /* increment # of journal entry */
|
||||
if (req_info->num_of_jou_entry > max_entries)
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
_ms_get_jou_ent_cont (aCtx, ec_ptr, max_data_vars, jwrite_je_done);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jwrite_je_done */
|
||||
/* write journal request is being decoded: journal entry has been */
|
||||
/* obtained. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jwrite_je_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
VAR_INFO *vi_ptr;
|
||||
|
||||
MLOG_CDEC0 ("jwrite_je_done");
|
||||
|
||||
/* point to where next will go */
|
||||
if (ec_ptr->entry_form_tag == 2 && ec_ptr->ef.data.list_of_var_pres)
|
||||
{
|
||||
vi_ptr = (VAR_INFO *) (ec_ptr + 1);
|
||||
ec_ptr = (ENTRY_CONTENT *) (vi_ptr + ec_ptr->ef.data.num_of_var);
|
||||
}
|
||||
else
|
||||
ec_ptr++;
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, UNI | CONSTR, SEQ_CODE, jwrite_jou_entry_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* jwrite_list_of_je_cstr_done */
|
||||
/* write journal request is being decoded: list of journal entry cstr */
|
||||
/* done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID jwrite_list_of_je_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT req_size;
|
||||
|
||||
/* find actual size for request info */
|
||||
req_size = (ST_CHAR *) ec_ptr - (ST_CHAR *) req_info;
|
||||
|
||||
/* give back unused storage */
|
||||
_mms_dec_info = (*m_realloc_os_fun) (_mms_dec_info, req_size);
|
||||
req_info = (JWRITE_REQ_INFO *) _mms_dec_info;
|
||||
|
||||
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_jwrite_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the write journal response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mp_jwrite_resp (MMSREQ_IND *indptr)
|
||||
{
|
||||
return (_mms_send_null_resp (indptr,MMSOP_WRITE_JOURNAL));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_jwrite_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the write journal response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_jwrite_resp (ST_UINT32 invoke_id)
|
||||
{
|
||||
return (_mms_fin_null_resp (invoke_id,MMSOP_WRITE_JOURNAL));
|
||||
}
|
||||
#endif
|
||||
109
mmslib/mmsle/rs_kill.c
Normal file
109
mmslib/mmsle/rs_kill.c
Normal file
@@ -0,0 +1,109 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rs_kill.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the responder portion of the kill */
|
||||
/* operation. It decodes the kill request (indication) and */
|
||||
/* encodes the kill response. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 05 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 04 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 03 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 02 Changes to decode buffer allocation scheme */
|
||||
/* 07/03/97 MDE 01 Op-specific info buffer handling changes */
|
||||
/* 06/09/97 MDE 01 Changed op specific buffer allocation */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pprg.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static KILL_REQ_INFO *req_info;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
|
||||
static ST_VOID kill_get_piname (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_kill_req */
|
||||
/* This function is called from MMSDEC when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_kill_req (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("Kill Request");
|
||||
|
||||
|
||||
/* get storage for request information */
|
||||
req_info = (KILL_REQ_INFO *) _m_get_dec_buf (aCtx, sizeof (KILL_REQ_INFO));
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 0, kill_get_piname);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* kill_get_piname */
|
||||
/* kill request is being decoded: get the program invocation name. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID kill_get_piname (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("kill_get_piname");
|
||||
|
||||
/* read program invocation name from message */
|
||||
if (asn1r_get_identifier (aCtx, req_info->piname))
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_kill_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the kill response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mp_kill_resp (MMSREQ_IND *indptr)
|
||||
{
|
||||
return (_mms_send_null_resp (indptr,MMSOP_KILL));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_kill_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the kill response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_kill_resp (ST_UINT32 invoke_id)
|
||||
{
|
||||
return (_mms_fin_null_resp (invoke_id,MMSOP_KILL));
|
||||
}
|
||||
#endif
|
||||
288
mmslib/mmsle/rs_loadd.c
Normal file
288
mmslib/mmsle/rs_loadd.c
Normal file
@@ -0,0 +1,288 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : rs_loaddom.c */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the responder portion of load domain */
|
||||
/* content. It decodes the load domain content request */
|
||||
/* (indication) & encodes the load domain content response. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/11/04 GLB 05 Remove "thisFileName" */
|
||||
/* 12/20/01 JRB 04 Converted to use ASN1R (re-entrant ASN1) */
|
||||
/* 09/13/99 MDE 03 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 02 Changes to decode buffer allocation scheme */
|
||||
/* 07/03/97 MDE 01 Op-specific info buffer handling changes */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
|
||||
#include "mmsdefs.h"
|
||||
#include "mms_pdom.h"
|
||||
#include "asn1defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the DECODE portion : */
|
||||
|
||||
static LOADDOM_REQ_INFO *req_info;
|
||||
|
||||
static ST_CHAR **cap_ptr;
|
||||
static ST_INT max_capabilities;
|
||||
static ST_INT max_fnames;
|
||||
static ST_UCHAR *ar_start;
|
||||
|
||||
/************************************************************************/
|
||||
/* variables global to the ENCODE portion : NONE */
|
||||
static ST_VOID loaddom_fname_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID loaddom_fname_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID loaddom_get_sharable (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID loaddom_get_cap (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID loaddom_cap_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID loaddom_cap_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID loaddom_get_dname (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID loaddom_third_pty_cstr (ASN1_DEC_CTXT *aCtx);
|
||||
static ST_VOID third_pty_cstr_done (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mms_load_domain_req */
|
||||
/* This function is called from MMSDEC when the opcode for this */
|
||||
/* operation is decoded. Setup state machine function pointers, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_load_domain_req (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT req_size;
|
||||
|
||||
MLOG_CDEC0 ("Load Domain Content Request");
|
||||
|
||||
|
||||
#if defined(FIXED_DECBUF)
|
||||
max_fnames = m_sv_max_file_names;
|
||||
max_capabilities = m_sv_max_loadd_cap;
|
||||
req_size = mmsl_dec_info_size;
|
||||
#else
|
||||
max_capabilities = (_mmsdec_msglen/2);
|
||||
max_fnames = (_mmsdec_msglen/2);
|
||||
if (m_sv_max_loadd_cap && (max_capabilities > m_sv_max_loadd_cap))
|
||||
max_capabilities = m_sv_max_loadd_cap;
|
||||
if (m_sv_max_file_names && (max_fnames > m_sv_max_file_names))
|
||||
max_fnames = m_sv_max_file_names;
|
||||
req_size = sizeof(LOADDOM_REQ_INFO) +
|
||||
(max_fnames * sizeof(FILE_NAME)) +
|
||||
(max_capabilities * sizeof(ST_CHAR *));
|
||||
#endif
|
||||
|
||||
/* get storage for request information */
|
||||
req_info = (LOADDOM_REQ_INFO *) _m_get_dec_buf (aCtx, req_size);
|
||||
cap_ptr = (ST_CHAR **) (req_info + 1);
|
||||
ASN1R_TAG_ADD (aCtx, CTX, 0,loaddom_get_dname);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* loaddom_get_dname */
|
||||
/* load domain content request is being decoded: domain name was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID loaddom_get_dname (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("loaddom_get_dname");
|
||||
|
||||
if (asn1r_get_identifier (aCtx, req_info->dname)) /* read the domain name */
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 1,loaddom_cap_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* loaddom_cap_cstr */
|
||||
/* load domain content request is being decoded: capability list */
|
||||
/* constructor was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID loaddom_cap_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("loaddom_cap_cstr");
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, UNI,VISTR_CODE,loaddom_get_cap);
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = loaddom_cap_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* loaddom_get_cap */
|
||||
/* load domain content request is being decoded: capability string */
|
||||
/* was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID loaddom_get_cap (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("loaddom_get_cap");
|
||||
|
||||
req_info->num_of_capab++; /* increment # of capabilities */
|
||||
if (req_info->num_of_capab > max_capabilities)
|
||||
{
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
/* copy capability back onto itself shifted by one character */
|
||||
*cap_ptr = (ST_CHAR *) aCtx->asn1r_field_ptr - 1;
|
||||
if (asn1r_get_vstr (aCtx, *cap_ptr))
|
||||
{ /* capability is too ST_INT32 */
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
cap_ptr++; /* point to where next will go */
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, UNI,VISTR_CODE,loaddom_get_cap);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* loaddom_cap_cstr_done */
|
||||
/* load domain content request is being decoded: capability list */
|
||||
/* constructor done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID loaddom_cap_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ASN1R_TAG_ADD (aCtx, CTX,2,loaddom_get_sharable);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* loaddom_get_sharable */
|
||||
/* load domain content request is being decoded: sharable was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID loaddom_get_sharable (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("loaddom_get_sharable");
|
||||
/* read sharable from the received message */
|
||||
if (asn1r_get_bool (aCtx, &(req_info->sharable)))
|
||||
{ /* sharable is too ST_INT32 */
|
||||
asn1r_set_dec_err (aCtx, REQ_BAD_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX|CONSTR,4,loaddom_fname_cstr);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* loaddom_fname_cstr */
|
||||
/* load domain content request is being decoded: filename cstr was */
|
||||
/* encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID loaddom_fname_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("loaddom_fname_cstr");
|
||||
|
||||
aCtx->asn1r_c_done_fun [aCtx->asn1r_msg_level] = loaddom_fname_cstr_done;
|
||||
|
||||
/* In the case of a request domain download request the file names are */
|
||||
/* put right after the cabability string pointers. The max number of */
|
||||
/* these file names is the same worst case as the capability strings. */
|
||||
|
||||
_ms_get_mms_fname (aCtx, (FILE_NAME *) cap_ptr, max_fnames, &req_info->num_of_fname);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* loaddom_fname_cstr_done */
|
||||
/* load domain content request is being decoded: file name list */
|
||||
/* constructor done was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID loaddom_fname_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
ST_INT req_size;
|
||||
|
||||
/* find actual size for request info */
|
||||
req_size = sizeof (LOADDOM_REQ_INFO)
|
||||
+ (sizeof (ST_CHAR *) * req_info->num_of_capab)
|
||||
+ (sizeof (FILE_NAME) * req_info->num_of_fname);
|
||||
|
||||
/* give back unused storage */
|
||||
_mms_dec_info = (*m_realloc_os_fun) (_mms_dec_info, req_size);
|
||||
req_info = (LOADDOM_REQ_INFO *) _mms_dec_info;
|
||||
|
||||
ASN1R_TAG_ADD (aCtx, CTX | CONSTR, 5, loaddom_third_pty_cstr);
|
||||
ar_start = aCtx->asn1r_field_ptr; /* save in case third party rcvd */
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* loaddom_third_pty_cstr */
|
||||
/* load domain content request is being decoded: third party */
|
||||
/* cstr was encountered. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID loaddom_third_pty_cstr (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("loaddom_third_pty_cstr");
|
||||
|
||||
req_info->third_pty_pres = SD_TRUE; /* set third party */
|
||||
req_info->third_pty = ar_start; /* save_start */
|
||||
*ar_start = '\x30'; /* change tag */
|
||||
|
||||
if (aCtx->asn1r_elmnt_len)
|
||||
asn1r_parse_cstr_contents (aCtx, third_pty_cstr_done);
|
||||
else
|
||||
aCtx->asn1r_c_done_fun[ aCtx->asn1r_msg_level ] = third_pty_cstr_done;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* third_pty_cstr_done */
|
||||
/* load domain content request is being decoded: third party */
|
||||
/* was encountered and read into req structure. */
|
||||
/************************************************************************/
|
||||
|
||||
static ST_VOID third_pty_cstr_done (ASN1_DEC_CTXT *aCtx)
|
||||
{
|
||||
MLOG_CDEC0 ("third_pty_cstr_done");
|
||||
|
||||
req_info->third_pty_len = aCtx->asn1r_field_ptr - ar_start;
|
||||
_ms_set_cs_check (aCtx); /* check for Companion Standard info */
|
||||
}
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mp_loaddom_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE and send the load domain content response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mp_loaddom_resp (MMSREQ_IND *indptr)
|
||||
{
|
||||
return (_mms_send_null_resp (indptr,MMSOP_LOAD_DOMAIN));
|
||||
}
|
||||
|
||||
#else
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* mpl_loaddom_resp */
|
||||
/* This function is called from either the application or the virtual */
|
||||
/* machine to ENCODE the load domain content response. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mpl_loaddom_resp (ST_UINT32 invoke_id)
|
||||
{
|
||||
return (_mms_fin_null_resp (invoke_id,MMSOP_LOAD_DOMAIN));
|
||||
}
|
||||
#endif
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user