xrootd
XrdClientProtocol.hh
Go to the documentation of this file.
00001 #ifndef XRD_CPROTOCOL_H
00002 #define XRD_CPROTOCOL_H
00003 /******************************************************************************/
00004 /*                                                                            */
00005 /*                X r d C l i e n t P r o t o c o l . h h                     */
00006 /*                                                                            */
00007 /* Author: Fabrizio Furano (INFN Padova, 2004)                                */
00008 /* Adapted from TXNetFile (root.cern.ch) originally done by                   */
00009 /*  Alvise Dorigo, Fabrizio Furano                                            */
00010 /*          INFN Padova, 2003                                                 */
00011 /*                                                                            */
00012 /* This file is part of the XRootD software suite.                            */
00013 /*                                                                            */
00014 /* XRootD is free software: you can redistribute it and/or modify it under    */
00015 /* the terms of the GNU Lesser General Public License as published by the     */
00016 /* Free Software Foundation, either version 3 of the License, or (at your     */
00017 /* option) any later version.                                                 */
00018 /*                                                                            */
00019 /* XRootD is distributed in the hope that it will be useful, but WITHOUT      */
00020 /* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or      */
00021 /* FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public       */
00022 /* License for more details.                                                  */
00023 /*                                                                            */
00024 /* You should have received a copy of the GNU Lesser General Public License   */
00025 /* along with XRootD in a file called COPYING.LESSER (LGPL license) and file  */
00026 /* COPYING (GPL license).  If not, see <http://www.gnu.org/licenses/>.        */
00027 /*                                                                            */
00028 /* The copyright holder's institutional names and contributor's names may not */
00029 /* be used to endorse or promote products derived from this software without  */
00030 /* specific prior written permission of the institution or contributor.       */
00031 /******************************************************************************/
00032 
00034 //                                                                      //
00035 // utility functions to deal with the protocol                          //
00036 //                                                                      //
00038 
00039 #include "XProtocol/XProtocol.hh"
00040 
00041 void clientMarshall(ClientRequest* str);
00042 void clientMarshallReadAheadList(readahead_list *buf_list, kXR_int32 dlen);
00043 void clientUnMarshallReadAheadList(readahead_list *buf_list, kXR_int32 dlen);
00044 void clientUnmarshall(struct ServerResponseHeader* str);
00045 
00046 void ServerResponseHeader2NetFmt(struct ServerResponseHeader *srh);
00047 void ServerInitHandShake2HostFmt(struct ServerInitHandShake *srh);
00048 
00049 bool isRedir(struct ServerResponseHeader *ServerResponse);
00050 
00051 char *convertRequestIdToChar(kXR_unt16 requestid);
00052 
00053 void PutFilehandleInRequest(ClientRequest* str, char *fHandle);
00054 
00055 char *convertRespStatusToChar(kXR_unt16 status);
00056 
00057 void smartPrintClientHeader(ClientRequest* hdr);
00058 void smartPrintServerHeader(struct ServerResponseHeader* hdr);
00059 
00060 #endif