[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

1402.0. "in_q encoding" by TENERE::BOMMART () Tue Aug 27 1991 14:22

Hi MCC gurus,

	I have written an directive CREATE OPERATION CONTEXT and would like to
	get the qualifiers given by the caller.

	I issue the command:
		CREATE OPERATION CONTEXT toto, IN DOMAIN turlututu

	When I ILV decode the in_q parameter I obtain the following:

[  0 ] (
    [  3 ]     aa 00 04 00 29 cc e0 e5 63 69 8f cc 92 00 0d 00 01 09 74 75
    72 6c 75 74 75 74 75 00 00
    )


	Ok the "[ 3 ]" is for the code of MCC_K_QUAL_IN_DOMAIN
	But the rest ?

	My "turlututu" domain is coded at the end (74 75 72 6c 75 74 75 74 75)

	But what is the rubbish thing before these octets ????


	What I would like to do is to get the domain and do a mcc_call_function
	to the Domain FM to check if this domain exists really.

	Is there somebody who has already written the same kind of code (I think
	that I'm going to reinvent the wheel :-)

Any help would be VERY appreciated, regards
Damien.
T.RTitleUserPersonal
Name
DateLines
1402.1Looks like a FullName to meTOOK::GUERTINDon't fight fire with flamesTue Aug 27 1991 14:591
    
1402.2mcc_ilv_get the value and build in_entity to SHOWTOOK::TANEd TanTue Aug 27 1991 16:1993
    The IN DOMAIN qualifier is encoded as an internal (opaque) format
    fullname.
    
    Assuming you want to do a SHOW DOMAIN turlututu ALL IDENTIFIERS, you
    need to get the domain name from in_q and build an in_entity to the
    SHOW. The following is only a code fragment. You need to handle error
    checking etc.
    
    ======================================================================
    
    
    MCC_T_Descriptor *p_dsc_in_q; /* in_q parameter to your entry point */
    
    ......
    
    unsigned long int status = MCC_S_NORMAL;
    unsigned long int stat = MCC_S_NORMAL;
    unsigned long int id_code;
    unsigned long int class;
    unsigned long int wildtype;
    MCC_T_Descriptor in_q_dsc;
    MCC_A_AES p_domain_entity = MCC_K_NULL_PTR;
    struct MCC_R_ILV_CONTEXT ilvctx;  /* ILV context block for in_q */
    
    in_q_dsc.mcc_w_maxstrlen = 1500;
    in_q_dsc.mcc_b_dtype     = DSC_K_DTYPE_T;
    in_q_dsc.mcc_b_class     = DSC_K_CLASS_S;
    in_q_dsc.mcc_a_pointer   = MCC_K_NULL_PTR;
    in_q_dsc.mcc_w_curlen    = 0;
    in_q_dsc.mcc_b_flags     = 0;
    in_q_dsc.mcc_b_ver       = 1;
    in_q_dsc.mcc_l_id        = MCC_K_DOMAIN_NAME; /* defined in
    						   * MCC_FM_DOMAIN_SVC_IF.H
    						   */
    in_q_dsc.mcc_l_dt        = MCC_K_DT_FULL_NAME;
    in_q_dsc.mcc_a_link      = MCC_K_NULL_PTR;
    
    
    ......
    
    status = mcc_ilv_get_param_begin(&ilvctx, p_dsc_in_q);
    
    /* This is assuming your in_q has qualifiers other than IN DOMAIN
     * qualifier with code of MCC_K_QUAL_IN_DOMAIN. They are BY USER, BY
     * ACCOUNT, BY PASSWORD, VIA PORT, VIA PATH. They are encoded and
     * passed down from FCL. If you don't support them, you might want to
     * check them and return error.
     */
                               
    if (status == MCC_S_NORMAL)
      {
        id_code = MCC_K_QUAL_IN_DOMAIN;
        status = mcc_ilv_fnd_id(&ilvctx, &id_code);
      }
    
    if (status == MCC_S_NORMAL)
      {
        /* allocate memory */
    
        if (!(in_q_dsc.mcc_a_pointer =
    		(unsigned char *)mcc_malloc(in_q_dsc.mcc_w_maxstrlen)))
          status = MCC_S_OUTOFMEM;
      }
                                           
    if (status == MCC_S_NORMAL)
      {
        status = mcc_ilv_get(&ilvctx, &in_q_dsc, &reason_code);
      }
    
    if (status == MCC_S_NORMAL)
      {
        /* Build the in_entity to SHOW DOMAIN ALL IDENTIFIER */
    
        class = MCC_K_CLASS_DOMAIN; /* defined in MCC_FM_DOMAIN_SVC_IF.H */
        wildtype = MCC_K_AES_NOT_WILD;
        status = mcc_aes_create(p_domain_entity, &class, &in_q_dsc,
                                &wildtype);
      }
    
    
    .....
    
    /* Cleanup */
    
    if (in_q_dsc.mcc_a_pointer)
      {
        mcc_free(in_q_dsc.mcc_a_pointer);
      }
    
    if (p_domain_entity)
      stat = mcc_aes_delete(&p_domain_entity);
    
    =====================================================================
1402.3Ed, I love you. :-) Many thanks again. Damien.RIVAGE::BOMMARTWed Aug 28 1991 04:590
1402.4MCC_FM_DOMAIN_SVC_IF.H missing in our field test version...RIVAGE::BOMMARTWed Aug 28 1991 08:3913
This is just an info for the DECmcc team.

In the field test version (T1.2.1/Ultrix) we are using for the moment, the
include files of the internal MCC modules are not installed (for example
I can't find MCC_FM_DOMAIN_SVC_IF.H)

Anyway, I have copied this file from a VMS version of MCC (from SYS$LIBRARY)

It was just an info for the person who is responsible to build the next field
test kit.

Regards,
Damien.