Lines Matching defs:im
45 struct idxmap *im, **imp;
62 for (imp=&idxmap[h]; (im=*imp)!=NULL; imp = &im->next)
63 if (im->index == ifi->ifi_index)
66 if (im == NULL) {
67 im = malloc(sizeof(*im));
68 if (im == NULL)
70 im->next = *imp;
71 im->index = ifi->ifi_index;
72 *imp = im;
75 im->type = ifi->ifi_type;
76 im->flags = ifi->ifi_flags;
79 im->alen = alen = RTA_PAYLOAD(tb[IFLA_ADDRESS]);
80 if (alen > sizeof(im->addr))
81 alen = sizeof(im->addr);
82 memcpy(im->addr, RTA_DATA(tb[IFLA_ADDRESS]), alen);
84 im->alen = 0;
85 memset(im->addr, 0, sizeof(im->addr));
87 strcpy(im->name, RTA_DATA(tb[IFLA_IFNAME]));
93 struct idxmap *im;
97 for (im = idxmap[idx&0xF]; im; im = im->next)
98 if (im->index == idx)
99 return im->name;
114 struct idxmap *im;
118 for (im = idxmap[idx&0xF]; im; im = im->next)
119 if (im->index == idx)
120 return im->type;
126 struct idxmap *im;
131 for (im = idxmap[idx&0xF]; im; im = im->next)
132 if (im->index == idx)
133 return im->flags;
140 struct idxmap *im;
145 for (im = idxmap[idx&0xF]; im; im = im->next) {
146 if (im->index == idx) {
147 if (alen > sizeof(im->addr))
148 alen = sizeof(im->addr);
149 if (alen > im->alen)
150 alen = im->alen;
151 memcpy(addr, im->addr, alen);
162 struct idxmap *im;
170 for (im = idxmap[i]; im; im = im->next) {
171 if (strcmp(im->name, name) == 0) {
172 icache = im->index;
174 return im->index;