XRootD
Loading...
Searching...
No Matches
ClientFattrRequest Struct Reference

#include <XProtocol.hh>

Collaboration diagram for ClientFattrRequest:

Static Public Member Functions

static char * NVecInsert (const char *name, char *buffer)
static char * NVecRead (char *buffer, char *&name)
static char * NVecRead (char *buffer, kXR_unt16 &rc)
static char * VVecInsert (const char *value, char *buffer)
static char * VVecRead (char *buffer, kXR_int32 &len)
static char * VVecRead (char *buffer, kXR_int32 len, char *&value)

Public Attributes

kXR_int32 dlen
kXR_char fhandle [4]
kXR_char numattr
kXR_char options
kXR_unt16 requestid
kXR_char reserved [9]
kXR_char streamid [2]
kXR_char subcode

Static Public Attributes

static const int aData = 0x10
static const int isNew = 0x01

Detailed Description

Definition at line 285 of file XProtocol.hh.

Member Function Documentation

◆ NVecInsert()

char * ClientFattrRequest::NVecInsert ( const char * name,
char * buffer )
static

Definition at line 172 of file XProtocol.cc.

173{
174 // set rc to 0
175 memset( buffer, 0, sizeof( kXR_unt16 ) );
176 buffer += sizeof( kXR_unt16 );
177 // copy attribute name including trailing null
178 size_t len = strlen( name );
179 memcpy( buffer, name, len + 1 );
180 buffer += len + 1;
181
182 // return memory that comes right after newly inserted nvec record
183 return buffer;
184}
unsigned short kXR_unt16
Definition XPtypes.hh:67

Referenced by XrdCl::MessageUtils::CreateXAttrVec(), and XrdCl::MessageUtils::CreateXAttrVec().

Here is the caller graph for this function:

◆ NVecRead() [1/2]

char * ClientFattrRequest::NVecRead ( char * buffer,
char *& name )
static

Definition at line 215 of file XProtocol.cc.

216{
217 name = strdup( buffer );
218 buffer += strlen( name ) + 1;
219 return buffer;
220}

◆ NVecRead() [2/2]

char * ClientFattrRequest::NVecRead ( char * buffer,
kXR_unt16 & rc )
static

Definition at line 205 of file XProtocol.cc.

206 {
207 memcpy(&rc, buffer, sizeof(kXR_unt16));
208 rc = htons( rc );
209 buffer += sizeof( kXR_unt16 );
210 return buffer;
211 }

◆ VVecInsert()

char * ClientFattrRequest::VVecInsert ( const char * value,
char * buffer )
static

Definition at line 188 of file XProtocol.cc.

189{
190 // copy value size
191 kXR_int32 len = strlen( value );
192 kXR_int32 lendat = htonl( len );
193 memcpy( buffer, &lendat, sizeof( kXR_int32 ) );
194 buffer += sizeof( kXR_int32 );
195 // copy value itself
196 memcpy( buffer, value, len );
197 buffer += len;
198
199 // return memory that comes right after newly inserted vvec entry
200 return buffer;
201}
int kXR_int32
Definition XPtypes.hh:89

Referenced by XrdCl::MessageUtils::CreateXAttrVec().

Here is the caller graph for this function:

◆ VVecRead() [1/2]

char * ClientFattrRequest::VVecRead ( char * buffer,
kXR_int32 & len )
static

Definition at line 224 of file XProtocol.cc.

225{
226 memcpy(&len, buffer, sizeof(kXR_int32));
227 len = htonl( len );
228 buffer += sizeof( kXR_int32 );
229 return buffer;
230}

◆ VVecRead() [2/2]

char * ClientFattrRequest::VVecRead ( char * buffer,
kXR_int32 len,
char *& value )
static

Definition at line 234 of file XProtocol.cc.

235{
236 value = reinterpret_cast<char*>( malloc( len + 1 ) );
237 strncpy( value, buffer, len );
238 value[len] = 0;
239 buffer += len;
240 return buffer;
241}

Member Data Documentation

◆ aData

const int ClientFattrRequest::aData = 0x10
static

◆ dlen

kXR_int32 ClientFattrRequest::dlen

Definition at line 293 of file XProtocol.hh.

Referenced by XrdCl::LocalFileHandler::ExecRequest().

◆ fhandle

kXR_char ClientFattrRequest::fhandle[4]

Definition at line 288 of file XProtocol.hh.

◆ isNew

const int ClientFattrRequest::isNew = 0x01
static

Definition at line 297 of file XProtocol.hh.

◆ numattr

kXR_char ClientFattrRequest::numattr

Definition at line 290 of file XProtocol.hh.

Referenced by XrdCl::LocalFileHandler::ExecRequest().

◆ options

kXR_char ClientFattrRequest::options

Definition at line 291 of file XProtocol.hh.

◆ requestid

kXR_unt16 ClientFattrRequest::requestid

Definition at line 287 of file XProtocol.hh.

◆ reserved

kXR_char ClientFattrRequest::reserved[9]

Definition at line 292 of file XProtocol.hh.

◆ streamid

kXR_char ClientFattrRequest::streamid[2]

Definition at line 286 of file XProtocol.hh.

◆ subcode

kXR_char ClientFattrRequest::subcode

Definition at line 289 of file XProtocol.hh.

Referenced by XrdCl::LocalFileHandler::ExecRequest().


The documentation for this struct was generated from the following files: