|
Alex,
I don't quite understand your question. Do you want to build
a AES specifier that has a Phase4name instance of your local
node? What did you do to get $#@%, when you called aes_dump?
Normally at MCC user level, you may simply do
MCC> show node4 0
You may also build a instance descriptor that has an ascii "0" in
it when calling mcc_call_access.
Please show me how you built the entity specifier.
BTW, I just found out Euegen and Alex are the same person.
Jean
|
| Jean,
I have said explicitly
> Q: What do you get when calling PhaseIV AM through mcc_call_access with
!!!!!!!!!!!!!!!
So what to do at the MCC user level doesn't apply here
Below you will find to files: one is complete source code and another is the
.COM file which I use to compile and link this program.
This program will prompt you for the node name.
If you enter something reasonable, say SWORD1, you will receive nice dump of
identifier attributes.
If you enter @#$% or any other combination of non-alphanumeric characters,
you will receive nice dump of identifier attributes for you local node, assuming
that it is the PhaseIV node
Best regards,
Gene
BTW, your discovery
> BTW, I just found out Euegen and Alex are the same person.
is absolutely amazing. My first name is Eugene or Gene for short. Alex and I
just have the same last name.
#include <stdio.h>
#include <mcc_descrip.h>
#include <mcc_vea_def.h>
#include <mcc_interface_def.h>
#include <mcc_msg.h>
#include <mcc_dna4_am_node4_svc_if.h>
main()
{
#define OUT_P_SIZE 1024
int step;
MCC_T_CVR status;
MCC_T_UNSLONG wildtype;
MCC_T_UNSLONG time_dt;
MCC_T_UNSLONG verb = MCC_K_VERB_SHOW;
MCC_T_UNSLONG attribute = MCC_K_ATTR_PRT_IDENTIFIER;
MCC_T_IDCode class;
char out_p_buffer[OUT_P_SIZE];
MCC_T_Descriptor desc;
MCC_A_AES p_in_entity;
MCC_A_AES p_out_entity;
MCC_T_Descriptor *p_time_stamp;
MCC_A_HANDLE p_handle;
char buffer[50];
int len;
#define MAXSTEP 5
enter_name:
printf("Enter name: ");
fscanf(stdin, "%s", buffer);
if (((len = strlen(buffer)) == 0) || (len > 6)) {
printf("Please, enter name from 1 to 6 characters long\n");
goto enter_name;
}
desc.mcc_w_maxstrlen = (unsigned short) len;
desc.mcc_b_dtype = DSC_K_DTYPE_T;
desc.mcc_b_class = DSC_K_CLASS_S;
desc.mcc_a_pointer = (unsigned char *) buffer;
desc.mcc_w_curlen = desc.mcc_w_maxstrlen;
desc.mcc_b_flags = 0;
desc.mcc_b_ver = MCC_K_VER_DESCRIPTOR;
desc.mcc_l_id = MCC_K_DN4_NI_NODE_NAME;
desc.mcc_l_dt = MCC_K_DT_PHASE4NAME;
desc.mcc_a_link = MCC_K_NULL_PTR;
step = 1;
do switch (step++) {
case 1:
p_in_entity = MCC_K_NULL_PTR;
class = MCC_K_CLASS_DECNET_NODE;
wildtype = MCC_K_AES_NOT_WILD;
status = mcc_aes_create(&p_in_entity, &class, &desc, &wildtype);
break;
case 2:
p_out_entity = MCC_K_NULL_PTR;
status = mcc_aes_create(&p_out_entity, &class, &desc, &wildtype);
break;
case 3:
p_time_stamp = MCC_K_NULL_PTR;
time_dt = MCC_K_DT_BIN_ABS_TIM;
status = mcc_time_create(&p_time_stamp, &time_dt,
MCC_K_NULL_PTR, /* init_time_len */
MCC_K_NULL_PTR); /* init_time_val */
break;
case 4:
p_handle = MCC_K_NULL_PTR;
status = mcc_ahs_create(&p_handle);
break;
case 5:
desc.mcc_w_maxstrlen = OUT_P_SIZE;
desc.mcc_b_dtype = DSC_K_DTYPE_T;
desc.mcc_b_class = DSC_K_CLASS_S;
desc.mcc_a_pointer = (unsigned char *) out_p_buffer;
desc.mcc_w_curlen = desc.mcc_w_maxstrlen;
desc.mcc_b_flags = 0;
desc.mcc_b_ver = MCC_K_VER_DESCRIPTOR;
desc.mcc_l_id = 0;
desc.mcc_l_dt = MCC_K_DT_ILV;
desc.mcc_a_link = MCC_K_NULL_PTR;
status = mcc_call_access(&verb,
p_in_entity,
&attribute,
MCC_K_NULL_PTR, /* time_spec: do it NOW */
MCC_K_NULL_PTR, /* p_in_q */
MCC_K_NULL_PTR, /* p_in_p */
p_handle,
p_out_entity,
p_time_stamp,
&desc, /* out_p */
MCC_K_NULL_PTR); /* out_q_p */
if ((status == MCC_S_RESPONSE) ||
(status = MCC_S_COMMON_EXCEPTION) ||
(status = MCC_S_SPECIALIZED_EXCEPTION) )
status = mcc_ilv_dump(&desc); /* dump out_p */
} while ((step <= MAXSTEP) && (status == MCC_S_NORMAL));
if (status != MCC_S_NORMAL)
printf("\nBad status %d on step %d", status, step-1);
exit(1);
}
$ cc/list/show=inc/stan=port/debug/noopt 'P1'
$ LINK /deb 'P1', SYS$INPUT/OPTIONS
sys$library:MCC_KERNEL_INIT.OBJ
SYS$SHARE:VAXCRTL/SHARE
SYS$SHARE:MCC_KERNEL_SHR/SHARE
$ EXIT
|
|
Eugene,
Sorry about the name mixup. Actually, I was told they are the same
people. I guess the info was wrong.
The reason that node @#$% is translated to the local node is one of
our translation routines call atoi() to resolve the instance. In this
case, atoi returns 0. '0' ascii is considered local node and is resolved
to local node address.
We already qared this and will fix it in the near future.
Jean
|