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
174 };
175 
176 // this is a bitmask
181 };
182 
183 // this is a single number that goes into capver as the version
184 //
186  kXR_ver000 = 0, // Old clients predating history
187  kXR_ver001 = 1, // Generally implemented 2005 protocol
188  kXR_ver002 = 2, // Same as 1 but adds asyncresp recognition
189  kXR_ver003 = 3, // The 2011-2012 rewritten client
190  kXR_ver004 = 4 // The 2016 sign-capable client
191 };
192 
195 };
196 
198  kXR_file = 0,
199  kXR_xset = 1,
207 };
208 
212 };
213 
215  kXR_compress = 1, // also locate (return unique hosts)
218  kXR_new = 8,
221  kXR_async = 64,
222  kXR_refresh = 128, // also locate
223  kXR_mkpath = 256,
224  kXR_prefname = 256, // only locate
226  kXR_retstat = 1024,
227  kXR_replica = 2048,
228  kXR_posc = 4096,
229  kXR_nowait = 8192, // also locate
230  kXR_seqio =16384,
232 };
233 
235  kXR_secreqs = 1 // Return security requirements
236 };
237 
250 };
251 
255 };
256 
260 };
261 
267  kXR_wmode = 16,
268  kXR_coloc = 32,
269  kXR_fresh = 64,
270  kXR_usetcp = 128,
271 
272  kXR_evict = 0x0001 // optionsX: file no longer useful
273 };
274 
275 // Version used for kXR_decrypt and kXR_sigver and is set in
276 // Set in SigverRequest::version, DecryptRequest::version and
277 // ServerResponseReqs_Protocol::secver
278 #define kXR_secver_0 0
279 
280 // Flags for kXR_decrypt and kXR_sigver
281 enum XSecFlags {
282  kXR_nodata = 1 // Request payload was not hashed or encrypted
283 };
284 
285 // Cryptography used for kXR_sigver SigverRequest::crypto
287  kXR_SHA256 = 0x01, // Hash used
288  kXR_HashMask = 0x0f, // Mak to extract the hash type
289  kXR_rsaKey = 0x80 // The rsa key was used
290 };
291 
292 //_______________________________________________
293 // PROTOCOL DEFINITION: SERVER'S RESPONSES TYPES
294 //_______________________________________________
295 //
297  kXR_ok = 0,
298  kXR_oksofar = 4000,
306 };
307 
308 //_______________________________________________
309 // PROTOCOL DEFINITION: SERVER"S ATTN CODES
310 //_______________________________________________
311 
313  kXR_asyncab = 5000,
322 };
323 
324 //_______________________________________________
325 // PROTOCOL DEFINITION: SERVER'S ERROR CODES
326 //_______________________________________________
327 //
330  kXR_ArgMissing, // 3001
331  kXR_ArgTooLong, // 3002
332  kXR_FileLocked, // 3003
334  kXR_FSError, // 3005
336  kXR_IOError, // 3007
337  kXR_NoMemory, // 3008
338  kXR_NoSpace, // 3009
340  kXR_NotFound, // 3011
343  kXR_noserver, // 3014
344  kXR_NotFile, // 3015
346  kXR_Cancelled, // 3017
347  kXR_ChkLenErr, // 3018
348  kXR_ChkSumErr, // 3019
349  kXR_inProgress, // 3020
350  kXR_overQuota, // 3021
351  kXR_SigVerErr, // 3022
352  kXR_DecryptErr, // 3023
353  kXR_Overloaded, // 3024
354  kXR_fsReadOnly, // 3025
355  kXR_BadPayload, // 3026
358  kXR_noReplicas, // 3029
359  kXR_ERRFENCE, // Always last valid errcode + 1
361 };
362 
363 
364 //______________________________________________
365 // PROTOCOL DEFINITION: CLIENT'S REQUESTS STRUCTS
366 //______________________________________________
367 //
368 // We need to pack structures sent all over the net!
369 // __attribute__((packed)) assures no padding bytes.
370 //
371 // Nice bodies of the headers for the client requests.
372 // Note that the protocol specifies these values to be in network
373 // byte order when sent
374 //
375 // G.Ganis: use of flat structures to avoid packing options
376 
382 };
389 };
395 };
402 };
410 };
414  kXR_unt16 expectrid; // Request code of subsequent request
415  kXR_char version; // Security version being used (see enum XSecVersion)
416  kXR_char flags; // One or more flags defined in enum XSecFlags
419 };
426 };
432 };
440 };
447 };
454  kXR_char ability; // See XLoginAbility enum flags
455  kXR_char capver[1]; // See XLoginCapVer enum flags
458 };
466 };
473 };
481 };
482 
488 };
492  kXR_int32 clientpv; // 2.9.7 or higher
493  kXR_char flags; // 3.1.0 or higher
496 };
502  kXR_unt16 port; // 2.9.9 or higher
503  kXR_unt16 optionX; // Extended options
506 };
514 };
523 };
531 };
538 };
544 };
550 };
555  kXR_char modifier; // For security purposes, should be zero
557 };
561  kXR_unt16 expectrid; // Request code of subsequent request
562  kXR_char version; // Security version being used (see XSecVersion)
563  kXR_char flags; // One or more flags defined in enum (see XSecFlags)
564  kXR_unt64 seqno; // Monotonically increasing number (part of hash)
565  kXR_char crypto; // Cryptography used (see XSecCrypto)
568 };
576 };
583 };
591 };
600 };
604  kXR_char options; // See static const ints below
607 
608  static const kXR_int32 doSync = 0x01;
609 };
616  kXR_char vertype; // One of XVerifyType
618  kXR_int32 dlen; // Includes crc length
619 };
620 
626 };
627 
628 typedef union {
629  struct ClientRequestHdr header;
630  struct ClientAdminRequest admin;
631  struct ClientAuthRequest auth;
632  struct ClientBindRequest bind;
633  struct ClientChmodRequest chmod;
635  struct ClientDecryptRequest decrypt;
636  struct ClientDirlistRequest dirlist;
637  struct ClientEndsessRequest endsess;
638  struct ClientGetfileRequest getfile;
639  struct ClientLocateRequest locate;
640  struct ClientLoginRequest login;
642  struct ClientMvRequest mv;
644  struct ClientPingRequest ping;
645  struct ClientPrepareRequest prepare;
646  struct ClientProtocolRequest protocol;
647  struct ClientPutfileRequest putfile;
648  struct ClientQueryRequest query;
651  struct ClientRmRequest rm;
653  struct ClientSetRequest set;
654  struct ClientSigverRequest sigver;
656  struct ClientSyncRequest sync;
660 } ClientRequest;
661 
662 typedef union {
663  struct ClientRequestHdr header;
664  struct ClientDecryptRequest decrypt;
665  struct ClientSigverRequest sigver;
667 
672 };
673 
674 struct read_args {
677  // his struct is followed by an array of readahead_list
678 };
679 
680 // New additions are placed in a specia namespace to avoid conflicts
681 //
682 namespace XrdProto
683 {
684 struct read_list {
688 };
689 
690 struct write_list {
694 };
695 }
696 
697 //_____________________________________________________________________
698 // PROTOCOL DEFINITION: SERVER'S RESPONSE
699 //_____________________________________________________________________
700 //
701 
702 // Nice header for the server response.
703 // Note that the protocol specifies these values to be in network
704 // byte order when sent
705 //
706 // G.Ganis: The following structures never need padding bytes:
707 // no need of packing options
708 
713 };
714 
715 // Body for the kXR_bind response... useful
718 };
719 
720 // Body for the kXR_open response... useful
723  kXR_int32 cpsize; // cpsize & cptype returned if kXR_compress *or*
724  kXR_char cptype[4]; // kXR_retstat is specified
725 }; // info will follow if kXR_retstat is specified
726 
727 // The following information is returned in the response body when kXR_secreqs
728 // is set in ClientProtocolRequest::flags. Note that the size of secvec is
729 // defined by secvsz and will not be present when secvsz == 0.
731  kXR_char reqindx; // Request index
732  kXR_char reqsreq; // Request signing requirement
733 };
734 
736  kXR_char theTag; // Always the character 'S' to identify struct
737  kXR_char rsvd; // Reserved for the future (always 0 for now)
738  kXR_char secver; // Security version
739  kXR_char secopt; // Security options
740  kXR_char seclvl; // Security level when secvsz == 0
741  kXR_char secvsz; // Number of items in secvec (i.e. its length/2)
743 };
744 
745 // Options reflected in protocol response ServerResponseReqs_Protocol::secopt
746 //
747 #define kXR_secOData 0x01
748 #define kXR_secOFrce 0x02
749 
750 // Security level definitions (these are predefined but can be over-ridden)
751 //
752 #define kXR_secNone 0
753 #define kXR_secCompatible 1
754 #define kXR_secStandard 2
755 #define kXR_secIntense 3
756 #define kXR_secPedantic 4
757 
758 // Requirements one of which set in each ServerResponseReqs_Protocol::secvec
759 //
760 #define kXR_signIgnore 0
761 #define kXR_signLikely 1
762 #define kXR_signNeeded 2
763 
764 // Body for the kXR_protocol response... useful
768  ServerResponseReqs_Protocol secreq; // Only for V3.1.0+ && if requested
769 };
770 
771 // Handy definition of the size of the protocol response when the security
772 // information is not present.
773 //
774 #define kXR_ShortProtRespLen sizeof(ServerResponseBody_Protocol)-\
775  sizeof(ServerResponseReqs_Protocol)
776 
779  kXR_char sec[4096]; // Should be sufficient for every use
780 };
781 
784  char host[4096]; // Should be sufficient for every use
785 };
786 
789  char errmsg[4096]; // Should be sufficient for every use
790 };
791 
794  char infomsg[4096]; // Should be sufficient for every use
795 };
796 
799 };
800 
803  char parms[4096]; // Should be sufficient for every use
804 };
805 
809  char host[4092];
810 };
811 
814  char reserved[4];
816  char respdata[4096];
817 };
818 
822 };
823 
828 };
829 
831  char data[4096];
832 };
833 
835  char data[4096];
836 };
837 
839 {
841  union
842  {
853  } body;
854 };
855 
857 
858 // The fields to be sent as initial handshake
865 };
866 
867 // The body received after the first handshake's header
872 };
873 
874 
875 
877 
878 struct ALIGN_CHECK {char chkszreq[25-sizeof(ClientRequest)];
879  char chkszrsp[ 9-sizeof(ServerResponseHeader)];
880 };
881 
882 /******************************************************************************/
883 /* X P r o t o c o l U t i l i t i e s */
884 /******************************************************************************/
885 
886 #include <errno.h>
887 #if defined(WIN32)
888 #if !defined(ENOTBLK)
889 # define ENOTBLK 15
890 #endif
891 #if !defined(ETXTBSY)
892 #define ETXTBSY 26
893 #endif
894 #if !defined(ENOBUFS)
895 #define ENOBUFS 105
896 #endif
897 #if !defined(ENETUNREACH)
898 #define ENETUNREACH 114
899 #endif
900 #endif
901 
902 #ifndef ENOATTR
903 #define ENOATTR ENODATA
904 #endif
905 
907 {
908 public:
909 
910 // mapError() is the occicial mapping from errno to xrootd protocol error.
911 //
912 static int mapError(int rc)
913  {if (rc < 0) rc = -rc;
914  switch(rc)
915  {case ENOENT: return kXR_NotFound;
916  case EINVAL: return kXR_ArgInvalid;
917  case EPERM: return kXR_NotAuthorized;
918  case EACCES: return kXR_NotAuthorized;
919  case EIO: return kXR_IOError;
920  case ENOMEM: return kXR_NoMemory;
921  case ENOBUFS: return kXR_NoMemory;
922  case ENOSPC: return kXR_NoSpace;
923  case ENAMETOOLONG: return kXR_ArgTooLong;
924  case ENETUNREACH: return kXR_noserver;
925  case ENOTBLK: return kXR_NotFile;
926  case EISDIR: return kXR_isDirectory;
927  case EEXIST: return kXR_InvalidRequest;
928  case ETXTBSY: return kXR_inProgress;
929  case ENODEV: return kXR_FSError;
930  case EFAULT: return kXR_ServerError;
931  case EDOM: return kXR_ChkSumErr;
932  case EDQUOT: return kXR_overQuota;
933  case EILSEQ: return kXR_SigVerErr;
934  case ERANGE: return kXR_DecryptErr;
935  case EUSERS: return kXR_Overloaded;
936  case EROFS: return kXR_fsReadOnly;
937  case ENOATTR: return kXR_AttrNotFound;
938  case EPROTOTYPE: return kXR_TLSRequired;
939  case EADDRNOTAVAIL: return kXR_noReplicas;
940  default: return kXR_FSError;
941  }
942  }
943 
944 static int toErrno( int xerr )
945 {
946  switch(xerr)
947  {case kXR_ArgInvalid: return EINVAL;
948  case kXR_ArgMissing: return EINVAL;
949  case kXR_ArgTooLong: return ENAMETOOLONG;
950  case kXR_FileLocked: return EDEADLK;
951  case kXR_FileNotOpen: return EBADF;
952  case kXR_FSError: return EIO;
953  case kXR_InvalidRequest:return EEXIST;
954  case kXR_IOError: return EIO;
955  case kXR_NoMemory: return ENOMEM;
956  case kXR_NoSpace: return ENOSPC;
957  case kXR_NotAuthorized: return EACCES;
958  case kXR_NotFound: return ENOENT;
959  case kXR_ServerError: return ENOMSG;
960  case kXR_Unsupported: return ENOSYS;
961  case kXR_noserver: return EHOSTUNREACH;
962  case kXR_NotFile: return ENOTBLK;
963  case kXR_isDirectory: return EISDIR;
964  case kXR_Cancelled: return ECANCELED;
965  case kXR_ChkLenErr: return EDOM;
966  case kXR_ChkSumErr: return EDOM;
967  case kXR_inProgress: return EINPROGRESS;
968  case kXR_overQuota: return EDQUOT;
969  case kXR_SigVerErr: return EILSEQ;
970  case kXR_DecryptErr: return ERANGE;
971  case kXR_Overloaded: return EUSERS;
972  case kXR_fsReadOnly: return EROFS;
973  case kXR_BadPayload: return EINVAL;
974  case kXR_AttrNotFound: return ENOATTR;
975  case kXR_TLSRequired: return EPROTOTYPE;
976  case kXR_noReplicas: return EADDRNOTAVAIL;
977  default: return ENOMSG;
978  }
979 }
980 
981 static const char *errName(kXR_int32 errCode);
982 
983 static const char *reqName(kXR_unt16 reqCode);
984 };
985 #endif
Definition: XProtocol.hh:812
unsigned char kXR_char
Definition: XPtypes.hh:65
kXR_int64 offset
Definition: XProtocol.hh:596
static const char * errName(kXR_int32 errCode)
Definition: XProtocol.hh:169
Definition: XProtocol.hh:765
kXR_int32 dlen
Definition: XProtocol.hh:599
Definition: XProtocol.hh:223
Definition: XProtocol.hh:203
Definition: XProtocol.hh:180
kXR_unt16 options
Definition: XProtocol.hh:478
kXR_char role[1]
Definition: XProtocol.hh:456
Definition: XProtocol.hh:302
Definition: XProtocol.hh:244
Definition: XProtocol.hh:116
kXR_unt16 requestid
Definition: XProtocol.hh:429
kXR_unt64 seqno
Definition: XProtocol.hh:564
kXR_char reserved[8]
Definition: XProtocol.hh:511
Definition: XProtocol.hh:131
kXR_char streamid[2]
Definition: XProtocol.hh:710
kXR_int64 offset
Definition: XProtocol.hh:671
Definition: XProtocol.hh:268
Definition: XProtocol.hh:830
kXR_char streamid[2]
Definition: XProtocol.hh:421
static const kXR_int32 doSync
Definition: XProtocol.hh:608
#define truncate(a, b)
Definition: XrdPosix.hh:106
kXR_int32 dlen
Definition: XProtocol.hh:537
kXR_int32 port
Definition: XProtocol.hh:783
kXR_char sessid[16]
Definition: XProtocol.hh:430
Definition: XProtocol.hh:266
Definition: XProtocol.hh:220
kXR_char streamid[2]
Definition: XProtocol.hh:508
kXR_char fhandle[4]
Definition: XProtocol.hh:722
kXR_char reserved[7]
Definition: XProtocol.hh:676
XMkdirOptions
Definition: XProtocol.hh:159
kXR_char streamid[2]
Definition: XProtocol.hh:490
kXR_char flags
Definition: XProtocol.hh:563
kXR_char ability
Definition: XProtocol.hh:454
kXR_int32 wsec
Definition: XProtocol.hh:826
kXR_unt16 requestid
Definition: XProtocol.hh:526
kXR_unt16 requestid
Definition: XProtocol.hh:491
Definition: XProtocol.hh:155
kXR_int32 pid
Definition: XProtocol.hh:451
kXR_unt16 expectrid
Definition: XProtocol.hh:414
kXR_char username[8]
Definition: XProtocol.hh:452
Definition: XProtocol.hh:330
Definition: XProtocol.hh:483
Definition: XProtocol.hh:321
Definition: XProtocol.hh:354
kXR_int32 dlen
Definition: XProtocol.hh:495
kXR_char options[1]
Definition: XProtocol.hh:462
Definition: XProtocol.hh:99
kXR_int32 wsec
Definition: XProtocol.hh:821
Definition: XProtocol.hh:178
Definition: XProtocol.hh:132
Definition: XProtocol.hh:153
ServerResponseBody_Waitresp waitresp
Definition: XProtocol.hh:846
char host[4092]
Definition: XProtocol.hh:809
kXR_char streamid[2]
Definition: XProtocol.hh:540
Definition: XProtocol.hh:205
ServerResponseBody_Wait wait
Definition: XProtocol.hh:845
#define writev(a, b, c)
Definition: XrdPosix.hh:112
Definition: XProtocol.hh:297
kXR_int32 dlen
Definition: XProtocol.hh:401
char reserved[4]
Definition: XProtocol.hh:814
Definition: XProtocol.hh:735
char infomsg[4096]
Definition: XProtocol.hh:794
Definition: XProtocol.hh:403
kXR_char reserved[12]
Definition: XProtocol.hh:417
Definition: XProtocol.hh:347
Definition: XProtocol.hh:668
Definition: XProtocol.hh:219
Definition: XProtocol.hh:166
kXR_char rsvd
Definition: XProtocol.hh:737
Definition: XProtocol.hh:206
ServerResponseBody_Bind bind
Definition: XProtocol.hh:852
kXR_char streamid[2]
Definition: XProtocol.hh:593
Definition: XProtocol.hh:474
Definition: XProtocol.hh:343
kXR_char reserved[16]
Definition: XProtocol.hh:486
kXR_char streamid[2]
Definition: XProtocol.hh:384
Definition: XProtocol.hh:264
kXR_char version
Definition: XProtocol.hh:415
kXR_unt16 requestid
Definition: XProtocol.hh:560
Definition: XProtocol.hh:441
kXR_char fhandle[4]
Definition: XProtocol.hh:595
Definition: XProtocol.hh:329
Definition: XProtocol.hh:411
kXR_unt16 optionX
Definition: XProtocol.hh:503
Definition: XProtocol.hh:332
kXR_int32 dlen
Definition: XProtocol.hh:543
kXR_unt16 requestid
Definition: XProtocol.hh:405
Definition: XProtocol.hh:333
kXR_char reserved[16]
Definition: XProtocol.hh:542
XOpenRequestMode
Definition: XProtocol.hh:147
Definition: XProtocol.hh:359
kXR_char fhandle[4]
Definition: XProtocol.hh:580
unsigned short kXR_unt16
Definition: XPtypes.hh:67
kXR_int32 msec
Definition: XProtocol.hh:827
kXR_int32 third
Definition: XProtocol.hh:862
kXR_char credtype[4]
Definition: XProtocol.hh:387
kXR_int32 msgval
Definition: XProtocol.hh:871
Definition: XProtocol.hh:143
char data[4096]
Definition: XProtocol.hh:831
Definition: XProtocol.hh:245
Definition: XProtocol.hh:337
kXR_char prty
Definition: XProtocol.hh:501
kXR_int16 arg1len
Definition: XProtocol.hh:471
Definition: XProtocol.hh:350
kXR_char pathid
Definition: XProtocol.hh:536
Definition: XProtocol.hh:319
Definition: XProtocol.hh:154
Definition: XProtocol.hh:102
Definition: XProtocol.hh:120
kXR_char sessid[16]
Definition: XProtocol.hh:393
Definition: XProtocol.hh:129
kXR_unt16 requestid
Definition: XProtocol.hh:422
Definition: XProtocol.hh:121
Definition: XProtocol.hh:288
kXR_int32 dlen
Definition: XProtocol.hh:425
kXR_int64 fsize
Definition: XProtocol.hh:407
XLogonType
Definition: XProtocol.hh:257
Definition: XProtocol.hh:610
kXR_unt16 requestid
Definition: XProtocol.hh:413
Definition: XProtocol.hh:130
kXR_unt16 requestid
Definition: XProtocol.hh:571
Definition: XProtocol.hh:489
kXR_unt16 requestid
Definition: XProtocol.hh:450
kXR_int64 offset
Definition: XProtocol.hh:614
Definition: XProtocol.hh:202
Definition: XProtocol.hh:97
kXR_char streamid[2]
Definition: XProtocol.hh:552
#define ENOATTR
Definition: XProtocol.hh:903
Definition: XProtocol.hh:819
kXR_int32 rlen
Definition: XProtocol.hh:670
Definition: XProtocol.hh:160
kXR_int32 dlen
Definition: XProtocol.hh:513
Definition: XProtocol.hh:246
Definition: XProtocol.hh:545
Definition: XProtocol.hh:186
Definition: XProtocol.hh:179
Definition: XProtocol.hh:390
kXR_unt16 requestid
Definition: XProtocol.hh:623
kXR_unt16 requestid
Definition: XProtocol.hh:469
Definition: XProtocol.hh:497
Definition: XProtocol.hh:834
kXR_unt16 status
Definition: XProtocol.hh:711
Definition: XProtocol.hh:358
XSecCrypto
Definition: XProtocol.hh:286
kXR_char secopt
Definition: XProtocol.hh:739
Definition: XProtocol.hh:267
static int mapError(int rc)
Definition: XProtocol.hh:912
kXR_char reserved[3]
Definition: XProtocol.hh:598
kXR_unt16 requestid
Definition: XProtocol.hh:443
Definition: XProtocol.hh:194
kXR_unt16 infotype
Definition: XProtocol.hh:518
kXR_char capver[1]
Definition: XProtocol.hh:455
kXR_int32 port
Definition: XProtocol.hh:808
XResponseType
Definition: XProtocol.hh:296
kXR_char substreamid
Definition: XProtocol.hh:717
kXR_char streamid[2]
Definition: XProtocol.hh:378
Definition: XProtocol.hh:239
kXR_char reserved[14]
Definition: XProtocol.hh:399
kXR_char streamid[2]
Definition: XProtocol.hh:602
kXR_int32 dlen
Definition: XProtocol.hh:606
kXR_char streamid[2]
Definition: XProtocol.hh:404
kXR_char reserved[10]
Definition: XProtocol.hh:504
kXR_char reserved[16]
Definition: XProtocol.hh:548
XVerifyType
Definition: XProtocol.hh:252
XQueryType
Definition: XProtocol.hh:238
Definition: XProtocol.hh:133
Definition: XProtocol.hh:190
kXR_int32 rlen
Definition: XProtocol.hh:529
kXR_int64 offset
Definition: XProtocol.hh:687
Definition: XProtocol.hh:151
Definition: XProtocol.hh:806
kXR_char seclvl
Definition: XProtocol.hh:740
kXR_unt16 requestid
Definition: XProtocol.hh:579
Definition: XProtocol.hh:356
kXR_int32 dlen
Definition: XProtocol.hh:530
Definition: XProtocol.hh:111
Definition: XProtocol.hh:112
ServerResponseBody_Login login
Definition: XProtocol.hh:850
Definition: XProtocol.hh:721
kXR_unt16 requestid
Definition: XProtocol.hh:476
kXR_char streamid[2]
Definition: XProtocol.hh:391
kXR_unt16 requestid
Definition: XProtocol.hh:586
kXR_char reserved1[2]
Definition: XProtocol.hh:519
kXR_char version
Definition: XProtocol.hh:562
Definition: XProtocol.hh:305
kXR_int32 dlen
Definition: XProtocol.hh:556
kXR_int32 dlen
Definition: XProtocol.hh:549
kXR_char reserved2[8]
Definition: XProtocol.hh:521
Definition: XProtocol.hh:100
kXR_unt16 requestid
Definition: XProtocol.hh:547
Definition: XProtocol.hh:188
Definition: XProtocol.hh:204
Definition: XProtocol.hh:235
ServerResponseBody_Error error
Definition: XProtocol.hh:843
Definition: XProtocol.hh:383
kXR_int32 fourth
Definition: XProtocol.hh:863
kXR_int32 wlen
Definition: XProtocol.hh:692
kXR_int32 dlen
Definition: XProtocol.hh:505
Definition: XProtocol.hh:229
Definition: XProtocol.hh:200
Definition: XProtocol.hh:126
XLoginVersion
Definition: XProtocol.hh:185
Definition: XProtocol.hh:346
Definition: XProtocol.hh:122
kXR_char cptype[4]
Definition: XProtocol.hh:724
Definition: XProtocol.hh:592
char host[4096]
Definition: XProtocol.hh:784
Definition: XProtocol.hh:674
kXR_char reserved[15]
Definition: XProtocol.hh:605
unsigned long long kXR_unt64
Definition: XPtypes.hh:99
kXR_char reserved[4]
Definition: XProtocol.hh:408
kXR_int32 rlen
Definition: XProtocol.hh:686
Definition: XProtocol.hh:515
Definition: XProtocol.hh:353
kXR_int32 errnum
Definition: XProtocol.hh:788
kXR_char reserved[2]
Definition: XProtocol.hh:617
Definition: XProtocol.hh:114
kXR_int32 dlen
Definition: XProtocol.hh:522
kXR_char reserved[4]
Definition: XProtocol.hh:589
Definition: XProtocol.hh:189
kXR_char options
Definition: XProtocol.hh:500
kXR_int32 options
Definition: XProtocol.hh:436
kXR_char reqindx
Definition: XProtocol.hh:731
ServerResponseSVec_Protocol secvec
Definition: XProtocol.hh:742
Definition: XProtocol.hh:287
kXR_char reserved[13]
Definition: XProtocol.hh:463
Definition: XProtocol.hh:777
Definition: XProtocol.hh:199
Definition: XProtocol.hh:150
char chkszreq[25-sizeof(ClientRequest)]
Definition: XProtocol.hh:878
Definition: XProtocol.hh:507
kXR_char streamid[2]
Definition: XProtocol.hh:585
Definition: XProtocol.hh:118
Definition: XProtocol.hh:334
Definition: XProtocol.hh:123
kXR_char streamid[2]
Definition: XProtocol.hh:468
kXR_char streamid[2]
Definition: XProtocol.hh:428
kXR_char options
Definition: XProtocol.hh:604
Definition: XProtocol.hh:152
kXR_int32 second
Definition: XProtocol.hh:861
Definition: XProtocol.hh:301
kXR_char streamid[2]
Definition: XProtocol.hh:460
kXR_int32 actnum
Definition: XProtocol.hh:807
Definition: XProtocol.hh:289
Definition: XProtocol.hh:211
kXR_int32 dlen
Definition: XProtocol.hh:618
Definition: XProtocol.hh:299
kXR_char streamid[2]
Definition: XProtocol.hh:397
char data[4096]
Definition: XProtocol.hh:835
#define write(a, b, c)
Definition: XrdPosix.hh:110
kXR_char pathid
Definition: XProtocol.hh:675
Definition: XProtocol.hh:137
Definition: XProtocol.hh:210
kXR_unt16 requestid
Definition: XProtocol.hh:553
Definition: XProtocol.hh:259
kXR_int32 msglen
Definition: XProtocol.hh:869
Definition: XProtocol.hh:98
Definition: XProtocol.hh:247
kXR_unt16 requestid
Definition: XProtocol.hh:534
Definition: XProtocol.hh:167
char respdata[4096]
Definition: XProtocol.hh:816
kXR_char fhandle[4]
Definition: XProtocol.hh:527
Definition: XProtocol.hh:662
kXR_char reserved[12]
Definition: XProtocol.hh:386
kXR_int64 offset
Definition: XProtocol.hh:528
Definition: XProtocol.hh:230
Definition: XProtocol.hh:577
Definition: XProtocol.hh:249
kXR_unt16 requestid
Definition: XProtocol.hh:594
Definition: XProtocol.hh:906
kXR_int32 options
Definition: XProtocol.hh:510
Definition: XProtocol.hh:355
Definition: XProtocol.hh:148
kXR_int32 cpsize
Definition: XProtocol.hh:723
kXR_char reserved[11]
Definition: XProtocol.hh:494
XErrorCode
Definition: XProtocol.hh:328
Definition: XProtocol.hh:878
Definition: XProtocol.hh:420
kXR_char streamid[2]
Definition: XProtocol.hh:546
kXR_int32 dlen
Definition: XProtocol.hh:625
Definition: XProtocol.hh:198
Definition: XProtocol.hh:716
kXR_unt16 requestid
Definition: XProtocol.hh:398
Definition: XProtocol.hh:303
XLoginCapVer
Definition: XProtocol.hh:177
Definition: XProtocol.hh:336
ServerResponseBody_Protocol protocol
Definition: XProtocol.hh:849
Definition: XProtocol.hh:187
kXR_char streamid[2]
Definition: XProtocol.hh:570
kXR_int32 buffsz
Definition: XProtocol.hh:438
Definition: XProtocol.hh:113
Definition: XProtocol.hh:551
Definition: XProtocol.hh:168
kXR_unt16 requestid
Definition: XProtocol.hh:485
Definition: XProtocol.hh:282
kXR_char reserved[15]
Definition: XProtocol.hh:554
kXR_unt16 mode
Definition: XProtocol.hh:464
kXR_int32 pval
Definition: XProtocol.hh:766
Definition: XProtocol.hh:248
kXR_int32 dlen
Definition: XProtocol.hh:487
kXR_char streamid[2]
Definition: XProtocol.hh:611
XSecFlags
Definition: XProtocol.hh:281
void ServerResponseHeader2NetFmt(struct ServerResponseHeader *srh)
kXR_unt16 expectrid
Definition: XProtocol.hh:561
Definition: XProtocol.hh:300
kXR_char fhandle[4]
Definition: XProtocol.hh:685
Definition: XProtocol.hh:448
Definition: XProtocol.hh:467
ServerResponseBody_Redirect redirect
Definition: XProtocol.hh:847
Definition: XProtocol.hh:243
Definition: XProtocol.hh:138
Definition: XProtocol.hh:125
kXR_int32 dlen
Definition: XProtocol.hh:457
Definition: XProtocol.hh:320
kXR_char streamid[2]
Definition: XProtocol.hh:559
kXR_int32 dlen
Definition: XProtocol.hh:446
Definition: XProtocol.hh:351
Definition: XProtocol.hh:101
kXR_char body[16]
Definition: XProtocol.hh:624
Definition: XProtocol.hh:119
Definition: XProtocol.hh:377
Definition: XProtocol.hh:396
kXR_char secver
Definition: XProtocol.hh:738
Definition: XProtocol.hh:127
kXR_char streamid[2]
Definition: XProtocol.hh:578
Definition: XProtocol.hh:838
kXR_int32 dlen
Definition: XProtocol.hh:567
kXR_int64 offset
Definition: XProtocol.hh:588
kXR_char reserved[12]
Definition: XProtocol.hh:479
kXR_int32 flags
Definition: XProtocol.hh:767
Definition: XProtocol.hh:797
kXR_unt16 requestid
Definition: XProtocol.hh:517
kXR_char streamid[2]
Definition: XProtocol.hh:533
Definition: XProtocol.hh:621
Definition: XProtocol.hh:684
Definition: XProtocol.hh:709
Definition: XProtocol.hh:298
Definition: XProtocol.hh:682
Definition: XProtocol.hh:218
Definition: XProtocol.hh:149
kXR_char secvsz
Definition: XProtocol.hh:741
kXR_unt16 requestid
Definition: XProtocol.hh:461
Definition: XProtocol.hh:170
Definition: XProtocol.hh:156
Definition: XProtocol.hh:730
kXR_int32 ServerResponseType
Definition: XProtocol.hh:876
kXR_char options
Definition: XProtocol.hh:572
kXR_char fhandle[4]
Definition: XProtocol.hh:669
Definition: XProtocol.hh:221
Definition: XProtocol.hh:344
Definition: XProtocol.hh:314
Definition: XProtocol.hh:331
kXR_int32 fifth
Definition: XProtocol.hh:864
XLoginAbility
Definition: XProtocol.hh:165
char parms[4096]
Definition: XProtocol.hh:803
kXR_int32 dlen
Definition: XProtocol.hh:480
Definition: XProtocol.hh:270
kXR_unt16 requestid
Definition: XProtocol.hh:385
Definition: XProtocol.hh:172
kXR_int32 dlen
Definition: XProtocol.hh:590
Definition: XProtocol.hh:216
ServerResponseReqs_Protocol secreq
Definition: XProtocol.hh:768
kXR_char reserved[14]
Definition: XProtocol.hh:470
Definition: XProtocol.hh:161
Definition: XProtocol.hh:226
Definition: XProtocol.hh:360
ServerResponseHeader resphdr
Definition: XProtocol.hh:815
Definition: XProtocol.hh:539
Definition: XProtocol.hh:357
kXR_int32 buffsz
Definition: XProtocol.hh:512
Definition: XProtocol.hh:315
XRequestTypes
Definition: XProtocol.hh:110
Definition: XProtocol.hh:240
#define stat(a, b)
Definition: XrdPosix.hh:96
kXR_char streamid[2]
Definition: XProtocol.hh:412
kXR_char streamid[2]
Definition: XProtocol.hh:484
kXR_int32 first
Definition: XProtocol.hh:860
kXR_char reqsreq
Definition: XProtocol.hh:732
kXR_char reserved[15]
Definition: XProtocol.hh:423
kXR_int32 actnum
Definition: XProtocol.hh:825
kXR_char fhandle[4]
Definition: XProtocol.hh:691
kXR_int32 dlen
Definition: XProtocol.hh:472
Definition: XProtocol.hh:340
kXR_char streamid[2]
Definition: XProtocol.hh:525
kXR_int32 dlen
Definition: XProtocol.hh:712
Definition: XProtocol.hh:318
static const char * reqName(kXR_unt16 reqCode)
Definition: XProtocol.hh:341
Definition: XProtocol.hh:524
kXR_char streamid[2]
Definition: XProtocol.hh:516
Definition: XProtocol.hh:254
Definition: XProtocol.hh:427
kXR_char sec[4096]
Definition: XProtocol.hh:779
kXR_char theTag
Definition: XProtocol.hh:736
kXR_int32 seconds
Definition: XProtocol.hh:798
Definition: XProtocol.hh:265
Definition: XProtocol.hh:128
Definition: XProtocol.hh:433
Definition: XProtocol.hh:173
#define close(a)
Definition: XrdPosix.hh:43
XPrepRequestOption
Definition: XProtocol.hh:262
kXR_int64 offset
Definition: XProtocol.hh:693
kXR_char flags
Definition: XProtocol.hh:493
kXR_char streamid[2]
Definition: XProtocol.hh:498
Definition: XProtocol.hh:263
Definition: XProtocol.hh:335
kXR_char modifier
Definition: XProtocol.hh:555
kXR_char streamid[2]
Definition: XProtocol.hh:449
Definition: XProtocol.hh:215
Definition: XProtocol.hh:313
kXR_char streamid[2]
Definition: XProtocol.hh:622
kXR_int32 dlen
Definition: XProtocol.hh:439
Definition: XProtocol.hh:269
Definition: XProtocol.hh:792
Definition: XProtocol.hh:227
XActionCode
Definition: XProtocol.hh:312
kXR_char streamid[2]
Definition: XProtocol.hh:475
kXR_unt16 requestid
Definition: XProtocol.hh:612
kXR_int32 dlen
Definition: XProtocol.hh:582
Definition: XProtocol.hh:532
Definition: XProtocol.hh:272
Definition: XProtocol.hh:824
kXR_char streamid[2]
Definition: XProtocol.hh:442
Definition: XProtocol.hh:171
kXR_char reserved[14]
Definition: XProtocol.hh:445
Definition: XProtocol.hh:117
Definition: XProtocol.hh:115
Definition: XProtocol.hh:304
XOpenRequestOption
Definition: XProtocol.hh:214
#define open
Definition: XrdPosix.hh:71
Definition: XProtocol.hh:141
Definition: XProtocol.hh:142
Definition: XProtocol.hh:316
ServerResponseBody_Attn attn
Definition: XProtocol.hh:848
kXR_char vertype
Definition: XProtocol.hh:616
Definition: XProtocol.hh:228
kXR_char fhandle[4]
Definition: XProtocol.hh:406
XDirlistRequestOption
Definition: XProtocol.hh:209
int kXR_int32
Definition: XPtypes.hh:89
Definition: XProtocol.hh:222
Definition: XProtocol.hh:859
ServerResponseHeader hdr
Definition: XProtocol.hh:840
Definition: XProtocol.hh:242
kXR_int32 actnum
Definition: XProtocol.hh:813
kXR_char reserved[11]
Definition: XProtocol.hh:573
kXR_unt16 requestid
Definition: XProtocol.hh:392
kXR_int32 dlen
Definition: XProtocol.hh:394
kXR_unt16 mode
Definition: XProtocol.hh:477
kXR_int32 dlen
Definition: XProtocol.hh:575
Definition: XProtocol.hh:231
Definition: XProtocol.hh:342
Definition: XProtocol.hh:140
kXR_int32 protover
Definition: XProtocol.hh:870
kXR_int32 dlen
Definition: XProtocol.hh:431
Definition: XProtocol.hh:628
kXR_char reserved[12]
Definition: XProtocol.hh:581
kXR_unt16 requestid
Definition: XProtocol.hh:603
#define read(a, b, c)
Definition: XrdPosix.hh:77
Definition: XProtocol.hh:569
Definition: XProtocol.hh:868
Definition: XProtocol.hh:338
Definition: XProtocol.hh:339
Definition: XProtocol.hh:224
kXR_char streamid[2]
Definition: XProtocol.hh:434
Definition: XProtocol.hh:787
ServerResponseBody_Buffer buffer
Definition: XProtocol.hh:851
char errmsg[4096]
Definition: XProtocol.hh:789
kXR_char rsvd2[3]
Definition: XProtocol.hh:566
kXR_char options[1]
Definition: XProtocol.hh:424
Definition: XProtocol.hh:352
kXR_unt16 requestid
Definition: XProtocol.hh:435
XProtocolRequestFlags
Definition: XProtocol.hh:234
kXR_unt16 port
Definition: XProtocol.hh:502
kXR_char pathid
Definition: XProtocol.hh:597
kXR_unt16 requestid
Definition: XProtocol.hh:509
Definition: XProtocol.hh:348
XStatRespFlags
Definition: XProtocol.hh:197
kXR_char reserved[8]
Definition: XProtocol.hh:437
kXR_unt16 requestid
Definition: XProtocol.hh:499
kXR_int32 dlen
Definition: XProtocol.hh:465
kXR_char reserved
Definition: XProtocol.hh:453
Definition: XProtocol.hh:134
kXR_char flags
Definition: XProtocol.hh:416
kXR_char reserved[15]
Definition: XProtocol.hh:535
#define mkdir(a, b)
Definition: XrdPosix.hh:69
kXR_char fhandle[4]
Definition: XProtocol.hh:613
Definition: XProtocol.hh:349
Definition: XProtocol.hh:225
Definition: XProtocol.hh:124
kXR_int32 seconds
Definition: XProtocol.hh:793
kXR_char pathid
Definition: XProtocol.hh:615
kXR_int32 actnum
Definition: XProtocol.hh:820
Definition: XProtocol.hh:345
long long kXR_int64
Definition: XPtypes.hh:98
Definition: XProtocol.hh:241
kXR_char crypto
Definition: XProtocol.hh:565
kXR_int32 actnum
Definition: XProtocol.hh:802
Definition: XProtocol.hh:217
XReqErrorType
Definition: XProtocol.hh:96
kXR_int32 dlen
Definition: XProtocol.hh:388
XStatRequestOption
Definition: XProtocol.hh:193
#define rmdir(a)
Definition: XrdPosix.hh:92
Definition: XProtocol.hh:136
Definition: XProtocol.hh:558
Definition: XProtocol.hh:258
kXR_unt16 mode
Definition: XProtocol.hh:400
kXR_unt16 requestid
Definition: XProtocol.hh:379
kXR_int32 dlen
Definition: XProtocol.hh:409
Definition: XProtocol.hh:584
kXR_char sessid[16]
Definition: XProtocol.hh:778
kXR_char reserved[16]
Definition: XProtocol.hh:380
Definition: XProtocol.hh:801
static int toErrno(int xerr)
Definition: XProtocol.hh:944
char chkszrsp[9-sizeof(ServerResponseHeader)]
Definition: XProtocol.hh:879
kXR_char fhandle[4]
Definition: XProtocol.hh:574
Definition: XProtocol.hh:317
kXR_unt16 options
Definition: XProtocol.hh:444
Definition: XProtocol.hh:459
Definition: XProtocol.hh:135
ServerResponseBody_Authmore authmore
Definition: XProtocol.hh:844
#define readv(a, b, c)
Definition: XrdPosix.hh:79
Definition: XProtocol.hh:253
Definition: XProtocol.hh:201
kXR_char fhandle[4]
Definition: XProtocol.hh:587
short kXR_int16
Definition: XPtypes.hh:66
kXR_int32 dlen
Definition: XProtocol.hh:418
Definition: XProtocol.hh:782
union ServerResponse::@0 body
kXR_unt16 requestid
Definition: XProtocol.hh:541
Definition: XProtocol.hh:601
kXR_char fhandle[4]
Definition: XProtocol.hh:520
kXR_int32 dlen
Definition: XProtocol.hh:381
Definition: XProtocol.hh:690
Definition: XProtocol.hh:139
kXR_int32 clientpv
Definition: XProtocol.hh:492