Lines Matching defs:im
34 struct idxmap *im;
36 for (im = idxmap[idx & 0xF]; im; im = im->next)
37 if (im->index == idx)
38 return im;
46 struct idxmap *im, **imp;
62 for (imp = &idxmap[h]; (im = *imp) != NULL; imp = &im->next)
63 if (im->index == ifi->ifi_index)
66 im = xmalloc(sizeof(*im));
67 im->next = *imp;
68 im->index = ifi->ifi_index;
69 *imp = im;
71 im->type = ifi->ifi_type;
72 im->flags = ifi->ifi_flags;
75 im->alen = alen = RTA_PAYLOAD(tb[IFLA_ADDRESS]);
76 if (alen > sizeof(im->addr))
77 alen = sizeof(im->addr);
78 memcpy(im->addr, RTA_DATA(tb[IFLA_ADDRESS]), alen);
80 im->alen = 0;
81 memset(im->addr, 0, sizeof(im->addr));
83 strcpy(im->name, RTA_DATA(tb[IFLA_IFNAME]));
89 struct idxmap *im;
93 im = find_by_index(idx);
94 if (im)
95 return im->name;
111 struct idxmap *im;
115 im = find_by_index(idx);
116 if (im)
117 return im->type;
124 struct idxmap *im;
128 im = find_by_index(idx);
129 if (im)
130 return im->flags;
144 struct idxmap *im;
154 for (im = idxmap[i]; im; im = im->next) {
155 if (strcmp(im->name, name) == 0) {
156 icache = im->index;
158 ret = im->index;