[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference azur::mcc

Title:DECmcc user notes file. Does not replace IPMT.
Notice:Use IPMT for problems. Newsletter location in note 6187
Moderator:TAEC::BEROUD
Created:Mon Aug 21 1989
Last Modified:Wed Jun 04 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:6497
Total number of notes:27359

2829.0. "help needed about MCC_DNS_TRANSLATE_IDENT()" by NSDC::CAILLE () Thu Apr 23 1992 09:25

T.RTitleUserPersonal
Name
DateLines
2829.1Try mcc_dns_fullname_stringTAEC::LAVILLATThu Apr 23 1992 10:0116
2829.2...exactly what I need...NSDC::CAILLEThu Apr 23 1992 15:3039
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.
   

2829.3what is'opaque_len' ?MCDOUG::MCPHERSONSave a tree: kill an ISO working group.Thu Apr 23 1992 15:5859
>
>  /*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);
	}
2829.4that works fine !!!NSDC::CAILLEFri Apr 24 1992 07:5017
Re.3:

>  	
>    What is "opaque_len" & where did it come from ?   I just turned around
>    and used mcc_w_curlen for the instance & it works fine.
>
	
  It was defined as following...

	MCC_T_Unsigned16    opaque_len = dns$k_fullnamemax;

  Since I'm using the 'p_ident_dsc.mcc_w_curlen' as the opaque_string_len
  the DNS_STATUS returned is OK !


  Thanks a lot !!!
  JMC.