T.R | Title | User | Personal Name | Date | Lines |
---|
5170.1 | Check the p_in_entity | TRM::KWAK | | Wed Jun 09 1993 11:09 | 20 |
|
RE: .0
The MCC Registration FM stores/retrieves "reference attributes" in DNS
using mcc_dns_read_attr_data(), and mcc_dns_write_attr_data().
> stat = mcc_dns_read_attr_data(p_in_entity, &attr_id,
> &read_dsc, &dns_stat);
In the function call above, you need to have the attribute code
in "attr_id".
From the error message you got (%DNS-E_INVALIDNAME), it seems that the
entity spec is incorrect. Please add the following statement before
making the call:
stat = mcc_aes_dump(p_in_entity);
William
|
5170.2 | You 're right but where is the bug ? | AEOENG::TUAUX | EIC Annecy - dtn 887 4121 | Wed Jun 09 1993 13:19 | 35 |
|
I put mcc_aes_dump (p_in_entity) and the result is correct, I get back
what I have initialize with the mcc_aes_create routine.
I try to run my program with a NODE4 entity. Error codes are nearly the same:
stat = %MCC-E-DNSERROR, unknown DNS error
dns_stat = %DNS-E-INVALID_ENTRYNA, Name of entry is not in...
So you are right, the problem comes from the entity spec.
I initialize the p_in_entity with the node name as following:
instance.mcc_b_dtype = DSC_K_DTYPE_T;
instance.mcc_b_class = DSC_K_CLASS_S;
instance.mcc_a_pointer = &"AEO685";
instance.mcc_w_maxstrlen = 6;
instance.mcc_w_curlen = 6;
instance.mcc_l_id = MCC_K_DN4_NI_NODE_REG_NAME;
instance.mcc_l_dt = MCC_K_DT_FULL_NAME;
instance.mcc_b_flags = 0;
instance.mcc_b_ver = MCC_K_VER_DESCRIPTOR;
instance.mcc_a_link = MCC_K_NULL_PTR;
if (stat == MCC_S_NORMAL)
stat = mcc_aes_create (
&p_in_entity,
&MCC_K_CLASS_DECNET_NODE,
&instance,
&MCC_K_AES_NOT_WILD);
Can you see something wrong ?
Thanks for your help.
Sylviane
|
5170.3 | Fullname is not string type | TOOK::KWAK | | Wed Jun 09 1993 14:11 | 44 |
|
RE: .2
You need to get the 'opaque' fullname of your node4 entity.
The datatype "MCC_T_DT_FULLNAME" is not string, but an 'opaque'
name used by DNS. You need to call mcc_dns_opaque_fullname() to
convert the string representation to the internal 'opaque' format
before you call mcc_aes_create().
Please refer MCC SRM (System Reference Manual) for details of the
routine. The following is what is needed to build the correct AES.
unsigned char *p_string,
opaque_name[100];
unsigned short str_len, opaque_name_len = 0;
p_string = "AEO685";
str_len = strlen(p_string);
stat = mcc_dns_opaque_fullname(p_string, &str_len,
opaque_name, &opaque_name_len, &dns_stat);
instance.mcc_b_dtype = DSC_K_DTYPE_T;
instance.mcc_b_class = DSC_K_CLASS_S;
instance.mcc_a_pointer = opaque_name;
instance.mcc_w_maxstrlen = sizeof (opaque_name);
instance.mcc_w_curlen = opaque_name_len;
instance.mcc_l_id = MCC_K_DN4_NI_NODE_REG_NAME;
instance.mcc_l_dt = MCC_K_DT_FULL_NAME;
instance.mcc_b_flags = 0;
instance.mcc_b_ver = MCC_K_VER_DESCRIPTOR;
instance.mcc_a_link = MCC_K_NULL_PTR;
if (stat == MCC_S_NORMAL)
stat = mcc_aes_create (
&p_in_entity,
&MCC_K_CLASS_DECNET_NODE,
&instance,
&MCC_K_AES_NOT_WILD);
|
5170.4 | problem is not fixed | AEOENG::TUAUX | EIC Annecy - dtn 887 4121 | Thu Jun 10 1993 06:21 | 17 |
|
Hello,
Still me with my DECdns problem !
I have done what you said, and now I get the following errors:
stat: %MCC-E-NOATTRIB, no such DNS attribute
And the mcc_aes_dump of p_in_entity is :
instance = �...Z� .�:?.......AEO685..
Have you any idea ?
Sylviane
|
5170.5 | The attribute you want does not exist in DNS. | TOOK::KWAK | | Thu Jun 10 1993 10:22 | 24 |
|
RE:.4
"%MCC-E-NOATTRIB" means the attribute you're looking for does not
exist in DECdns.
As I said in .1, the Registration FM stores Reference attributes
in DNS, which can be read using mcc_dns_read_attr_data().
Suppose you wish to read reference attribute of registered entity
(snmp YOURS_NS:.ipfoo), do the following:
$ man/ent
MCC> set snmp YOURS_NS:.ipfoo remarks = "Testing program"
MCC> show snmp YOURS_NS:.ipfoo remarks
$! Now find the attribute code for the attribute "remarks"
$! and use is in 'attr_id' parameter.
If you want to retrieve identifiers (e.g. IP address and IP name),
you need to call mcc_dns_get_identifiers().
William
|
5170.6 | It works! | AEOENG::TUAUX | EIC Annecy - dtn 887 4121 | Thu Jun 10 1993 13:49 | 3 |
| My program is working now, thanks for your help.
Sylviane
|