home *** CD-ROM | disk | FTP | other *** search
/ Network Support Encyclopedia 96-1 / novell-nsepro-1996-1-cd2.iso / download / netware / dax1.exe / CP / CP.H next >
Text File  |  1992-07-15  |  4KB  |  80 lines

  1. //   ╔════════════════════════════════════════════════════════════════════╗
  2. //   ║                                                                    ║
  3. //   ║ module:      cp.h                                                  ║
  4. //   ║                                                                    ║
  5. //   ║  This software is provided as is and carries no warranty           ║
  6. //   ║  whatsoever.  Novell disclaims and excludes any and all implied    ║
  7. //   ║  warranties of merchantability, title and fitness for a particular ║
  8. //   ║  purpose.  Novell does not warrant that the software will satisfy  ║
  9. //   ║  your requirements or that the software is without defect or error ║
  10. //   ║  or that operation of the software will be uninterrupted.  You are ║
  11. //   ║  using the software at your risk.  The software is not a product   ║
  12. //   ║  of Novell, Inc. or any of subsidiaries.                           ║
  13. //   ║                                                                    ║
  14. //   ╟────────────────────────────────────────────────────────────────────╢
  15. //   ║ maintenance history:                                               ║
  16. //   ║ level    date      pi   description                                ║
  17. //   ╟────────────────────────────────────────────────────────────────────╢
  18. //   ║  001   01/23/92    kl   initial release.                           ║
  19. //   ║  002   07/14/92    kl   windows port.                              ║
  20. //   ╚════════════════════════════════════════════════════════════════════╝
  21.  
  22. #if !defined(CPDHDR)
  23. #define CPDHDR
  24.  
  25. #include    <h/extypes.h>
  26. #include    <cp/cpdbg.h>
  27.  
  28. #define CPPKTSIG    0x53445043      // 'CPDS' swapped
  29. #define CPMAXMSG    500             // 500 bytes for DAP Message
  30.  
  31. //
  32. //  This header is put in front of the message before we put in on the
  33. //  wire.  The serverID is assigned by the application server CP Layer
  34. //  when the first request is sent in.
  35. //
  36.  
  37. typedef struct {
  38.         UINT32      signature;      // signature for packet CPPKTSIG
  39.         UINT32      serverID;       // server ID for this session
  40.         UINT8       reserved[6];    // hang on to six bytes for later
  41. }CPHEADER;
  42.  
  43. //
  44. //  The following structure is the layout of messages exchanged
  45. //  between the communication protocol support layers of our
  46. //  client/server application.  This is the structure of the message
  47. //  being sent across the wire.
  48. //
  49.  
  50. typedef struct {
  51.         //
  52.         //  'cp' contains info needed by the Communication Protocol
  53.         //  layers running on the client and server machines.  We
  54.         //  put this in front of the actual messages being exchanged
  55.         //  between the client/server protocol.
  56.         //
  57.         CPHEADER    cphdr;
  58.         //
  59.         //  'msg' contains the info being exchanged between the actual
  60.         //  client/server protocol layer (DAP).  From here (the CP Layer)
  61.         //  we don't care what's in there, so treat it as an array of
  62.         //  characters.
  63.         //
  64.         UINT8       msg[CPMAXMSG];
  65. }CPMESSAGE;
  66.  
  67. #define     CP_SUCCESS                  0
  68. #define     CP_SESSION_IN_PROGRESS      101
  69. #define     CP_NO_TRANSPORT             102
  70. #define     CP_TRANSPORT_ERROR          103
  71. #define     CP_UNKNOWN_SERVER           104
  72. #define     CP_NO_MESSAGE               105
  73. #define     CP_RESOURCE_ERROR           106
  74. #define     CP_TRANSPORT_BUSY           107
  75. #define     CP_UNKNOWN_CLIENT           108
  76. #define     CP_NO_SESSION_IN_PROGRESS   109
  77.  
  78. #endif
  79. 
  80.