rpcDceProto.idl
上传用户:nvosite88
上传日期:2007-01-17
资源大小:4983k
文件大小:8k
- /* rpcDceProto.idl - DCE-RPC protocol definition */
- /* Copyright (c) 2001 Wind River Systems, Inc. */
- /*
- modification history
- --------------------
- 01a,20aug01,nel created from rpc/rpcDceProto.h
- */
- import "vxidl.idl";
- [
- uuid(c79a11f0-957f-11d5-99c3-00c04fa12c4a),
- pointer_default(unique),
- local
- ]
- interface IRpcDceTypes
- {
- /* Packet types - connectionless ones are commented out */
- typedef enum tagRPC_CN_TYPES
- {
- RPC_CN_PKT_REQUEST = 0,
- RPC_CN_PKT_RESPONSE = 2,
- RPC_CN_PKT_FAULT = 3,
- RPC_CN_PKT_BIND = 11,
- RPC_CN_PKT_BIND_ACK = 12,
- RPC_CN_PKT_BIND_NAK = 13,
- RPC_CN_PKT_ALTER_CONTEXT = 14,
- RPC_CN_PKT_ALTER_CONTEXT_RESP = 15,
- RPC_CN_PKT_AUTH3 = 16,
- RPC_CN_PKT_SHUTDOWN = 17,
- RPC_CN_PKT_REMOTE_ALERT = 18,
- RPC_CN_PKT_ORPHANED = 19
- } rpc_cn_types;
- /* Flags */
- typedef enum tagRPC_CN_FLAGS
- {
- RPC_CN_FLAGS_FIRST_FRAG = 0x01,
- RPC_CN_FLAGS_LAST_FRAG = 0x02,
- RPC_CN_FLAGS_ALERT_PENDING = 0x04,
- RPC_CN_FLAGS_RESERVED1 = 0x08,
- RPC_CN_FLAGS_CONCURRENT_MPX = 0x10,
- RPC_CN_FLAGS_DID_NOT_EXECUTE = 0x20,
- RPC_CN_FLAGS_MAYBE = 0x40,
- RPC_CN_FLAGS_OBJECT_UUID = 0x80
- } rpc_cn_flags;
- /* Packet headers (for TCP only - no UDP) */
- typedef struct tagRpcCnCommonHdrT
- {
- BYTE rpcVersion;
- BYTE rpcMinorVersion;
- BYTE packetType;
- BYTE flags;
- BYTE drep [4];
- USHORT fragLen;
- USHORT authLen;
- ULONG callId;
- } rpc_cn_common_hdr_t;
- typedef struct tagRpcCnPresSyntaxIdT
- {
- GUID id;
- ULONG version;
- } rpc_cn_pres_syntax_id_t;
- cpp_quote("#define MAX_AUTH_LEN (512)")
-
- /* auth-trailer itself must be 4-byte aligned within packet after stub-data */
- typedef struct tagRpcCnAuthTlrT
- {
- BYTE authType;
- BYTE authLevel;
- BYTE stubPadLen;
- BYTE reserved; /* MBZ */
- ULONG key;
- /* Offset of authValue from start of trailer is 8 bytes */
- /* Size of authValue is big enough to hold the largest trailer we */
- /* know of, which is currently the trailer contained in an AUTH3 */
- /* PDU which is dependant on the length of the domain-name and */
- /* username, so 512 is over-long but more than adequate... */
- BYTE authValue [512]; /* long enough to hold info */
- } rpc_cn_auth_tlr_t;
- cpp_quote("#define SIZEOF_AUTH_TLR_PREAMBLE (8)")
- /* Macros for allcoating/freeing variable-sized auth-trailers */
- cpp_quote("#define ALLOC_AUTH_TLR(n) new char [n+sizeof(rpc_cn_auth_tlr_t)]")
- cpp_quote("#define FREE_AUTH_TLR(t) delete [] ((char*) t)")
- typedef struct tagRpcCnPresCtxElemT
- {
- USHORT presCtxId;
- BYTE nTransferSyntaxes;
- BYTE reserved; /* MBZ */
- rpc_cn_pres_syntax_id_t abstractSyntax;
- rpc_cn_pres_syntax_id_t transferSyntax [1];
- } rpc_cn_pres_ctx_elem_t;
- typedef struct tagRpcCnPresCtxListT
- {
- BYTE numCtxElems;
- BYTE reserved;
- USHORT reserved2;
- rpc_cn_pres_ctx_elem_t presCtxElem [1];
- } rpc_cn_pres_ctx_list_t;
- typedef struct tagRpcCnAuth3HdrT
- {
- rpc_cn_common_hdr_t hdr;
- USHORT maxTxFrag;
- USHORT maxRxFrag;
- /*
- rpc_cn_auth_tlr_t authTrailer; if authLen != 0
- */
- } rpc_cn_auth3_hdr_t;
- typedef struct tagRpcCnBindHdrT
- {
- rpc_cn_common_hdr_t hdr;
- USHORT maxTxFrag;
- USHORT maxRxFrag;
- ULONG assocGroupId;
- rpc_cn_pres_ctx_list_t presCtxList;
- /*
- rpc_cn_auth_tlr_t authTrailer; if authLen != 0
- */
- } rpc_cn_bind_hdr_t;
- typedef struct
- {
- USHORT len;
- BYTE addr [6];
- } rpc_cn_port_any_t;
- typedef struct
- {
- USHORT result;
- USHORT reason;
- rpc_cn_pres_syntax_id_t transferSyntax;
- } rpc_cn_pres_result_t;
- typedef struct
- {
- BYTE numResults;
- BYTE reserved;
- USHORT reserved2;
- rpc_cn_pres_result_t presResult [1];
- } rpc_cn_pres_result_list_t;
- typedef struct
- {
- rpc_cn_common_hdr_t hdr;
- USHORT maxTxFrag;
- USHORT maxRxFrag;
- ULONG assocGroupId;
- rpc_cn_port_any_t secAddr;
- rpc_cn_pres_result_list_t resultList;
- /*
- rpc_cn_auth_tlr_t authTrailer; size == hdr.authLen
- */
- } rpc_cn_bind_ack_hdr_t;
- typedef struct
- {
- rpc_cn_common_hdr_t hdr;
- USHORT maxTxFrag;
- USHORT maxRxFrag;
- ULONG assocGroupId;
- USHORT secAddr; /* zero */
- USHORT pad;
- rpc_cn_pres_result_list_t resultList;
- /*
- rpc_cn_auth_tlr_t authTrailer; size == hdr.authLen
- */
- } rpc_cn_alter_context_resp_hdr_t;
- typedef struct
- {
- rpc_cn_common_hdr_t hdr;
- USHORT reason; /* 0 == not specified */
- BYTE numProtocols; /* 1 */
- BYTE verMajor; /* 5 */
- BYTE verMinor; /* 0 */
- } rpc_cn_bind_nak_hdr_t;
- typedef struct
- {
- rpc_cn_common_hdr_t hdr;
- ULONG allocHint;
- USHORT presCtxId;
- USHORT methodNum;
-
- /* size (so far) == sizeof (rpc_cn_common_hdr_t) + 8 */
- GUID objectId;
-
- /* size (so far) == sizeof (rpc_cn_common_hdr_t) + 8 + sizeof (UUID) */
- /*
- BYTE stubData [1];
- */
- /*
- rpc_cn_auth_tlr_t authTrailer; size == hdr.authLen
- */
- } rpc_cn_request_hdr_t;
- typedef struct
- {
- rpc_cn_common_hdr_t hdr;
- ULONG allocHint;
- USHORT presCtxId;
- BYTE alertCount;
- BYTE reserved; /* MBZ */
- /* size (so far) == sizeof (rpc_cn_common_hdr_t) + 8 */
- /*
- BYTE stubData [1];
- */
- /*
- rpc_cn_auth_tlr_t authTrailer;
- */
- } rpc_cn_response_hdr_t;
- typedef struct
- {
- rpc_cn_common_hdr_t hdr;
- ULONG allocHint;
- USHORT presCtxId;
- BYTE alertCount;
- BYTE reserved; /* MBZ */
- ULONG status;
- ULONG reserved2; /* MBZ */
- /* size (so far) == sizeof (rpc_cn_common_hdr_t) + 16 */
- /*
- BYTE stubData [1];
- */
- /*
- rpc_cn_auth_tlr_t authTrailer;
- */
- } rpc_cn_fault_hdr_t;
- typedef rpc_cn_common_hdr_t rpc_cn_shutdown_hdr_t;
- typedef rpc_cn_common_hdr_t rpc_cn_remote_alert_hdr_t;
- typedef rpc_cn_common_hdr_t rpc_cn_orphaned_hdr_t;
- cpp_quote("typedef union tag_rpc_cn_packet_t")
- cpp_quote(" {")
- cpp_quote(" rpc_cn_request_hdr_t request;")
- cpp_quote(" rpc_cn_response_hdr_t response;")
- cpp_quote(" rpc_cn_bind_hdr_t bind;")
- cpp_quote(" rpc_cn_bind_ack_hdr_t bind_ack;")
- cpp_quote(" rpc_cn_bind_nak_hdr_t bind_nak;")
- cpp_quote(" rpc_cn_auth3_hdr_t auth3;")
- cpp_quote(" rpc_cn_fault_hdr_t fault;")
- cpp_quote(" rpc_cn_alter_context_resp_hdr_t alter_context_resp;")
- cpp_quote("")
- cpp_quote(" rpc_cn_shutdown_hdr_t shutdown;")
- cpp_quote(" rpc_cn_orphaned_hdr_t orphaned;")
- cpp_quote(" } rpc_cn_packet_t;")
- }