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 eDest->
Emsg(
"PMark_Begin",
"Unable to start pmark for session",
tident);
257 } else {
259 eDest->
Emsg(
"PMark_Begin",
"Flow value is invalid; "
260 "pmark disabled for session",
tident);
261 }
262
263
264
265 return 0;
266}
267
268
269
270
271
274{
275 class DelCfgInfo
276 {
public: DelCfgInfo(
CfgInfo *&cfg) : cfgInfo(cfg) {}
277 ~DelCfgInfo() {if (cfgInfo) {delete cfgInfo; cfgInfo = 0;}}
278 private:
281
282
283
286 return 0;
287 }
288
289
290
294 fatal = false;
295
296
297
302 } else {
304 eLog->
Say(
"Config warning: firefly disabled; "
305 "configuration incomplete!");
306 return 0;
307 }
309
310
311
313
314
315
318 eLog->
Say(
"Config warning: ignoring defsfile; "
319 "no mappings have been specified!");
321 } else {
323 {
eLog->
Say(
"Config invalid: pmark mappings cannot be resolved "
324 "without specifying defsfile!");
325 fatal = true;
326 return 0;
327 }
329 if (!ConfigDefs())
331 {fatal = true;
332 return 0;
333 }
334 eLog->
Say(
"Config warning: pmark ignoring defsfile; "
335 "unable to process and nofail is in effect!");
336 }
337 }
338
339
340
341
343
344
345
346 bool aOK = false;
349 char buff[1024];
351 if (eTxt)
352 {snprintf(buff,
sizeof(buff),
"%s:%d; %s",
ffDest,
ffPortD, eTxt);
353 eLog->
Emsg(
"Config",
"pmark unable to create UDP tunnel to", buff);
355 fatal = true;
356 return 0;
357 }
358 if (spec.
Format(buff,
sizeof(buff)))
360 if (!aOK)
361 {
eLog->
Emsg(
"Config",
"pmark unable to create UDP tunnel to",
ffDest);
362 fatal = true;
366 return 0;
367 }
368 }
369
370
371
374 if (!aOK)
375 {
eLog->
Emsg(
"Config",
"pmark unable to create origin UDP tunnel");
376 fatal = true;
378 return 0;
379 }
380 }
381
382
383
385
386
387
391 else eDest->
Say(
"Config warning: Unable to determine local domain; "
392 " domain check restricted to IP address type!");
393 }
394
395
396
398}
399
400
401
402
403
404namespace
405{
406bool Recover()
407{
408 if (!
noFail)
return false;
410 return true;
411}
412}
413
414bool XrdNetPMarkCfg::ConfigDefs()
415{
416 class Const2Char
417 {public:
418 char *data;
419 Const2Char(const char *str) : data(strdup(str)) {}
420 ~Const2Char() {free(data);}
421 };
423 std::set<std::string>::iterator it;
424 std::map<std::string, ExpInfo>::iterator itE;
425 bool isDload, aOK = true;
426
427
428
430 return Recover();
431
432
433
434 aOK = LoadFile();
435
436
437
439
440
441
442 if (!aOK) return Recover();
443
444
445
447 {Const2Char pv(it->c_str());
448 if (!ConfigPV2E(pv.data)) aOK = false;
449 }
451
452
453
455 {Const2Char ru(it->c_str());
456 if (!ConfigRU2A(ru.data)) aOK = false;
457 }
459
460
461
462
464 while(itE !=
expMap.end())
465 {if (itE->second.inUse)
466 {itE->second.Roles = itE->second.r2aMap.size() != 0;
467 itE->second.Users = itE->second.u2aMap.size() != 0;
468 itE++;
469 } else {
470 DEBUG(
"Deleting unused experiment '"<<itE->first.c_str()<<
"'");
472 }
473 }
474 if (aOK &&
expMap.size() == 0)
477 {
eDest->
Say(
"Config warning: No experiments referenced; "
478 "packet marking restricted to scitagged url's!");
479 } else {
480 eDest->
Say(
"Config warning: No experiments referenced and scitags "
481 "not enabled; packet marking has been disabled!");
483 }
484 } else if (!aOK)
489 }
490 return aOK;
491}
492
493
494
495
496
497namespace
498{
499void Complain(const char *rWho, const char *rName,
500 const char *uWho, const char *uName, const char *eName=0)
501{
502 char *et0P = 0, eText0[256], eText1[256], eText2[256];
503 if (eName)
504 {snprintf(eText0, sizeof(eText0), "experiment %s", eName);
505 et0P = eText0;
506 }
507 snprintf(eText1, sizeof(eText1), "%s '%s'", rWho, rName);
508 snprintf(eText2, sizeof(eText2), "%s '%s'", uWho, uName);
509 eDest->
Say(
"Config failure: ",et0P, eText1,
" references undefined ",eText2);
510}
511}
512
513
514
515bool XrdNetPMarkCfg::ConfigPV2E(char *info)
516{
517 std::map<std::string, ExpInfo >::iterator itE;
518 std::map<std::string, ExpInfo*>::iterator itV;
519 char *eName, *xName, *xType = info;
520 xName = index(info, ' '); *xName = 0; xName++;
521 eName = index(xName, ' '); *eName = 0; eName++;
522
523 if ((itE =
expMap.find(std::string(eName))) ==
expMap.end())
524 {Complain(xType, xName, "experiment", eName);
525 return false;
526 }
527 itE->second.inUse = true;
528
529 if (*xType == 'd')
531 return true;
532 }
533
534 if (*xType == 'p')
536 if (p2nP)
539 } else {
541 (xName, eName, &(itE->second)));
543 }
544 } else {
545 itV =
v2eMap.find(std::string(xName));
546 if (itV !=
v2eMap.end()) itV->second = &(itE->second);
547 else v2eMap[xName] = &(itE->second);
548 }
549
550 return true;
551}
552
553
554
555
556
557
558
559bool XrdNetPMarkCfg::ConfigRU2A(char *info)
560{
561 std::map<std::string, int>::iterator itA;
562 std::map<std::string, ExpInfo>::iterator itE;
563 std::map<std::string, MapInfo>::iterator itX;
564 char *aName, *eName, *xName, *xType;
565 eName = info;
566 xType = index(info, ' '); *xType = 0; xType++;
567 xName = index(xType, ' '); *xName = 0; xName++;
568 aName = index(xName, ' '); *aName = 0; aName++;
569
570 if ((itE =
expMap.find(std::string(eName))) ==
expMap.end())
571 {Complain(xType, xName, "experiment", eName);
572 return false;
573 }
574
575 itA = itE->second.actMap.find(std::string(aName));
576 if (itA == itE->second.actMap.end())
577 {Complain(xType, xName, "activity", aName, eName);
578 return false;
579 }
580
581 if (*xType == 'd') itE->second.dAct = itA->second;
582 else {std::map<std::string, MapInfo> &xMap =
583 (*xType == 'r' ? itE->second.r2aMap : itE->second.u2aMap);
584
585 itX = xMap.find(std::string(xName));
586 if (itX != xMap.end())
587 {itX->second.Name = aName; itX->second.Code = itA->second;}
588 else xMap[std::string(xName)] =
MapInfo(aName, itA->second);
589 }
590
591 return true;
592}
593
594
595
596
597
598namespace
599{
600const char *Code2S(int code)
601{
602 static char buff[16];
603 snprintf(buff, sizeof(buff), " [%d]", code);
604 return buff;
605}
606
607void ShowActs(std::map<std::string, MapInfo>& map, const char *hdr,
608 const char *mName)
609{
610 std::map<std::string, MapInfo>::iterator it;
611
612 for (it = map.begin(); it != map.end(); it++)
613 {
eDest->
Say(hdr, mName, it->first.c_str(),
" activity ",
614 it->second.Name.c_str(), Code2S(it->second.Code));
615 }
616}
617}
618
619void XrdNetPMarkCfg::Display()
620{
621 std::map<std::string, ExpInfo>::iterator itE;
622 std::map<int, std::vector<const char*>> pvRefs;
623 const char *hdr = " ", *hdrplu = " ++ ";
624 char buff[80];
625
626
627
628 std::map<int, std::vector<const char*>>::iterator it2E;
630
631 while(p2e)
633 if ((it2E = pvRefs.find(expinfo->
Code)) != pvRefs.end())
634 it2E->second.push_back(p2e->
thePath());
635 else {std::vector<const char*> vec;
637 pvRefs[expinfo->
Code] = vec;
638 }
640 }
641
642
643
644 std::map<std::string, ExpInfo*>::iterator itV;
646 {int eCode = itV->second->Code;
647 std::string vName = std::string(" ") + itV->first;
648 if ((it2E = pvRefs.find(eCode)) != pvRefs.end())
649 it2E->second.push_back(vName.c_str());
650 else {std::vector<const char*> vec;
651 vec.push_back(vName.c_str());
652 pvRefs[eCode] = vec;
653 }
654 }
655
656
657
658
659 snprintf(buff,
sizeof(buff),
"%d",
static_cast<int>(
expMap.size()));
660 const char *txt = (
expMap.size() == 1 ?
" expirement " :
" experiments ");
661 eDest->
Say(
"Config pmark results: ", buff, txt,
"directly referenced:");
662
663
664
666 {int expCode = itE->second.Code;
667 eDest->
Say(hdr, itE->first.c_str(), Code2S(expCode),
668 (&itE->second ==
expDflt ?
" (default)" : 0));
669 if ((it2E = pvRefs.find(expCode)) != pvRefs.end())
670 {std::vector<const char*> &vec = it2E->second;
671 for (int i = 0; i < (int)vec.size(); i++)
672 {const char *rType = (*vec[i] == ' ' ? "vorg" : "path ");
674 }
675 }
676 if (itE->second.u2aMap.size() != 0)
677 ShowActs(itE->second.u2aMap, hdrplu, "user ");
678 if (itE->second.r2aMap.size() != 0)
679 ShowActs(itE->second.r2aMap, hdrplu, "role ");
680 if (itE->second.dAct >= 0)
681 {std::map<std::string, int>::iterator itA;
682 int aCode = itE->second.dAct;
683 for (itA = itE->second.actMap.begin();
684 itA != itE->second.actMap.end(); itA++)
685 {if (aCode == itA->second)
686 {
eDest->
Say(hdrplu,
"Default activity ",
687 itA->first.c_str(), Code2S(aCode));
688 break;
689 }
690 }
691 if (itA == itE->second.actMap.end()) itE->second.dAct = -1;
692 }
693 }
694}
695
696
697
698
699
700const char *XrdNetPMarkCfg::Extract(const char *sVec, char *buff, int blen)
701{
702 const char *space;
703
704
705
706 if (!(space = index(sVec, ' '))) return sVec;
707
708
709
710 int n = space - sVec;
711 if (!n || n >= blen) return 0;
712 snprintf(buff, blen, "%.*s", n, sVec);
713 return buff;
714}
715
716
717
718
719
720bool XrdNetPMarkCfg::FetchFile()
721{
724 char tmo[16], outfile[512];
725 int rc;
726
727
728
730 {
eDest->
Emsg(
"Config", rc,
"setup job to fetch defsfile");
731 return false;
732 }
733
734
735
736 snprintf(outfile, sizeof(outfile), "/tmp/XrdPMark-%ld.json",
737 static_cast<long>(getpid()));
739
740
741
742 snprintf(tmo,
sizeof(tmo),
"%d",
Cfg->
defsTO);
746
747
748
753 }
754
755
756
758 if (rc)
759 {snprintf(outfile, sizeof(outfile), "failed with rc=%d", rc);
761 return false;
762 }
763
764
765
767 return true;
768}
769
770
771
772
773
774bool XrdNetPMarkCfg::getCodes(
XrdSecEntity &client,
const char *path,
775 const char *cgi, int &ecode, int &acode)
776{
778
779
780
782
783
784
786
787
788
791 if (p2nP) expP = p2nP->
theValu();
792 }
793
794
795
797 {std::map<std::string, ExpInfo*>::iterator itV;
798 char voBuff[256];
799 const char *VO = Extract(client.
vorg, voBuff,
sizeof(voBuff));
801 expP = itV->second;
802 }
803
804
805
807
808
809
810 if (!expP) return false;
812
813
814
816 {std::map<std::string, MapInfo>::iterator itU;
817 itU = expP->
u2aMap.find(std::string(client.
name));
818 if (itU != expP->
u2aMap.end())
819 {acode = itU->second.Code;
820 return true;
821 }
822 }
823
824
825
827 {std::map<std::string, MapInfo>::iterator itR;
828 char roBuff[256];
829 const char *RO = Extract(client.
role, roBuff,
sizeof(roBuff));
830 if (RO)
831 {itR = expP->
r2aMap.find(std::string(client.
role));
832 if (itR != expP->
r2aMap.end())
833 {acode = itR->second.Code;
834 return true;
835 }
836 }
837 }
838
839
840
841 acode = (expP->
dAct > 0 ? expP->
dAct : 1);
842 return true;
843}
844
845
846
847
848
849using json = nlohmann::json;
850
851namespace
852{
853const char *MsgTrim(const char *msg)
854{
855 const char *sP;
856 if ((sP = index(msg, ' ')) && *(sP+1)) return sP+1;
857 return msg;
858}
859}
860
861bool XrdNetPMarkCfg::LoadFile()
862{
863 struct fBuff {char *buff; fBuff() : buff(0) {}
864 ~fBuff() {if (buff) free(buff);}
865 } defs;
866 int rc;
867
868
869
872 return false;
873 }
874
875
876
877
878 try {bool result = LoadJson(defs.buff);
879 return result;
880 } catch (json::exception& e)
881 {
eDest->
Emsg(
"Config",
"Unable to process defsfile;",
882 MsgTrim(e.what()));
883 }
884 return false;
885}
886
887
888
889
890
891bool XrdNetPMarkCfg::LoadJson(char *buff)
892{
894 std::map<std::string, ExpInfo>::iterator itE;
895
896
897
898 j = json::parse(buff);
899
900
901
902 std::string modDate;
903 json j_mod = j[
"modified"];
904 if (j_mod != 0) modDate = j_mod.get<std::string>();
905 else modDate = "*unspecified*";
906
908 "' last modified on ", modDate.c_str());
909
910
911
912 json j_exp = j[
"experiments"];
913 if (j_exp == 0)
914 {
eDest->
Emsg(
"Config",
"The defsfile does not define any experiments!");
915 return false;
916 }
917
918
919
920
921 for (auto it : j_exp)
922 {std::string expName = it["expName"].get<std::string>();
923 if (expName.empty()) continue;
924 if (!it[
"expId"].is_number() || it[
"expId"] <
minExpID || it[
"expId"] >
maxExpID)
925 {
eDest->
Say(
"Config warning: ignoring experiment '", expName.c_str(),
926 "'; associated ID is invalid.");
927 continue;
928 }
930
932 {
eDest->
Say(
"Config warning: ignoring experiment '", expName.c_str(),
933 "'; map insertion failed!");
934 continue;
935 }
936
937 json j_acts = it[
"activities"];
938 if (j_acts == 0)
939 {
eDest->
Say(
"Config warning: ignoring experiment '", expName.c_str(),
940 "'; has no activities!");
941 continue;
942 }
943
944 for (unsigned int i = 0; i < j_acts.size(); i++)
945 {std::string actName = j_acts[i]["activityName"].get<std::string>();
946 if (actName.empty()) continue;
947 if (!j_acts[i]["activityId"].is_number()
948 || j_acts[i][
"activityId"] <
minActID
949 || j_acts[i][
"activityId"] >
maxActID)
950 {
eDest->
Say(
"Config warning:",
"ignoring ", expName.c_str(),
951 " actitivity '", actName.c_str(),
952 "'; associated ID is invalid.");
953 continue;
954 }
955 itE->second.actMap[actName] = j_acts[i]["activityId"].get<int>();
956 }
957 }
958
959
960
962 {
eDest->
Say(
"Config warning: unable to define any experiments via defsfile!");
963 return false;
964 }
965 return true;
966}
967
968
969
970
971
973{
974
975
976
977
978
979
980
981
982
983
984
985 std::string name;
986 char *val;
987
988
989
991
992
993
994 if (!(val =
Config.GetWord()))
995 {
eLog->
Say(
"Config invalid: pmark argument not specified");
return 1;}
996
997
998
999do{if (!strcmp("debug", val) || !strcmp("nodebug", val))
1001 continue;
1002 }
1003
1004 if (!strcmp("defsfile", val))
1005 {
if (!(val =
Config.GetWord()))
1006 {
eLog->
Say(
"Config invalid: pmark defsfile value not specified");
1007 return 1;
1008 }
1009
1010 if (!strcmp("fail", val) || !strcmp("nofail", val))
1012 if (!(val =
Config.GetWord()))
1013 {
eLog->
Say(
"Config invalid: pmark defsfile location not specified");
1014 return 1;
1015 }
1016 }
1017
1018 if (*val == '/')
1020 continue;
1021 }
1022
1023 if (strcmp("curl", val) && strcmp("wget", val))
1024 {
eLog->
Say(
"Config invalid: unknown defsfile transfer agent '",val,
"'");
1025 return 1;
1026 }
1028 {
eLog->
Say(
"Config invalid: defsfile transfer agent '",val,
"' not found.");
1029 return 1;
1030 }
1031
1032 if (*val == 'c')
1034 } else {
1036 }
1037
1039 if (val && isdigit(*val))
1041 return 1;
1043 }
1044
1045 if (!val) {
eLog->
Say(
"Config invalid: pmark defsfile url not specified");
1046 return 1;
1047 }
1049 continue;
1050 }
1051
1052 if (!strcmp("domain", val))
1053 {
if (!(val =
Config.GetWord()))
1054 {
eLog->
Say(
"Config invalid: pmark domain value not specified");
1055 return 1;
1056 }
1057 if (!strcmp(val, "any" )
1061 else {
eLog->
Say(
"Config invalid: pmark invalid domain determinant '",
1062 val, "'");
1063 return 1;
1064 }
1065 continue;
1066 }
1067
1068 if (!strcmp("fail", val) || !strcmp("nofail", val))
1070 continue;
1071 }
1072
1073
1074
1075
1076 if (!strcmp("ffdest", val))
1077 {const char *addtxt = "";
1078 char *colon, *comma;
1079 int xPort;
1081 do {if (!val || *val == 0 || *val == ',' || *val == ':')
1082 {
eLog->
Say(
"Config invalid: pmark ffdest value not specified",
1083 addtxt); return 1;
1084 }
1085 if ((comma = index(val, ','))) *comma++ = 0;
1086 if ((colon = index(val, ':')))
1087 {*colon++ = 0;
1089 return 1;
1091 if (!strcmp(val,
"origin"))
ffPortO = xPort;
1095 }
1096 addtxt = " after comma";
1097 } while((val = comma));
1099 continue;
1100 }
1101
1102 if (!strcmp("ffecho", val))
1103 {
if (!(val =
Config.GetWord()))
1104 {
eLog->
Say(
"Config invalid: pmark ffecho value not specified");
1105 return 1;
1106 }
1109 continue;
1110 }
1111
1112 if (!strcmp("map2act", val))
1113 {
if (!(val =
Config.GetWord()))
1114 {
eLog->
Say(
"Config invalid: pmark activity experiment not specified");
1115 return 1;
1116 }
1117 name = val;
1118
1119 if (!(val =
Config.GetWord()))
1120 {
eLog->
Say(
"Config invalid: pmark activity determinant not specified");
1121 return 1;
1122 }
1123
1124 const char *adet;
1125 if (!strcmp(val, "default")) adet = "dflt";
1126 else if (!strcmp(val, "role")) adet = "role";
1127 else if (!strcmp(val, "user")) adet = "user";
1128 else {
eLog->
Say(
"Config invalid: pmark invalid activity determinant '",
1129 val, "'");
1130 return 1;
1131 }
1132 name += ' '; name += val;
1133
1134 if (*adet !=
'd' && !(val =
Config.GetWord()))
1135 {
eLog->
Say(
"Config invalid: pmark activity", adet,
"not specified");
1136 return 1;
1137 }
1138 name += ' '; name += val;
1139
1140 if (!(val =
Config.GetWord()))
1141 {
eLog->
Say(
"Config invalid: pmark", adet,
"activity not specified");
1142 return 1;
1143 }
1144 name += ' '; name += val;
1145
1147 continue;
1148 }
1149
1150 if (!strcmp("map2exp", val))
1151 {
if (!(val =
Config.GetWord()))
1152 {
eLog->
Say(
"Config invalid: pmark map2exp type not specified");
1153 return 1;
1154 }
1155 if (strcmp("default", val) && strcmp("path", val)
1156 && strcmp("vo", val) && strcmp("vorg", val))
1157 {
eLog->
Say(
"Config invalid: invalid pmark map2exp type, '",val,
"'.");
1158 return 1;
1159 }
1160 name = val;
1161
1162 if (*val !=
'd' && !(val =
Config.GetWord()))
1163 {
eLog->
Say(
"Config invalid: pmark map2exp ", name.c_str(),
1164 "not specified");
1165 return 1;
1166 }
1167 name += ' '; name += val;
1168
1169 if (!(val =
Config.GetWord()))
1170 {
eLog->
Say(
"Config invalid: pmark map2exp expirement not specified");
1171 return 1;
1172 }
1173 name += ' '; name += val;
1174
1176 continue;
1177 }
1178
1179 if (!strcmp("trace", val) || !strcmp("notrace", val))
1181 continue;
1182 }
1183
1184 if (!strcmp("use", val))
1185 {
if (!(val =
Config.GetWord()))
1186 {
eLog->
Say(
"Config invalid: pmark use argument not specified");
1187 return 1;
1188 }
1189 bool argOK = false;
1190 char *arg;
1191 do {bool theval = strncmp(val, "no", 2) != 0;
1192 arg = (!theval ? val += 2 : val);
1193 if (!strcmp("flowlabel", arg))
1195 else if (!strcmp("flowlabel+ff", arg))
1197 else if (!strcmp("firefly", arg))
1198 {
useFFly = (theval ? 1 : 0); argOK =
true;}
1199 else if (!strcmp(
"scitag", arg)) {
useSTag = theval; argOK =
true;}
1200 else if (argOK) {
Config.RetToken();
break;}
1201 else {
eLog->
Say(
"Config invalid: 'use ",val,
"' is invalid");
1202 return 1;
1203 }
1204 }
while((val =
Config.GetWord()));
1205 if (!val) break;
1206 continue;
1207 }
1208
1209 eLog->
Say(
"Config warning: ignoring unknown pmark argument'",val,
"'.");
1210
1211 }
while ((val =
Config.GetWord()));
1212
1213 return 0;
1214}
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