78{
80 {public:
83
87};
88
90 {public:
91 std::map<std::string, int>
actMap;
92 std::map<std::string, MapInfo>
r2aMap;
93 std::map<std::string, MapInfo>
u2aMap;
99
102 };
103
104
105
106std::map<std::string, ExpInfo>
expMap;
108std::map<std::string, ExpInfo*>
v2eMap;
109
110
111
119
120
122
125static
129
130static const int domAny = 0;
131static const int domLcl = 1;
132static const int domRmt = 2;
133
138
143
147
151
154
156 std::set<std::string>
x2aSet;
157 std::set<std::string>
x2eSet;
158
161 };
162
164}
166
167
168
169
170
171
172
173
174
176 const char *path,
177 const char *cgi,
178 const char *app)
179{
182 int eCode, aCode;
183
184
185
190 {
const char *urName = addrInfo.
Name();
192 {const char *dot = index(urName, '.');
194 }
195 }
197 {
DBGID(client.
tident,
"Skipping sending flow info; unwanted domain");
198 return 0;
199 }
200 }
201
202
203
204
205 if (!getCodes(client, path, cgi, eCode, aCode))
206 {
TRACE(
"Unable to determine experiment; flow not marked.");
207 return 0;
208 }
209
210
211
212 if (cgi)
213 {const char *apP = strstr(cgi, "pmark.appname=");
214 if (apP)
215 {apP += 14;
216 const char* aP = apP;
217 while(*aP && *aP != '&') aP++;
218 int apLen = aP - apP;
219 if (apLen > 0)
220 {altApp = "";
221 altApp.
insert(apP, 0, apLen);
222 app = altApp.
c_str();
223 }
224 }
225 }
226
227
228
231}
232
233
234
238{
239
240
241
242
243
244
245
246
247
248
249
250
251
254 if (pmFF->
Start(addrInfo))
return pmFF;
255 delete pmFF;
256 }
257
258
259
260 return 0;
261}
262
263
264
265
266
269{
270 class DelCfgInfo
271 {
public: DelCfgInfo(
CfgInfo *&cfg) : cfgInfo(cfg) {}
272 ~DelCfgInfo() {if (cfgInfo) {delete cfgInfo; cfgInfo = 0;}}
273 private:
276
277
278
281 return 0;
282 }
283
284
285
289 fatal = false;
290
291
292
297 } else {
299 eLog->
Say(
"Config warning: firefly disabled; "
300 "configuration incomplete!");
301 return 0;
302 }
304
305
306
308
309
310
313 eLog->
Say(
"Config warning: ignoring defsfile; "
314 "no mappings have been specified!");
316 } else {
318 {
eLog->
Say(
"Config invalid: pmark mappings cannot be resolved "
319 "without specifying defsfile!");
320 fatal = true;
321 return 0;
322 }
324 if (!ConfigDefs())
326 {fatal = true;
327 return 0;
328 }
329 eLog->
Say(
"Config warning: pmark ignoring defsfile; "
330 "unable to process and nofail is in effect!");
331 }
332 }
333
334
335
336
338
339
340
341 bool aOK = false;
344 char buff[1024];
346 if (eTxt)
347 {snprintf(buff,
sizeof(buff),
"%s:%d; %s",
ffDest,
ffPortD, eTxt);
348 eLog->
Emsg(
"Config",
"pmark unable to create UDP tunnel to", buff);
350 fatal = true;
351 return 0;
352 }
353 if (spec.
Format(buff,
sizeof(buff)))
355 if (!aOK)
356 {
eLog->
Emsg(
"Config",
"pmark unable to create UDP tunnel to",
ffDest);
357 fatal = true;
361 return 0;
362 }
363 }
364
365
366
369 if (!aOK)
370 {
eLog->
Emsg(
"Config",
"pmark unable to create origin UDP tunnel");
371 fatal = true;
373 return 0;
374 }
375 }
376
377
378
380
381
382
386 else eDest->
Say(
"Config warning: Unable to determine local domain; "
387 " domain check restricted to IP address type!");
388 }
389
390
391
393}
394
395
396
397
398
399namespace
400{
401bool Recover()
402{
403 if (!
noFail)
return false;
405 return true;
406}
407}
408
409bool XrdNetPMarkCfg::ConfigDefs()
410{
411 class Const2Char
412 {public:
413 char *data;
414 Const2Char(const char *str) : data(strdup(str)) {}
415 ~Const2Char() {free(data);}
416 };
418 std::set<std::string>::iterator it;
419 std::map<std::string, ExpInfo>::iterator itE;
420 bool isDload, aOK = true;
421
422
423
425 return Recover();
426
427
428
429 aOK = LoadFile();
430
431
432
434
435
436
437 if (!aOK) return Recover();
438
439
440
442 {Const2Char pv(it->c_str());
443 if (!ConfigPV2E(pv.data)) aOK = false;
444 }
446
447
448
450 {Const2Char ru(it->c_str());
451 if (!ConfigRU2A(ru.data)) aOK = false;
452 }
454
455
456
457
459 while(itE !=
expMap.end())
460 {if (itE->second.inUse)
461 {itE->second.Roles = itE->second.r2aMap.size() != 0;
462 itE->second.Users = itE->second.u2aMap.size() != 0;
463 itE++;
464 } else {
465 DEBUG(
"Deleting unused experiment '"<<itE->first.c_str()<<
"'");
467 }
468 }
469 if (aOK &&
expMap.size() == 0)
472 {
eDest->
Say(
"Config warning: No experiments referenced; "
473 "packet marking restricted to scitagged url's!");
474 } else {
475 eDest->
Say(
"Config warning: No experiments referenced and scitags "
476 "not enabled; packet marking has been disabled!");
478 }
479 } else if (!aOK)
484 }
485 return aOK;
486}
487
488
489
490
491
492namespace
493{
494void Complain(const char *rWho, const char *rName,
495 const char *uWho, const char *uName, const char *eName=0)
496{
497 char *et0P = 0, eText0[256], eText1[256], eText2[256];
498 if (eName)
499 {snprintf(eText0, sizeof(eText0), "experiment %s", eName);
500 et0P = eText0;
501 }
502 snprintf(eText1, sizeof(eText1), "%s '%s'", rWho, rName);
503 snprintf(eText2, sizeof(eText2), "%s '%s'", uWho, uName);
504 eDest->
Say(
"Config failure: ",et0P, eText1,
" references undefined ",eText2);
505}
506}
507
508
509
510bool XrdNetPMarkCfg::ConfigPV2E(char *info)
511{
512 std::map<std::string, ExpInfo >::iterator itE;
513 std::map<std::string, ExpInfo*>::iterator itV;
514 char *eName, *xName, *xType = info;
515 xName = index(info, ' '); *xName = 0; xName++;
516 eName = index(xName, ' '); *eName = 0; eName++;
517
518 if ((itE =
expMap.find(std::string(eName))) ==
expMap.end())
519 {Complain(xType, xName, "experiment", eName);
520 return false;
521 }
522 itE->second.inUse = true;
523
524 if (*xType == 'd')
526 return true;
527 }
528
529 if (*xType == 'p')
531 if (p2nP)
534 } else {
536 (xName, eName, &(itE->second)));
538 }
539 } else {
540 itV =
v2eMap.find(std::string(xName));
541 if (itV !=
v2eMap.end()) itV->second = &(itE->second);
542 else v2eMap[xName] = &(itE->second);
543 }
544
545 return true;
546}
547
548
549
550
551
552
553
554bool XrdNetPMarkCfg::ConfigRU2A(char *info)
555{
556 std::map<std::string, int>::iterator itA;
557 std::map<std::string, ExpInfo>::iterator itE;
558 std::map<std::string, MapInfo>::iterator itX;
559 char *aName, *eName, *xName, *xType;
560 eName = info;
561 xType = index(info, ' '); *xType = 0; xType++;
562 xName = index(xType, ' '); *xName = 0; xName++;
563 aName = index(xName, ' '); *aName = 0; aName++;
564
565 if ((itE =
expMap.find(std::string(eName))) ==
expMap.end())
566 {Complain(xType, xName, "experiment", eName);
567 return false;
568 }
569
570 itA = itE->second.actMap.find(std::string(aName));
571 if (itA == itE->second.actMap.end())
572 {Complain(xType, xName, "activity", aName, eName);
573 return false;
574 }
575
576 if (*xType == 'd') itE->second.dAct = itA->second;
577 else {std::map<std::string, MapInfo> &xMap =
578 (*xType == 'r' ? itE->second.r2aMap : itE->second.u2aMap);
579
580 itX = xMap.find(std::string(xName));
581 if (itX != xMap.end())
582 {itX->second.Name = aName; itX->second.Code = itA->second;}
583 else xMap[std::string(xName)] =
MapInfo(aName, itA->second);
584 }
585
586 return true;
587}
588
589
590
591
592
593namespace
594{
595const char *Code2S(int code)
596{
597 static char buff[16];
598 snprintf(buff, sizeof(buff), " [%d]", code);
599 return buff;
600}
601
602void ShowActs(std::map<std::string, MapInfo>& map, const char *hdr,
603 const char *mName)
604{
605 std::map<std::string, MapInfo>::iterator it;
606
607 for (it = map.begin(); it != map.end(); it++)
608 {
eDest->
Say(hdr, mName, it->first.c_str(),
" activity ",
609 it->second.Name.c_str(), Code2S(it->second.Code));
610 }
611}
612}
613
614void XrdNetPMarkCfg::Display()
615{
616 std::map<std::string, ExpInfo>::iterator itE;
617 std::map<int, std::vector<const char*>> pvRefs;
618 const char *hdr = " ", *hdrplu = " ++ ";
619 char buff[80];
620
621
622
623 std::map<int, std::vector<const char*>>::iterator it2E;
625
626 while(p2e)
628 if ((it2E = pvRefs.find(expinfo->
Code)) != pvRefs.end())
629 it2E->second.push_back(p2e->
thePath());
630 else {std::vector<const char*> vec;
632 pvRefs[expinfo->
Code] = vec;
633 }
635 }
636
637
638
639 std::map<std::string, ExpInfo*>::iterator itV;
641 {int eCode = itV->second->Code;
642 if ((it2E = pvRefs.find(eCode)) != pvRefs.end())
643 it2E->second.push_back(itV->first.c_str());
644 else {std::vector<const char*> vec;
645 vec.push_back(itV->first.c_str());
646 pvRefs[eCode] = vec;
647 }
648 }
649
650
651
652
653 snprintf(buff,
sizeof(buff),
"%d",
static_cast<int>(
expMap.size()));
654 const char *txt = (
expMap.size() == 1 ?
" expirement " :
" experiments ");
655 eDest->
Say(
"Config pmark results: ", buff, txt,
"directly referenced:");
656
657
658
660 {int expCode = itE->second.Code;
661 eDest->
Say(hdr, itE->first.c_str(), Code2S(expCode),
662 (&itE->second ==
expDflt ?
" (default)" : 0));
663 if ((it2E = pvRefs.find(expCode)) != pvRefs.end())
664 {std::vector<const char*> &vec = it2E->second;
665 for (int i = 0; i < (int)vec.size(); i++)
666 {const char *rType = (*vec[i] == '/' ? "path " : "vorg ");
668 }
669 }
670 if (itE->second.u2aMap.size() != 0)
671 ShowActs(itE->second.u2aMap, hdrplu, "user ");
672 if (itE->second.r2aMap.size() != 0)
673 ShowActs(itE->second.r2aMap, hdrplu, "role ");
674 if (itE->second.dAct >= 0)
675 {std::map<std::string, int>::iterator itA;
676 int aCode = itE->second.dAct;
677 for (itA = itE->second.actMap.begin();
678 itA != itE->second.actMap.end(); itA++)
679 {if (aCode == itA->second)
680 {
eDest->
Say(hdrplu,
"Default activity ",
681 itA->first.c_str(), Code2S(aCode));
682 break;
683 }
684 }
685 if (itA == itE->second.actMap.end()) itE->second.dAct = -1;
686 }
687 }
688}
689
690
691
692
693
694const char *XrdNetPMarkCfg::Extract(const char *sVec, char *buff, int blen)
695{
696 const char *space;
697
698
699
700 if (!(space = index(sVec, ' '))) return sVec;
701
702
703
704 int n = space - sVec;
705 if (!n || n >= blen) return 0;
706 snprintf(buff, blen, "%.*s", n, sVec);
707 return buff;
708}
709
710
711
712
713
714bool XrdNetPMarkCfg::FetchFile()
715{
718 char tmo[16], outfile[512];
719 int rc;
720
721
722
724 {
eDest->
Emsg(
"Config", rc,
"setup job to fetch defsfile");
725 return false;
726 }
727
728
729
730 snprintf(outfile, sizeof(outfile), "/tmp/XrdPMark-%ld.json",
731 static_cast<long>(getpid()));
733
734
735
736 snprintf(tmo,
sizeof(tmo),
"%d",
Cfg->
defsTO);
740
741
742
747 }
748
749
750
752 if (rc)
753 {snprintf(outfile, sizeof(outfile), "failed with rc=%d", rc);
755 return false;
756 }
757
758
759
761 return true;
762}
763
764
765
766
767
768bool XrdNetPMarkCfg::getCodes(
XrdSecEntity &client,
const char *path,
769 const char *cgi, int &ecode, int &acode)
770{
772
773
774
776
777
778
780
781
782
785 if (p2nP) expP = p2nP->
theValu();
786 }
787
788
789
791 {std::map<std::string, ExpInfo*>::iterator itV;
792 char voBuff[256];
793 const char *VO = Extract(client.
vorg, voBuff,
sizeof(voBuff));
795 expP = itV->second;
796 }
797
798
799
801
802
803
804 if (!expP) return false;
806
807
808
810 {std::map<std::string, MapInfo>::iterator itU;
811 itU = expP->
u2aMap.find(std::string(client.
name));
812 if (itU != expP->
u2aMap.end())
813 {acode = itU->second.Code;
814 return true;
815 }
816 }
817
818
819
821 {std::map<std::string, MapInfo>::iterator itR;
822 char roBuff[256];
823 const char *RO = Extract(client.
role, roBuff,
sizeof(roBuff));
824 if (RO)
825 {itR = expP->
r2aMap.find(std::string(client.
role));
826 if (itR != expP->
r2aMap.end())
827 {acode = itR->second.Code;
828 return true;
829 }
830 }
831 }
832
833
834
835 acode = (expP->
dAct >= 0 ? expP->
dAct : 0);
836 return true;
837}
838
839
840
841
842
843using json = nlohmann::json;
844
845namespace
846{
847const char *MsgTrim(const char *msg)
848{
849 const char *sP;
850 if ((sP = index(msg, ' ')) && *(sP+1)) return sP+1;
851 return msg;
852}
853}
854
855bool XrdNetPMarkCfg::LoadFile()
856{
857 struct fBuff {char *buff; fBuff() : buff(0) {}
858 ~fBuff() {if (buff) free(buff);}
859 } defs;
860 int rc;
861
862
863
866 return false;
867 }
868
869
870
871
872 try {bool result = LoadJson(defs.buff);
873 return result;
874 } catch (json::exception& e)
875 {
eDest->
Emsg(
"Config",
"Unable to process defsfile;",
876 MsgTrim(e.what()));
877 }
878 return false;
879}
880
881
882
883
884
885bool XrdNetPMarkCfg::LoadJson(char *buff)
886{
888 std::map<std::string, ExpInfo>::iterator itE;
889
890
891
892 j = json::parse(buff);
893
894
895
896 std::string modDate;
897 json j_mod = j[
"modified"];
898 if (j_mod != 0) modDate = j_mod.get<std::string>();
899 else modDate = "*unspecified*";
900
902 "' last modified on ", modDate.c_str());
903
904
905
906 json j_exp = j[
"experiments"];
907 if (j_exp == 0)
908 {
eDest->
Emsg(
"Config",
"The defsfile does not define any experiments!");
909 return false;
910 }
911
912
913
914
915 for (auto it : j_exp)
916 {std::string expName = it["expName"].get<std::string>();
917 if (expName.empty()) continue;
918 if (!it[
"expId"].is_number() || it[
"expId"] <
minExpID || it[
"expId"] >
maxExpID)
919 {
eDest->
Say(
"Config warning: ignoring experiment '", expName.c_str(),
920 "'; associated ID is invalid.");
921 continue;
922 }
924
926 {
eDest->
Say(
"Config warning: ignoring experiment '", expName.c_str(),
927 "'; map insertion failed!");
928 continue;
929 }
930
931 json j_acts = it[
"activities"];
932 if (j_acts == 0)
933 {
eDest->
Say(
"Config warning: ignoring experiment '", expName.c_str(),
934 "'; has no activities!");
935 continue;
936 }
937
938 for (unsigned int i = 0; i < j_acts.size(); i++)
939 {std::string actName = j_acts[i]["activityName"].get<std::string>();
940 if (actName.empty()) continue;
941 if (!j_acts[i]["activityId"].is_number()
942 || j_acts[i][
"activityId"] <
minActID
943 || j_acts[i][
"activityId"] >
maxActID)
944 {
eDest->
Say(
"Config warning:",
"ignoring ", expName.c_str(),
945 " actitivity '", actName.c_str(),
946 "'; associated ID is invalid.");
947 continue;
948 }
949 itE->second.actMap[actName] = j_acts[i]["activityId"].get<int>();
950 }
951 }
952
953
954
956 {
eDest->
Say(
"Config warning: unable to define any experiments via defsfile!");
957 return false;
958 }
959 return true;
960}
961
962
963
964
965
967{
968
969
970
971
972
973
974
975
976
977
978
979 std::string name;
980 char *val;
981
982
983
985
986
987
988 if (!(val =
Config.GetWord()))
989 {
eLog->
Say(
"Config invalid: pmark argument not specified");
return 1;}
990
991
992
993do{if (!strcmp("debug", val) || !strcmp("nodebug", val))
995 continue;
996 }
997
998 if (!strcmp("defsfile", val))
999 {
if (!(val =
Config.GetWord()))
1000 {
eLog->
Say(
"Config invalid: pmark defsfile value not specified");
1001 return 1;
1002 }
1003
1004 if (!strcmp("fail", val) || !strcmp("nofail", val))
1006 if (!(val =
Config.GetWord()))
1007 {
eLog->
Say(
"Config invalid: pmark defsfile locationnot specified");
1008 return 1;
1009 }
1010 }
1011
1012 if (*val == '/')
1014 continue;
1015 }
1016
1017 if (strcmp("curl", val) && strcmp("wget", val))
1018 {
eLog->
Say(
"Config invalid: unknown defsfile transfer agent '",val,
"'");
1019 return 1;
1020 }
1022 {
eLog->
Say(
"Config invalid: defsfile transfer agent '",val,
"' not found.");
1023 return 1;
1024 }
1025
1026 if (*val == 'c')
1028 } else {
1030 }
1031
1033 if (val && isdigit(*val))
1035 return 1;
1037 }
1038
1039 if (!val) {
eLog->
Say(
"Config invalid: pmark defsfile url not specified");
1040 return 1;
1041 }
1043 continue;
1044 }
1045
1046 if (!strcmp("domain", val))
1047 {
if (!(val =
Config.GetWord()))
1048 {
eLog->
Say(
"Config invalid: pmark domain value not specified");
1049 return 1;
1050 }
1051 if (!strcmp(val, "any" )
1055 else {
eLog->
Say(
"Config invalid: pmark invalid domain determinant '",
1056 val, "'");
1057 return 1;
1058 }
1059 continue;
1060 }
1061
1062 if (!strcmp("fail", val) || !strcmp("nofail", val))
1064 continue;
1065 }
1066
1067
1068
1069
1070 if (!strcmp("ffdest", val))
1071 {const char *addtxt = "";
1072 char *colon, *comma;
1073 int xPort;
1075 do {if (!val || *val == 0 || *val == ',' || *val == ':')
1076 {
eLog->
Say(
"Config invalid: pmark ffdest value not specified",
1077 addtxt); return 1;
1078 }
1079 if ((comma = index(val, ','))) *comma++ = 0;
1080 if ((colon = index(val, ':')))
1081 {*colon++ = 0;
1083 return 1;
1085 if (!strcmp(val,
"origin"))
ffPortO = xPort;
1089 }
1090 addtxt = " after comma";
1091 } while((val = comma));
1093 continue;
1094 }
1095
1096 if (!strcmp("ffecho", val))
1097 {
if (!(val =
Config.GetWord()))
1098 {
eLog->
Say(
"Config invalid: pmark ffecho value not specified");
1099 return 1;
1100 }
1103 continue;
1104 }
1105
1106 if (!strcmp("map2act", val))
1107 {
if (!(val =
Config.GetWord()))
1108 {
eLog->
Say(
"Config invalid: pmark activity experiment not specified");
1109 return 1;
1110 }
1111 name = val;
1112
1113 if (!(val =
Config.GetWord()))
1114 {
eLog->
Say(
"Config invalid: pmark activity determinant not specified");
1115 return 1;
1116 }
1117
1118 const char *adet;
1119 if (!strcmp(val, "default")) adet = "dflt";
1120 else if (!strcmp(val, "role")) adet = "role";
1121 else if (!strcmp(val, "user")) adet = "user";
1122 else {
eLog->
Say(
"Config invalid: pmark invalid activity determinant '",
1123 val, "'");
1124 return 1;
1125 }
1126 name += ' '; name += val;
1127
1128 if (*adet !=
'd' && !(val =
Config.GetWord()))
1129 {
eLog->
Say(
"Config invalid: pmark activity", adet,
"not specified");
1130 return 1;
1131 }
1132 name += ' '; name += val;
1133
1134 if (!(val =
Config.GetWord()))
1135 {
eLog->
Say(
"Config invalid: pmark", adet,
"activity not specified");
1136 return 1;
1137 }
1138 name += ' '; name += val;
1139
1141 continue;
1142 }
1143
1144 if (!strcmp("map2exp", val))
1145 {
if (!(val =
Config.GetWord()))
1146 {
eLog->
Say(
"Config invalid: pmark map2exp type not specified");
1147 return 1;
1148 }
1149 if (strcmp("default", val) && strcmp("path", val)
1150 && strcmp("vo", val) && strcmp("vorg", val))
1151 {
eLog->
Say(
"Config invalid: invalid pmark map2exp type, '",val,
"'.");
1152 return 1;
1153 }
1154 name = val;
1155
1156 if (*val !=
'd' && !(val =
Config.GetWord()))
1157 {
eLog->
Say(
"Config invalid: pmark map2exp ", name.c_str(),
1158 "not specified");
1159 return 1;
1160 }
1161 name += ' '; name += val;
1162
1163 if (!(val =
Config.GetWord()))
1164 {
eLog->
Say(
"Config invalid: pmark map2exp expirement not specified");
1165 return 1;
1166 }
1167 name += ' '; name += val;
1168
1170 continue;
1171 }
1172
1173 if (!strcmp("trace", val) || !strcmp("notrace", val))
1175 continue;
1176 }
1177
1178 if (!strcmp("use", val))
1179 {
if (!(val =
Config.GetWord()))
1180 {
eLog->
Say(
"Config invalid: pmark use argument not specified");
1181 return 1;
1182 }
1183 bool argOK = false;
1184 char *arg;
1185 do {bool theval = strncmp(val, "no", 2) != 0;
1186 arg = (!theval ? val += 2 : val);
1187 if (!strcmp("flowlabel", arg))
1189 else if (!strcmp("flowlabel+ff", arg))
1191 else if (!strcmp("firefly", arg))
1192 {
useFFly = (theval ? 1 : 0); argOK =
true;}
1193 else if (!strcmp(
"scitag", arg)) {
useSTag = theval; argOK =
true;}
1194 else if (argOK) {
Config.RetToken();
break;}
1195 else {
eLog->
Say(
"Config invalid: 'use ",val,
"' is invalid");
1196 return 1;
1197 }
1198 }
while((val =
Config.GetWord()));
1199 if (!val) break;
1200 continue;
1201 }
1202
1203 eLog->
Say(
"Config warning: ignoring unknown pmark argument'",val,
"'.");
1204
1205 }
while ((val =
Config.GetWord()));
1206
1207 return 0;
1208}
static XrdSysError eDest(0,"crypto_")
static bool isHostName(const char *name)
int Format(char *bAddr, int bLen, fmtUse fmtType=fmtAuto, int fmtOpts=0)
const char * Name(const char *eName=0, const char **eText=0)
const char * Set(const char *hSpec, int pNum=PortInSpec)
static int Parse(XrdSysError *eLog, XrdOucStream &Config)
static XrdNetPMark * Config(XrdSysError *eLog, XrdScheduler *sched, XrdSysTrace *trc, bool &fatal)
XrdNetPMark::Handle * Begin(XrdSecEntity &Client, const char *path=0, const char *cgi=0, const char *app=0) override
std::map< std::string, int > actMap
std::map< std::string, MapInfo > u2aMap
std::map< std::string, MapInfo > r2aMap
bool Start(XrdNetAddrInfo &addr)
static bool getEA(const char *cgi, int &ecode, int &acode)
static const int maxExpID
static const int minActID
static const int maxActID
static const int minExpID
static char * MyHostName(const char *eName="*unknown*", const char **eText=0)
void RepName(const char *newname)
void Insert(XrdOucMapP2X< T > *newp)
XrdOucMapP2X< T > * Match(const char *pd, const int pl=0)
XrdOucMapP2X< T > * Find(const char *path)
XrdOucMapP2X< T > * theNext()
void insert(const int i, int start=-1)
const char * c_str() const
static bool findPgm(const char *pgm, XrdOucString &path)
static char * getFile(const char *path, int &rc, int maxsz=10240, bool notempty=true)
static int a2tm(XrdSysError &, const char *emsg, const char *item, int *val, int minv=-1, int maxv=-1)
static int a2p(XrdSysError &, const char *ptype, const char *val, bool anyOK=true)
char * vorg
Entity's virtual organization(s)
XrdNetAddrInfo * addrInfo
Entity's connection details.
const char * tident
Trace identifier always preset.
char * name
Entity's name.
char * role
Entity's role(s)
int Emsg(const char *esfx, int ecode, const char *text1, const char *text2=0)
void Say(const char *text1, const char *text2=0, const char *txt3=0, const char *text4=0, const char *text5=0, const char *txt6=0)
std::map< std::string, ExpInfo > expMap
std::map< std::string, ExpInfo * > v2eMap
XrdOucMapP2X< ExpInfo * > p2eMap
std::set< std::string > x2eSet
const char * pgmOpts[pgmOptN]
std::set< std::string > x2aSet