X-Git-Url: http://git.onelab.eu/?p=distributedratelimiting.git;a=blobdiff_plain;f=drl%2Fconfig.c;h=261ce0c5c7185883b7e745b0fe4028a52c35712b;hp=d9d9ede441815d09b7d8d0356bfe5d1059c9e039;hb=4beac2bba3083d8ee73c49b9ad51e6af1e2c9af4;hpb=c9d6255f0c06ee41eb2c06a5f74a957ec7be3223 diff --git a/drl/config.c b/drl/config.c index d9d9ede..261ce0c 100644 --- a/drl/config.c +++ b/drl/config.c @@ -113,6 +113,8 @@ static int parse_common(xmlDocPtr doc, xmlNodePtr ident, ident_config *common) { xmlChar *mainloop_intervals; xmlChar *communication_intervals; xmlChar *independent; + xmlChar *htb_node; + xmlChar *htb_parent; xmlNodePtr fields = ident->children; ident_peer *current = NULL; @@ -266,6 +268,21 @@ static int parse_common(xmlDocPtr doc, xmlNodePtr ident, ident_config *common) { xmlFree(independent); } + htb_node = xmlGetProp(ident, (const xmlChar *) "htb_node"); + htb_parent = xmlGetProp(ident, (const xmlChar *) "htb_parent"); + if (htb_node == NULL) { + common->htb_node = -1; + } else { + sscanf((const char *)htb_node, "%x", &common->htb_node); + xmlFree(htb_node); + } + if (htb_parent == NULL) { + common->htb_parent = -1; + } else { + sscanf((const char *)htb_parent, "%x", &common->htb_parent); + xmlFree(htb_parent); + } + while (fields != NULL) { if((!xmlStrcmp(fields->name, (const xmlChar *) "peer"))) { xmlChar *ip = xmlNodeListGetString(doc, fields->children, 1);