[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

2738.0. "DECmcc program for getting bridge counters" by SCHOOL::KIM () Fri Apr 10 1992 14:46

Hi,

Would you see the following dump output and the program, and find what is
wrong with the program?  I try to get counter values of bridge
LOCAL_NS:.500-1 (i.e. MCC> SHOW BRIDGE LOCAL_NS:.500-1 ALL COUNTERS).

I have difficulty in reading the dump output.  Can you also give me a
pointer to the code (ILV) that is associated with the bridge spec?

Thank you.

/dk


Here is the dump output:

Calling mcc_call_function
In Entity : 
        entity [0] wild = NOT_WILD class = 9 id = 1 type = 5
        instance = LOCAL_NS:.500-1
Return status : 52854873 
Out Entity : 
        entity [0] wild = NOT_WILD class = 9 id = 1 type = 5
        instance = LOCAL_NS:.500-1
Timestamp :
 
Dump of MCC time descriptor:
mcc_w_maxstrlen = 16
mcc_b_dtype     = DSC_K_DTYPE_T
mcc_b_class     = DSC_K_CLASS_D
mcc_w_curlen    = 16
mcc_b_flags     = 0
mcc_b_ver       = 1
mcc_l_id        = 0
mcc_a_link      = 0
mcc_l_dt        = MCC_K_DT_BIN_ABS_TIM
mcc_a_pointer   = 
    bin_utc      =  8-APR-1992 09:29:20.77
    time          = 01CB1533959B7620
    inacc         = FFFFFFFFFFFFFFFF
    tdf_minutes   = -240
Out_p : 

*****


[  20 ] ( 
    [  12 ] ( 
        [  0 ] ( 
            [  1 ]             01 
            [  2 ]             09 
            [  3 ]             01 
            [  4 ]             05 
            [  5 ]             4c 4f 43 41 4c 5f 4e 53 3a 2e 35 30 30 2d 31  -- LOCAL_NS:.500-1
            )
        )
    )


Here is the program:


/*******************************/
/* bridge_pm.c		       */
/*******************************/

#module GET_COUNTER "V01.0.0"

#include <stdio>
#include <ssdef>
#include <stsdef>

#include <mcc_descrip>
#include <mcc_interface_def.h>
#include <mcc_vea_def.h>
#include <mcc_msg.h>
#include <mcc_common_definitions>
#include "MCC_BRIDGE_AM_SVC_IF.H"

main()
{
   unsigned long int 	stat = MCC_S_NORMAL;
   unsigned long int 	handle_stat = MCC_K_HANDLE_FIRST;
   MCC_A_AES 		p_in_entity = MCC_K_NULL_PTR;
   MCC_T_Descriptor 	instance_descriptor;
   unsigned long int	verb = MCC_K_VERB_SHOW;
   unsigned long int	partition = MCC_K_PRT_COUNTERS;
   MCC_A_TIMEFRAME	p_time_spec = MCC_K_NULL_PTR;
   MCC_T_Descriptor	*p_dsc_in_q;
   MCC_T_Descriptor	*p_dsc_in_p;
   MCC_A_HANDLE		p_handle;
   MCC_A_AES		p_out_entity = MCC_K_NULL_PTR;
   MCC_T_Descriptor	*p_time_stamp;
   MCC_T_Descriptor	dsc_out_p;
   char			buff[1024];
   int			buff_len = 1024;
   MCC_T_Descriptor	*p_dsc_out_p = &dsc_out_p;
   MCC_T_Descriptor	*p_dsc_out_q;

/*******************************/
/* create a bridge instance    */
/*******************************/

   instance_descriptor.mcc_w_maxstrlen = 15;
   instance_descriptor.mcc_b_dtype = DSC_K_DTYPE_Z;
   instance_descriptor.mcc_b_class = DSC_K_CLASS_S;
   instance_descriptor.mcc_a_pointer = &"LOCAL_NS:.500-1";
   instance_descriptor.mcc_w_curlen = 15;
   instance_descriptor.mcc_b_flags = 0;
   instance_descriptor.mcc_b_ver = MCC_K_VER_DESCRIPTOR;
   instance_descriptor.mcc_l_id = MCC_K_BR_NAME;
   instance_descriptor.mcc_l_dt = MCC_K_DT_FULL_NAME;
   instance_descriptor.mcc_a_link = MCC_K_NULL_PTR;

   if($VMS_STATUS_SUCCESS (stat))
      stat = mcc_aes_create (&p_in_entity,
                             &MCC_K_CLASS_BRIDGE,
                             &instance_descriptor,
                             &MCC_K_AES_NOT_WILD);

/*******************************/
/* prepare mcc_call_function   */
/*******************************/

/* if ($VMS_STATUS_SUCCESS (stat))
      stat = mcc_ats_create_frame (&p_time_spec); */
   p_dsc_in_q = p_dsc_in_p = MCC_K_NULL_PTR;
   if ($VMS_STATUS_SUCCESS (stat))
      stat = mcc_ahs_create (&p_handle);
   if ($VMS_STATUS_SUCCESS (stat))
      stat = mcc_aes_create (&p_out_entity,
			    MCC_K_NULL_PTR,
			    MCC_K_NULL_PTR,
			    &MCC_K_AES_CLASS_WILD);
   p_time_stamp = MCC_K_NULL_PTR;
   if ($VMS_STATUS_SUCCESS (stat))
      stat = mcc_time_create (&p_time_stamp,
			      &MCC_K_DT_BIN_ABS_TIM,
			      MCC_K_NULL_PTR,
			      MCC_K_NULL_PTR);
   if ($VMS_STATUS_SUCCESS (stat)) {
      p_dsc_out_p->mcc_b_dtype = DSC_K_DTYPE_Z;
      p_dsc_out_p->mcc_b_class = DSC_K_CLASS_S;
      p_dsc_out_p->mcc_a_pointer = buff;
      p_dsc_out_p->mcc_w_maxstrlen = buff_len;
      p_dsc_out_p->mcc_w_curlen = buff_len;
      p_dsc_out_p->mcc_l_id = 0;
      p_dsc_out_p->mcc_l_dt = MCC_K_DT_ILV;
      p_dsc_out_p->mcc_b_flags = 0;
      p_dsc_out_p->mcc_b_ver = MCC_K_VER_DESCRIPTOR;
      p_dsc_out_p->mcc_a_link = MCC_K_NULL_PTR;
   }

/*******************************/
/* call mcc_call_function      */
/*******************************/

   do {
      if($VMS_STATUS_SUCCESS (stat))
         stat = mcc_call_function (&verb,
				   p_in_entity,
				   &partition,
				   p_time_spec,
				   p_dsc_in_q,
				   p_dsc_in_p,
				   p_handle,
				   p_out_entity,
				   p_time_stamp,
				   p_dsc_out_p,
				   p_dsc_out_q);

/*******************************/
/* print mcc_call_function out */
/*******************************/

      printf("Calling mcc_call_function\n");
      printf("In Entity : \n");

      mcc_aes_dump(p_in_entity);


      printf ("Return status : %d \n", stat);
      printf ("Out Entity : \n");
 
      mcc_aes_dump (p_out_entity);

      printf("Timestamp :\n ");
      mcc_time_dump (p_time_stamp);

      printf("Out_p : \n\n*****\n\n");
      mcc_ilv_dump (p_dsc_out_p);

      stat = mcc_ahs_get_context(p_handle, &handle_stat);

   } while(handle_stat == MCC_K_HANDLE_MORE);
}

T.RTitleUserPersonal
Name
DateLines
2738.1Need to convert bridge name to MCC_T_FullnameQUIVER::HAROKOPUSFri Apr 24 1992 19:5051
Hi dk,

Sorry for responding so late.  I've been real busy with the ELM FT update
and I finally got a chance to look at your code.

The problem is that the bridge name needs to be converted to a fullname
before calling the bridge AM.   The following modifications to your
routine should accomplish this:

char *bridge_name;
MCC_T_Unsigned16 str_len;
MCC_T_Unsigned16 dns_str_len;
MCC_T_Unsigned32 dns_stat;
MCC_T_FullName full_br_name;


/*******************************/
/* create a bridge instance    */
/*******************************/


    bridge_name = &"LOCAL_NS:.500-1";
    str_len = strlen(bridge_name);
    stat = mcc_dns_opaque_fullname(bridge_name,
                                   &str_len,
                                   full_br_name;
                                   &dns_str_len,
                                   &dns_stat);

   instance_descriptor.mcc_w_maxstrlen = sizeof(MCC_T_FullName);
   instance_descriptor.mcc_b_dtype = DSC_K_DTYPE_T;
   instance_descriptor.mcc_b_class = DSC_K_CLASS_S;
   instance_descriptor.mcc_a_pointer = ( unsigned char *) full_br_name;
   instance_descriptor.mcc_w_curlen = dns_str_len;
   instance_descriptor.mcc_b_flags = 0;
   instance_descriptor.mcc_b_ver = MCC_K_VER_DESCRIPTOR;
   instance_descriptor.mcc_l_id = MCC_K_BR_NAME;
   instance_descriptor.mcc_l_dt = MCC_K_DT_FULL_NAME;
   instance_descriptor.mcc_a_link = MCC_K_NULL_PTR;

   if($VMS_STATUS_SUCCESS (stat))
      stat = mcc_aes_create (&p_in_entity,
                             &MCC_K_CLASS_BRIDGE,
                             &instance_descriptor,
                             &MCC_K_AES_NOT_WILD);



Good luck,

Bob
2738.2Documentation problem?VCSESU::WADEBill Wade, VAXc Systems &amp; Support EngMon Apr 27 1992 14:0410
    
    re .1
    
    I think what dk is asking is how was he supposed to know this?  He
    tried to debug this on his own but the documentation was not much help.
    He's trying to get some experience with the DECmcc callable interface
    and from a typical programmer perspective he's having problems.  Is this
    a documentation problem?   
    
    
2738.3If not in 1 of these, then QAR itTOOK::MCPHERSONSave a tree: kill an ISO working group.Mon Apr 27 1992 14:219
>    I think what dk is asking is how was he supposed to know this?  He
>    tried to debug this on his own but the documentation was not much help.

The information should be in one or all of the following places
	1) The MRM for the MM whose services are being
 	   requested
	2) The "Management Module Programming Guide"
	3) The System Reference Manual