rpcDceProto.idl
上传用户:nvosite88
上传日期:2007-01-17
资源大小:4983k
文件大小:8k
源码类别:

VxWorks

开发平台:

C/C++

  1. /* rpcDceProto.idl - DCE-RPC protocol definition */
  2. /* Copyright (c) 2001 Wind River Systems, Inc. */
  3. /*
  4. modification history
  5. --------------------
  6. 01a,20aug01,nel  created from rpc/rpcDceProto.h
  7. */
  8. import "vxidl.idl";
  9. [
  10. uuid(c79a11f0-957f-11d5-99c3-00c04fa12c4a),
  11. pointer_default(unique),
  12. local
  13. ]
  14. interface IRpcDceTypes
  15.     {
  16. /* Packet types - connectionless ones are commented out */
  17. typedef enum tagRPC_CN_TYPES
  18.     {
  19.     RPC_CN_PKT_REQUEST = 0,
  20.     RPC_CN_PKT_RESPONSE = 2,
  21.     RPC_CN_PKT_FAULT = 3,
  22.     RPC_CN_PKT_BIND = 11,
  23.     RPC_CN_PKT_BIND_ACK = 12,
  24.     RPC_CN_PKT_BIND_NAK = 13,
  25.     RPC_CN_PKT_ALTER_CONTEXT = 14,
  26.     RPC_CN_PKT_ALTER_CONTEXT_RESP = 15,
  27.     RPC_CN_PKT_AUTH3 = 16,
  28.     RPC_CN_PKT_SHUTDOWN = 17,
  29.     RPC_CN_PKT_REMOTE_ALERT = 18,
  30.     RPC_CN_PKT_ORPHANED = 19
  31.     } rpc_cn_types;
  32. /* Flags */
  33. typedef enum tagRPC_CN_FLAGS
  34.     {
  35.     RPC_CN_FLAGS_FIRST_FRAG = 0x01,
  36.     RPC_CN_FLAGS_LAST_FRAG = 0x02,
  37.     RPC_CN_FLAGS_ALERT_PENDING = 0x04,
  38.     RPC_CN_FLAGS_RESERVED1 = 0x08,
  39.     RPC_CN_FLAGS_CONCURRENT_MPX = 0x10,
  40.     RPC_CN_FLAGS_DID_NOT_EXECUTE = 0x20,
  41.     RPC_CN_FLAGS_MAYBE = 0x40,
  42.     RPC_CN_FLAGS_OBJECT_UUID = 0x80
  43.     } rpc_cn_flags;
  44. /* Packet headers (for TCP only - no UDP) */
  45. typedef struct tagRpcCnCommonHdrT
  46.     {
  47.     BYTE    rpcVersion;
  48.     BYTE    rpcMinorVersion;
  49.     BYTE    packetType;
  50.     BYTE    flags;
  51.     BYTE    drep [4];
  52.     USHORT  fragLen;
  53.     USHORT  authLen;
  54.     ULONG   callId;
  55.     } rpc_cn_common_hdr_t;
  56. typedef struct tagRpcCnPresSyntaxIdT
  57.     {
  58.     GUID    id;
  59.     ULONG   version;
  60.     } rpc_cn_pres_syntax_id_t;
  61. cpp_quote("#define MAX_AUTH_LEN   (512)")
  62.     
  63. /* auth-trailer itself must be 4-byte aligned within packet after stub-data */
  64. typedef struct tagRpcCnAuthTlrT
  65.     {
  66.     BYTE    authType;
  67.     BYTE    authLevel;
  68.     BYTE    stubPadLen;
  69.     BYTE    reserved; /* MBZ */
  70.     ULONG   key;
  71.     /* Offset of authValue from start of trailer is 8 bytes */
  72.     /* Size of authValue is big enough to hold the largest trailer we */
  73.     /* know of, which is currently the trailer contained in an AUTH3 */
  74.     /* PDU which is dependant on the length of the domain-name and */
  75.     /* username, so 512 is over-long but more than adequate... */
  76.     BYTE    authValue [512]; /* long enough to hold info */
  77.     } rpc_cn_auth_tlr_t;
  78. cpp_quote("#define SIZEOF_AUTH_TLR_PREAMBLE (8)")
  79. /* Macros for allcoating/freeing variable-sized auth-trailers */
  80. cpp_quote("#define ALLOC_AUTH_TLR(n) new char [n+sizeof(rpc_cn_auth_tlr_t)]")
  81. cpp_quote("#define FREE_AUTH_TLR(t) delete [] ((char*) t)")
  82. typedef struct tagRpcCnPresCtxElemT
  83.     {
  84.     USHORT                      presCtxId;
  85.     BYTE                        nTransferSyntaxes;
  86.     BYTE                        reserved; /* MBZ */
  87.     rpc_cn_pres_syntax_id_t     abstractSyntax;
  88.     rpc_cn_pres_syntax_id_t     transferSyntax [1];
  89.     } rpc_cn_pres_ctx_elem_t;
  90. typedef struct tagRpcCnPresCtxListT
  91.     {
  92.     BYTE                        numCtxElems;
  93.     BYTE                        reserved;
  94.     USHORT                      reserved2;
  95.     rpc_cn_pres_ctx_elem_t      presCtxElem [1];
  96.     } rpc_cn_pres_ctx_list_t;
  97. typedef struct tagRpcCnAuth3HdrT
  98.     {
  99.     rpc_cn_common_hdr_t         hdr;
  100.     USHORT                      maxTxFrag;
  101.     USHORT                      maxRxFrag;
  102.     /*
  103.     rpc_cn_auth_tlr_t           authTrailer;  if authLen != 0
  104.     */
  105.     } rpc_cn_auth3_hdr_t;
  106. typedef struct tagRpcCnBindHdrT
  107.     {
  108.     rpc_cn_common_hdr_t         hdr;
  109.     USHORT                      maxTxFrag;
  110.     USHORT                      maxRxFrag;
  111.     ULONG                       assocGroupId;
  112.     rpc_cn_pres_ctx_list_t      presCtxList;
  113.     /*
  114.     rpc_cn_auth_tlr_t           authTrailer;  if authLen != 0
  115.     */
  116.     } rpc_cn_bind_hdr_t;
  117. typedef struct
  118.     {
  119.     USHORT                      len;
  120.     BYTE                        addr [6];
  121.     } rpc_cn_port_any_t;
  122. typedef struct
  123.     {
  124.     USHORT                      result;
  125.     USHORT                      reason;
  126.     rpc_cn_pres_syntax_id_t     transferSyntax;
  127.     } rpc_cn_pres_result_t;
  128. typedef struct
  129.     {
  130.     BYTE                        numResults;
  131.     BYTE                        reserved;
  132.     USHORT                      reserved2;
  133.     rpc_cn_pres_result_t        presResult [1];
  134.     } rpc_cn_pres_result_list_t;
  135. typedef struct
  136.     {
  137.     rpc_cn_common_hdr_t         hdr;
  138.     USHORT                      maxTxFrag;
  139.     USHORT                      maxRxFrag;
  140.     ULONG                       assocGroupId;
  141.     rpc_cn_port_any_t           secAddr;
  142.     rpc_cn_pres_result_list_t   resultList;
  143.     /*
  144.     rpc_cn_auth_tlr_t           authTrailer;    size == hdr.authLen
  145.     */
  146.     } rpc_cn_bind_ack_hdr_t;
  147. typedef struct
  148.     {
  149.     rpc_cn_common_hdr_t         hdr;
  150.     USHORT                      maxTxFrag;
  151.     USHORT                      maxRxFrag;
  152.     ULONG                       assocGroupId;
  153.     USHORT         secAddr; /* zero */
  154.     USHORT pad;
  155.     rpc_cn_pres_result_list_t   resultList;
  156.     /*
  157.     rpc_cn_auth_tlr_t           authTrailer;     size == hdr.authLen
  158.     */
  159.     } rpc_cn_alter_context_resp_hdr_t;
  160. typedef struct
  161.     {
  162.     rpc_cn_common_hdr_t         hdr;
  163.     USHORT                      reason; /* 0 == not specified */
  164.     BYTE numProtocols; /* 1 */
  165.     BYTE verMajor; /* 5 */
  166.     BYTE verMinor; /* 0 */
  167.     } rpc_cn_bind_nak_hdr_t;
  168. typedef struct
  169.     {
  170.     rpc_cn_common_hdr_t         hdr;
  171.     ULONG                       allocHint; 
  172.     USHORT                      presCtxId;
  173.     USHORT                      methodNum;
  174.     
  175.     /* size (so far) == sizeof (rpc_cn_common_hdr_t) + 8 */
  176.     GUID                        objectId;
  177.     
  178.     /* size (so far) == sizeof (rpc_cn_common_hdr_t) + 8 + sizeof (UUID) */
  179.     /*
  180.     BYTE                        stubData [1];
  181.     */
  182.     /*
  183.     rpc_cn_auth_tlr_t           authTrailer;    size == hdr.authLen
  184.     */
  185.     } rpc_cn_request_hdr_t;
  186. typedef struct
  187.     {
  188.     rpc_cn_common_hdr_t         hdr;
  189.     ULONG                       allocHint;
  190.     USHORT                      presCtxId;
  191.     BYTE                        alertCount;
  192.     BYTE                        reserved; /* MBZ */
  193.     /* size (so far) == sizeof (rpc_cn_common_hdr_t) + 8 */
  194.     /*
  195.     BYTE                        stubData [1];
  196.     */
  197.     /*
  198.     rpc_cn_auth_tlr_t           authTrailer;
  199.     */
  200.     } rpc_cn_response_hdr_t;
  201. typedef struct
  202.     {
  203.     rpc_cn_common_hdr_t         hdr;
  204.     ULONG                       allocHint;
  205.     USHORT                      presCtxId;
  206.     BYTE                        alertCount;
  207.     BYTE                        reserved; /* MBZ */
  208.     ULONG                       status;
  209.     ULONG                       reserved2; /* MBZ */
  210.     /* size (so far) == sizeof (rpc_cn_common_hdr_t) + 16 */
  211.     /*
  212.     BYTE                        stubData [1];
  213.     */
  214.     /*
  215.     rpc_cn_auth_tlr_t           authTrailer;
  216.     */
  217.     } rpc_cn_fault_hdr_t;
  218. typedef rpc_cn_common_hdr_t rpc_cn_shutdown_hdr_t;
  219. typedef rpc_cn_common_hdr_t rpc_cn_remote_alert_hdr_t;
  220. typedef rpc_cn_common_hdr_t rpc_cn_orphaned_hdr_t;
  221. cpp_quote("typedef union tag_rpc_cn_packet_t")
  222. cpp_quote("    {")
  223. cpp_quote("    rpc_cn_request_hdr_t request;")
  224. cpp_quote("    rpc_cn_response_hdr_t response;")
  225. cpp_quote("    rpc_cn_bind_hdr_t bind;")
  226. cpp_quote("    rpc_cn_bind_ack_hdr_t bind_ack;")
  227. cpp_quote("    rpc_cn_bind_nak_hdr_t bind_nak;")
  228. cpp_quote("    rpc_cn_auth3_hdr_t auth3;")
  229. cpp_quote("    rpc_cn_fault_hdr_t fault;")
  230. cpp_quote("    rpc_cn_alter_context_resp_hdr_t alter_context_resp;")
  231. cpp_quote("")
  232. cpp_quote("    rpc_cn_shutdown_hdr_t shutdown;")
  233. cpp_quote("    rpc_cn_orphaned_hdr_t orphaned;")
  234. cpp_quote("    } rpc_cn_packet_t;")
  235. }