12 #ifndef ROOT_DaemonUtils
13 #define ROOT_DaemonUtils
30 #ifndef ROOT_TSeqCollection
33 #ifndef ROOT_NetErrors
42 std::string &user,
Int_t &meth,
60 void Perror(
char *buf,
int size);
69 int RpdInitSession(
int, std::string &,
int &,
int &,
int &, std::string &);
70 void RpdInit(EService serv,
int pid,
int sproto,
71 unsigned int opts,
int rumsk,
int sshp,
72 const char *tmpd,
const char *asrpp,
int login = 0);
int NetSendError(ERootdErrors err)
Send error code.
int GetErrno()
return errno
void RpdSetMethInitFlag(int methinit)
Namespace for new ROOT classes and functions.
void Fatal(const char *location, const char *msgfmt,...)
int NetGetSockFd()
return open socket descriptor
int NetRecvRaw(void *buf, int len)
Receive a buffer of maximum len bytes.
void ErrorInfo(const char *va_(fmt),...)
Formats a string in a circular formatting buffer and prints the string.
int NetRecv(char *msg, int max)
Receive a string of maximum length max.
void RpdInit(EService serv, int pid, int sproto, unsigned int opts, int rumsk, int sshp, const char *tmpd, const char *asrpp, int login=0)
Int_t SrvClupImpl(TSeqCollection *)
Wrapper to cleanup code.
int NetSendRaw(const void *buf, int len)
Send buffer of len bytes.
Sequenceable collection abstract base class.
int RpdCleanupAuthTab(const char *crypttoken)
void SrvSetSocket(TSocket *Socket)
Fill socket parameters.
void RpdSetErrorHandler(ErrorHandler_t Err, ErrorHandler_t Sys, ErrorHandler_t Fatal)
void RpdAuthCleanup(const char *sstr, int opt)
void(* ErrorHandler_t)(int level, const char *msg, int size)
void ResetErrno()
reset errno
Int_t SrvAuthImpl(TSocket *socket, const char *, const char *, std::string &user, Int_t &meth, Int_t &type, std::string &ctoken, TSeqCollection *)
Server authentication code.
int NetSend(int code, EMessageTypes kind)
Send integer. Message will be of type "kind".
int NetParOpen(int port, int size)
Empty call, for consistency.
void NetGetRemoteHost(std::string &openhost)
Return name of connected host.
int NetSendAck()
Send acknowledge code.
static Vc_ALWAYS_INLINE int_v max(const int_v &x, const int_v &y)
void NetClose()
Empty call, for consistency.
typedef void((*Func_t)())
void Err(int level, const char *msg, int size)
void ErrorInit(const char *ident)
void Perror(char *buf, int size)
Return in buf the message belonging to errno.
int RpdInitSession(int, std::string &, int &, int &, int &, std::string &)
void Error(ErrorHandler_t func, int code, const char *va_(fmt),...)
Write error message and call a handler, if required.