~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Wine Cross Reference
wine/dlls/rpcrt4/rpc_defs.h

Version: ~ [ wine-1.1.33 ] ~ [ wine-1.1.32 ] ~ [ wine-1.1.31 ] ~ [ wine-1.1.30 ] ~ [ wine-1.1.29 ] ~ [ wine-1.1.28 ] ~ [ wine-1.1.27 ] ~ [ wine-1.1.26 ] ~ [ wine-1.1.25 ] ~ [ wine-1.1.24 ] ~ [ wine-1.1.23 ] ~ [ wine-1.1.22 ] ~ [ wine-1.1.21 ] ~ [ wine-1.1.20 ] ~ [ wine-1.1.19 ] ~ [ wine-1.1.18 ] ~ [ wine-1.1.17 ] ~ [ wine-1.1.16 ] ~ [ wine-1.1.15 ] ~ [ wine-1.1.14 ] ~ [ wine-1.1.13 ] ~ [ wine-1.1.12 ] ~ [ wine-1.1.11 ] ~ [ wine-1.1.10 ] ~ [ wine-1.1.9 ] ~ [ wine-1.1.8 ] ~ [ wine-1.1.7 ] ~ [ wine-1.0.1 ] ~ [ wine-1.1.6 ] ~ [ wine-1.1.5 ] ~ [ wine-1.1.4 ] ~ [ wine-1.1.3 ] ~ [ wine-1.1.2 ] ~ [ wine-1.1.1 ] ~ [ wine-1.1.0 ] ~ [ wine-1.0 ] ~

  1 /*
  2  * RPC definitions
  3  *
  4  * Copyright 2001-2002 Ove Kåven, TransGaming Technologies
  5  * Copyright 2004 Filip Navara
  6  *
  7  * This library is free software; you can redistribute it and/or
  8  * modify it under the terms of the GNU Lesser General Public
  9  * License as published by the Free Software Foundation; either
 10  * version 2.1 of the License, or (at your option) any later version.
 11  *
 12  * This library is distributed in the hope that it will be useful,
 13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 15  * Lesser General Public License for more details.
 16  *
 17  * You should have received a copy of the GNU Lesser General Public
 18  * License along with this library; if not, write to the Free Software
 19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 20  */
 21 
 22 #ifndef __WINE_RPC_DEFS_H
 23 #define __WINE_RPC_DEFS_H
 24 
 25 #include "pshpack1.h"
 26 typedef struct
 27 {
 28   unsigned char rpc_ver;          /* RPC major version (5) */
 29   unsigned char rpc_ver_minor;    /* RPC minor version (0) */
 30   unsigned char ptype;            /* Packet type (PKT_*) */
 31   unsigned char flags;
 32   unsigned char drep[4];          /* Data representation */
 33   unsigned short frag_len;        /* Data size in bytes including header and tail. */
 34   unsigned short auth_len;        /* Authentication length  */
 35   unsigned int  call_id;          /* Call identifier. */
 36 } RpcPktCommonHdr;
 37 
 38 typedef struct
 39 {
 40   RpcPktCommonHdr common;
 41   unsigned int   alloc_hint;      /* Data size in bytes excluding header and tail. */
 42   unsigned short context_id;      /* Presentation context identifier */
 43   unsigned short opnum;
 44 } RpcPktRequestHdr;
 45 
 46 typedef struct
 47 {
 48   RpcPktCommonHdr common;
 49   unsigned int   alloc_hint;      /* Data size in bytes excluding header and tail. */
 50   unsigned short context_id;      /* Presentation context identifier */
 51   unsigned char cancel_count;
 52   unsigned char reserved;
 53 } RpcPktResponseHdr;
 54 
 55 typedef struct
 56 {
 57   RpcPktCommonHdr common;
 58   unsigned int   alloc_hint;      /* Data size in bytes excluding header and tail. */
 59   unsigned short context_id;      /* Presentation context identifier */
 60   unsigned char cancel_count;     /* Received cancel count */
 61   unsigned char reserved;         /* Force alignment! */
 62   unsigned int  status;           /* Runtime fault code (RPC_STATUS) */
 63   unsigned int  reserved2;
 64 } RpcPktFaultHdr;
 65 
 66 typedef struct
 67 {
 68   unsigned short context_id;      /* Presentation context identifier */
 69   unsigned char num_syntaxes;     /* Number of syntaxes */
 70   unsigned char reserved;         /* For alignment */
 71   RPC_SYNTAX_IDENTIFIER abstract_syntax;
 72   RPC_SYNTAX_IDENTIFIER transfer_syntaxes[ANYSIZE_ARRAY]; /* size_is(num_syntaxes) */
 73 } RpcContextElement;
 74 
 75 typedef struct
 76 {
 77   RpcPktCommonHdr common;
 78   unsigned short max_tsize;       /* Maximum transmission fragment size */
 79   unsigned short max_rsize;       /* Maximum receive fragment size */
 80   unsigned int  assoc_gid;        /* Associated group id */
 81   unsigned char num_elements;     /* Number of elements */
 82   unsigned char padding[3];       /* Force alignment! */
 83   /*
 84    * Following this header are these fields:
 85    *  RpcContextElement context_elements[num_elements]
 86    */
 87 } RpcPktBindHdr;
 88 
 89 typedef struct
 90 {
 91   unsigned short length;  /* Length of the string including null terminator */
 92   char string[ANYSIZE_ARRAY]; /* String data in single byte, null terminated form */
 93 } RpcAddressString;
 94 
 95 typedef struct
 96 {
 97   unsigned short result;
 98   unsigned short reason;
 99   RPC_SYNTAX_IDENTIFIER transfer_syntax;
100 } RpcResult;
101 
102 typedef struct
103 {
104   unsigned char num_results;       /* Number of results */
105   unsigned char reserved[3];       /* Force alignment! */
106   RpcResult results[ANYSIZE_ARRAY]; /* size_is(num_results) */
107 } RpcResultList;
108 
109 typedef struct
110 {
111   RpcPktCommonHdr common;
112   unsigned short max_tsize;       /* Maximum transmission fragment size */
113   unsigned short max_rsize;       /* Maximum receive fragment size */
114   unsigned int assoc_gid;         /* Associated group id */
115   /* 
116    * Following this header are these fields:
117    *   RpcAddressString server_address;
118    *   [0 - 3 bytes of padding so that results is 4-byte aligned]
119    *   RpcResultList results;
120    */
121 } RpcPktBindAckHdr;
122 
123 typedef struct
124 {
125   RpcPktCommonHdr common;
126   unsigned short reject_reason;
127   unsigned char protocols_count;
128   struct {
129     unsigned char rpc_ver;
130     unsigned char rpc_ver_minor;
131   } protocols[ANYSIZE_ARRAY];
132 } RpcPktBindNAckHdr;
133 
134 /* undocumented packet sent during RPC over HTTP */
135 typedef struct
136 {
137   RpcPktCommonHdr common;
138   unsigned short flags;
139   unsigned short num_data_items;
140 } RpcPktHttpHdr;
141 
142 /* Union representing all possible packet headers */
143 typedef union
144 {
145   RpcPktCommonHdr common;
146   RpcPktRequestHdr request;
147   RpcPktResponseHdr response;
148   RpcPktFaultHdr fault;
149   RpcPktBindHdr bind;
150   RpcPktBindAckHdr bind_ack;
151   RpcPktBindNAckHdr bind_nack;
152   RpcPktHttpHdr http;
153 } RpcPktHdr;
154 
155 typedef struct
156 {
157   unsigned char auth_type;       /* authentication scheme in use */
158   unsigned char auth_level;      /* RPC_C_AUTHN_LEVEL* */
159   unsigned char auth_pad_length; /* length of padding to restore n % 4 alignment */
160   unsigned char auth_reserved;   /* reserved, must be zero */
161   unsigned int  auth_context_id; /* unique value for the authenticated connection */
162 } RpcAuthVerifier;
163 #include "poppack.h"
164 
165 #define RPC_AUTH_VERIFIER_LEN(common_hdr) \
166     ((common_hdr)->auth_len ? (common_hdr)->auth_len + sizeof(RpcAuthVerifier) : 0)
167 
168 #define RPC_VER_MAJOR             5
169 #define RPC_VER_MINOR             0
170 
171 #define RPC_FLG_FIRST             1
172 #define RPC_FLG_LAST              2
173 #define RPC_FLG_OBJECT_UUID    0x80
174 
175 #define RPC_MIN_PACKET_SIZE  0x1000
176 #define RPC_MAX_PACKET_SIZE  0x16D0
177 
178 enum rpc_packet_type
179 {
180     PKT_REQUEST = 0,
181     PKT_PING = 1,
182     PKT_RESPONSE = 2,
183     PKT_FAULT = 3,
184     PKT_WORKING = 4,
185     PKT_NOCALL = 5,
186     PKT_REJECT = 6,
187     PKT_ACK = 7,
188     PKT_CL_CANCEL = 8,
189     PKT_FACK = 9,
190     PKT_CANCEL_ACK = 10,
191     PKT_BIND = 11,
192     PKT_BIND_ACK = 12,
193     PKT_BIND_NACK = 13,
194     PKT_ALTER_CONTEXT = 14,
195     PKT_ALTER_CONTEXT_RESP = 15,
196     PKT_AUTH3 = 16,
197     PKT_SHUTDOWN = 17,
198     PKT_CO_CANCEL = 18,
199     PKT_ORPHANED = 19,
200     PKT_HTTP = 20,
201 };
202 
203 #define RESULT_ACCEPT               0
204 #define RESULT_USER_REJECTION       1
205 #define RESULT_PROVIDER_REJECTION   2
206 
207 #define REASON_NONE                             0
208 #define REASON_ABSTRACT_SYNTAX_NOT_SUPPORTED    1
209 #define REASON_TRANSFER_SYNTAXES_NOT_SUPPORTED  2
210 #define REASON_LOCAL_LIMIT_EXCEEDED             3
211 
212 #define REJECT_REASON_NOT_SPECIFIED            0
213 #define REJECT_TEMPORARY_CONGESTION            1
214 #define REJECT_LOCAL_LIMIT_EXCEEDED            2
215 #define REJECT_CALLED_PADDR_UNKNOWN            3 /* not used */
216 #define REJECT_PROTOCOL_VERSION_NOT_SUPPORTED  4
217 #define REJECT_DEFAULT_CONTEXT_NOT_SUPPORTED   5 /* not used */
218 #define REJECT_USER_DATA_NOT_READABLE          6 /* not used */
219 #define REJECT_NO_PSAP_AVAILABLE               7 /* not used */
220 #define REJECT_UNKNOWN_AUTHN_SERVICE           8
221 #define REJECT_INVALID_CHECKSUM                9
222 
223 #define NCADG_IP_UDP   0x08
224 #define NCACN_IP_TCP   0x07
225 #define NCADG_IPX      0x0E
226 #define NCACN_SPX      0x0C
227 #define NCACN_NB_NB    0x12
228 #define NCACN_NB_IPX   0x0D
229 #define NCACN_DNET_NSP 0x04
230 #define NCACN_HTTP     0x1F
231 
232 /* FreeDCE: TWR_C_FLR_PROT_ID_IP */
233 #define TWR_IP 0x09
234 
235 #endif  /* __WINE_RPC_DEFS_H */
236 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.