home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / CPI-C.ZIP / CALLS.H < prev    next >
Text File  |  1992-06-21  |  5KB  |  97 lines

  1. /*
  2.  *  PROGRAM:   JQCPIC -- John Q's Portable CPI-C Abuser
  3.  *
  4.  *  MODULE:    CALLS.H -- state table probabilities
  5.  *
  6.  *  COPYRIGHTS:
  7.  *             This module contains code made available by IBM
  8.  *             Corporation on an AS IS basis.  Any one receiving the
  9.  *             module is considered to be licensed under IBM copyrights
  10.  *             to use the IBM-provided source code in any way he or she
  11.  *             deems fit, including copying it, compiling it, modifying
  12.  *             it, and redistributing it, with or without
  13.  *             modifications.  No license under any IBM patents or
  14.  *             patent applications is to be implied from this copyright
  15.  *             license.
  16.  *
  17.  *             A user of the module should understand that IBM cannot
  18.  *             provide technical support for the module and will not be
  19.  *             responsible for any consequences of use of the program.
  20.  *
  21.  *             Any notices, including this one, are not to be removed
  22.  *             from the module without the prior written consent of
  23.  *             IBM.
  24.  *
  25.  *  AUTHOR:    Dr. John Q. Walker II
  26.  *             IBM VNET: JOHNQ at RALVM6          IBM tie line: 444-4414
  27.  *             Internet: johnq@vnet.ibm.com        phone: (919) 254-4414
  28.  *
  29.  *  RELATED FILES:
  30.  *             See file JQCPIC.DOC for detailed information.
  31.  *
  32.  *  CHANGE HISTORY:
  33.  *  Date       Description
  34.  *  05/12/92   Added prologue.
  35.  */
  36.  
  37. /*
  38.     This table matches the table in the CPI-C reference manual, with the
  39.     following attributes:
  40.     -   There's an extra state: 0.  I use it to indicate that the only
  41.         allowable call is CMINIT.  In state 1, the only allowable call
  42.         is CMACCP.  This makes it easy to distinguish between the client
  43.         and server sides.
  44.     -   The numbers in the table indicate the suggested probability for
  45.         issuing each call.  0 indicates "don't make this call in this
  46.         state."  I've initially put a value of 1 for all the state-check
  47.         cells; allow state check approximately 1 out of 100 times.  I've
  48.         lowered the values on the Extract calls, since they're just not
  49.         very interesting.
  50.     -   The values for DEALLOCATE are low, in an attempt to get
  51.         something useful done before the conversation goes away.
  52.     -   The values for Set_Mode_Name, Set_Partner_LU_Name, and Set_TP_Name
  53.         are low, since setting them messes up the conversation.
  54. */
  55.  
  56.  
  57. static unsigned cpic_state_table[NUM_CPIC_CALLS][NUM_CPIC_STATES] = {
  58.     /*                  0   1   2   3   4   5   6   7   8 */
  59.   { /* CMACCP   0  */   0,100,  0,  0,  0,  0,  0,  0,  0  },
  60.   { /* CMALLC   1  */   0,  0,100,  1,  1,  1,  1,  1,  1  },
  61.   { /* CMCFM    2  */   0,  0,  1,100,  1,100,  1,  1,  1  },
  62.   { /* CMCFMD   3  */   0,  0,  1,  1,  1,  1,100,100,100  },
  63.   { /* CMDEALa  4  */   0,  0,  2,  2,  2,  2,  2,  2,  2  },
  64.   { /* CMDEALc  5  */   0,  0,  1,  2,  1,  2,  1,  1,  1  },
  65.   { /* CMDEALf  6  */   0,  0,  1,  2,  1,  2,  1,  1,  1  },
  66.   { /* CMDEALs  7  */   0,  0,  1,  2,  1,  2,  1,  1,  1  },
  67.   { /* CMECS    8  */   0,  0, 10, 10, 10, 10, 10, 10, 10  },
  68.   { /* CMECT    9  */   0,  0, 10, 10, 10, 10, 10, 10, 10  },
  69.   { /* CMEMN   10  */   0,  0, 10, 10, 10, 10, 10, 10, 10  },
  70.   { /* CMEPLN  11  */   0,  0, 10, 10, 10, 10, 10, 10, 10  },
  71.   { /* CMESL   12  */   0,  0, 10, 10, 10, 10, 10, 10, 10  },
  72.   { /* CMFLUS  13  */   0,  0,  1,100,  1,100,  1,  1,  1  },
  73.   { /* CMINIT  14  */ 100,  0,  0,  0,  0,  0,  0,  0,  0  },
  74.   { /* CMPTRc  15  */   0,  0,  1,100,  1,100,  1,  1,  1  },
  75.   { /* CMPTRf  16  */   0,  0,  1,100,  1,100,  1,  1,  1  },
  76.   { /* CMPTRs  17  */   0,  0,  1,100,  1,100,  1,  1,  1  },
  77.   { /* CMRCVi  18  */   0,  0,  1,  1,100,  1,  1,  1,  1  },
  78.   { /* CMRCVw  19  */   0,  0,  1,100,100,100,  1,  1,  1  },
  79.   { /* CMRTS   20  */   0,  0,  1,100,100,100,100,100,100  },
  80.   { /* CMSCT   21  */   0,  0,100,  1,  1,  1,  1,  1,  1  },
  81.   { /* CMSDT   22  */   0,  0,100,100,100,100,100,100,100  },
  82.   { /* CMSED   23  */   0,  0,100,100,100,100,100,100,100  },
  83.   { /* CMSEND  24  */   0,  0,  1,100,  1,100,  1,  1,  1  },
  84.   { /* CMSERR  25  */   0,  0,  1,100,100,100,100,100,100  },
  85.   { /* CMSF    26  */   0,  0,100,100,100,100,100,100,100  },
  86.   { /* CMSLD   27  */   0,  0,100,100,100,100,100,100,100  },
  87.   { /* CMSMN   29  */   0,  0,  2,  1,  1,  1,  1,  1,  1  },
  88.   { /* CMSPLN  29  */   0,  0,  2,  1,  1,  1,  1,  1,  1  },
  89.   { /* CMSPTR  30  */   0,  0,100,100,100,100,100,100,100  },
  90.   { /* CMSRC   31  */   0,  0,100,  1,  1,  1,  1,  1,  1  },
  91.   { /* CMSRT   32  */   0,  0,100,100,100,100,100,100,100  },
  92.   { /* CMSSL   33  */   0,  0,100,  1,  1,  1,  1,  1,  1  },
  93.   { /* CMSST   34  */   0,  0,100,100,100,100,100,100,100  },
  94.   { /* CMSTPN  35  */   0,  0,  2,  1,  1,  1,  1,  1,  1  },
  95.   { /* CMTRTS  36  */   0,  0,  1,100,100,100,  1,  1,  1  }
  96. };
  97.