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