Lines Matching defs:attr
25 * return the local attr attributes for host name
82 * if attr==0 || attr=="-" then all attributes returned
86 csattr(register Cs_t* state, const char* name, const char* attr)
100 messagef((state->id, NiL, -8, "attr(%s,%s) call", name, attr));
103 if (attr && (!*attr || *attr == '-' && !*(attr + 1)))
104 attr = 0;
113 n = attr && streq(attr, "name");
122 if (attr && streq(attr, "*"))
132 if (attr)
134 if (streq(attr, "*"))
136 if (streq(attr, "name"))
138 if (streq(attr, "addr") || streq(attr, "host"))
141 return *attr == 'a' ? csntoa(state, addr) : state->host;
146 if (!attr)
158 else if (streq(attr, "addr") || streq(attr, "host"))
159 b += sfsprintf(b, x - b, " %s", (addr = csaddr(state, ip->name)) ? (*attr == 'a' ? csntoa(state, addr) : state->host) : CS_HOST_UNKNOWN);
172 for (s = (char*)attr; *s && *v == *s++; v++);
188 _cs_attr(const char* name, const char* attr)
190 return csattr(&cs, name, attr);