| Re .0:
>
> DBG> exam/aw @p_ident_dsc.mcc_a_pointer
> MAIN\p_ident_dsc.mcc_a_pointer:'..e����.~......my_solix.........
>
> Does the descriptor include NameSpace, class and instance ???
>
Your descriptor contain an opaque fullname (MCC_T_FullName).
If you want its string equivalent, use the mcc_dns_fullname_string routine,
that will do the conversion MCC_T_FullName to char.
Hope this helps.
Pierre.
|
| Re.1:
Hello Pierre,
thanks a lot for your help !
I still have some problem to get the string format
the status returned by the routine is the following:
%MCC-E-DNSERROR, unknown DNS error
just have a look at the call...
/*get primary id */
status = mcc_dns_translate_ident(p_alt_entity, &p_ident_dsc, &dns_status);
/*retrieve FullName string*/
status = mcc_dns_fullname_string(
p_ident_dsc.mcc_a_pointer,
&opaque_len,
fullname_string,
&fullname_len,
&dns_status);
return (status);
the status returned by the translate routine was ok!
Is the 'p_ident_dsc.mcc_a_pointer'; the address of an opaque_string
format?
do you have any suggestion...
JMC.
|
| >
> /*get primary id */
>
> status = mcc_dns_translate_ident(p_alt_entity, &p_ident_dsc, &dns_status);
>
> /*retrieve FullName string*/
>
> status = mcc_dns_fullname_string(
> p_ident_dsc.mcc_a_pointer,
> &opaque_len,
> fullname_string,
> &fullname_len,
> &dns_status);
>
> return (status);
>
>
> the status returned by the translate routine was ok!
>
What is "opaque_len" & where did it come from ? I just turned around
and used mcc_w_curlen for the instance & it works fine.
Attached is a *very* similar code that I know works...
/doug
<attachment>
MCC_T_Descriptor dsc_instance;
MCC_T_Unsigned32 dns_status;
MCC_T_Unsigned16 collector_name_len = 0;
char collector_name[MAX_FULLNAME_SIZE]
#define MAX_FULLNAME_SIZE 400 /* max of a fullname */
/*
* convert the DNS fullname of Collector we're sending to
* into a Latin1String...
*/
status = mcc_dns_fullname_string(dsc_instance.mcc_a_pointer,
&dsc_instance.mcc_w_curlen,
collector_name,
&collector_name_len,
&dns_status);
collector_name[collector_name_len] = 0; /* Null-terminate it */
if (TRACE_LOG_ENABLED(MCC_M_EVCAM_DEBUG)) {
printf(" Class = %d Instance = %s Id = %d Dt = %d \n",
Class, collector_name, dsc_instance.mcc_l_id, dsc_instance.mcc_l_dt);
/* dump out in_p for grins. */
status = mcc_ilv_dump(pI_dsc_inp);
}
|