/*****************************************************************/
/**                                                             **/
/**             (C) Copyright 1992 the Regents of the           **/
/**        University of California.  All Rights Reserved.      **/
/**                                                             **/
/**        This work was produced under the sponsorship of      **/
/**         the U.S. Department of Energy.  The Government      **/
/**                retains certain rights therein.              **/
/**                                                             **/
/**                         Written by                          **/
/**         Distributed Programming Environments Project        **/
/**           Computer Software and Networking Division,        **/
/**                   Livermore Computer Center,                **/
/**            Lawrence Livermore National Laboratory           **/
/**                                                             **/
/*****************************************************************/
 
Interface sample; 
 
   Invoke iop 5 
	OctetString(2),OctetString(12),OctetString(500), 
	OctetString(500); 
 
End; 

  
main(argc,argv) 
   int argc; 
   char *argv[]; 
{ 
   OctetString(2) a2,b2; 
   OctetString(12) a12,b12; 
   OctetString(500) a500,b500,c500; 
 
   Control (sample) inst; 
  
   int i; 
 
   if (argc != 2) 
      exit(1);    
 
   a2.len = 2;
   a2.val[0] = 0xea; 
   a2.val[1] = 0x8f; 

   a12.len = 12;
   for (i=0;i<12;i++) 
      a12.val[i] = (i+1)|(i<<4); 

   a500.len = 247;
   for (i=0;i<246;i++) 
      a500.val[i] = (i+1); 
   a500.val[246] = 244;
 
/***************** receive from file ********************/

  
   Bind_STUB(inst,"T11.4.in","r",Asn_1_ber); 
   Accept inst 
   { 
      On iop(,b12,b500, ...) 
       { 
          int l; 
 
/***************** report results *********************/

         if (!__ROr_CMPP_OctetString(a12,b12,(l=12,&l),0))
            printf("###Compare 12 failed\n"); 
         if (!__ROr_CMPP_OctetString(a500,b500,(l=500,&l),0))
            printf("###Compare 500 failed\n"); 
      }  
   } 
   Unbind(inst); 
 
   printf("test completed\n");
   return(0); 
} 
  
