Logo ROOT   6.14/05
Reference Guide
Namespaces | Functions | Variables
DaemonUtils.cxx File Reference
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <errno.h>
#include "Rtypes.h"
#include "Varargs.h"
#include "DaemonUtils.h"
#include "TAuthenticate.h"
#include "TSecContext.h"
#include "TEnv.h"
#include "TROOT.h"
Include dependency graph for DaemonUtils.cxx:

Namespaces

 ROOT
 Namespace for new ROOT classes and functions.
 

Functions

void Err (int level, const char *msg, int size)
 
void ErrFatal (int level, const char *msg, int size)
 
void ROOT::Error (ErrorHandler_t func, int code, const char *va_(fmt),...)
 Write error message and call a handler, if required. More...
 
void ROOT::ErrorInfo (const char *va_(fmt),...)
 Formats a string in a circular formatting buffer and prints the string. More...
 
void ErrSys (int level, const char *msg, int size)
 
int ROOT::GetErrno ()
 return errno More...
 
void ROOT::NetClose ()
 Empty call, for consistency. More...
 
void ROOT::NetGetRemoteHost (std::string &openhost)
 Return name of connected host. More...
 
int ROOT::NetGetSockFd ()
 return open socket descriptor More...
 
int ROOT::NetParOpen (int port, int size)
 Empty call, for consistency. More...
 
int ROOT::NetRecv (char *msg, int max)
 Receive a string of maximum length max. More...
 
int ROOT::NetRecv (char *msg, int len, EMessageTypes &kind)
 Receive a string of maximum len length. More...
 
int ROOT::NetRecv (void *&buf, int &len, EMessageTypes &kind)
 Receive a buffer. More...
 
int ROOT::NetRecvRaw (void *buf, int len)
 Receive a buffer of maximum len bytes. More...
 
int ROOT::NetRecvRaw (int sock, void *buf, int len)
 Receive a buffer of maximum len bytes from generic socket sock. More...
 
int ROOT::NetSend (int code, EMessageTypes kind)
 Send integer. Message will be of type "kind". More...
 
int ROOT::NetSend (const char *msg, EMessageTypes kind)
 Send a string. Message will be of type "kind". More...
 
int ROOT::NetSend (const void *buf, int len, EMessageTypes kind)
 Send buffer of len bytes. Message will be of type "kind". More...
 
int ROOT::NetSendAck ()
 Send acknowledge code. More...
 
int ROOT::NetSendError (ERootdErrors err)
 Send error code. More...
 
int ROOT::NetSendRaw (const void *buf, int len)
 Send buffer of len bytes. More...
 
void ROOT::Perror (char *buf, int size)
 Return in buf the message belonging to errno. More...
 
static int ROOT::Recvn (int sock, void *buffer, int length)
 Receive exactly length bytes into buffer. More...
 
void ROOT::ResetErrno ()
 reset errno More...
 
Int_t SrvAuthCleanup (TSeqCollection *sls)
 
Int_t SrvAuthenticate (TSocket *socket, const char *confdir, const char *tmpdir, string &user, Int_t &meth, Int_t &type, string &ctkn, TSeqCollection *secctxlist)
 
Int_t SrvAuthImpl (TSocket *socket, const char *confdir, const char *tmpdir, string &user, Int_t &meth, Int_t &type, string &ctoken, TSeqCollection *secctxlist)
 Server authentication code. More...
 
Int_t SrvClupImpl (TSeqCollection *secls)
 Wrapper to cleanup code. More...
 
void ROOT::SrvSetSocket (TSocket *Socket)
 Fill socket parameters. More...
 
static Int_t SrvSetVars (string)
 Set relevant environment variables. More...
 

Variables

static Int_t gReuseAllow = 0x1F
 
static EService gService = kSOCKD
 
static TSocketgSocket
 
static int ROOT::gSockFd = -1
 
static Int_t gSrvProtocol = 1
 

Function Documentation

◆ Err()

void Err ( int  level,
const char *  msg,
int  size 
)

Definition at line 164 of file DaemonUtils.cxx.

◆ ErrFatal()

void ErrFatal ( int  level,
const char *  msg,
int  size 
)

Definition at line 172 of file DaemonUtils.cxx.

◆ ErrSys()

void ErrSys ( int  level,
const char *  msg,
int  size 
)

Definition at line 180 of file DaemonUtils.cxx.

◆ SrvAuthCleanup()

Int_t SrvAuthCleanup ( TSeqCollection sls)

Definition at line 86 of file DaemonUtils.cxx.

◆ SrvAuthenticate()

Int_t SrvAuthenticate ( TSocket socket,
const char *  confdir,
const char *  tmpdir,
string &  user,
Int_t meth,
Int_t type,
string &  ctkn,
TSeqCollection secctxlist 
)

Definition at line 77 of file DaemonUtils.cxx.

◆ SrvAuthImpl()

Int_t SrvAuthImpl ( TSocket socket,
const char *  confdir,
const char *  tmpdir,
string &  user,
Int_t meth,
Int_t type,
string &  ctoken,
TSeqCollection secctxlist 
)

Server authentication code.

Returns 0 in case authentication failed 1 in case of success On success, returns authenticated username in user

Definition at line 210 of file DaemonUtils.cxx.

◆ SrvClupImpl()

Int_t SrvClupImpl ( TSeqCollection secls)

Wrapper to cleanup code.

Definition at line 189 of file DaemonUtils.cxx.

◆ SrvSetVars()

static Int_t SrvSetVars ( string  )
static

Set relevant environment variables.

Definition at line 94 of file DaemonUtils.cxx.

Variable Documentation

◆ gReuseAllow

Int_t gReuseAllow = 0x1F
static

Definition at line 71 of file DaemonUtils.cxx.

◆ gService

EService gService = kSOCKD
static

Definition at line 70 of file DaemonUtils.cxx.

◆ gSocket

TSocket* gSocket
static

Definition at line 64 of file DaemonUtils.cxx.

◆ gSrvProtocol

Int_t gSrvProtocol = 1
static

Definition at line 69 of file DaemonUtils.cxx.