Home | History | Annotate | Download | only in lib

Lines Matching defs:im

46 		struct ll_cache *im
48 if (im->index == index)
49 return im;
71 struct ll_cache *im
74 if (strncmp(im->name, name, IFNAMSIZ) == 0)
75 return im;
87 struct ll_cache *im;
96 im = ll_get_by_index(ifi->ifi_index);
98 if (im) {
99 hlist_del(&im->name_hash);
100 hlist_del(&im->idx_hash);
101 free(im);
112 if (im) {
114 if (strcmp(im->name, ifname) != 0) {
115 hlist_del(&im->name_hash);
117 hlist_add_head(&im->name_hash, &name_head[h]);
120 im->flags = ifi->ifi_flags;
124 im = malloc(sizeof(*im));
125 if (im == NULL)
127 im->index = ifi->ifi_index;
128 strcpy(im->name, ifname);
129 im->type = ifi->ifi_type;
130 im->flags = ifi->ifi_flags;
133 hlist_add_head(&im->idx_hash, &idx_head[h]);
136 hlist_add_head(&im->name_hash, &name_head[h]);
143 const struct ll_cache *im;
148 im = ll_get_by_index(idx);
149 if (im)
150 return im->name;
167 const struct ll_cache *im;
172 im = ll_get_by_index(idx);
173 return im ? im->type : -1;
178 const struct ll_cache *im;
183 im = ll_get_by_index(idx);
184 return im ? im->flags : -1;
189 const struct ll_cache *im;
195 im = ll_get_by_name(name);
196 if (im)
197 return im->index;