XRootD
XrdSecProtParm Class Reference
+ Collaboration diagram for XrdSecProtParm:

Public Member Functions

 XrdSecProtParm (XrdSysError *erp, const char *cid)
 
 ~XrdSecProtParm ()
 
void Add ()
 
int Cat (char *token)
 
int Insert (char oct)
 
int isProto (char *proto)
 
char * Result (int &size)
 
void setProt (char *pid)
 

Static Public Member Functions

static XrdSecProtParmFind (char *pid, int remove=0)
 

Public Attributes

XrdSecProtParmNext
 
char ProtoID [XrdSecPROTOIDSIZE+1]
 

Static Public Attributes

static XrdSecProtParmFirst = 0
 

Detailed Description

Definition at line 185 of file XrdSecServer.cc.

Constructor & Destructor Documentation

◆ XrdSecProtParm()

XrdSecProtParm::XrdSecProtParm ( XrdSysError erp,
const char *  cid 
)
inline

Definition at line 208 of file XrdSecServer.cc.

208  : who(cid)
209  {*ProtoID = '\0';
210  bsize = 4096;
211  buff = (char *)malloc(bsize);
212  *buff = '\0';
213  bp = buff;
214  eDest = erp;
215  Next = 0;
216  }
char ProtoID[XrdSecPROTOIDSIZE+1]
XrdSecProtParm * Next

References Next, and ProtoID.

◆ ~XrdSecProtParm()

XrdSecProtParm::~XrdSecProtParm ( )
inline

Definition at line 217 of file XrdSecServer.cc.

217 {free(buff);}

Member Function Documentation

◆ Add()

void XrdSecProtParm::Add ( )
inline

Definition at line 189 of file XrdSecServer.cc.

189 {Next = First; First = this;}
static XrdSecProtParm * First

References First, and Next.

◆ Cat()

int XrdSecProtParm::Cat ( char *  token)

Definition at line 233 of file XrdSecServer.cc.

234 {
235  int alen;
236  alen = strlen(token);
237  if (alen+1 > bsize-(bp-buff))
238  {eDest->Emsg("Config",who,ProtoID,"argument string too long");
239  return 0;
240  }
241  *bp++ = ' ';
242  strcpy(bp, token);
243  bp += alen;
244  return 1;
245 }
int Emsg(const char *esfx, int ecode, const char *text1, const char *text2=0)
Definition: XrdSysError.cc:95

References XrdSysError::Emsg(), and ProtoID.

+ Here is the call graph for this function:

◆ Find()

XrdSecProtParm * XrdSecProtParm::Find ( char *  pid,
int  remove = 0 
)
static

Definition at line 251 of file XrdSecServer.cc.

252 {
253  XrdSecProtParm *mp, *pp;
254 
255  mp = 0; pp = First;
256  while(pp && !pp->isProto(pid)){mp = pp; pp = pp->Next;}
257  if (pp && remove)
258  {if (mp) mp->Next = pp->Next;
259  else First = pp->Next;
260  }
261  return pp;
262 }
int isProto(char *proto)

References First, isProto(), and Next.

+ Here is the call graph for this function:

◆ Insert()

int XrdSecProtParm::Insert ( char  oct)

Definition at line 268 of file XrdSecServer.cc.

269 {
270  if (bsize-(bp-buff) < 1)
271  {eDest->Emsg("Config",who,ProtoID,"argument string too long");
272  return 0;
273  }
274  *bp++ = oct;
275  return 1;
276 }
@ oct
Definition: XrdSysTrace.hh:42

References XrdSysError::Emsg(), Xrd::oct, and ProtoID.

+ Here is the call graph for this function:

◆ isProto()

int XrdSecProtParm::isProto ( char *  proto)
inline

Definition at line 197 of file XrdSecServer.cc.

197 {return !strcmp(ProtoID, proto);}

References ProtoID.

Referenced by Find().

+ Here is the caller graph for this function:

◆ Result()

char* XrdSecProtParm::Result ( int &  size)
inline

Definition at line 199 of file XrdSecServer.cc.

199 {size = bp-buff; return buff;}

◆ setProt()

void XrdSecProtParm::setProt ( char *  pid)
inline

Definition at line 201 of file XrdSecServer.cc.

201 {strcpy(ProtoID, pid);}

References ProtoID.

Member Data Documentation

◆ First

XrdSecProtParm * XrdSecProtParm::First = 0
static

Definition at line 203 of file XrdSecServer.cc.

Referenced by Add(), and Find().

◆ Next

XrdSecProtParm* XrdSecProtParm::Next

Definition at line 204 of file XrdSecServer.cc.

Referenced by XrdSecProtParm(), Add(), and Find().

◆ ProtoID

char XrdSecProtParm::ProtoID[XrdSecPROTOIDSIZE+1]

Definition at line 206 of file XrdSecServer.cc.

Referenced by XrdSecProtParm(), Cat(), Insert(), isProto(), and setProt().


The documentation for this class was generated from the following file: