Home | History | Annotate | Download | only in lib

Lines Matching refs: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);
111 if (im) {
113 if (strcmp(im->name, ifname) != 0) {
114 hlist_del(&im->name_hash);
116 hlist_add_head(&im->name_hash, &name_head[h]);
119 im->flags = ifi->ifi_flags;
123 im = malloc(sizeof(*im) + strlen(ifname) + 1);
124 if (im == NULL)
126 im->index = ifi->ifi_index;
127 strcpy(im->name, ifname);
128 im->type = ifi->ifi_type;
129 im->flags = ifi->ifi_flags;
132 hlist_add_head(&im->idx_hash, &idx_head[h]);
135 hlist_add_head(&im->name_hash, &name_head[h]);
142 const struct ll_cache *im;
147 im = ll_get_by_index(idx);
148 if (im)
149 return im->name;
166 const struct ll_cache *im;
171 im = ll_get_by_index(idx);
172 return im ? im->type : -1;
177 const struct ll_cache *im;
182 im = ll_get_by_index(idx);
183 return im ? im->flags : -1;
188 const struct ll_cache *im;
194 im = ll_get_by_name(name);
195 if (im)
196 return im->index;