Lines Matching refs:ni
135 struct if_nameindex *ni; in if_nameindex() local
139 ni = malloc((n + 1) * sizeof(*ni)); in if_nameindex()
140 if (ni == NULL) { in if_nameindex()
145 ni[i].if_index = i + 1; in if_nameindex()
147 ni[i].if_name = malloc(IF_NAMESIZE); in if_nameindex()
148 if (ni[i].if_name == NULL) { in if_nameindex()
152 name = if_indextoname(i + 1, ni[i].if_name); in if_nameindex()
156 ni[n].if_index = 0; in if_nameindex()
157 ni[n].if_name = NULL; in if_nameindex()
159 return ni; in if_nameindex()
162 if_freenameindex(ni); in if_nameindex()