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 #ifdef __CINT__
56 #define __attribute__(x)
57 #endif
58 
59 #include "XProtocol/XPtypes.hh"
60 
61 /******************************************************************************/
62 /* P r o t o c o l V e r s i o n D e f i n i t i o n s */
63 /******************************************************************************/
64 
65 // The following is the binary representation of the protocol version here.
66 // Protocol version is repesented as three base10 digits x.y.z with x having no
67 // upper limit (i.e. n.9.9 + 1 -> n+1.0.0). The kXR_PROTSIGNVERSION defines the
68 // protocol version where request signing became available.
69 //
70 #define kXR_PROTOCOLVERSION 0x00000500
71 #define kXR_PROTXATTVERSION 0x00000500
72 #define kXR_PROTTLSVERSION 0x00000500
73 #define kXR_PROTSIGNVERSION 0x00000310
74 #define kXR_PROTOCOLVSTRING "5.0.0"
75 
76 /******************************************************************************/
77 /* C l i e n t - S e r v e r H a n d s h a k e */
78 /******************************************************************************/
79 
80 // The fields to be sent as initial handshake
81 //
88 };
89 
90 // The body received after the first handshake's header
91 //
96 };
97 
98 /******************************************************************************/
99 /* C l i e n t R e q u e s t s */
100 /******************************************************************************/
101 
102 // G.Ganis: All the following structures never need padding bytes:
103 // no need of packing options like __attribute__((packed))
104 //
105 // All binary data is sent in network byte order.
106 
107 // Client request codes
108 //
111  kXR_auth = 3000,
112  kXR_query, // 3001
113  kXR_chmod, // 3002
114  kXR_close, // 3003
115  kXR_dirlist, // 3004
116  kXR_gpfile, // 3005 was kXR_getfile
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_chkpoint,// 3012 was kXR_putfile
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_fattr, // 3020 was kXR_admin
132  kXR_prepare, // 3021
133  kXR_statx, // 3022
134  kXR_endsess, // 3023
135  kXR_bind, // 3024
136  kXR_readv, // 3025
137  kXR_pgwrite, // 3026 was kXR_verifyw
138  kXR_locate, // 3027
139  kXR_truncate,// 3028
140  kXR_sigver, // 3029
141  kXR_pgread, // 3030 was kXR_decrypt
142  kXR_writev, // 3031
143  kXR_REQFENCE // Always last valid request code +1
144 };
145 
146 // All client requests use a header with the following format
147 //
153 };
154 
155 /******************************************************************************/
156 /* k X R _ a u t h R e q u e s t */
157 /******************************************************************************/
158 
165 };
166 
167 /******************************************************************************/
168 /* k X R _ b i n d R e q u e s t */
169 /******************************************************************************/
170 
176 };
177 
178 /******************************************************************************/
179 /* k X R _ c h m o d R e q u e s t */
180 /******************************************************************************/
181 
186  kXR_unt16 mode; // See XOpenRequestMode
188 };
189 
190 /******************************************************************************/
191 /* k X R _ c l o s e R e q u e s t */
192 /******************************************************************************/
193 
200 };
201 
202 /******************************************************************************/
203 /* k X R _ d i r l i s t R e q u e s t */
204 /******************************************************************************/
205 
209 };
210 
215  kXR_char options[1]; // See XDirlistRequestOption enum
217 };
218 
219 /******************************************************************************/
220 /* k X R _ e n d s e s s R e q u e s t */
221 /******************************************************************************/
222 
228 };
229 
230 /******************************************************************************/
231 /* k X R _ f a t t r R e q u e s t */
232 /******************************************************************************/
233 
234 // kXR_fattr subcodes
235 //
241  kXR_fatrrMaxSC = 3 // Highest valid subcode
242 };
243 
244 // kXR_fattr limits
245 //
246 enum xfaLimits {
247  kXR_faMaxVars = 16, // Maximum variables per request
248  kXR_faMaxNlen = 248, // Maximum length of variable name
249  kXR_faMaxVlen = 65536 // Maximum length of variable value
250 };
251 
256  kXR_char subcode; // See xfaSubCode enum
258  kXR_char options; // See valid options below
261 
262 // Valid options:
263 //
264  static const int isNew = 0x01; // For set, the variable must not exist
265  static const int aData = 0x10; // For list, return attribute value
266 
267 // Add an attribute name to nvec (the buffer has to be sufficiently big)
268 //
269  static char* NVecInsert( const char *name, char *buffer );
270 
271 // Add an attribute name to vvec (the buffer has to be sufficiently big)
272 //
273  static char* VVecInsert( const char *value, char *buffer );
274 
275 // Read error code from nvec
276 //
277  static char* NVecRead( char* buffer, kXR_unt16 &rc );
278 
279 // Read attribute name from nvec, should be deallocated with free()
280 //
281  static char* NVecRead( char* buffer, char *&name );
282 
283 // Read value length from vvec
284 //
285  static char* VVecRead( char* buffer, kXR_int32 &len );
286 
287 // Read attribute value from vvec, should be deallocated with free()
288 //
289  static char* VVecRead( char* buffer, kXR_int32 len, char *&value );
290 
291 };
292 
293 /******************************************************************************/
294 /* k X R _ g p f i l e R e q u e s t */
295 /******************************************************************************/
296 
297 struct ClientGPfileRequest { // ??? This is all wrong now
299  kXR_unt16 requestid; // kXR_gpfile
304 };
305 
306 /******************************************************************************/
307 /* k X R _ l o c a t e R e q u e s t */
308 /******************************************************************************/
309 
313  kXR_unt16 options; // See XOpenRequestOption enum tagged for locate
316 };
317 
318 /******************************************************************************/
319 /* k X R _ l o g i n R e q u e s t */
320 /******************************************************************************/
321 
322 // this is a bitmask
332 };
333 
334 // this is a bitmask (note that XLoginVersion resides in lower bits)
339 };
340 
341 // this is a single number that is or'd into capver as the version
342 //
344  kXR_ver000 = 0, // Old clients predating history
345  kXR_ver001 = 1, // Generally implemented 2005 protocol
346  kXR_ver002 = 2, // Same as 1 but adds asyncresp recognition
347  kXR_ver003 = 3, // The 2011-2012 rewritten client
348  kXR_ver004 = 4, // The 2016 sign-capable client
349  kXR_ver005 = 5 // The 2019 TLS-capable client
350 };
351 
358  kXR_char ability; // See XLoginAbility enum flags
359  kXR_char capver[1]; // See XLoginCapVer enum flags
362 };
363 
364 /******************************************************************************/
365 /* k X R _ m k d i r R e q u e s t */
366 /******************************************************************************/
367 
371 };
372 
378  kXR_unt16 mode; // See XOpenRequestMode
380 };
381 
382 /******************************************************************************/
383 /* k X R _ m v R e q u e s t */
384 /******************************************************************************/
385 
392 };
393 
394 /******************************************************************************/
395 /* k X R _ o p e n R e q u e s t */
396 /******************************************************************************/
397 
398 // OPEN MODE FOR A REMOTE FILE
400  kXR_ur = 0x100,
401  kXR_uw = 0x080,
402  kXR_ux = 0x040,
403  kXR_gr = 0x020,
404  kXR_gw = 0x010,
405  kXR_gx = 0x008,
406  kXR_or = 0x004,
407  kXR_ow = 0x002,
408  kXR_ox = 0x001
409 };
410 
412  kXR_compress = 1, // also locate (return unique hosts)
415  kXR_new = 8,
418  kXR_async = 64,
419  kXR_refresh = 128, // also locate
420  kXR_mkpath = 256,
421  kXR_prefname = 256, // only locate
423  kXR_retstat = 1024,
424  kXR_4dirlist = 1024, // for locate intending a dirlist
425  kXR_replica = 2048,
426  kXR_posc = 4096,
427  kXR_nowait = 8192, // also locate
428  kXR_seqio =16384,
430 };
431 
439 };
440 
441 /******************************************************************************/
442 /* k X R _ p g r e a d R e q u e s t */
443 /******************************************************************************/
444 
445 // The page size for pgread and pgwrite and the maximum transmission size
446 //
447 namespace XrdProto // Always use this namespace for new additions
448 {
449 static const int kXR_pgPageSZ = 4096;
450 static const int kXR_pgUnitSZ = kXR_pgPageSZ + sizeof(kXR_unt32);
451 
452 // kXR_pgread/write options
453 //
454 static const kXR_char kXR_AnyPath = 0xff; // In pathid
455 static const int kXR_pgRetry = 0x01; // In reqflags
456 }
457 
464  kXR_int32 dlen; // Request data length must be 0 unless args present
465 };
466 
468  kXR_char pathid; // Request data length must be 1
469  kXR_char reqflags; // Request data length must be 2
470 };
471 
472 namespace
473 {
474 }
475 
476 /******************************************************************************/
477 /* k X R _ p r w r i t e R e q u e s t */
478 /******************************************************************************/
479 
489 // kXR_char data[dlen];
490 };
491 
492 /******************************************************************************/
493 /* k X R _ p i n g R e q u e s t */
494 /******************************************************************************/
495 
501 };
502 
503 /******************************************************************************/
504 /* k X R _ p r o t o c o l R e q u e s t */
505 /******************************************************************************/
506 
510  kXR_int32 clientpv; // 2.9.7 or higher
511  kXR_char flags; // 3.1.0 or higher
512  kXR_char expect; // 4.0.0 or higher
515 
517  kXR_secreqs = 0x01, // Options: Return security requirements
518  kXR_ableTLS = 0x02, // Options: Client is TLS capable
519  kXR_wantTLS = 0x04 // Options: Change connection to use TLS
520 };
521 
523  kXR_ExpMask = 0x0f, // Isolate the relevant expect enumeration value
524  kXR_ExpNone = 0x00,
525  kXR_ExpBind = 0x01,
526  kXR_ExpGPF = 0x02,
527  kXR_ExpLogin = 0x03,
528  kXR_ExpTPC = 0x04,
529  kXR_ExpGPFA = 0x08
530 };
531 };
532 
533 /******************************************************************************/
534 /* k X R _ p r e p a r e R e q u e s t */
535 /******************************************************************************/
536 
542  kXR_wmode = 16,
543  kXR_coloc = 32,
544  kXR_fresh = 64,
545  kXR_usetcp = 128,
546 
547  kXR_evict = 0x0001 // optionsX: file no longer useful
548 };
549 
555  kXR_unt16 port; // 2.9.9 or higher
556  kXR_unt16 optionX; // Extended options
559 };
560 
561 /******************************************************************************/
562 /* k X R _ q u e r y R e q u e s t */
563 /******************************************************************************/
564 
577 };
578 
582  kXR_unt16 infotype; // See XQueryType enum
587 };
588 
589 /******************************************************************************/
590 /* k X R _ r e a d R e q u e s t */
591 /******************************************************************************/
592 
600 // Optionally followed by read_args
601 };
602 
603 struct read_args {
606 // This struct may be followed by an array of readahead_list
607 };
608 
613 };
614 
615 /******************************************************************************/
616 /* k X R _ r e a d v R e q u e s t */
617 /******************************************************************************/
618 
625 // This struct followed by the read_list
626 };
627 
628 namespace XrdProto // Always use this namespace for new additions
629 {
630 struct read_list {
634 };
635 }
636 
637 /******************************************************************************/
638 /* k X R _ r m R e q u e s t */
639 /******************************************************************************/
640 
646 };
647 
648 /******************************************************************************/
649 /* k X R _ r m d i r R e q u e s t */
650 /******************************************************************************/
651 
657 };
658 
659 /******************************************************************************/
660 /* k X R _ s e t R e q u e s t */
661 /******************************************************************************/
662 
667  kXR_char modifier; // For security purposes, should be zero
669 };
670 
671 /******************************************************************************/
672 /* k X R _ s i g v e r R e q u e s t */
673 /******************************************************************************/
674 
675 // Cryptography used for kXR_sigver SigverRequest::crypto
677  kXR_SHA256 = 0x01, // Hash used
678  kXR_HashMask = 0x0f, // Mak to extract the hash type
679  kXR_rsaKey = 0x80 // The rsa key was used
680 };
681 
682 // Flags for kXR_sigver
683 enum XSecFlags {
684  kXR_nodata = 1 // Request payload was not hashed
685 };
686 
687 // Version number
690 };
691 
695  kXR_unt16 expectrid; // Request code of subsequent request
696  kXR_char version; // Security version being used (see XSecVersion)
697  kXR_char flags; // One or more flags defined in enum (see XSecFlags)
698  kXR_unt64 seqno; // Monotonically increasing number (part of hash)
699  kXR_char crypto; // Cryptography used (see XSecCrypto)
702 };
703 
704 /******************************************************************************/
705 /* k X R _ s t a t R e q u e s t */
706 /******************************************************************************/
707 
710 };
711 
715  kXR_char options; // See XStatRequestOption
719 };
720 
721 /******************************************************************************/
722 /* k X R _ s y n c R e q u e s t */
723 /******************************************************************************/
724 
731 };
732 
733 /******************************************************************************/
734 /* k X R _ t r u n c a t e R e q u e s t */
735 /******************************************************************************/
736 
744 };
745 
746 /******************************************************************************/
747 /* k X R _ w r i t e R e q u e s t */
748 /******************************************************************************/
749 
758 };
759 
760 /******************************************************************************/
761 /* k X R _ w r i t e v R e q u e s t */
762 /******************************************************************************/
763 
767  kXR_char options; // See static const ints below
770 // This struct followed by the write_list
771 
772  static const kXR_int32 doSync = 0x01;
773 };
774 
775 namespace XrdProto // Always use this namespace for new additions
776 {
777 struct write_list {
781 };
782 }
783 
784 /******************************************************************************/
785 /* U n i o n o f a l l C l i e n t R e q u e s t s */
786 /******************************************************************************/
787 
788 typedef union {
789  struct ClientRequestHdr header;
790  struct ClientAuthRequest auth;
791  struct ClientBindRequest bind;
792  struct ClientChmodRequest chmod;
794  struct ClientDirlistRequest dirlist;
795  struct ClientEndsessRequest endsess;
796  struct ClientFattrRequest fattr;
797  struct ClientGPfileRequest gpfile;
798  struct ClientLocateRequest locate;
799  struct ClientLoginRequest login;
801  struct ClientMvRequest mv;
803  struct ClientPgReadRequest pgread;
804  struct ClientPgWriteRequest pgwrite;
805  struct ClientPingRequest ping;
806  struct ClientPrepareRequest prepare;
807  struct ClientProtocolRequest protocol;
808  struct ClientQueryRequest query;
811  struct ClientRmRequest rm;
813  struct ClientSetRequest set;
814  struct ClientSigverRequest sigver;
816  struct ClientSyncRequest sync;
820 } ClientRequest;
821 
822 typedef union {
823  struct ClientRequestHdr header;
824  struct ClientSigverRequest sigver;
826 
827 /******************************************************************************/
828 /* S e r v e r R e s p o n s e s */
829 /******************************************************************************/
830 
831 // Nice header for the server response.
832 // Note that the protocol specifies these values to be in network
833 // byte order when sent
834 //
835 // G.Ganis: The following structures never need padding bytes:
836 // no need of packing options
837 
838 // Server response codes
839 //
841  kXR_ok = 0,
842  kXR_oksofar = 4000,
843  kXR_attn, // 4001
844  kXR_authmore,// 4002
845  kXR_error, // 4003
846  kXR_redirect,// 4004
847  kXR_wait, // 4005
848  kXR_waitresp,// 4006
849  kXR_status, // 4007
851 };
852 
853 // All serer responses start with the same header
854 //
859 };
860 
861 // This is a bit of wierdness held over from the very old days, sigh.
862 //
864  char data[4096];
865 };
866 
867 /******************************************************************************/
868 /* k X R _ a t t n R e s p o n s e */
869 /******************************************************************************/
870 
872  kXR_asyncab = 5000, // No longer supported
873  kXR_asyncdi, // 5001 No longer supported
874  kXR_asyncms = 5002,
875  kXR_asyncrd, // 5003 No longer supported
876  kXR_asyncwt, // 5004 No longer supported
877  kXR_asyncav, // 5005 No longer supported
878  kXR_asynunav, // 5006 No longer supported
879  kXR_asyncgo, // 5007 No longer supported
881 };
882 
884  kXR_int32 actnum; // See XActionCode enum
885  char parms[4096]; // Should be sufficient for every use
886 };
887 
889  kXR_int32 actnum; // XActionCode::kXR_asyncms
890  char reserved[4];
892  char respdata[4096];
893 };
894 
896  kXR_int32 actnum; // XActionCode::kXR_asynresp
897  char reserved[4];
899  char respdata[4096];
900 };
901 
902 /******************************************************************************/
903 /* k X R _ a u t h m o r e R e s p o n s e */
904 /******************************************************************************/
905 
907  char data[4096];
908 };
909 
910 /******************************************************************************/
911 /* k X R _ b i n d R e s p o n s e */
912 /******************************************************************************/
913 
916 };
917 
918 /******************************************************************************/
919 /* k X R _ e r r o r R e s p o n s e */
920 /******************************************************************************/
921 
924  kXR_ArgMissing, // 3001
925  kXR_ArgTooLong, // 3002
926  kXR_FileLocked, // 3003
928  kXR_FSError, // 3005
930  kXR_IOError, // 3007
931  kXR_NoMemory, // 3008
932  kXR_NoSpace, // 3009
934  kXR_NotFound, // 3011
937  kXR_noserver, // 3014
938  kXR_NotFile, // 3015
940  kXR_Cancelled, // 3017
941  kXR_ItExists, // 3018
942  kXR_ChkSumErr, // 3019
943  kXR_inProgress, // 3020
944  kXR_overQuota, // 3021
945  kXR_SigVerErr, // 3022
946  kXR_DecryptErr, // 3023
947  kXR_Overloaded, // 3024
948  kXR_fsReadOnly, // 3025
949  kXR_BadPayload, // 3026
952  kXR_noReplicas, // 3029
953  kXR_AuthFailed, // 3030
954  kXR_ERRFENCE, // Always last valid errcode + 1
956 };
957 
959  kXR_int32 errnum; // See XErrorCode enu
960  char errmsg[4096]; // Should be sufficient for every use
961 };
962 
963 /******************************************************************************/
964 /* k X R _ l o g i n R e s p o n s e */
965 /******************************************************************************/
966 
969  kXR_char sec[4096]; // Should be sufficient for every use
970 };
971 
972 /******************************************************************************/
973 /* k X R _ o p e n R e s p o n s e */
974 /******************************************************************************/
975 
978  kXR_int32 cpsize; // cpsize & cptype returned if kXR_compress *or*
979  kXR_char cptype[4]; // kXR_retstat is specified
980 }; // info will follow if kXR_retstat is specified
981 
982 /******************************************************************************/
983 /* k X R _ p g r e a d R e s p o n s e */
984 /******************************************************************************/
985 
987  kXR_int64 offset; // info[]: File offset of data that follows
988 // kXR_char data[dlen];
989 };
990 
991 /******************************************************************************/
992 /* k X R _ p g w r i t e R e s p o n s e */
993 /******************************************************************************/
994 
996  kXR_int64 offset; // info[]: File offset of data written
997 // kXR_int64 bof[(resplen-16)/8-1]; // List of offsets of pages in error
998 };
999 
1000 /******************************************************************************/
1001 /* k X R _ p r o t o c o l R e s p o n s e */
1002 /******************************************************************************/
1003 
1004 // The following information is returned in the response body when kXR_secreqs
1005 // is set in ClientProtocolRequest::flags. Note that the size of secvec is
1006 // defined by secvsz and will not be present when secvsz == 0.
1007 //
1009  kXR_char reqindx; // Request index
1010  kXR_char reqsreq; // Request signing requirement
1011 };
1012 
1014  kXR_char theTag; // Always the character 'S' to identify struct
1015  kXR_char rsvd; // Reserved for the future (always 0 for now)
1016  kXR_char secver; // Security version
1017  kXR_char secopt; // Security options
1018  kXR_char seclvl; // Security level when secvsz == 0
1019  kXR_char secvsz; // Number of items in secvec (i.e. its length/2)
1021 };
1022 
1023 // Options reflected in protocol response ServerResponseReqs_Protocol::secopt
1024 //
1025 #define kXR_secOData 0x01
1026 #define kXR_secOFrce 0x02
1027 
1028 // Security level definitions (these are predefined but can be over-ridden)
1029 //
1030 #define kXR_secNone 0
1031 #define kXR_secCompatible 1
1032 #define kXR_secStandard 2
1033 #define kXR_secIntense 3
1034 #define kXR_secPedantic 4
1035 
1036 // Requirements one of which set in each ServerResponseReqs_Protocol::secvec
1037 //
1038 #define kXR_signIgnore 0
1039 #define kXR_signLikely 1
1040 #define kXR_signNeeded 2
1041 
1042 // Version used for kXR_sigver and is set in SigverRequest::version,
1043 // ServerResponseReqs_Protocol::secver
1044 //
1045 #define kXR_secver_0 0
1046 
1047 // KINDS of SERVERS (no longer used by new clients)
1048 //
1049 #define kXR_DataServer 1
1050 #define kXR_LBalServer 0
1051 
1052 // The below are defined for protocol version 2.9.7 or higher
1053 // These are the flag values in the kXR_protool response
1054 //
1055 #define kXR_isManager 0x00000002
1056 #define kXR_isServer 0x00000001
1057 #define kXR_attrMeta 0x00000100
1058 #define kXR_attrProxy 0x00000200
1059 #define kXR_attrSuper 0x00000400
1060 #define kXR_attrVirtRdr 0x00000800
1061 
1062 // Things the server supports
1063 //
1064 #define kXR_anongpf 0x00800000
1065 #define kXR_supgpf 0x00400000
1066 #define kXR_suppgrw 0x00200000
1067 #define kXR_supposc 0x00100000
1068 
1069 // TLS requirements
1070 //
1071 #define kXR_haveTLS 0x80000000
1072 #define kXR_gotoTLS 0x40000000
1073 #define kXR_tlsAny 0x1f000000
1074 #define kXR_tlsData 0x01000000
1075 #define kXR_tlsGPF 0x02000000
1076 #define kXR_tlsLogin 0x04000000
1077 #define kXR_tlsSess 0x08000000
1078 #define kXR_tlsTPC 0x10000000
1079 #define kXR_tlsGPFA 0x20000000
1080 
1081 // Body for the kXR_protocol response... useful
1082 //
1086  ServerResponseReqs_Protocol secreq; // Only for V3.1.0+ && if requested
1087 };
1088 
1089 // Handy definition of the size of the protocol response when the security
1090 // information is not present.
1091 //
1092 #define kXR_ShortProtRespLen sizeof(ServerResponseBody_Protocol)-\
1093  sizeof(ServerResponseReqs_Protocol)
1094 
1095 /******************************************************************************/
1096 /* k X R _ r e d i r e c t R e s p o n s e */
1097 /******************************************************************************/
1098 
1101  char host[4096]; // Should be sufficient for every use
1102 };
1103 
1104 /******************************************************************************/
1105 /* k X R _ s t a t R e s p o n s e */
1106 /******************************************************************************/
1107 
1108 // The following bits are encoded in the "flags" token in the response
1109 //
1120 };
1121 
1122 /******************************************************************************/
1123 /* k X R _ s t a t u s R e s p o n s e */
1124 /******************************************************************************/
1125 
1126 struct ServerResponseBody_Status { // Always preceeded by ServerResponseHeader
1127  kXR_unt32 crc32c; // IETF RFC 7143 standard
1128  kXR_char streamID[2]; // Identical to streamid[2] in ServerResponseHeader
1129  kXR_char requestid; // requestcode - kXR_1stRequest
1130  kXR_char resptype; // See RespType enum below
1133 // kXR_char info[ServerResponseHeader::dlen-sizeof(ServerResponseBody_Status)];
1134 // kXR_char data[dlen];
1135 };
1136 
1137 namespace XrdProto
1138 {
1139 enum RespType {
1140 
1144 };
1145 
1146  // This is the minimum size of ServerResponseHeader::dlen for kXR_status
1147  //
1148  static const int kXR_statusBodyLen = sizeof(ServerResponseBody_Status);
1149 }
1150 
1154 };
1155 
1156 /******************************************************************************/
1157 /* k X R _ w a i t R e s p o n s e */
1158 /******************************************************************************/
1159 
1162  char infomsg[4096]; // Should be sufficient for every use
1163 };
1164 
1165 /******************************************************************************/
1166 /* k X R _ w a i t r e s p R e s p o n s e */
1167 /******************************************************************************/
1168 
1171 };
1172 
1173 /******************************************************************************/
1174 /* U n i o n o f a l l S e r v e r R e s p o n s e s */
1175 /******************************************************************************/
1176 
1178 {
1180  union
1181  {
1194  } body;
1195 };
1196 
1197 struct ALIGN_CHECK {char chkszreq[25-sizeof(ClientRequest)];
1198  char chkszrsp[ 9-sizeof(ServerResponseHeader)];
1199 };
1200 
1201 /******************************************************************************/
1202 /* X P r o t o c o l U t i l i t i e s */
1203 /******************************************************************************/
1204 
1205 #include <errno.h>
1206 #if defined(WIN32)
1207 #if !defined(ENOTBLK)
1208 # define ENOTBLK 15
1209 #endif
1210 #if !defined(ETXTBSY)
1211 #define ETXTBSY 26
1212 #endif
1213 #if !defined(ENOBUFS)
1214 #define ENOBUFS 105
1215 #endif
1216 #if !defined(ENETUNREACH)
1217 #define ENETUNREACH 114
1218 #endif
1219 #endif
1220 
1221 #ifndef ENOATTR
1222 #define ENOATTR ENODATA
1223 #endif
1224 
1225 #ifndef EBADRQC
1226 #if defined(__APPLE__)
1227 #define EBADRQC EBADRPC
1228 #endif
1229 #endif
1230 
1231 #ifndef EAUTH
1232 #define EAUTH EBADE
1233 #endif
1234 
1235 struct stat;
1236 
1238 {
1239 public:
1240 
1241 // mapError() is the occicial mapping from errno to xrootd protocol error.
1242 //
1243 static int mapError(int rc)
1244  {if (rc < 0) rc = -rc;
1245  switch(rc)
1246  {case ENOENT: return kXR_NotFound;
1247  case EINVAL: return kXR_ArgInvalid;
1248  case EPERM: return kXR_NotAuthorized;
1249  case EACCES: return kXR_NotAuthorized;
1250  case EIO: return kXR_IOError;
1251  case ENOMEM: return kXR_NoMemory;
1252  case ENOBUFS: return kXR_NoMemory;
1253  case ENOSPC: return kXR_NoSpace;
1254  case ENAMETOOLONG: return kXR_ArgTooLong;
1255  case ENETUNREACH: return kXR_noserver;
1256  case ENOTBLK: return kXR_NotFile;
1257  case ENOTSUP: return kXR_Unsupported;
1258  case EISDIR: return kXR_isDirectory;
1259  case EEXIST: return kXR_ItExists;
1260  case EBADRQC: return kXR_InvalidRequest;
1261  case ETXTBSY: return kXR_inProgress;
1262  case ENODEV: return kXR_FSError;
1263  case EFAULT: return kXR_ServerError;
1264  case EDOM: return kXR_ChkSumErr;
1265  case EDQUOT: return kXR_overQuota;
1266  case EILSEQ: return kXR_SigVerErr;
1267  case ERANGE: return kXR_DecryptErr;
1268  case EUSERS: return kXR_Overloaded;
1269  case EROFS: return kXR_fsReadOnly;
1270  case ENOATTR: return kXR_AttrNotFound;
1271  case EPROTOTYPE: return kXR_TLSRequired;
1272  case EADDRNOTAVAIL: return kXR_noReplicas;
1273  case EAUTH: return kXR_AuthFailed;
1274  default: return kXR_FSError;
1275  }
1276  }
1277 
1278 static int toErrno( int xerr )
1279 {
1280  switch(xerr)
1281  {case kXR_ArgInvalid: return EINVAL;
1282  case kXR_ArgMissing: return EINVAL;
1283  case kXR_ArgTooLong: return ENAMETOOLONG;
1284  case kXR_FileLocked: return EDEADLK;
1285  case kXR_FileNotOpen: return EBADF;
1286  case kXR_FSError: return ENODEV;
1287  case kXR_InvalidRequest:return EBADRQC;
1288  case kXR_IOError: return EIO;
1289  case kXR_NoMemory: return ENOMEM;
1290  case kXR_NoSpace: return ENOSPC;
1291  case kXR_NotAuthorized: return EACCES;
1292  case kXR_NotFound: return ENOENT;
1293  case kXR_ServerError: return EFAULT;
1294  case kXR_Unsupported: return ENOTSUP;
1295  case kXR_noserver: return EHOSTUNREACH;
1296  case kXR_NotFile: return ENOTBLK;
1297  case kXR_isDirectory: return EISDIR;
1298  case kXR_Cancelled: return ECANCELED;
1299  case kXR_ItExists: return EEXIST;
1300  case kXR_ChkSumErr: return EDOM;
1301  case kXR_inProgress: return EINPROGRESS;
1302  case kXR_overQuota: return EDQUOT;
1303  case kXR_SigVerErr: return EILSEQ;
1304  case kXR_DecryptErr: return ERANGE;
1305  case kXR_Overloaded: return EUSERS;
1306  case kXR_fsReadOnly: return EROFS;
1307  case kXR_BadPayload: return EINVAL;
1308  case kXR_AttrNotFound: return ENOATTR;
1309  case kXR_TLSRequired: return EPROTOTYPE;
1310  case kXR_noReplicas: return EADDRNOTAVAIL;
1311  case kXR_AuthFailed: return EAUTH;
1312  default: return ENOMSG;
1313  }
1314 }
1315 
1316 static const char *errName(kXR_int32 errCode);
1317 
1318 static const char *reqName(kXR_unt16 reqCode);
1319 
1320 /******************************************************************************/
1321 /* O b s o l e t e D e f i n i t i o n s */
1322 /******************************************************************************/
1323 
1324 struct ServerResponseBody_Attn_asyncdi { // No longer supported
1328 };
1329 
1330 struct ServerResponseBody_Attn_asyncrd { // No longer supported
1333  char host[4092];
1334 };
1335 
1336 struct ServerResponseBody_Attn_asyncwt { // No longer supported
1339 };
1340 
1341 // Kind of error inside a XTNetFile's routine (temporary)
1342 //
1344  kGENERICERR = 0, // Generic error
1345  kREAD, // Error while reading from stream
1346  kWRITE, // Error while writing to stream
1347  kREDIRCONNECT, // Error redirecting to a given host
1348  kOK, // Everything seems ok
1349  kNOMORESTREAMS // No more available stream IDs for
1350  // async processing
1351 };
1352 
1354 
1355 #define kXR_maxReqRetry 10
1356 
1357 }; // XProtocol
1358 #endif
Definition: XProtocol.hh:895
unsigned char kXR_char
Definition: XPtypes.hh:65
kXR_int64 offset
Definition: XProtocol.hh:754
static const char * errName(kXR_int32 errCode)
Definition: XProtocol.hh:327
Definition: XProtocol.hh:1083
Definition: XProtocol.hh:1141
kXR_int32 dlen
Definition: XProtocol.hh:757
Definition: XProtocol.hh:420
Definition: XProtocol.hh:1116
Definition: XProtocol.hh:338
kXR_unt16 options
Definition: XProtocol.hh:436
Definition: XProtocol.hh:846
Definition: XProtocol.hh:571
kXR_unt16 requestid
Definition: XProtocol.hh:225
kXR_unt64 seqno
Definition: XProtocol.hh:698
kXR_char streamid[2]
Definition: XProtocol.hh:856
kXR_char reqflags
Definition: XProtocol.hh:486
kXR_int64 offset
Definition: XProtocol.hh:612
Definition: XProtocol.hh:543
Definition: XProtocol.hh:906
kXR_char streamid[2]
Definition: XProtocol.hh:212
Definition: XProtocol.hh:1348
Definition: XProtocol.hh:527
Definition: XProtocol.hh:689
static const kXR_int32 doSync
Definition: XProtocol.hh:772
#define truncate(a, b)
Definition: XrdPosix.hh:106
kXR_int32 dlen
Definition: XProtocol.hh:624
kXR_int32 port
Definition: XProtocol.hh:1100
kXR_char sessid[16]
Definition: XProtocol.hh:226
#define EAUTH
Definition: XProtocol.hh:1232
Definition: XProtocol.hh:541
Definition: XProtocol.hh:417
kXR_char fhandle[4]
Definition: XProtocol.hh:977
kXR_char reserved[7]
Definition: XProtocol.hh:605
XMkdirOptions
Definition: XProtocol.hh:368
kXR_char streamid[2]
Definition: XProtocol.hh:508
char reserved[4]
Definition: XProtocol.hh:890
kXR_char flags
Definition: XProtocol.hh:697
kXR_char ability
Definition: XProtocol.hh:358
kXR_unt16 requestid
Definition: XProtocol.hh:595
kXR_unt16 requestid
Definition: XProtocol.hh:509
Definition: XProtocol.hh:407
kXR_int32 pid
Definition: XProtocol.hh:355
kXR_char username[8]
Definition: XProtocol.hh:356
Definition: XProtocol.hh:924
Definition: XProtocol.hh:496
Definition: XProtocol.hh:880
Definition: XProtocol.hh:948
kXR_int32 actnum
Definition: XProtocol.hh:889
kXR_int32 dlen
Definition: XProtocol.hh:514
Definition: XProtocol.hh:1142
kXR_char options[1]
Definition: XProtocol.hh:376
Definition: XProtocol.hh:336
Definition: XProtocol.hh:132
Definition: XProtocol.hh:405
ServerResponseBody_Waitresp waitresp
Definition: XProtocol.hh:1193
kXR_char streamid[2]
Definition: XProtocol.hh:642
xfaSubCode
Definition: XProtocol.hh:236
Definition: XProtocol.hh:1118
ServerResponseBody_Wait wait
Definition: XProtocol.hh:1192
#define writev(a, b, c)
Definition: XrdPosix.hh:112
ServerResponseBody_pgRead pgread
Definition: XProtocol.hh:1188
Definition: XProtocol.hh:841
kXR_int32 dlen
Definition: XProtocol.hh:187
char reserved[4]
Definition: XProtocol.hh:897
Definition: XProtocol.hh:1013
char infomsg[4096]
Definition: XProtocol.hh:1162
Definition: XProtocol.hh:194
Definition: XProtocol.hh:609
Definition: XProtocol.hh:416
Definition: XProtocol.hh:324
kXR_char rsvd
Definition: XProtocol.hh:1015
Definition: XProtocol.hh:1119
ServerResponseBody_Bind bind
Definition: XProtocol.hh:1184
kXR_char streamid[2]
Definition: XProtocol.hh:751
Definition: XProtocol.hh:432
Definition: XProtocol.hh:937
kXR_unt16 requestid
Definition: XProtocol.hh:299
kXR_char reserved[16]
Definition: XProtocol.hh:499
kXR_char streamid[2]
Definition: XProtocol.hh:160
Definition: XProtocol.hh:539
kXR_unt16 requestid
Definition: XProtocol.hh:694
Definition: XProtocol.hh:310
kXR_char fhandle[4]
Definition: XProtocol.hh:753
Definition: XProtocol.hh:953
XReqErrorType
Definition: XProtocol.hh:1343
Definition: XProtocol.hh:923
kXR_unt16 optionX
Definition: XProtocol.hh:556
kXR_unt16 requestid
Definition: XProtocol.hh:460
Definition: XProtocol.hh:926
kXR_int32 dlen
Definition: XProtocol.hh:645
ExpectFlags
Definition: XProtocol.hh:522
Definition: XProtocol.hh:927
kXR_unt16 requestid
Definition: XProtocol.hh:196
kXR_char reserved[16]
Definition: XProtocol.hh:644
XOpenRequestMode
Definition: XProtocol.hh:399
Definition: XProtocol.hh:954
char host[4092]
Definition: XProtocol.hh:1333
kXR_char fhandle[4]
Definition: XProtocol.hh:728
unsigned short kXR_unt16
Definition: XPtypes.hh:67
kXR_int32 third
Definition: XProtocol.hh:85
kXR_char credtype[4]
Definition: XProtocol.hh:163
Definition: XProtocol.hh:123
kXR_char streamid[2]
Definition: XProtocol.hh:481
kXR_int32 msgval
Definition: XProtocol.hh:95
Definition: XProtocol.hh:143
Definition: XProtocol.hh:1345
char data[4096]
Definition: XProtocol.hh:907
Definition: XProtocol.hh:572
Definition: XProtocol.hh:1330
Definition: XProtocol.hh:931
kXR_char prty
Definition: XProtocol.hh:554
kXR_int16 arg1len
Definition: XProtocol.hh:390
Definition: XProtocol.hh:944
kXR_char pathid
Definition: XProtocol.hh:623
Definition: XProtocol.hh:878
kXR_int32 actnum
Definition: XProtocol.hh:1337
Definition: XProtocol.hh:406
kXR_char expect
Definition: XProtocol.hh:512
Definition: XProtocol.hh:120
kXR_char sessid[16]
Definition: XProtocol.hh:174
Definition: XProtocol.hh:129
kXR_char fhandle[4]
Definition: XProtocol.hh:461
kXR_unt16 requestid
Definition: XProtocol.hh:213
Definition: XProtocol.hh:121
Definition: XProtocol.hh:678
kXR_int32 dlen
Definition: XProtocol.hh:216
Definition: XProtocol.hh:130
kXR_char pathid
Definition: XProtocol.hh:468
kXR_unt16 requestid
Definition: XProtocol.hh:714
Definition: XProtocol.hh:507
kXR_unt16 requestid
Definition: XProtocol.hh:354
Definition: XProtocol.hh:1115
kXR_char streamid[2]
Definition: XProtocol.hh:664
#define ENOATTR
Definition: XProtocol.hh:1222
kXR_int32 options
Definition: XProtocol.hh:300
kXR_int32 rlen
Definition: XProtocol.hh:611
Definition: XProtocol.hh:369
Definition: XProtocol.hh:573
Definition: XProtocol.hh:652
Definition: XProtocol.hh:344
static const kXR_char kXR_AnyPath
Definition: XProtocol.hh:454
Definition: XProtocol.hh:337
Definition: XProtocol.hh:171
kXR_unt16 requestid
Definition: XProtocol.hh:150
Definition: XProtocol.hh:1143
kXR_unt16 requestid
Definition: XProtocol.hh:388
Definition: XProtocol.hh:550
Definition: XProtocol.hh:863
kXR_char streamid[2]
Definition: XProtocol.hh:298
kXR_unt16 status
Definition: XProtocol.hh:857
Definition: XProtocol.hh:952
XSecCrypto
Definition: XProtocol.hh:676
kXR_char secopt
Definition: XProtocol.hh:1017
kXR_int32 rlen
Definition: XProtocol.hh:463
kXR_char reserved[8]
Definition: XProtocol.hh:301
kXR_int32 actnum
Definition: XProtocol.hh:1325
Definition: XProtocol.hh:542
char respdata[4096]
Definition: XProtocol.hh:892
static int mapError(int rc)
Definition: XProtocol.hh:1243
kXR_char reserved[3]
Definition: XProtocol.hh:756
Definition: XProtocol.hh:480
kXR_unt16 requestid
Definition: XProtocol.hh:312
Definition: XProtocol.hh:709
kXR_unt16 infotype
Definition: XProtocol.hh:582
kXR_char capver[1]
Definition: XProtocol.hh:359
XResponseType
Definition: XProtocol.hh:840
Definition: XProtocol.hh:1336
kXR_char substreamid
Definition: XProtocol.hh:915
Definition: XProtocol.hh:566
kXR_char reserved[14]
Definition: XProtocol.hh:185
Definition: XProtocol.hh:116
kXR_char streamid[2]
Definition: XProtocol.hh:765
kXR_int32 dlen
Definition: XProtocol.hh:769
kXR_int32 wsec
Definition: XProtocol.hh:1326
kXR_char streamid[2]
Definition: XProtocol.hh:195
kXR_char reserved[10]
Definition: XProtocol.hh:557
Definition: XProtocol.hh:526
kXR_char reserved[16]
Definition: XProtocol.hh:655
XQueryType
Definition: XProtocol.hh:565
Definition: XProtocol.hh:1324
Definition: XProtocol.hh:133
Definition: XProtocol.hh:1151
Definition: XProtocol.hh:348
kXR_int32 rlen
Definition: XProtocol.hh:598
kXR_int64 offset
Definition: XProtocol.hh:633
Definition: XProtocol.hh:528
Definition: XProtocol.hh:403
struct ServerResponseBody_Status bdy
Definition: XProtocol.hh:1153
Definition: XProtocol.hh:525
Definition: XProtocol.hh:237
kXR_char seclvl
Definition: XProtocol.hh:1018
ServerResponseBody_pgWrite pgwrite
Definition: XProtocol.hh:1189
kXR_unt16 requestid
Definition: XProtocol.hh:727
Definition: XProtocol.hh:950
kXR_int32 dlen
Definition: XProtocol.hh:599
static char * VVecRead(char *buffer, kXR_int32 &len)
Definition: XProtocol.hh:111
Definition: XProtocol.hh:112
kXR_int32 dlen
Definition: XProtocol.hh:488
ServerResponseBody_Login login
Definition: XProtocol.hh:1187
Definition: XProtocol.hh:976
kXR_unt16 requestid
Definition: XProtocol.hh:434
static char * NVecInsert(const char *name, char *buffer)
static const int kXR_pgRetry
Definition: XProtocol.hh:455
kXR_char streamid[2]
Definition: XProtocol.hh:172
kXR_unt16 requestid
Definition: XProtocol.hh:739
Definition: XProtocol.hh:467
kXR_char reserved[9]
Definition: XProtocol.hh:259
kXR_char reserved1[2]
Definition: XProtocol.hh:583
kXR_char version
Definition: XProtocol.hh:696
Definition: XProtocol.hh:850
kXR_int32 dlen
Definition: XProtocol.hh:668
kXR_int32 dlen
Definition: XProtocol.hh:656
kXR_char reserved2[8]
Definition: XProtocol.hh:585
Definition: XProtocol.hh:247
kXR_unt16 requestid
Definition: XProtocol.hh:654
Definition: XProtocol.hh:346
Definition: XProtocol.hh:1117
ServerResponseBody_Error error
Definition: XProtocol.hh:1186
Definition: XProtocol.hh:159
kXR_int32 fourth
Definition: XProtocol.hh:86
kXR_int32 wlen
Definition: XProtocol.hh:779
kXR_int32 dlen
Definition: XProtocol.hh:558
kXR_int64 offset
Definition: XProtocol.hh:987
Definition: XProtocol.hh:427
Definition: XProtocol.hh:1113
Definition: XProtocol.hh:126
XLoginVersion
Definition: XProtocol.hh:343
Definition: XProtocol.hh:940
Definition: XProtocol.hh:122
kXR_char cptype[4]
Definition: XProtocol.hh:979
Definition: XProtocol.hh:750
char host[4096]
Definition: XProtocol.hh:1101
Definition: XProtocol.hh:603
kXR_char reserved[15]
Definition: XProtocol.hh:768
unsigned long long kXR_unt64
Definition: XPtypes.hh:99
kXR_int32 rlen
Definition: XProtocol.hh:632
Definition: XProtocol.hh:579
Definition: XProtocol.hh:947
kXR_int32 errnum
Definition: XProtocol.hh:959
Definition: XProtocol.hh:114
kXR_int32 dlen
Definition: XProtocol.hh:586
kXR_char reserved[4]
Definition: XProtocol.hh:742
Definition: XProtocol.hh:347
kXR_char streamID[2]
Definition: XProtocol.hh:1128
kXR_char options
Definition: XProtocol.hh:553
Definition: XProtocol.hh:519
Definition: XProtocol.hh:1347
kXR_char reqindx
Definition: XProtocol.hh:1009
ServerResponseSVec_Protocol secvec
Definition: XProtocol.hh:1020
kXR_int32 ServerResponseType
Definition: XProtocol.hh:1353
Definition: XProtocol.hh:677
kXR_char reserved[13]
Definition: XProtocol.hh:377
Definition: XProtocol.hh:967
Definition: XProtocol.hh:1112
Definition: XProtocol.hh:402
char chkszreq[25-sizeof(ClientRequest)]
Definition: XProtocol.hh:1197
kXR_char streamid[2]
Definition: XProtocol.hh:738
Definition: XProtocol.hh:118
Definition: XProtocol.hh:928
kXR_char streamid[2]
Definition: XProtocol.hh:387
kXR_char streamid[2]
Definition: XProtocol.hh:224
kXR_char options
Definition: XProtocol.hh:767
Definition: XProtocol.hh:404
Definition: XProtocol.hh:458
kXR_int32 second
Definition: XProtocol.hh:84
Definition: XProtocol.hh:845
kXR_char streamid[2]
Definition: XProtocol.hh:374
Definition: XProtocol.hh:679
Definition: XProtocol.hh:208
Definition: XProtocol.hh:843
kXR_char streamid[2]
Definition: XProtocol.hh:183
char data[4096]
Definition: XProtocol.hh:864
#define write(a, b, c)
Definition: XrdPosix.hh:110
kXR_int32 dlen
Definition: XProtocol.hh:1132
kXR_char pathid
Definition: XProtocol.hh:604
kXR_int32 dlen
Definition: XProtocol.hh:303
Definition: XProtocol.hh:207
kXR_unt16 requestid
Definition: XProtocol.hh:665
kXR_int32 msglen
Definition: XProtocol.hh:93
Definition: XProtocol.hh:574
kXR_unt16 requestid
Definition: XProtocol.hh:621
Definition: XProtocol.hh:325
kXR_unt32 crc32c
Definition: XProtocol.hh:1127
char respdata[4096]
Definition: XProtocol.hh:899
kXR_char fhandle[4]
Definition: XProtocol.hh:596
Definition: XProtocol.hh:822
kXR_char reserved[12]
Definition: XProtocol.hh:162
kXR_int64 offset
Definition: XProtocol.hh:597
Definition: XProtocol.hh:428
Definition: XProtocol.hh:725
Definition: XProtocol.hh:576
kXR_int32 port
Definition: XProtocol.hh:1332
kXR_unt16 requestid
Definition: XProtocol.hh:752
Definition: XProtocol.hh:424
Definition: XProtocol.hh:1237
Definition: XProtocol.hh:888
Definition: XProtocol.hh:110
Definition: XProtocol.hh:949
Definition: XProtocol.hh:400
kXR_int32 cpsize
Definition: XProtocol.hh:978
XErrorCode
Definition: XProtocol.hh:922
Definition: XProtocol.hh:1197
kXR_int32 dlen
Definition: XProtocol.hh:260
Definition: XProtocol.hh:211
kXR_char streamid[2]
Definition: XProtocol.hh:653
Definition: XProtocol.hh:524
kXR_int32 dlen
Definition: XProtocol.hh:152
Definition: XProtocol.hh:1346
Definition: XProtocol.hh:1111
Definition: XProtocol.hh:914
kXR_unt16 requestid
Definition: XProtocol.hh:184
Definition: XProtocol.hh:847
XLoginCapVer
Definition: XProtocol.hh:335
Definition: XProtocol.hh:930
kXR_int64 offset
Definition: XProtocol.hh:996
Definition: XProtocol.hh:941
ServerResponseBody_Protocol protocol
Definition: XProtocol.hh:1190
kXR_int64 offset
Definition: XProtocol.hh:484
Definition: XProtocol.hh:345
kXR_char streamid[2]
Definition: XProtocol.hh:713
static const int kXR_pgPageSZ
Definition: XProtocol.hh:449
Definition: XProtocol.hh:1126
Definition: XProtocol.hh:113
Definition: XProtocol.hh:663
Definition: XProtocol.hh:326
kXR_unt16 requestid
Definition: XProtocol.hh:498
XSecVersion
Definition: XProtocol.hh:688
Definition: XProtocol.hh:684
static const int aData
Definition: XProtocol.hh:265
kXR_char reserved[15]
Definition: XProtocol.hh:666
kXR_unt16 mode
Definition: XProtocol.hh:378
kXR_int32 pval
Definition: XProtocol.hh:1084
Definition: XProtocol.hh:575
Definition: XProtocol.hh:241
kXR_int32 dlen
Definition: XProtocol.hh:500
XSecFlags
Definition: XProtocol.hh:683
kXR_unt16 expectrid
Definition: XProtocol.hh:695
Definition: XProtocol.hh:844
kXR_char fhandle[4]
Definition: XProtocol.hh:631
Definition: XProtocol.hh:352
Definition: XProtocol.hh:386
Definition: XProtocol.hh:131
ServerResponseBody_Redirect redirect
Definition: XProtocol.hh:1191
Definition: XProtocol.hh:570
Definition: XProtocol.hh:138
Definition: XProtocol.hh:125
kXR_char requestid
Definition: XProtocol.hh:1129
kXR_int32 dlen
Definition: XProtocol.hh:361
Definition: XProtocol.hh:879
kXR_char streamid[2]
Definition: XProtocol.hh:693
kXR_int32 dlen
Definition: XProtocol.hh:315
Definition: XProtocol.hh:945
kXR_char body[16]
Definition: XProtocol.hh:151
kXR_char reserved[4]
Definition: XProtocol.hh:1131
Definition: XProtocol.hh:141
Definition: XProtocol.hh:119
Definition: XProtocol.hh:182
kXR_char secver
Definition: XProtocol.hh:1016
Definition: XProtocol.hh:127
unsigned int kXR_unt32
Definition: XPtypes.hh:90
kXR_char streamid[2]
Definition: XProtocol.hh:726
Definition: XProtocol.hh:349
Definition: XProtocol.hh:1177
kXR_int32 dlen
Definition: XProtocol.hh:701
kXR_char reserved[12]
Definition: XProtocol.hh:198
kXR_int64 offset
Definition: XProtocol.hh:741
kXR_char reserved[12]
Definition: XProtocol.hh:437
kXR_int32 flags
Definition: XProtocol.hh:1085
Definition: XProtocol.hh:1169
kXR_unt16 requestid
Definition: XProtocol.hh:581
kXR_char streamid[2]
Definition: XProtocol.hh:620
Definition: XProtocol.hh:148
Definition: XProtocol.hh:630
kXR_int32 actnum
Definition: XProtocol.hh:1331
Definition: XProtocol.hh:855
static char * VVecInsert(const char *value, char *buffer)
RespType
Definition: XProtocol.hh:1139
Definition: XProtocol.hh:842
kXR_char reserved[10]
Definition: XProtocol.hh:513
Definition: XProtocol.hh:447
Definition: XProtocol.hh:415
Definition: XProtocol.hh:401
kXR_char secvsz
Definition: XProtocol.hh:1019
kXR_unt16 requestid
Definition: XProtocol.hh:375
Definition: XProtocol.hh:328
Definition: XProtocol.hh:408
Definition: XProtocol.hh:1008
kXR_char options
Definition: XProtocol.hh:715
RequestFlags
Definition: XProtocol.hh:516
kXR_char fhandle[4]
Definition: XProtocol.hh:610
Definition: XProtocol.hh:418
Definition: XProtocol.hh:938
Definition: XProtocol.hh:873
Definition: XProtocol.hh:925
kXR_int32 fifth
Definition: XProtocol.hh:87
kXR_unt16 requestid
Definition: XProtocol.hh:482
xfaLimits
Definition: XProtocol.hh:246
XLoginAbility
Definition: XProtocol.hh:323
char parms[4096]
Definition: XProtocol.hh:885
Definition: XProtocol.hh:297
kXR_int32 dlen
Definition: XProtocol.hh:438
Definition: XProtocol.hh:545
kXR_unt16 requestid
Definition: XProtocol.hh:161
kXR_char reserved[2]
Definition: XProtocol.hh:487
Definition: XProtocol.hh:330
kXR_int32 dlen
Definition: XProtocol.hh:743
Definition: XProtocol.hh:413
ServerResponseReqs_Protocol secreq
Definition: XProtocol.hh:1086
kXR_char reserved[14]
Definition: XProtocol.hh:389
Definition: XProtocol.hh:370
Definition: XProtocol.hh:423
Definition: XProtocol.hh:955
ServerResponseHeader resphdr
Definition: XProtocol.hh:898
Definition: XProtocol.hh:641
Definition: XProtocol.hh:951
Definition: XProtocol.hh:874
struct ServerResponseHeader hdr
Definition: XProtocol.hh:1152
XRequestTypes
Definition: XProtocol.hh:109
Definition: XProtocol.hh:567
#define stat(a, b)
Definition: XrdPosix.hh:96
kXR_char streamid[2]
Definition: XProtocol.hh:497
kXR_int32 first
Definition: XProtocol.hh:83
kXR_char reqsreq
Definition: XProtocol.hh:1010
Definition: XProtocol.hh:518
Definition: XProtocol.hh:137
kXR_char reserved[15]
Definition: XProtocol.hh:214
kXR_char fhandle[4]
Definition: XProtocol.hh:778
Definition: XProtocol.hh:934
kXR_int32 dlen
Definition: XProtocol.hh:391
kXR_char streamid[2]
Definition: XProtocol.hh:594
kXR_int32 dlen
Definition: XProtocol.hh:858
Definition: XProtocol.hh:877
static const char * reqName(kXR_unt16 reqCode)
Definition: XProtocol.hh:935
Definition: XProtocol.hh:593
kXR_char streamid[2]
Definition: XProtocol.hh:580
Definition: XProtocol.hh:1349
Definition: XProtocol.hh:223
kXR_char sec[4096]
Definition: XProtocol.hh:969
kXR_char streamid[2]
Definition: XProtocol.hh:459
kXR_char theTag
Definition: XProtocol.hh:1014
kXR_int32 seconds
Definition: XProtocol.hh:1170
Definition: XProtocol.hh:540
Definition: XProtocol.hh:128
kXR_char reserved2
Definition: XProtocol.hh:360
kXR_char streamid[2]
Definition: XProtocol.hh:253
static const int isNew
Definition: XProtocol.hh:264
Definition: XProtocol.hh:331
#define close(a)
Definition: XrdPosix.hh:43
XPrepRequestOption
Definition: XProtocol.hh:537
kXR_int64 offset
Definition: XProtocol.hh:780
kXR_char flags
Definition: XProtocol.hh:511
kXR_char streamid[2]
Definition: XProtocol.hh:551
Definition: XProtocol.hh:538
Definition: XProtocol.hh:929
kXR_char modifier
Definition: XProtocol.hh:667
kXR_char streamid[2]
Definition: XProtocol.hh:353
Definition: XProtocol.hh:412
Definition: XProtocol.hh:872
kXR_char streamid[2]
Definition: XProtocol.hh:149
Definition: XProtocol.hh:544
Definition: XProtocol.hh:1160
Definition: XProtocol.hh:425
XActionCode
Definition: XProtocol.hh:871
kXR_char streamid[2]
Definition: XProtocol.hh:433
kXR_int32 dlen
Definition: XProtocol.hh:730
static const int kXR_statusBodyLen
Definition: XProtocol.hh:1148
Definition: XProtocol.hh:619
kXR_int64 offset
Definition: XProtocol.hh:462
kXR_char pathid
Definition: XProtocol.hh:485
Definition: XProtocol.hh:547
kXR_char streamid[2]
Definition: XProtocol.hh:311
Definition: XProtocol.hh:329
kXR_char reserved[14]
Definition: XProtocol.hh:314
Definition: XProtocol.hh:1344
Definition: XProtocol.hh:117
Definition: XProtocol.hh:115
Definition: XProtocol.hh:848
XOpenRequestOption
Definition: XProtocol.hh:411
#define open
Definition: XrdPosix.hh:71
kXR_char resptype
Definition: XProtocol.hh:1130
Definition: XProtocol.hh:142
Definition: XProtocol.hh:249
Definition: XProtocol.hh:875
ServerResponseBody_Attn attn
Definition: XProtocol.hh:1182
kXR_char fhandle[4]
Definition: XProtocol.hh:255
Definition: XProtocol.hh:426
kXR_char fhandle[4]
Definition: XProtocol.hh:197
XDirlistRequestOption
Definition: XProtocol.hh:206
int kXR_int32
Definition: XPtypes.hh:89
Definition: XProtocol.hh:419
Definition: XProtocol.hh:82
ServerResponseHeader hdr
Definition: XProtocol.hh:1179
Definition: XProtocol.hh:569
kXR_int32 actnum
Definition: XProtocol.hh:896
kXR_char fhandle[4]
Definition: XProtocol.hh:483
Definition: XProtocol.hh:995
kXR_char reserved[11]
Definition: XProtocol.hh:716
kXR_unt16 requestid
Definition: XProtocol.hh:173
kXR_int32 dlen
Definition: XProtocol.hh:175
kXR_unt16 mode
Definition: XProtocol.hh:435
Definition: XProtocol.hh:240
kXR_int32 dlen
Definition: XProtocol.hh:718
kXR_char numattr
Definition: XProtocol.hh:257
Definition: XProtocol.hh:429
Definition: XProtocol.hh:936
static char * NVecRead(char *buffer, kXR_unt16 &rc)
Definition: XProtocol.hh:140
kXR_int32 protover
Definition: XProtocol.hh:94
kXR_int32 dlen
Definition: XProtocol.hh:227
Definition: XProtocol.hh:788
kXR_char reserved[12]
Definition: XProtocol.hh:729
kXR_unt16 requestid
Definition: XProtocol.hh:766
#define read(a, b, c)
Definition: XrdPosix.hh:77
kXR_int32 buffsz
Definition: XProtocol.hh:302
Definition: XProtocol.hh:712
Definition: XProtocol.hh:92
Definition: XProtocol.hh:248
Definition: XProtocol.hh:932
Definition: XProtocol.hh:933
Definition: XProtocol.hh:421
Definition: XProtocol.hh:239
Definition: XProtocol.hh:958
ServerResponseBody_Buffer buffer
Definition: XProtocol.hh:1185
Definition: XProtocol.hh:517
char errmsg[4096]
Definition: XProtocol.hh:960
kXR_char rsvd2[3]
Definition: XProtocol.hh:700
kXR_char subcode
Definition: XProtocol.hh:256
kXR_char options[1]
Definition: XProtocol.hh:215
Definition: XProtocol.hh:946
kXR_char options
Definition: XProtocol.hh:258
kXR_unt16 port
Definition: XProtocol.hh:555
Definition: XProtocol.hh:238
kXR_char pathid
Definition: XProtocol.hh:755
Definition: XProtocol.hh:529
Definition: XProtocol.hh:942
kXR_int32 msec
Definition: XProtocol.hh:1327
ServerResponseHeader resphdr
Definition: XProtocol.hh:891
kXR_int32 dlen
Definition: XProtocol.hh:464
XStatRespFlags
Definition: XProtocol.hh:1110
kXR_unt16 requestid
Definition: XProtocol.hh:552
kXR_int32 dlen
Definition: XProtocol.hh:379
kXR_char reserved
Definition: XProtocol.hh:357
static const int kXR_pgUnitSZ
Definition: XProtocol.hh:450
Definition: XProtocol.hh:134
kXR_int32 wsec
Definition: XProtocol.hh:1338
kXR_char reserved[15]
Definition: XProtocol.hh:622
#define mkdir(a, b)
Definition: XrdPosix.hh:69
Definition: XProtocol.hh:943
Definition: XProtocol.hh:422
Definition: XProtocol.hh:124
kXR_char reqflags
Definition: XProtocol.hh:469
kXR_int32 seconds
Definition: XProtocol.hh:1161
Definition: XProtocol.hh:849
Definition: XProtocol.hh:939
Definition: XProtocol.hh:252
long long kXR_int64
Definition: XPtypes.hh:98
Definition: XProtocol.hh:568
kXR_char crypto
Definition: XProtocol.hh:699
kXR_int32 actnum
Definition: XProtocol.hh:884
Definition: XProtocol.hh:414
kXR_int32 dlen
Definition: XProtocol.hh:164
XStatRequestOption
Definition: XProtocol.hh:708
#define rmdir(a)
Definition: XrdPosix.hh:92
Definition: XProtocol.hh:136
Definition: XProtocol.hh:692
kXR_unt16 requestid
Definition: XProtocol.hh:254
kXR_unt16 mode
Definition: XProtocol.hh:186
kXR_int32 dlen
Definition: XProtocol.hh:199
Definition: XProtocol.hh:737
kXR_char sessid[16]
Definition: XProtocol.hh:968
Definition: XProtocol.hh:883
static int toErrno(int xerr)
Definition: XProtocol.hh:1278
char chkszrsp[9-sizeof(ServerResponseHeader)]
Definition: XProtocol.hh:1198
kXR_char fhandle[4]
Definition: XProtocol.hh:717
Definition: XProtocol.hh:876
kXR_unt16 options
Definition: XProtocol.hh:313
Definition: XProtocol.hh:373
Definition: XProtocol.hh:135
ServerResponseBody_Authmore authmore
Definition: XProtocol.hh:1183
#define readv(a, b, c)
Definition: XrdPosix.hh:79
Definition: XProtocol.hh:523
Definition: XProtocol.hh:1114
kXR_char fhandle[4]
Definition: XProtocol.hh:740
short kXR_int16
Definition: XPtypes.hh:66
Definition: XProtocol.hh:1099
union ServerResponse::@0 body
kXR_unt16 requestid
Definition: XProtocol.hh:643
Definition: XProtocol.hh:986
Definition: XProtocol.hh:764
kXR_char fhandle[4]
Definition: XProtocol.hh:584
Definition: XProtocol.hh:777
Definition: XProtocol.hh:139
kXR_int32 clientpv
Definition: XProtocol.hh:510