Lines Matching refs:idx
91 const char *ll_idx_n2a(unsigned idx, char *buf) in ll_idx_n2a() argument
95 if (idx == 0) in ll_idx_n2a()
97 for (im = idxmap[idx&0xF]; im; im = im->next) in ll_idx_n2a()
98 if (im->index == idx) in ll_idx_n2a()
100 snprintf(buf, 16, "if%d", idx); in ll_idx_n2a()
105 const char *ll_index_to_name(unsigned idx) in ll_index_to_name() argument
109 return ll_idx_n2a(idx, nbuf); in ll_index_to_name()
112 int ll_index_to_type(unsigned idx) in ll_index_to_type() argument
116 if (idx == 0) in ll_index_to_type()
118 for (im = idxmap[idx&0xF]; im; im = im->next) in ll_index_to_type()
119 if (im->index == idx) in ll_index_to_type()
124 unsigned ll_index_to_flags(unsigned idx) in ll_index_to_flags() argument
128 if (idx == 0) in ll_index_to_flags()
131 for (im = idxmap[idx&0xF]; im; im = im->next) in ll_index_to_flags()
132 if (im->index == idx) in ll_index_to_flags()
137 unsigned ll_index_to_addr(unsigned idx, unsigned char *addr, in ll_index_to_addr() argument
142 if (idx == 0) in ll_index_to_addr()
145 for (im = idxmap[idx&0xF]; im; im = im->next) { in ll_index_to_addr()
146 if (im->index == idx) { in ll_index_to_addr()
164 unsigned idx; in ll_name_to_index() local
180 idx = if_nametoindex(name); in ll_name_to_index()
181 if (idx == 0) in ll_name_to_index()
182 sscanf(name, "if%u", &idx); in ll_name_to_index()
183 return idx; in ll_name_to_index()