xrootd
XrdCmsLogin.hh
Go to the documentation of this file.
1 #ifndef __CMS_LOGIN_H__
2 #define __CMS_LOGIN_H__
3 /******************************************************************************/
4 /* */
5 /* X r d C m s L o g i n . h h */
6 /* */
7 /* (c) 2007 by the Board of Trustees of the Leland Stanford, Jr., University */
8 /* All Rights Reserved */
9 /* Produced by Andrew Hanushevsky for Stanford University under contract */
10 /* DE-AC02-76-SFO0515 with the Department of Energy */
11 /******************************************************************************/
12 
13 // $Id$
14 
15 #include <sys/uio.h>
16 
17 #include "XProtocol/XPtypes.hh"
18 #include "XProtocol/YProtocol.hh"
19 
20 class XrdLink;
21 
23 {
24 public:
25 
26  int Admit(XrdLink *Link, XrdCms::CmsLoginData &Data);
27 
28 static int Login(XrdLink *Link, XrdCms::CmsLoginData &Data, int timeout=-1);
29 
30  XrdCmsLogin(char *Buff = 0, int Blen = 0) {myBuff = Buff; myBlen = Blen;}
31 
33 
34 private:
35 
36 static int Authenticate(XrdLink *Link, XrdCms::CmsLoginData &Data);
37 static int Emsg(XrdLink *, const char *, int ecode=XrdCms::kYR_EINVAL);
38 static int sendData(XrdLink *Link, XrdCms::CmsLoginData &Data);
39 
40  char *myBuff;
41  int myBlen;
42 };
43 #endif