7 /* return list of ip addresses for a name */
9 ndbgetipaddr(Ndb *db, char *val)
12 Ndbtuple *it, *first, *last, *next;
15 /* already an IP address? */
17 if(strcmp(attr, "ip") == 0){
18 it = ndbnew("ip", val);
20 ndbsetmalloctag(it, getcallerpc(&db));
25 p = ndbgetvalue(db, &s, attr, val, "ip", &it);
31 /* remove the non-ip entries */
32 for(; it != nil; it = next){
34 if(strcmp(it->attr, "ip") == 0){
49 } while((it = ndbsnext(&s, attr, val)) != nil);
51 first = ndbdedup(first);
53 ndbsetmalloctag(first, getcallerpc(&db));