ROOT
6.06/09
Reference Guide
|
#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"
Go to the source code of this file.
Namespaces | |
ROOT | |
Namespace for new ROOT classes and functions. | |
Functions | |
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 | SrvAuthCleanup (TSeqCollection *sls) |
static Int_t | SrvSetVars (string confdir) |
Set relevant environment variables. More... | |
void | Err (int level, const char *msg, int size) |
void | ErrFatal (int level, const char *msg, int size) |
void | ErrSys (int level, const char *msg, int size) |
Int_t | SrvClupImpl (TSeqCollection *secls) |
Wrapper to cleanup code. More... | |
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... | |
void | ROOT::SrvSetSocket (TSocket *Socket) |
Fill socket parameters. More... | |
static int | ROOT::Recvn (int sock, void *buffer, int length) |
Receive exactly length bytes into buffer. More... | |
void | ROOT::NetClose () |
Empty call, for consistency. 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::NetGetRemoteHost (std::string &openhost) |
Return name of connected host. More... | |
int | ROOT::GetErrno () |
return errno More... | |
void | ROOT::ResetErrno () |
reset errno More... | |
void | ROOT::Perror (char *buf, int size) |
Return in buf the message belonging to errno. More... | |
void | ROOT::ErrorInfo (const char *va_(fmt),...) |
Formats a string in a circular formatting buffer and prints the string. More... | |
void | ROOT::Error (ErrorHandler_t func, int code, const char *va_(fmt),...) |
Write error message and call a handler, if required. More... | |
Variables | |
static TSocket * | gSocket |
static Int_t | gSrvProtocol = 1 |
static EService | gService = kSOCKD |
static Int_t | gReuseAllow = 0x1F |
static int | ROOT::gSockFd = -1 |
void Err | ( | int | level, |
const char * | msg, | ||
int | size | ||
) |
Definition at line 176 of file DaemonUtils.cxx.
Referenced by TMVA::PDF::SmoothHistogram(), and SrvAuthImpl().
void ErrFatal | ( | int | level, |
const char * | msg, | ||
int | size | ||
) |
Definition at line 184 of file DaemonUtils.cxx.
Referenced by ErrSys(), and SrvAuthImpl().
void ErrSys | ( | int | level, |
const char * | msg, | ||
int | size | ||
) |
Definition at line 192 of file DaemonUtils.cxx.
Referenced by SrvAuthImpl().
Int_t SrvAuthCleanup | ( | TSeqCollection * | sls | ) |
Definition at line 86 of file DaemonUtils.cxx.
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.
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 222 of file DaemonUtils.cxx.
Referenced by SrvAuthenticate().
Int_t SrvClupImpl | ( | TSeqCollection * | secls | ) |
Wrapper to cleanup code.
Definition at line 201 of file DaemonUtils.cxx.
Referenced by SrvAuthCleanup().
|
static |
Set relevant environment variables.
Definition at line 94 of file DaemonUtils.cxx.
Referenced by SrvAuthImpl().
|
static |
Definition at line 71 of file DaemonUtils.cxx.
Referenced by SrvAuthImpl().
|
static |
Definition at line 70 of file DaemonUtils.cxx.
Referenced by SrvAuthImpl().
|
static |
Definition at line 64 of file DaemonUtils.cxx.
|
static |
Definition at line 69 of file DaemonUtils.cxx.
Referenced by SrvAuthImpl().