XRootD
Loading...
Searching...
No Matches
XrdXrootdRedirPI Class Referenceabstract

#include <XrdXrootdRedirPI.hh>

+ Collaboration diagram for XrdXrootdRedirPI:

Public Member Functions

 XrdXrootdRedirPI ()
 Constructor and Destructor.
 
virtual ~XrdXrootdRedirPI ()
 
virtual std::string Redirect (const char *Target, uint16_t &port, const char *TCgi, XrdNetAddrInfo &TNetInfo, XrdNetAddrInfo &CNetInfo)=0
 
virtual std::string RedirectURL (const char *urlHead, const char *Target, const char *port, const char *urlTail, int &rdrOpts, XrdNetAddrInfo &TNetInfo, XrdNetAddrInfo &CNetInfo)
 

Detailed Description

Definition at line 39 of file XrdXrootdRedirPI.hh.

Constructor & Destructor Documentation

◆ XrdXrootdRedirPI()

XrdXrootdRedirPI::XrdXrootdRedirPI ( )
inline

Constructor and Destructor.

Definition at line 133 of file XrdXrootdRedirPI.hh.

133{}

◆ ~XrdXrootdRedirPI()

virtual XrdXrootdRedirPI::~XrdXrootdRedirPI ( )
inlinevirtual

Definition at line 134 of file XrdXrootdRedirPI.hh.

134{}

Member Function Documentation

◆ Redirect()

virtual std::string XrdXrootdRedirPI::Redirect ( const char * Target,
uint16_t & port,
const char * TCgi,
XrdNetAddrInfo & TNetInfo,
XrdNetAddrInfo & CNetInfo )
pure virtual

Return the actual host and port to be used for a redirection.

Parameters
Target- holds the current redirect target.The target can be a a hostname, IPv4, or bracketed IPv6 address.
port- is the numeric port the client will be using to connect to the target. It may be changed to another upon return (see return notes).
TCgi- Optional CGI information as noted in the redirect protocol specification (see note below). It may also be a null string.
TNetInfo- Network address information for the target.
CNetInfo- Network address information for the client being redirected.
Returns
string.size() > 0 and string.front() != '!': A new redirect target is being returned to use for the redirect. The target must also include any CGI information this is necessary (e.g. some or all from the TCgi parameter). The port argument also holds the port number that should be used. Leave it alone if the incommin port is correct. string.size() == 0: Use the original redirect target. string.size() > 0 and string.front() == '!': A fatal error has occured and an error message should be sent to the client. The error message text are the characters after the exclamation point.
Note
According to the protocol specification targets are of the form host[?[fcgi][?lcgi]] and when passed are separated and the Target sargument holdse host and TCgi holds the [?[fcgi][?lcgi]] which may be a null string. When returning a new target, it must be fully specified along with any relevant cgi.

◆ RedirectURL()

virtual std::string XrdXrootdRedirPI::RedirectURL ( const char * urlHead,
const char * Target,
const char * port,
const char * urlTail,
int & rdrOpts,
XrdNetAddrInfo & TNetInfo,
XrdNetAddrInfo & CNetInfo )
inlinevirtual

Return the actual URL to be used for a redirection.

Parameters
urlHead- holds the prefix to the destination spec. Typically, this is "<protocol>://".
Target- holds the current redirect target and does not contain the port. The target can be a hostname, IPv4, or bracketed IPv6 address.
port- is the character port the client will be using to connect to the target. If there is no port, then this is a null string.
urlTail- Is the remaining URL (i.e. all the characters after the target specification (i.e. host[:port]) it may be a null string (e.g. "xroot://dest:1094" is specified.)
rdrOptsRedirect options as bit flags. These may be changed. Currently, do not touch these options.
TNetInfo- Network address information for the target.
CNetInfo- Network address information for the client being redirected.
Returns
string.size() > 0 and string.front() != '!': A new redirect URL has been returned to use for the redirect. string.size() == 0: Use the original redirect URL. string.size() > 0 and string.front() == '!': A fatal error has occured and an error message should be sent to the client. The error message text are the characters after the exclamation point.
Note
The redirect plugin should not change the original protocol.
The URL type of redirect is esoteric and is used primarily to change protocols (e.g. xrooot to file). Hence, a default implementation is supplied.

Definition at line 120 of file XrdXrootdRedirPI.hh.

127 {std::string x(""); return x;}

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