Lines Matching defs:list
128 static int substring_to_idx(char *str, struct arglist *list)
136 for (alist = list; alist->name; alist++)
141 static int string_to_idx(char *str, struct arglist *list)
146 for (alist = list; alist->name; alist++)
151 static char *idx_to_string(int idx, struct arglist *list)
156 for (alist = list; alist->name; alist++)
182 // Parse /etc/iproute2/RPDB_tables and prepare list.
183 static void parseRPDB(char *fname, struct arglist **list, int32_t size)
206 if (list[index]) free(list[index]->name);
207 else list[index] = xzalloc(sizeof(struct arglist));
208 list[index]->idx = idx;
209 list[index]->name = xstrdup(toybuf);
216 static void free_alist(struct arglist **list)
220 if (list[i]) {
221 free(list[i]->name);
222 free(list[i]);
227 static void init_arglist(struct arglist **list,int value, char* name)
229 if (!list[value]) list[value] = xzalloc(sizeof(struct arglist));
230 list[value]->idx = value;
231 list[value]->name = xstrdup(name);
986 {"set", 1}, {"show", 2}, {"list", 2}, {"lst", 2}, {NULL,-1}};
1476 {"list", 1},{"show", 1},{"lst", 1}, {"flush", 1}, {NULL,-1}};
1504 "iproute { list | flush } SELECTOR\n" \
2135 {"chg", 3},{"delete",4}, {"get", 5}, {"list", 6}, {"show", 7},
2176 error_exit("usage: ip rule [ list | add | del ] SELECTOR ACTION\n"
2408 struct arglist options[] = {{"add", 0}, {"delete", 0}, {"list", 1},
2769 {"delete", 0}, {"show", 1}, {"list", 1}, {"lst", 1}, {NULL, -1}