xrootd
XProtocol.hh
Go to the documentation of this file.
1 #ifndef __XPROTOCOL_H
2 #define __XPROTOCOL_H
3 /******************************************************************************/
4 /* */
5 /* X P r o t o c o l . h h */
6 /* */
7 /* (c) 2012 by the Board of Trustees of the Leland Stanford, Jr., University */
8 /* All Rights Reserved */
9 /* Produced by Andrew Hanushevsky for Stanford University under contract */
10 /* DE-AC02-76-SFO0515 with the Department of Energy */
11 /* */
12 /* This file is part of the XRootD software suite. */
13 /* */
14 /* XRootD is free software: you can redistribute it and/or modify it under */
15 /* the terms of the GNU Lesser General Public License as published by the */
16 /* Free Software Foundation, either version 3 of the License, or (at your */
17 /* option) any later version. */
18 /* */
19 /* XRootD is distributed in the hope that it will be useful, but WITHOUT */
20 /* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
21 /* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
22 /* License for more details. */
23 /* */
24 /* You should have received a copy of the GNU Lesser General Public License */
25 /* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
26 /* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
27 /* */
28 /* The copyright holder's institutional names and contributor's names may not */
29 /* be used to endorse or promote products derived from this software without */
30 /* specific prior written permission of the institution or contributor. */
31 /******************************************************************************/
32 
33 //#ifndef __GNUC__
34 //#define __attribute__(x)
35 //#ifdef SUNCC
36 //#pragma pack(4)
37 //#endif
38 //#endif
39 
40 #ifdef __CINT__
41 #define __attribute__(x)
42 #endif
43 
44 // The following is the binary representation of the protocol version here.
45 // Protocol version is repesented as three base10 digits x.y.z with x having no
46 // upper limit (i.e. n.9.9 + 1 -> n+1.0.0). The kXR_PROTSIGNVERSION defines the
47 // protocol version where request signing became available.
48 //
49 #define kXR_PROTOCOLVERSION 0x00000310
50 #define kXR_PROTSIGNVERSION 0x00000310
51 #define kXR_PROTOCOLVSTRING "3.1.0"
52 
53 #include "XProtocol/XPtypes.hh"
54 
55 // KINDS of SERVERS
56 //
57 //
58 #define kXR_DataServer 1
59 #define kXR_LBalServer 0
60 
61 // The below are defined for protocol version 2.9.7 or higher
62 // These are the flag value in the kXR_protool response
63 //
64 #define kXR_isManager 0x00000002
65 #define kXR_isServer 0x00000001
66 #define kXR_attrMeta 0x00000100
67 #define kXR_attrProxy 0x00000200
68 #define kXR_attrSuper 0x00000400
69 
70 #define kXR_maxReqRetry 10
71 
72 // Kind of error inside a XTNetFile's routine (temporary)
73 //
75  kGENERICERR = 0, // Generic error
76  kREAD, // Error while reading from stream
77  kWRITE, // Error while writing to stream
78  kREDIRCONNECT, // Error redirecting to a given host
79  kOK, // Everything seems ok
80  kNOMORESTREAMS // No more available stream IDs for
81  // async processing
82 };
83 
84 //______________________________________________
85 // PROTOCOL DEFINITION: CLIENT'S REQUESTS TYPES
86 //______________________________________________
87 //
89  kXR_auth = 3000,
90  kXR_query, // 3001
91  kXR_chmod, // 3002
92  kXR_close, // 3003
93  kXR_dirlist, // 3004
94  kXR_getfile, // 3005
95  kXR_protocol,// 3006
96  kXR_login, // 3007
97  kXR_mkdir, // 3008
98  kXR_mv, // 3009
99  kXR_open, // 3010
100  kXR_ping, // 3011
101  kXR_putfile, // 3012
102  kXR_read, // 3013
103  kXR_rm, // 3014
104  kXR_rmdir, // 3015
105  kXR_sync, // 3016
106  kXR_stat, // 3017
107  kXR_set, // 3018
108  kXR_write, // 3019
109  kXR_admin, // 3020
110  kXR_prepare, // 3021
111  kXR_statx, // 3022
112  kXR_endsess, // 3023
113  kXR_bind, // 3024
114  kXR_readv, // 3025
115  kXR_verifyw, // 3026
116  kXR_locate, // 3027
117  kXR_truncate,// 3028
118  kXR_sigver, // 3029
119  kXR_decrypt, // 3030
120  kXR_REQFENCE // Always last valid request code +1
121 };
122 
123 // OPEN MODE FOR A REMOTE FILE
125  kXR_ur = 0x100,
126  kXR_uw = 0x080,
127  kXR_ux = 0x040,
128  kXR_gr = 0x020,
129  kXR_gw = 0x010,
130  kXR_gx = 0x008,
131  kXR_or = 0x004,
132  kXR_ow = 0x002,
133  kXR_ox = 0x001
134 };
135 
139 };
140 
141 // this is a bitmask
150 };
151 
152 // this is a bitmask
157 };
158 
159 // this is a single number that goes into capver as the version
160 //
162  kXR_ver000 = 0, // Old clients predating history
163  kXR_ver001 = 1, // Generally implemented 2005 protocol
164  kXR_ver002 = 2, // Same as 1 but adds asyncresp recognition
165  kXR_ver003 = 3, // The 2011-2012 rewritten client
166  kXR_ver004 = 4 // The 2016 sign-capable client
167 };
168 
171 };
172 
174  kXR_file = 0,
175  kXR_xset = 1,
183 };
184 
188 };
189 
191  kXR_compress = 1, // also locate (return unique hosts)
194  kXR_new = 8,
197  kXR_async = 64,
198  kXR_refresh = 128, // also locate
199  kXR_mkpath = 256,
200  kXR_prefname = 256, // only locate
202  kXR_retstat = 1024,
203  kXR_replica = 2048,
204  kXR_posc = 4096,
205  kXR_nowait = 8192, // also locate
206  kXR_seqio =16384,
208 };
209 
211  kXR_secreqs = 1 // Return security requirements
212 };
213 
226 };
227 
231 };
232 
236 };
237 
238 // Andy's request for async/unsolicited
244  kXR_wmode = 16,
245  kXR_coloc = 32,
247 };
248 
249 // Version used for kXR_decrypt and kXR_sigver and is set in
250 // Set in SigverRequest::version, DecryptRequest::version and
251 // ServerResponseReqs_Protocol::secver
252 #define kXR_secver_0 0
253 
254 // Flags for kXR_decrypt and kXR_sigver
255 enum XSecFlags {
256  kXR_nodata = 1 // Request payload was not hashed or encrypted
257 };
258 
259 // Cryptography used for kXR_sigver SigverRequest::crypto
261  kXR_SHA256 = 0x01, // Hash used
262  kXR_HashMask = 0x0f, // Mak to extract the hash type
263  kXR_rsaKey = 0x80 // The rsa key was used
264 };
265 
266 //_______________________________________________
267 // PROTOCOL DEFINITION: SERVER'S RESPONSES TYPES
268 //_______________________________________________
269 //
271  kXR_ok = 0,
272  kXR_oksofar = 4000,
280 };
281 
282 //_______________________________________________
283 // PROTOCOL DEFINITION: SERVER"S ATTN CODES
284 //_______________________________________________
285 
287  kXR_asyncab = 5000,
296 };
297 
298 //_______________________________________________
299 // PROTOCOL DEFINITION: SERVER'S ERROR CODES
300 //_______________________________________________
301 //
328  kXR_ERRFENCE, // Always last valid errcode + 1
330 };
331 
332 
333 //______________________________________________
334 // PROTOCOL DEFINITION: CLIENT'S REQUESTS STRUCTS
335 //______________________________________________
336 //
337 // We need to pack structures sent all over the net!
338 // __attribute__((packed)) assures no padding bytes.
339 //
340 // Nice bodies of the headers for the client requests.
341 // Note that the protocol specifies these values to be in network
342 // byte order when sent
343 //
344 // G.Ganis: use of flat structures to avoid packing options
345 
351 };
358 };
364 };
371 };
379 };
383  kXR_unt16 expectrid; // Request code of subsequent request
384  kXR_char version; // Security version being used (see enum XSecVersion)
385  kXR_char flags; // One or more flags defined in enum XSecFlags
388 };
395 };
401 };
409 };
416 };
423  kXR_char ability; // See XLoginAbility enum flags
424  kXR_char capver[1]; // See XLoginCapVer enum flags
427 };
435 };
442 };
450 };
451 
457 };
461  kXR_int32 clientpv; // 2.9.7 or higher
462  kXR_char flags; // 3.1.0 or higher
465 };
471  kXR_unt16 port; // 2.9.9 or higher
474 };
482 };
491 };
499 };
506 };
512 };
518 };
523  kXR_char modifier; // For security purposes, should be zero
525 };
529  kXR_unt16 expectrid; // Request code of subsequent request
530  kXR_char version; // Security version being used (see XSecVersion)
531  kXR_char flags; // One or more flags defined in enum (see XSecFlags)
532  kXR_unt64 seqno; // Monotonically increasing number (part of hash)
533  kXR_char crypto; // Cryptography used (see XSecCrypto)
536 };
544 };
551 };
559 };
568 };
575  kXR_char vertype; // One of XVerifyType
577  kXR_int32 dlen; // Includes crc length
578 };
579 
585 };
586 
587 typedef union {
588  struct ClientRequestHdr header;
589  struct ClientAdminRequest admin;
590  struct ClientAuthRequest auth;
591  struct ClientBindRequest bind;
592  struct ClientChmodRequest chmod;
593  struct ClientCloseRequest close;
594  struct ClientDecryptRequest decrypt;
595  struct ClientDirlistRequest dirlist;
596  struct ClientEndsessRequest endsess;
597  struct ClientGetfileRequest getfile;
598  struct ClientLocateRequest locate;
599  struct ClientLoginRequest login;
600  struct ClientMkdirRequest mkdir;
601  struct ClientMvRequest mv;
602  struct ClientOpenRequest open;
603  struct ClientPingRequest ping;
604  struct ClientPrepareRequest prepare;
605  struct ClientProtocolRequest protocol;
606  struct ClientPutfileRequest putfile;
607  struct ClientQueryRequest query;
608  struct ClientReadRequest read;
609  struct ClientReadVRequest readv;
610  struct ClientRmRequest rm;
611  struct ClientRmdirRequest rmdir;
612  struct ClientSetRequest set;
613  struct ClientSigverRequest sigver;
614  struct ClientStatRequest stat;
615  struct ClientSyncRequest sync;
616  struct ClientTruncateRequest truncate;
617  struct ClientWriteRequest write;
618 } ClientRequest;
619 
620 typedef union {
621  struct ClientRequestHdr header;
622  struct ClientDecryptRequest decrypt;
623  struct ClientSigverRequest sigver;
625 
630 };
631 
632 struct read_args {
635  // his struct is followed by an array of readahead_list
636 };
637 
638 //_____________________________________________________________________
639 // PROTOCOL DEFINITION: SERVER'S RESPONSE
640 //_____________________________________________________________________
641 //
642 
643 // Nice header for the server response.
644 // Note that the protocol specifies these values to be in network
645 // byte order when sent
646 //
647 // G.Ganis: The following structures never need padding bytes:
648 // no need of packing options
649 
654 };
655 
656 // Body for the kXR_bind response... useful
659 };
660 
661 // Body for the kXR_open response... useful
664  kXR_int32 cpsize; // cpsize & cptype returned if kXR_compress *or*
665  kXR_char cptype[4]; // kXR_retstat is specified
666 }; // info will follow if kXR_retstat is specified
667 
668 // The following information is returned in the response body when kXR_secreqs
669 // is set in ClientProtocolRequest::flags. Note that the size of secvec is
670 // defined by secvsz and will not be present when secvsz == 0.
672  kXR_char reqindx; // Request index
673  kXR_char reqsreq; // Request signing requirement
674 };
675 
677  kXR_char theTag; // Always the character 'S' to identify struct
678  kXR_char rsvd; // Reserved for the future (always 0 for now)
679  kXR_char secver; // Security version
680  kXR_char secopt; // Security options
681  kXR_char seclvl; // Security level when secvsz == 0
682  kXR_char secvsz; // Number of items in secvec (i.e. its length/2)
684 };
685 
686 // Options reflected in protocol response ServerResponseReqs_Protocol::secopt
687 //
688 #define kXR_secOData 0x01
689 #define kXR_secOFrce 0x02
690 
691 // Security level definitions (these are predefined but can be over-ridden)
692 //
693 #define kXR_secNone 0
694 #define kXR_secCompatible 1
695 #define kXR_secStandard 2
696 #define kXR_secIntense 3
697 #define kXR_secPedantic 4
698 
699 // Requirements one of which set in each ServerResponseReqs_Protocol::secvec
700 //
701 #define kXR_signIgnore 0
702 #define kXR_signLikely 1
703 #define kXR_signNeeded 2
704 
705 // Body for the kXR_protocol response... useful
709  ServerResponseReqs_Protocol secreq; // Only for V3.1.0+ && if requested
710 };
711 
712 // Handy definition of the size of the protocol response when the security
713 // information is not present.
714 //
715 #define kXR_ShortProtRespLen sizeof(ServerResponseBody_Protocol)-\
716  sizeof(ServerResponseReqs_Protocol)
717 
720  kXR_char sec[4096]; // Should be sufficient for every use
721 };
722 
725  char host[4096]; // Should be sufficient for every use
726 };
727 
730  char errmsg[4096]; // Should be sufficient for every use
731 };
732 
735  char infomsg[4096]; // Should be sufficient for every use
736 };
737 
740 };
741 
744  char parms[4096]; // Should be sufficient for every use
745 };
746 
750  char host[4092];
751 };
752 
755  char reserved[4];
757  char respdata[4096];
758 };
759 
763 };
764 
769 };
770 
772  char data[4096];
773 };
774 
776  char data[4096];
777 };
778 
780 {
782  union
783  {
794  } body;
795 };
796 
798 
799 // The fields to be sent as initial handshake
806 };
807 
808 // The body received after the first handshake's header
813 };
814 
815 
816 
818 
819 struct ALIGN_CHECK {char chkszreq[25-sizeof(ClientRequest)];
820  char chkszrsp[ 9-sizeof(ServerResponseHeader)];
821 };
822 
823 /******************************************************************************/
824 /* X P r o t o c o l U t i l i t i e s */
825 /******************************************************************************/
826 
827 #include <errno.h>
828 #if defined(WIN32)
829 #if !defined(ENOTBLK)
830 # define ENOTBLK 15
831 #endif
832 #if !defined(ETXTBSY)
833 #define ETXTBSY 26
834 #endif
835 #if !defined(ENOBUFS)
836 #define ENOBUFS 105
837 #endif
838 #if !defined(ENETUNREACH)
839 #define ENETUNREACH 114
840 #endif
841 #endif
842 
844 {
845 public:
846 
847 // mapError() is the occicial mapping from errno to xrootd protocol error.
848 //
849 static int mapError(int rc)
850  {if (rc < 0) rc = -rc;
851  switch(rc)
852  {case ENOENT: return kXR_NotFound;
853  case EPERM: return kXR_NotAuthorized;
854  case EACCES: return kXR_NotAuthorized;
855  case EIO: return kXR_IOError;
856  case ENOMEM: return kXR_NoMemory;
857  case ENOBUFS: return kXR_NoMemory;
858  case ENOSPC: return kXR_NoSpace;
859  case ENAMETOOLONG: return kXR_ArgTooLong;
860  case ENETUNREACH: return kXR_noserver;
861  case ENOTBLK: return kXR_NotFile;
862  case EISDIR: return kXR_isDirectory;
863  case EEXIST: return kXR_InvalidRequest;
864  case ETXTBSY: return kXR_inProgress;
865  case ENODEV: return kXR_FSError;
866  case EFAULT: return kXR_ServerError;
867  case EDOM: return kXR_ChkSumErr;
868  case EDQUOT: return kXR_overQuota;
869  case EILSEQ: return kXR_SigVerErr;
870  case ERANGE: return kXR_DecryptErr;
871  case EUSERS: return kXR_Overloaded;
872  default: return kXR_FSError;
873  }
874  }
875 
876 static int toErrno( int xerr )
877 {
878  switch(xerr)
879  {case kXR_ArgInvalid: return EINVAL;
880  case kXR_ArgMissing: return EINVAL;
881  case kXR_ArgTooLong: return ENAMETOOLONG;
882  case kXR_FileLocked: return EDEADLK;
883  case kXR_FileNotOpen: return EBADF;
884  case kXR_FSError: return EIO;
885  case kXR_InvalidRequest:return EEXIST;
886  case kXR_IOError: return EIO;
887  case kXR_NoMemory: return ENOMEM;
888  case kXR_NoSpace: return ENOSPC;
889  case kXR_NotAuthorized: return EACCES;
890  case kXR_NotFound: return ENOENT;
891  case kXR_ServerError: return ENOMSG;
892  case kXR_Unsupported: return ENOSYS;
893  case kXR_noserver: return EHOSTUNREACH;
894  case kXR_NotFile: return ENOTBLK;
895  case kXR_isDirectory: return EISDIR;
896  case kXR_Cancelled: return ECANCELED;
897  case kXR_ChkLenErr: return EDOM;
898  case kXR_ChkSumErr: return EDOM;
899  case kXR_inProgress: return EINPROGRESS;
900  case kXR_overQuota: return EDQUOT;
901  case kXR_SigVerErr: return EILSEQ;
902  case kXR_DecryptErr: return ERANGE;
903  case kXR_Overloaded: return EUSERS;
904  default: return ENOMSG;
905  }
906 }
907 
908 static const char *errName(kXR_int32 errCode);
909 
910 static const char *reqName(kXR_unt16 reqCode);
911 };
912 #endif
Definition: XProtocol.hh:753
unsigned char kXR_char
Definition: XPtypes.hh:38
kXR_int64 offset
Definition: XProtocol.hh:564
static const char * errName(kXR_int32 errCode)
Definition: XProtocol.hh:146
Definition: XProtocol.hh:706
kXR_int32 dlen
Definition: XProtocol.hh:567
Definition: XProtocol.hh:199
Definition: XProtocol.hh:179
Definition: XProtocol.hh:156
kXR_unt16 options
Definition: XProtocol.hh:447
kXR_char role[1]
Definition: XProtocol.hh:425
Definition: XProtocol.hh:276
Definition: XProtocol.hh:220
Definition: XProtocol.hh:94
kXR_unt16 requestid
Definition: XProtocol.hh:398
kXR_unt64 seqno
Definition: XProtocol.hh:532
kXR_char reserved[8]
Definition: XProtocol.hh:479
Definition: XProtocol.hh:109
kXR_char streamid[2]
Definition: XProtocol.hh:651
kXR_int64 offset
Definition: XProtocol.hh:629
kXR_char reserved[12]
Definition: XProtocol.hh:472
Definition: XProtocol.hh:245
Definition: XProtocol.hh:771
kXR_char streamid[2]
Definition: XProtocol.hh:390
kXR_int32 dlen
Definition: XProtocol.hh:505
kXR_int32 port
Definition: XProtocol.hh:724
kXR_char sessid[16]
Definition: XProtocol.hh:399
Definition: XProtocol.hh:243
Definition: XProtocol.hh:196
kXR_char streamid[2]
Definition: XProtocol.hh:476
kXR_char fhandle[4]
Definition: XProtocol.hh:663
kXR_char reserved[7]
Definition: XProtocol.hh:634
XMkdirOptions
Definition: XProtocol.hh:136
kXR_char streamid[2]
Definition: XProtocol.hh:459
kXR_char flags
Definition: XProtocol.hh:531
kXR_char ability
Definition: XProtocol.hh:423
kXR_int32 wsec
Definition: XProtocol.hh:767
kXR_unt16 requestid
Definition: XProtocol.hh:494
kXR_unt16 requestid
Definition: XProtocol.hh:460
Definition: XProtocol.hh:132
kXR_int32 pid
Definition: XProtocol.hh:420
kXR_unt16 expectrid
Definition: XProtocol.hh:383
kXR_char username[8]
Definition: XProtocol.hh:421
Definition: XProtocol.hh:304
Definition: XProtocol.hh:452
Definition: XProtocol.hh:295
union ServerResponse::@20 body
kXR_int32 dlen
Definition: XProtocol.hh:464
kXR_char options[1]
Definition: XProtocol.hh:431
Definition: XProtocol.hh:77
kXR_int32 wsec
Definition: XProtocol.hh:762
Definition: XProtocol.hh:154
Definition: XProtocol.hh:110
Definition: XProtocol.hh:130
ServerResponseBody_Waitresp waitresp
Definition: XProtocol.hh:787
char host[4092]
Definition: XProtocol.hh:750
kXR_char streamid[2]
Definition: XProtocol.hh:508
Definition: XProtocol.hh:181
ServerResponseBody_Wait wait
Definition: XProtocol.hh:786
Definition: XProtocol.hh:271
kXR_int32 dlen
Definition: XProtocol.hh:370
char reserved[4]
Definition: XProtocol.hh:755
Definition: XProtocol.hh:676
char infomsg[4096]
Definition: XProtocol.hh:735
Definition: XProtocol.hh:372
kXR_char reserved[12]
Definition: XProtocol.hh:386
Definition: XProtocol.hh:321
Definition: XProtocol.hh:626
Definition: XProtocol.hh:195
Definition: XProtocol.hh:143
kXR_char rsvd
Definition: XProtocol.hh:678
Definition: XProtocol.hh:182
ServerResponseBody_Bind bind
Definition: XProtocol.hh:793
kXR_char streamid[2]
Definition: XProtocol.hh:561
Definition: XProtocol.hh:443
Definition: XProtocol.hh:317
kXR_char reserved[16]
Definition: XProtocol.hh:455
kXR_char streamid[2]
Definition: XProtocol.hh:353
Definition: XProtocol.hh:241
kXR_char version
Definition: XProtocol.hh:384
kXR_unt16 requestid
Definition: XProtocol.hh:528
Definition: XProtocol.hh:410
kXR_char fhandle[4]
Definition: XProtocol.hh:563
Definition: XProtocol.hh:303
Definition: XProtocol.hh:380
Definition: XProtocol.hh:306
kXR_int32 dlen
Definition: XProtocol.hh:511
kXR_unt16 requestid
Definition: XProtocol.hh:374
Definition: XProtocol.hh:307
kXR_char reserved[16]
Definition: XProtocol.hh:510
XOpenRequestMode
Definition: XProtocol.hh:124
Definition: XProtocol.hh:328
kXR_char fhandle[4]
Definition: XProtocol.hh:548
unsigned short kXR_unt16
Definition: XPtypes.hh:40
kXR_int32 msec
Definition: XProtocol.hh:768
kXR_int32 third
Definition: XProtocol.hh:803
kXR_char credtype[4]
Definition: XProtocol.hh:356
kXR_int32 msgval
Definition: XProtocol.hh:812
Definition: XProtocol.hh:120
char data[4096]
Definition: XProtocol.hh:772
Definition: XProtocol.hh:221
Definition: XProtocol.hh:311
kXR_char prty
Definition: XProtocol.hh:470
kXR_int16 arg1len
Definition: XProtocol.hh:440
Definition: XProtocol.hh:324
kXR_char pathid
Definition: XProtocol.hh:504
Definition: XProtocol.hh:293
Definition: XProtocol.hh:131
Definition: XProtocol.hh:80
Definition: XProtocol.hh:98
kXR_char sessid[16]
Definition: XProtocol.hh:362
Definition: XProtocol.hh:107
kXR_unt16 requestid
Definition: XProtocol.hh:391
Definition: XProtocol.hh:99
Definition: XProtocol.hh:262
kXR_int32 dlen
Definition: XProtocol.hh:394
kXR_int64 fsize
Definition: XProtocol.hh:376
XLogonType
Definition: XProtocol.hh:233
Definition: XProtocol.hh:569
kXR_unt16 requestid
Definition: XProtocol.hh:382
Definition: XProtocol.hh:108
kXR_unt16 requestid
Definition: XProtocol.hh:539
Definition: XProtocol.hh:458
kXR_unt16 requestid
Definition: XProtocol.hh:419
kXR_int64 offset
Definition: XProtocol.hh:573
Definition: XProtocol.hh:178
Definition: XProtocol.hh:75
kXR_char streamid[2]
Definition: XProtocol.hh:520
Definition: XProtocol.hh:760
kXR_int32 rlen
Definition: XProtocol.hh:628
Definition: XProtocol.hh:137
kXR_int32 dlen
Definition: XProtocol.hh:481
Definition: XProtocol.hh:222
Definition: XProtocol.hh:513
Definition: XProtocol.hh:162
Definition: XProtocol.hh:155
Definition: XProtocol.hh:359
kXR_unt16 requestid
Definition: XProtocol.hh:582
kXR_unt16 requestid
Definition: XProtocol.hh:438
Definition: XProtocol.hh:466
Definition: XProtocol.hh:775
kXR_unt16 status
Definition: XProtocol.hh:652
XSecCrypto
Definition: XProtocol.hh:260
kXR_char secopt
Definition: XProtocol.hh:680
Definition: XProtocol.hh:244
static int mapError(int rc)
Definition: XProtocol.hh:849
kXR_char reserved[3]
Definition: XProtocol.hh:566
kXR_unt16 requestid
Definition: XProtocol.hh:412
Definition: XProtocol.hh:170
kXR_unt16 infotype
Definition: XProtocol.hh:486
kXR_char capver[1]
Definition: XProtocol.hh:424
kXR_int32 port
Definition: XProtocol.hh:749
XResponseType
Definition: XProtocol.hh:270
kXR_char substreamid
Definition: XProtocol.hh:658
kXR_char streamid[2]
Definition: XProtocol.hh:347
Definition: XProtocol.hh:215
kXR_char reserved[14]
Definition: XProtocol.hh:368
kXR_char streamid[2]
Definition: XProtocol.hh:373
kXR_char reserved[16]
Definition: XProtocol.hh:516
XVerifyType
Definition: XProtocol.hh:228
XQueryType
Definition: XProtocol.hh:214
Definition: XProtocol.hh:111
Definition: XProtocol.hh:166
kXR_int32 rlen
Definition: XProtocol.hh:497
Definition: XProtocol.hh:128
Definition: XProtocol.hh:747
kXR_char seclvl
Definition: XProtocol.hh:681
kXR_unt16 requestid
Definition: XProtocol.hh:547
kXR_int32 dlen
Definition: XProtocol.hh:498
Definition: XProtocol.hh:89
Definition: XProtocol.hh:90
ServerResponseBody_Login login
Definition: XProtocol.hh:791
Definition: XProtocol.hh:662
kXR_unt16 requestid
Definition: XProtocol.hh:445
kXR_char streamid[2]
Definition: XProtocol.hh:360
kXR_unt16 requestid
Definition: XProtocol.hh:554
kXR_char reserved1[2]
Definition: XProtocol.hh:487
kXR_char version
Definition: XProtocol.hh:530
Definition: XProtocol.hh:279
kXR_int32 dlen
Definition: XProtocol.hh:524
kXR_int32 dlen
Definition: XProtocol.hh:517
kXR_char reserved2[8]
Definition: XProtocol.hh:489
Definition: XProtocol.hh:78
kXR_unt16 requestid
Definition: XProtocol.hh:515
Definition: XProtocol.hh:164
Definition: XProtocol.hh:180
Definition: XProtocol.hh:211
ServerResponseBody_Error error
Definition: XProtocol.hh:784
Definition: XProtocol.hh:352
kXR_int32 fourth
Definition: XProtocol.hh:804
kXR_int32 dlen
Definition: XProtocol.hh:473
Definition: XProtocol.hh:205
Definition: XProtocol.hh:176
Definition: XProtocol.hh:104
XLoginVersion
Definition: XProtocol.hh:161
Definition: XProtocol.hh:320
Definition: XProtocol.hh:100
kXR_char cptype[4]
Definition: XProtocol.hh:665
Definition: XProtocol.hh:560
char host[4096]
Definition: XProtocol.hh:725
Definition: XProtocol.hh:632
unsigned long long kXR_unt64
Definition: XPtypes.hh:72
kXR_char reserved[4]
Definition: XProtocol.hh:377
Definition: XProtocol.hh:483
Definition: XProtocol.hh:327
kXR_int32 errnum
Definition: XProtocol.hh:729
kXR_char reserved[2]
Definition: XProtocol.hh:576
Definition: XProtocol.hh:92
kXR_int32 dlen
Definition: XProtocol.hh:490
kXR_char reserved[4]
Definition: XProtocol.hh:557
Definition: XProtocol.hh:165
kXR_char options
Definition: XProtocol.hh:469
kXR_int32 options
Definition: XProtocol.hh:405
kXR_char reqindx
Definition: XProtocol.hh:672
ServerResponseSVec_Protocol secvec
Definition: XProtocol.hh:683
Definition: XProtocol.hh:261
kXR_char reserved[13]
Definition: XProtocol.hh:432
Definition: XProtocol.hh:718
Definition: XProtocol.hh:175
Definition: XProtocol.hh:127
char chkszreq[25-sizeof(ClientRequest)]
Definition: XProtocol.hh:819
Definition: XProtocol.hh:475
kXR_char streamid[2]
Definition: XProtocol.hh:553
Definition: XProtocol.hh:96
Definition: XProtocol.hh:308
Definition: XProtocol.hh:101
kXR_char streamid[2]
Definition: XProtocol.hh:437
kXR_char streamid[2]
Definition: XProtocol.hh:397
Definition: XProtocol.hh:129
kXR_int32 second
Definition: XProtocol.hh:802
Definition: XProtocol.hh:275
kXR_char streamid[2]
Definition: XProtocol.hh:429
kXR_int32 actnum
Definition: XProtocol.hh:748
Definition: XProtocol.hh:263
Definition: XProtocol.hh:187
kXR_int32 dlen
Definition: XProtocol.hh:577
Definition: XProtocol.hh:273
kXR_char streamid[2]
Definition: XProtocol.hh:366
char data[4096]
Definition: XProtocol.hh:776
kXR_char pathid
Definition: XProtocol.hh:633
Definition: XProtocol.hh:115
Definition: XProtocol.hh:186
kXR_unt16 requestid
Definition: XProtocol.hh:521
Definition: XProtocol.hh:235
kXR_int32 msglen
Definition: XProtocol.hh:810
Definition: XProtocol.hh:76
Definition: XProtocol.hh:223
kXR_unt16 requestid
Definition: XProtocol.hh:502
Definition: XProtocol.hh:144
char respdata[4096]
Definition: XProtocol.hh:757
kXR_char fhandle[4]
Definition: XProtocol.hh:495
Definition: XProtocol.hh:620
kXR_char reserved[12]
Definition: XProtocol.hh:355
kXR_int64 offset
Definition: XProtocol.hh:496
Definition: XProtocol.hh:206
Definition: XProtocol.hh:545
Definition: XProtocol.hh:225
kXR_unt16 requestid
Definition: XProtocol.hh:562
Definition: XProtocol.hh:843
kXR_int32 options
Definition: XProtocol.hh:478
Definition: XProtocol.hh:125
kXR_int32 cpsize
Definition: XProtocol.hh:664
kXR_char reserved[11]
Definition: XProtocol.hh:463
XErrorCode
Definition: XProtocol.hh:302
Definition: XProtocol.hh:819
Definition: XProtocol.hh:389
kXR_char streamid[2]
Definition: XProtocol.hh:514
kXR_int32 dlen
Definition: XProtocol.hh:584
Definition: XProtocol.hh:174
Definition: XProtocol.hh:657
kXR_unt16 requestid
Definition: XProtocol.hh:367
Definition: XProtocol.hh:277
XLoginCapVer
Definition: XProtocol.hh:153
Definition: XProtocol.hh:310
ServerResponseBody_Protocol protocol
Definition: XProtocol.hh:790
Definition: XProtocol.hh:163
kXR_char streamid[2]
Definition: XProtocol.hh:538
kXR_int32 buffsz
Definition: XProtocol.hh:407
Definition: XProtocol.hh:91
Definition: XProtocol.hh:519
Definition: XProtocol.hh:145
kXR_unt16 requestid
Definition: XProtocol.hh:454
Definition: XProtocol.hh:256
kXR_char reserved[15]
Definition: XProtocol.hh:522
kXR_unt16 mode
Definition: XProtocol.hh:433
kXR_int32 pval
Definition: XProtocol.hh:707
Definition: XProtocol.hh:224
kXR_int32 dlen
Definition: XProtocol.hh:456
kXR_char streamid[2]
Definition: XProtocol.hh:570
XSecFlags
Definition: XProtocol.hh:255
void ServerResponseHeader2NetFmt(struct ServerResponseHeader *srh)
kXR_unt16 expectrid
Definition: XProtocol.hh:529
Definition: XProtocol.hh:274
Definition: XProtocol.hh:417
Definition: XProtocol.hh:436
ServerResponseBody_Redirect redirect
Definition: XProtocol.hh:788
Definition: XProtocol.hh:219
Definition: XProtocol.hh:116
Definition: XProtocol.hh:103
kXR_int32 dlen
Definition: XProtocol.hh:426
Definition: XProtocol.hh:294
kXR_char streamid[2]
Definition: XProtocol.hh:527
kXR_int32 dlen
Definition: XProtocol.hh:415
Definition: XProtocol.hh:325
Definition: XProtocol.hh:79
kXR_char body[16]
Definition: XProtocol.hh:583
Definition: XProtocol.hh:97
Definition: XProtocol.hh:346
Definition: XProtocol.hh:365
kXR_char secver
Definition: XProtocol.hh:679
Definition: XProtocol.hh:105
kXR_char streamid[2]
Definition: XProtocol.hh:546
Definition: XProtocol.hh:779
kXR_int32 dlen
Definition: XProtocol.hh:535
kXR_int64 offset
Definition: XProtocol.hh:556
kXR_char reserved[12]
Definition: XProtocol.hh:448
kXR_int32 flags
Definition: XProtocol.hh:708
Definition: XProtocol.hh:738
kXR_unt16 requestid
Definition: XProtocol.hh:485
kXR_char streamid[2]
Definition: XProtocol.hh:501
Definition: XProtocol.hh:580
Definition: XProtocol.hh:650
Definition: XProtocol.hh:272
Definition: XProtocol.hh:194
Definition: XProtocol.hh:126
kXR_char secvsz
Definition: XProtocol.hh:682
kXR_unt16 requestid
Definition: XProtocol.hh:430
Definition: XProtocol.hh:147
Definition: XProtocol.hh:133
Definition: XProtocol.hh:671
kXR_int32 ServerResponseType
Definition: XProtocol.hh:817
kXR_char options
Definition: XProtocol.hh:540
kXR_char fhandle[4]
Definition: XProtocol.hh:627
Definition: XProtocol.hh:197
Definition: XProtocol.hh:318
Definition: XProtocol.hh:288
Definition: XProtocol.hh:305
kXR_int32 fifth
Definition: XProtocol.hh:805
XLoginAbility
Definition: XProtocol.hh:142
char parms[4096]
Definition: XProtocol.hh:744
kXR_int32 dlen
Definition: XProtocol.hh:449
kXR_unt16 requestid
Definition: XProtocol.hh:354
Definition: XProtocol.hh:149
kXR_int32 dlen
Definition: XProtocol.hh:558
Definition: XProtocol.hh:192
ServerResponseReqs_Protocol secreq
Definition: XProtocol.hh:709
kXR_char reserved[14]
Definition: XProtocol.hh:439
Definition: XProtocol.hh:138
Definition: XProtocol.hh:202
Definition: XProtocol.hh:329
ServerResponseHeader resphdr
Definition: XProtocol.hh:756
Definition: XProtocol.hh:507
kXR_int32 buffsz
Definition: XProtocol.hh:480
Definition: XProtocol.hh:289
XRequestTypes
Definition: XProtocol.hh:88
Definition: XProtocol.hh:216
kXR_char streamid[2]
Definition: XProtocol.hh:381
kXR_char streamid[2]
Definition: XProtocol.hh:453
kXR_int32 first
Definition: XProtocol.hh:801
kXR_char reqsreq
Definition: XProtocol.hh:673
kXR_char reserved[15]
Definition: XProtocol.hh:392
kXR_int32 actnum
Definition: XProtocol.hh:766
kXR_int32 dlen
Definition: XProtocol.hh:441
Definition: XProtocol.hh:314
kXR_char streamid[2]
Definition: XProtocol.hh:493
kXR_int32 dlen
Definition: XProtocol.hh:653
Definition: XProtocol.hh:292
static const char * reqName(kXR_unt16 reqCode)
Definition: XProtocol.hh:315
Definition: XProtocol.hh:492
kXR_char streamid[2]
Definition: XProtocol.hh:484
Definition: XProtocol.hh:230
Definition: XProtocol.hh:396
kXR_char sec[4096]
Definition: XProtocol.hh:720
kXR_char theTag
Definition: XProtocol.hh:677
kXR_int32 seconds
Definition: XProtocol.hh:739
Definition: XProtocol.hh:242
Definition: XProtocol.hh:106
Definition: XProtocol.hh:402
XPrepRequestOption
Definition: XProtocol.hh:239
kXR_char flags
Definition: XProtocol.hh:462
kXR_char streamid[2]
Definition: XProtocol.hh:467
Definition: XProtocol.hh:240
Definition: XProtocol.hh:309
kXR_char modifier
Definition: XProtocol.hh:523
kXR_char streamid[2]
Definition: XProtocol.hh:418
Definition: XProtocol.hh:191
Definition: XProtocol.hh:287
kXR_char streamid[2]
Definition: XProtocol.hh:581
kXR_int32 dlen
Definition: XProtocol.hh:408
Definition: XProtocol.hh:246
Definition: XProtocol.hh:733
Definition: XProtocol.hh:203
XActionCode
Definition: XProtocol.hh:286
kXR_char streamid[2]
Definition: XProtocol.hh:444
kXR_unt16 requestid
Definition: XProtocol.hh:571
kXR_int32 dlen
Definition: XProtocol.hh:550
Definition: XProtocol.hh:500
Definition: XProtocol.hh:765
kXR_char streamid[2]
Definition: XProtocol.hh:411
Definition: XProtocol.hh:148
kXR_char reserved[14]
Definition: XProtocol.hh:414
Definition: XProtocol.hh:95
Definition: XProtocol.hh:93
Definition: XProtocol.hh:278
XOpenRequestOption
Definition: XProtocol.hh:190
Definition: XProtocol.hh:119
Definition: XProtocol.hh:290
ServerResponseBody_Attn attn
Definition: XProtocol.hh:789
kXR_char vertype
Definition: XProtocol.hh:575
Definition: XProtocol.hh:204
kXR_char fhandle[4]
Definition: XProtocol.hh:375
XDirlistRequestOption
Definition: XProtocol.hh:185
int kXR_int32
Definition: XPtypes.hh:62
Definition: XProtocol.hh:198
Definition: XProtocol.hh:800
ServerResponseHeader hdr
Definition: XProtocol.hh:781
Definition: XProtocol.hh:218
kXR_int32 actnum
Definition: XProtocol.hh:754
kXR_char reserved[11]
Definition: XProtocol.hh:541
kXR_unt16 requestid
Definition: XProtocol.hh:361
kXR_int32 dlen
Definition: XProtocol.hh:363
kXR_unt16 mode
Definition: XProtocol.hh:446
kXR_int32 dlen
Definition: XProtocol.hh:543
Definition: XProtocol.hh:207
Definition: XProtocol.hh:316
Definition: XProtocol.hh:118
kXR_int32 protover
Definition: XProtocol.hh:811
kXR_int32 dlen
Definition: XProtocol.hh:400
Definition: XProtocol.hh:587
kXR_char reserved[12]
Definition: XProtocol.hh:549
Definition: XProtocol.hh:537
Definition: XProtocol.hh:809
Definition: XProtocol.hh:312
Definition: XProtocol.hh:313
Definition: XProtocol.hh:200
kXR_char streamid[2]
Definition: XProtocol.hh:403
Definition: XProtocol.hh:728
ServerResponseBody_Buffer buffer
Definition: XProtocol.hh:792
char errmsg[4096]
Definition: XProtocol.hh:730
kXR_char rsvd2[3]
Definition: XProtocol.hh:534
kXR_char options[1]
Definition: XProtocol.hh:393
Definition: XProtocol.hh:326
kXR_unt16 requestid
Definition: XProtocol.hh:404
XProtocolRequestFlags
Definition: XProtocol.hh:210
kXR_unt16 port
Definition: XProtocol.hh:471
kXR_char pathid
Definition: XProtocol.hh:565
kXR_unt16 requestid
Definition: XProtocol.hh:477
Definition: XProtocol.hh:322
XStatRespFlags
Definition: XProtocol.hh:173
kXR_char reserved[8]
Definition: XProtocol.hh:406
kXR_unt16 requestid
Definition: XProtocol.hh:468
kXR_int32 dlen
Definition: XProtocol.hh:434
kXR_char reserved
Definition: XProtocol.hh:422
Definition: XProtocol.hh:112
kXR_char flags
Definition: XProtocol.hh:385
kXR_char reserved[15]
Definition: XProtocol.hh:503
kXR_char fhandle[4]
Definition: XProtocol.hh:572
Definition: XProtocol.hh:323
Definition: XProtocol.hh:201
Definition: XProtocol.hh:102
kXR_int32 seconds
Definition: XProtocol.hh:734
kXR_char pathid
Definition: XProtocol.hh:574
kXR_int32 actnum
Definition: XProtocol.hh:761
Definition: XProtocol.hh:319
long long kXR_int64
Definition: XPtypes.hh:71
Definition: XProtocol.hh:217
kXR_char crypto
Definition: XProtocol.hh:533
kXR_int32 actnum
Definition: XProtocol.hh:743
Definition: XProtocol.hh:193
XReqErrorType
Definition: XProtocol.hh:74
kXR_int32 dlen
Definition: XProtocol.hh:357
XStatRequestOption
Definition: XProtocol.hh:169
Definition: XProtocol.hh:114
Definition: XProtocol.hh:526
Definition: XProtocol.hh:234
kXR_unt16 mode
Definition: XProtocol.hh:369
kXR_unt16 requestid
Definition: XProtocol.hh:348
kXR_int32 dlen
Definition: XProtocol.hh:378
Definition: XProtocol.hh:552
kXR_char sessid[16]
Definition: XProtocol.hh:719
kXR_char reserved[16]
Definition: XProtocol.hh:349
Definition: XProtocol.hh:742
static int toErrno(int xerr)
Definition: XProtocol.hh:876
char chkszrsp[9-sizeof(ServerResponseHeader)]
Definition: XProtocol.hh:820
kXR_char fhandle[4]
Definition: XProtocol.hh:542
Definition: XProtocol.hh:291
kXR_unt16 options
Definition: XProtocol.hh:413
Definition: XProtocol.hh:428
Definition: XProtocol.hh:113
ServerResponseBody_Authmore authmore
Definition: XProtocol.hh:785
Definition: XProtocol.hh:229
Definition: XProtocol.hh:177
kXR_char fhandle[4]
Definition: XProtocol.hh:555
short kXR_int16
Definition: XPtypes.hh:39
kXR_int32 dlen
Definition: XProtocol.hh:387
Definition: XProtocol.hh:723
kXR_unt16 requestid
Definition: XProtocol.hh:509
kXR_char fhandle[4]
Definition: XProtocol.hh:488
kXR_int32 dlen
Definition: XProtocol.hh:350
Definition: XProtocol.hh:117
kXR_int32 clientpv
Definition: XProtocol.hh:461