1 /* $Id: yaz-proxy-config.cpp,v 1.14 2005-02-10 08:09:42 oleg Exp $
2 Copyright (c) 1998-2004, Index Data.
4 This file is part of the yaz-proxy.
6 YAZ proxy is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 2, or (at your option) any later
11 YAZ proxy is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 You should have received a copy of the GNU General Public License
17 along with YAZ proxy; see the file LICENSE. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
26 class Yaz_ProxyConfigP {
27 friend class Yaz_ProxyConfig;
31 int mycmp(const char *hay, const char *item, size_t len);
32 int match_list(int v, const char *m);
33 int atoi_l(const char **cp);
35 int check_schema(xmlNodePtr ptr, Z_RecordComposition *comp,
36 const char *schema_identifier);
38 xmlNodePtr m_proxyPtr;
39 void return_target_info(xmlNodePtr ptr, const char **url,
40 int *limit_bw, int *limit_pdu, int *limit_req,
41 int *target_idletime, int *client_idletime,
42 int *keepalive_limit_bw, int *keepalive_limit_pdu,
43 int *pre_init, const char **cql2rpn,
44 const char **authentication,
45 const char **negotiation_charset,
46 const char **negotiation_lang);
47 void return_limit(xmlNodePtr ptr,
48 int *limit_bw, int *limit_pdu, int *limit_req);
49 int check_type_1(ODR odr, xmlNodePtr ptr, Z_RPNQuery *query,
51 xmlNodePtr find_target_node(const char *name, const char *db);
52 xmlNodePtr find_target_db(xmlNodePtr ptr, const char *db);
53 const char *get_text(xmlNodePtr ptr);
54 int check_type_1_attributes(ODR odr, xmlNodePtr ptr,
55 Z_AttributeList *attrs,
57 int check_type_1_structure(ODR odr, xmlNodePtr ptr, Z_RPNStructure *q,
59 int get_explain_ptr(const char *host, const char *db,
60 xmlNodePtr *ptr_target, xmlNodePtr *ptr_explain);
64 Yaz_ProxyConfig::Yaz_ProxyConfig()
66 m_cp = new Yaz_ProxyConfigP;
74 Yaz_ProxyConfig::~Yaz_ProxyConfig()
77 if (!m_cp->m_copy && m_cp->m_docPtr)
78 xmlFreeDoc(m_cp->m_docPtr);
83 int Yaz_ProxyConfig::read_xml(const char *fname)
86 xmlDocPtr ndoc = xmlParseFile(fname);
90 yaz_log(YLOG_WARN, "Config file %s not found or parse error", fname);
93 int noSubstitutions = xmlXIncludeProcess(ndoc);
94 if (noSubstitutions == -1)
95 yaz_log(YLOG_WARN, "XInclude processing failed on config %s", fname);
97 xmlNodePtr proxyPtr = xmlDocGetRootElement(ndoc);
98 if (!proxyPtr || proxyPtr->type != XML_ELEMENT_NODE ||
99 strcmp((const char *) proxyPtr->name, "proxy"))
101 yaz_log(YLOG_WARN, "No proxy element in %s", fname);
105 m_cp->m_proxyPtr = proxyPtr;
107 // OK: release previous and make it the current one.
109 xmlFreeDoc(m_cp->m_docPtr);
110 m_cp->m_docPtr = ndoc;
118 const char *Yaz_ProxyConfigP::get_text(xmlNodePtr ptr)
120 for(ptr = ptr->children; ptr; ptr = ptr->next)
121 if (ptr->type == XML_TEXT_NODE)
123 xmlChar *t = ptr->content;
128 return (const char *) t;
136 void Yaz_ProxyConfigP::return_limit(xmlNodePtr ptr,
141 for (ptr = ptr->children; ptr; ptr = ptr->next)
143 if (ptr->type == XML_ELEMENT_NODE
144 && !strcmp((const char *) ptr->name, "bandwidth"))
146 const char *t = get_text(ptr);
150 if (ptr->type == XML_ELEMENT_NODE
151 && !strcmp((const char *) ptr->name, "retrieve"))
153 const char *t = get_text(ptr);
155 *limit_req = atoi(t);
157 if (ptr->type == XML_ELEMENT_NODE
158 && !strcmp((const char *) ptr->name, "pdu"))
160 const char *t = get_text(ptr);
162 *limit_pdu = atoi(t);
169 void Yaz_ProxyConfigP::return_target_info(xmlNodePtr ptr,
174 int *target_idletime,
175 int *client_idletime,
176 int *keepalive_limit_bw,
177 int *keepalive_limit_pdu,
179 const char **cql2rpn,
180 const char **authentication,
181 const char **negotiation_charset,
182 const char **negotiation_lang)
187 for (; ptr; ptr = ptr->next)
189 if (ptr->type == XML_ELEMENT_NODE
190 && !strcmp((const char *) ptr->name, "preinit"))
192 const char *v = get_text(ptr);
193 *pre_init = v ? atoi(v) : 1;
195 if (ptr->type == XML_ELEMENT_NODE
196 && !strcmp((const char *) ptr->name, "url"))
198 const char *t = get_text(ptr);
199 if (t && no_url < MAX_ZURL_PLEX)
205 if (ptr->type == XML_ELEMENT_NODE
206 && !strcmp((const char *) ptr->name, "keepalive"))
209 *keepalive_limit_bw = 500000;
210 *keepalive_limit_pdu = 1000;
211 return_limit(ptr, keepalive_limit_bw, keepalive_limit_pdu,
214 if (ptr->type == XML_ELEMENT_NODE
215 && !strcmp((const char *) ptr->name, "limit"))
216 return_limit(ptr, limit_bw, limit_pdu, limit_req);
217 if (ptr->type == XML_ELEMENT_NODE
218 && !strcmp((const char *) ptr->name, "target-timeout"))
220 const char *t = get_text(ptr);
223 *target_idletime = atoi(t);
224 if (*target_idletime < 0)
225 *target_idletime = 0;
228 if (ptr->type == XML_ELEMENT_NODE
229 && !strcmp((const char *) ptr->name, "client-timeout"))
231 const char *t = get_text(ptr);
234 *client_idletime = atoi(t);
235 if (*client_idletime < 0)
236 *client_idletime = 0;
239 if (ptr->type == XML_ELEMENT_NODE
240 && !strcmp((const char *) ptr->name, "cql2rpn"))
242 const char *t = get_text(ptr);
246 if (ptr->type == XML_ELEMENT_NODE
247 && !strcmp((const char *) ptr->name, "authentication"))
249 const char *t = get_text(ptr);
253 if (ptr->type == XML_ELEMENT_NODE
254 && !strcmp((const char *) ptr->name, "negotiation-charset"))
256 const char *t = get_text(ptr);
258 *negotiation_charset = t;
260 if (ptr->type == XML_ELEMENT_NODE
261 && !strcmp((const char *) ptr->name, "negotiation-lang"))
263 const char *t = get_text(ptr);
265 *negotiation_lang = t;
271 int Yaz_ProxyConfigP::atoi_l(const char **cp)
274 while (**cp && isdigit(**cp))
276 v = v*10 + (**cp - '0');
282 int Yaz_ProxyConfigP::match_list(int v, const char *m)
286 while(*m && isspace(*m))
297 if (v >= l && v <= h)
306 int Yaz_ProxyConfigP::check_type_1_attributes(ODR odr, xmlNodePtr ptrl,
307 Z_AttributeList *attrs,
311 for (i = 0; i<attrs->num_attributes; i++)
313 Z_AttributeElement *el = attrs->attributes[i];
315 if (!el->attributeType)
317 int type = *el->attributeType;
320 if (el->which == Z_AttributeValue_numeric && el->value.numeric)
321 value = el->value.numeric;
324 for(ptr = ptrl->children; ptr; ptr = ptr->next)
326 if (ptr->type == XML_ELEMENT_NODE &&
327 !strcmp((const char *) ptr->name, "attribute"))
329 const char *match_type = 0;
330 const char *match_value = 0;
331 const char *match_error = 0;
332 struct _xmlAttr *attr;
333 for (attr = ptr->properties; attr; attr = attr->next)
335 if (!strcmp((const char *) attr->name, "type") &&
336 attr->children && attr->children->type == XML_TEXT_NODE)
337 match_type = (const char *) attr->children->content;
338 if (!strcmp((const char *) attr->name, "value") &&
339 attr->children && attr->children->type == XML_TEXT_NODE)
340 match_value = (const char *) attr->children->content;
341 if (!strcmp((const char *) attr->name, "error") &&
342 attr->children && attr->children->type == XML_TEXT_NODE)
343 match_error = (const char *) attr->children->content;
345 if (match_type && match_value)
347 char addinfo_str[20];
348 if (!match_list(type, match_type))
352 if (!strcmp(match_type, "*"))
353 sprintf (addinfo_str, "%d", type);
356 if (!match_list(*value, match_value))
358 sprintf (addinfo_str, "%d", *value);
366 *addinfo = odr_strdup(odr, addinfo_str);
367 return atoi(match_error);
379 int Yaz_ProxyConfigP::check_type_1_structure(ODR odr, xmlNodePtr ptr,
383 if (q->which == Z_RPNStructure_complex)
385 int e = check_type_1_structure(odr, ptr, q->u.complex->s1, addinfo);
388 e = check_type_1_structure(odr, ptr, q->u.complex->s2, addinfo);
391 else if (q->which == Z_RPNStructure_simple)
393 if (q->u.simple->which == Z_Operand_APT)
395 return check_type_1_attributes(
396 odr, ptr, q->u.simple->u.attributesPlusTerm->attributes,
405 int Yaz_ProxyConfigP::check_type_1(ODR odr, xmlNodePtr ptr, Z_RPNQuery *query,
408 // possibly check for Bib-1
409 return check_type_1_structure(odr, ptr, query->RPNStructure, addinfo);
413 int Yaz_ProxyConfig::check_query(ODR odr, const char *name, Z_Query *query,
419 ptr = m_cp->find_target_node(name, 0);
422 if (query->which == Z_Query_type_1 || query->which == Z_Query_type_101)
423 return m_cp->check_type_1(odr, ptr, query->u.type_1, addinfo);
430 int Yaz_ProxyConfigP::check_schema(xmlNodePtr ptr, Z_RecordComposition *comp,
431 const char *schema_identifier)
434 int default_match = 1;
435 if (comp && comp->which == Z_RecordComp_simple &&
436 comp->u.simple && comp->u.simple->which == Z_ElementSetNames_generic)
438 esn = comp->u.simple->u.generic;
440 // if no ESN/schema was given accept..
443 // check if schema identifier match
444 if (schema_identifier && !strcmp(esn, schema_identifier))
446 // Check each name element
447 for (; ptr; ptr = ptr->next)
449 if (ptr->type == XML_ELEMENT_NODE
450 && !strcmp((const char *) ptr->name, "name"))
452 xmlNodePtr tptr = ptr->children;
454 for (; tptr; tptr = tptr->next)
455 if (tptr->type == XML_TEXT_NODE && tptr->content)
457 xmlChar *t = tptr->content;
458 while (*t && isspace(*t))
461 while (esn[i] && esn[i] == t[i])
463 if (!esn[i] && (!t[i] || isspace(t[i])))
468 return default_match;
472 const char *Yaz_ProxyConfig::check_mime_type(const char *path)
478 {".xml", "text/xml"},
479 {".xsl", "text/xml"},
480 {".tkl", "text/xml"},
481 {".xsd", "text/xml"},
482 {".html", "text/html"},
483 {".jpg", "image/jpeg"},
484 {".png", "image/png"},
485 {".gif", "image/gif"},
490 size_t plen = strlen (path);
491 for (i = 0; types[i].type; i++)
492 if (types[i].mask == 0)
493 return types[i].type;
496 size_t mlen = strlen(types[i].mask);
497 if (plen > mlen && !memcmp(path+plen-mlen, types[i].mask, mlen))
498 return types[i].type;
500 return "application/octet-stream";
504 int Yaz_ProxyConfig::check_syntax(ODR odr, const char *name,
505 Odr_oid *syntax, Z_RecordComposition *comp,
507 char **stylesheet, char **schema,
509 char **backend_charset,
510 char **usemarcon_ini_stage1,
511 char **usemarcon_ini_stage2
526 xfree (*backend_type);
531 xfree (*backend_charset);
532 *backend_charset = 0;
534 if (usemarcon_ini_stage1)
536 xfree (*usemarcon_ini_stage1);
537 *usemarcon_ini_stage1 = 0;
539 if (usemarcon_ini_stage2)
541 xfree (*usemarcon_ini_stage2);
542 *usemarcon_ini_stage2 = 0;
545 int syntax_has_matched = 0;
548 ptr = m_cp->find_target_node(name, 0);
551 for(ptr = ptr->children; ptr; ptr = ptr->next)
553 if (ptr->type == XML_ELEMENT_NODE &&
554 !strcmp((const char *) ptr->name, "syntax"))
556 int match = 0; // if we match record syntax
557 const char *match_type = 0;
558 const char *match_error = 0;
559 const char *match_marcxml = 0;
560 const char *match_stylesheet = 0;
561 const char *match_identifier = 0;
562 const char *match_backend_type = 0;
563 const char *match_backend_charset = 0;
564 const char *match_usemarcon_ini_stage1 = 0;
565 const char *match_usemarcon_ini_stage2 = 0;
566 struct _xmlAttr *attr;
567 for (attr = ptr->properties; attr; attr = attr->next)
569 if (!strcmp((const char *) attr->name, "type") &&
570 attr->children && attr->children->type == XML_TEXT_NODE)
571 match_type = (const char *) attr->children->content;
572 if (!strcmp((const char *) attr->name, "error") &&
573 attr->children && attr->children->type == XML_TEXT_NODE)
574 match_error = (const char *) attr->children->content;
575 if (!strcmp((const char *) attr->name, "marcxml") &&
576 attr->children && attr->children->type == XML_TEXT_NODE)
577 match_marcxml = (const char *) attr->children->content;
578 if (!strcmp((const char *) attr->name, "stylesheet") &&
579 attr->children && attr->children->type == XML_TEXT_NODE)
580 match_stylesheet = (const char *) attr->children->content;
581 if (!strcmp((const char *) attr->name, "identifier") &&
582 attr->children && attr->children->type == XML_TEXT_NODE)
583 match_identifier = (const char *) attr->children->content;
584 if (!strcmp((const char *) attr->name, "backendtype") &&
585 attr->children && attr->children->type == XML_TEXT_NODE)
586 match_backend_type = (const char *)
587 attr->children->content;
588 if (!strcmp((const char *) attr->name, "backendcharset") &&
589 attr->children && attr->children->type == XML_TEXT_NODE)
590 match_backend_charset = (const char *)
591 attr->children->content;
592 if (!strcmp((const char *) attr->name, "usemarconstage1") &&
593 attr->children && attr->children->type == XML_TEXT_NODE)
594 match_usemarcon_ini_stage1 = (const char *)
595 attr->children->content;
596 if (!strcmp((const char *) attr->name, "usemarconstage2") &&
597 attr->children && attr->children->type == XML_TEXT_NODE)
598 match_usemarcon_ini_stage2 = (const char *)
599 attr->children->content;
603 if (!strcmp(match_type, "*"))
605 else if (!strcmp(match_type, "none"))
612 int match_oid[OID_SIZE];
613 oid_name_to_oid(CLASS_RECSYN, match_type, match_oid);
614 if (oid_oidcmp(match_oid, syntax) == 0)
621 syntax_has_matched = 1;
622 match = m_cp->check_schema(ptr->children, comp,
627 if (stylesheet && match_stylesheet)
630 *stylesheet = xstrdup(match_stylesheet);
632 if (schema && match_identifier)
635 *schema = xstrdup(match_identifier);
637 if (backend_type && match_backend_type)
639 xfree(*backend_type);
640 *backend_type = xstrdup(match_backend_type);
642 if (backend_charset && match_backend_charset)
644 xfree(*backend_charset);
645 *backend_charset = xstrdup(match_backend_charset);
647 if (usemarcon_ini_stage1 && match_usemarcon_ini_stage1)
649 xfree(*usemarcon_ini_stage1);
650 *usemarcon_ini_stage1 = xstrdup(match_usemarcon_ini_stage1);
652 if (usemarcon_ini_stage1 && match_usemarcon_ini_stage2)
654 xfree(*usemarcon_ini_stage2);
655 *usemarcon_ini_stage2 = xstrdup(match_usemarcon_ini_stage2);
663 if (syntax_has_matched) // if syntax OK, bad schema/ESN
667 char dotoid_str[100];
668 oid_to_dotstring(syntax, dotoid_str);
669 *addinfo = odr_strdup(odr, dotoid_str);
671 return atoi(match_error);
682 xmlNodePtr Yaz_ProxyConfigP::find_target_db(xmlNodePtr ptr, const char *db)
689 for (dptr = ptr->children; dptr; dptr = dptr->next)
690 if (dptr->type == XML_ELEMENT_NODE &&
691 !strcmp((const char *) dptr->name, "database"))
693 struct _xmlAttr *attr;
694 for (attr = dptr->properties; attr; attr = attr->next)
695 if (!strcmp((const char *) attr->name, "name"))
698 && attr->children->type==XML_TEXT_NODE
699 && attr->children->content
700 && (!strcmp((const char *) attr->children->content, db)
701 || !strcmp((const char *) attr->children->content,
709 xmlNodePtr Yaz_ProxyConfigP::find_target_node(const char *name, const char *db)
714 for (ptr = m_proxyPtr->children; ptr; ptr = ptr->next)
716 if (ptr->type == XML_ELEMENT_NODE &&
717 !strcmp((const char *) ptr->name, "target"))
722 // <target default="1"> ?
723 struct _xmlAttr *attr;
724 for (attr = ptr->properties; attr; attr = attr->next)
725 if (!strcmp((const char *) attr->name, "default") &&
726 attr->children && attr->children->type == XML_TEXT_NODE)
728 xmlChar *t = attr->children->content;
731 return find_target_db(ptr, db);
737 // <target name="name"> ?
738 struct _xmlAttr *attr;
739 for (attr = ptr->properties; attr; attr = attr->next)
740 if (!strcmp((const char *) attr->name, "name"))
743 && attr->children->type==XML_TEXT_NODE
744 && attr->children->content
745 && (!strcmp((const char *) attr->children->content,
747 || !strcmp((const char *) attr->children->content,
750 return find_target_db(ptr, db);
760 int Yaz_ProxyConfig::get_target_no(int no,
766 int *target_idletime,
767 int *client_idletime,
769 int *keepalive_limit_bw,
770 int *keepalive_limit_pdu,
772 const char **cql2rpn,
773 const char **authentication,
774 const char **negotiation_charset,
775 const char **negotiation_lang)
779 if (!m_cp->m_proxyPtr)
782 for (ptr = m_cp->m_proxyPtr->children; ptr; ptr = ptr->next)
783 if (ptr->type == XML_ELEMENT_NODE &&
784 !strcmp((const char *) ptr->name, "target"))
788 struct _xmlAttr *attr;
789 for (attr = ptr->properties; attr; attr = attr->next)
790 if (!strcmp((const char *) attr->name, "name"))
793 && attr->children->type==XML_TEXT_NODE
794 && attr->children->content)
795 *name = (const char *) attr->children->content;
797 m_cp->return_target_info(
799 limit_bw, limit_pdu, limit_req,
800 target_idletime, client_idletime,
801 keepalive_limit_bw, keepalive_limit_pdu,
802 pre_init, cql2rpn, authentication,
803 negotiation_charset, negotiation_lang);
812 int Yaz_ProxyConfigP::mycmp(const char *hay, const char *item, size_t len)
814 if (len == strlen(item) && memcmp(hay, item, len) == 0)
819 void Yaz_ProxyConfig::get_generic_info(int *log_mask,
824 if (!m_cp->m_proxyPtr)
826 for (ptr = m_cp->m_proxyPtr->children; ptr; ptr = ptr->next)
828 if (ptr->type == XML_ELEMENT_NODE
829 && !strcmp((const char *) ptr->name, "log"))
831 const char *v = m_cp->get_text(ptr);
836 while (*cp && *cp != ',' && !isspace(*cp))
839 if (m_cp->mycmp(v, "client-apdu", len))
840 *log_mask |= PROXY_LOG_APDU_CLIENT;
841 if (m_cp->mycmp(v, "server-apdu", len))
842 *log_mask |= PROXY_LOG_APDU_SERVER;
843 if (m_cp->mycmp(v, "client-requests", len))
844 *log_mask |= PROXY_LOG_REQ_CLIENT;
845 if (m_cp->mycmp(v, "server-requests", len))
846 *log_mask |= PROXY_LOG_REQ_SERVER;
848 *log_mask |= atoi(v);
851 while (*cp && isspace(*cp))
856 if (ptr->type == XML_ELEMENT_NODE &&
857 !strcmp((const char *) ptr->name, "max-clients"))
859 const char *t = m_cp->get_text(ptr);
862 *max_clients = atoi(t);
863 if (*max_clients < 1)
872 int Yaz_ProxyConfigP::get_explain_ptr(const char *host, const char *db,
873 xmlNodePtr *ptr_target,
874 xmlNodePtr *ptr_explain)
881 for (ptr = m_proxyPtr->children; ptr; ptr = ptr->next)
883 if (ptr->type == XML_ELEMENT_NODE &&
884 !strcmp((const char *) ptr->name, "target"))
887 xmlNodePtr ptr = (*ptr_target)->children;
888 for (; ptr; ptr = ptr->next)
890 if (ptr->type == XML_ELEMENT_NODE &&
891 !strcmp((const char *) ptr->name, "explain"))
894 xmlNodePtr ptr = (*ptr_explain)->children;
896 for (; ptr; ptr = ptr->next)
897 if (ptr->type == XML_ELEMENT_NODE &&
898 !strcmp((const char *) ptr->name, "serverInfo"))
902 for (ptr = ptr->children; ptr; ptr = ptr->next)
903 if (ptr->type == XML_ELEMENT_NODE &&
904 !strcmp((const char *) ptr->name, "database"))
909 for (ptr = ptr->children; ptr; ptr = ptr->next)
910 if (ptr->type == XML_TEXT_NODE &&
912 !strcmp((const char *) ptr->content, db))
925 const char *Yaz_ProxyConfig::get_explain_name(const char *db,
926 const char **backend_db)
929 xmlNodePtr ptr_target, ptr_explain;
930 if (m_cp->get_explain_ptr(0, db, &ptr_target, &ptr_explain)
933 struct _xmlAttr *attr;
934 const char *name = 0;
936 for (attr = ptr_target->properties; attr; attr = attr->next)
937 if (!strcmp((const char *) attr->name, "name")
939 && attr->children->type==XML_TEXT_NODE
940 && attr->children->content
941 && attr->children->content[0])
943 name = (const char *)attr->children->content;
948 for (attr = ptr_target->properties; attr; attr = attr->next)
949 if (!strcmp((const char *) attr->name, "database"))
952 && attr->children->type==XML_TEXT_NODE
953 && attr->children->content)
954 *backend_db = (const char *) attr->children->content;
963 char *Yaz_ProxyConfig::get_explain_doc(ODR odr, const char *name,
964 const char *db, int *len)
967 xmlNodePtr ptr_target, ptr_explain;
968 if (m_cp->get_explain_ptr(0 /* host */, db, &ptr_target, &ptr_explain))
970 xmlNodePtr ptr2 = xmlCopyNode(ptr_explain, 1);
972 xmlDocPtr doc = xmlNewDoc((const xmlChar *) "1.0");
974 xmlDocSetRootElement(doc, ptr2);
977 xmlDocDumpMemory(doc, &buf_out, len);
978 char *content = (char*) odr_malloc(odr, *len);
979 memcpy(content, buf_out, *len);
989 void Yaz_ProxyConfig::get_target_info(const char *name,
994 int *target_idletime,
995 int *client_idletime,
997 int *keepalive_limit_bw,
998 int *keepalive_limit_pdu,
1000 const char **cql2rpn,
1001 const char **authentication,
1002 const char **negotiation_charset,
1003 const char **negotiation_lang)
1007 if (!m_cp->m_proxyPtr)
1014 for (ptr = m_cp->m_proxyPtr->children; ptr; ptr = ptr->next)
1016 if (ptr->type == XML_ELEMENT_NODE &&
1017 !strcmp((const char *) ptr->name, "max-clients"))
1019 const char *t = m_cp->get_text(ptr);
1022 *max_clients = atoi(t);
1023 if (*max_clients < 1)
1028 ptr = m_cp->find_target_node(name, 0);
1036 m_cp->return_target_info(ptr, url, limit_bw, limit_pdu, limit_req,
1037 target_idletime, client_idletime,
1038 keepalive_limit_bw, keepalive_limit_pdu,
1039 pre_init, cql2rpn, authentication,
1040 negotiation_charset, negotiation_lang);