|
|
|||
File indexing completed on 2026-01-08 10:33:37
0001 #ifndef __XRDCMSVNID_H__ 0002 #define __XRDCMSVNID_H__ 0003 /******************************************************************************/ 0004 /* */ 0005 /* X r d C m s V n I d . h h */ 0006 /* */ 0007 /* (c) 2017 by the Board of Trustees of the Leland Stanford, Jr., University */ 0008 /* All Rights Reserved */ 0009 /* Produced by Andrew Hanushevsky for Stanford University under contract */ 0010 /* DE-AC02-76-SFO0515 with the Department of Energy */ 0011 /* */ 0012 /* This file is part of the XRootD software suite. */ 0013 /* */ 0014 /* XRootD is free software: you can redistribute it and/or modify it under */ 0015 /* the terms of the GNU Lesser General Public License as published by the */ 0016 /* Free Software Foundation, either version 3 of the License, or (at your */ 0017 /* option) any later version. */ 0018 /* */ 0019 /* XRootD is distributed in the hope that it will be useful, but WITHOUT */ 0020 /* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */ 0021 /* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */ 0022 /* License for more details. */ 0023 /* */ 0024 /* You should have received a copy of the GNU Lesser General Public License */ 0025 /* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */ 0026 /* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */ 0027 /* */ 0028 /* The copyright holder's institutional names and contributor's names may not */ 0029 /* be used to endorse or promote products derived from this software without */ 0030 /* specific prior written permission of the institution or contributor. */ 0031 /******************************************************************************/ 0032 0033 //------------------------------------------------------------------------------ 0034 //! Function XrdCmsgetVnId is used to obtain the unique node identification. 0035 //! This plug-in is specified by the 'all.vnidlib' directive and when present 0036 //! uses the plug-in to obtain the node identification. This ID is used to 0037 //! track the node instead of the node's host name or IP address; essentially 0038 //! creating a virtual network . This plugin is meant for container and 0039 //! virtualization frameworks that assign an arbitrary host name or IP addresses 0040 //! to a container or VM on each start-up; making host name or IP address an 0041 //! unreliable tracking mechanism. Hence, nodes are tracked within a vrtual 0042 //! network composed of the node ID and internal cluster ID. 0043 //------------------------------------------------------------------------------ 0044 0045 /******************************************************************************/ 0046 /* X r d C m s g e t V n I d */ 0047 /******************************************************************************/ 0048 0049 //------------------------------------------------------------------------------ 0050 //! Obtain node identification. 0051 //! 0052 //! This extern "C" function is called to obtain the node identification. 0053 //! It need not be thread safe as it is called only once during initialization. 0054 //! 0055 //! @param eDest -> The error object that must be used to print any errors or 0056 //! other messages (see XrdSysError.hh). 0057 //! @param confg -> Name of the configuration file that was used. 0058 //! @param parms -> Argument string specified on the vnidlib directive. It is 0059 //! a null string if no parms exist. 0060 //! @param nRole -> The role this node has, as follow: 0061 //! 'm' - manager, 's' - server, 'u' - supervisor 0062 //! If the letter is upper case, then it's a proxy role. 0063 //! @param mlen -> The maximum length the return string may have. Returning 0064 //! a string longer than mlen aborts initialization. 0065 //! 0066 //! @return Success: A string containing the node identification. 0067 //! Failure: A null string which causes initialization to fail. 0068 //------------------------------------------------------------------------------ 0069 0070 #define XrdCmsgetVnIdArgs XrdSysError &eDest, \ 0071 const std::string &confg, \ 0072 const std::string &parms, \ 0073 char nRole, \ 0074 int mlen 0075 0076 /*! Declare this function as follows in you shared library: 0077 0078 extern "C" std::string XrdCmsgetVnId(XrdCmsgetVnIdArgs) {...} 0079 */ 0080 0081 //------------------------------------------------------------------------------ 0082 //! Declare compilation version. 0083 //! 0084 //! Additionally, you *should* declare the xrootd version you used to compile 0085 //! your plug-in. While not currently required, it is highly recommended to 0086 //! avoid execution issues should the class definition change. Declare it as: 0087 //------------------------------------------------------------------------------ 0088 0089 /*! #include "XrdVersion.hh" 0090 XrdVERSIONINFO(XrdCmsgetNidName,<name>); 0091 0092 where <name> is a 1- to 15-character unquoted name identifying your plugin. 0093 */ 0094 #endif
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|