8 * look up the ip attributes 'list' for an entry that has the
9 * given 'attr=val' and a 'ip=' tuples.
11 * return nil if not found.
14 csipinfo(char *netroot, char *attr, char *val, char **list, int n)
16 Ndbtuple *t, *first, *last;
23 snprint(line, sizeof(line), "%s/cs", netroot);
25 strcpy(line, "/net/cs");
26 fd = open(line, ORDWR);
30 e = line + sizeof(line);
31 p = seprint(line, e, "!ipinfo %s=%s", attr, val);
32 for(i = 0; i < n; i++){
35 p = seprint(p, e, " %s", *list++);
38 if(write(fd, line, strlen(line)) < 0){
46 n = read(fd, line, sizeof(line)-2);
52 t = _ndbparseline(line);
66 ndbsetmalloctag(first, getcallerpc(&netroot));