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