Lines Matching refs:idx
18 static void iface_index_get(size_t idx, struct shell_static_entry *entry);
22 static char *set_iface_index_buffer(size_t idx) in set_iface_index_buffer() argument
24 struct net_if *iface = net_if_get_by_index(idx); in set_iface_index_buffer()
27 if (idx == 0) { in set_iface_index_buffer()
35 snprintk(iface_index_buffer[idx - 1], MAX_IFACE_STR_LEN, "%d", (uint8_t)idx); in set_iface_index_buffer()
37 return iface_index_buffer[idx - 1]; in set_iface_index_buffer()
40 static char *set_iface_index_help(size_t idx) in set_iface_index_help() argument
42 struct net_if *iface = net_if_get_by_index(idx); in set_iface_index_help()
45 if (idx == 0) { in set_iface_index_help()
59 snprintk(iface_help_buffer[idx - 1], MAX_IFACE_HELP_STR_LEN, in set_iface_index_help()
62 snprintk(iface_help_buffer[idx - 1], MAX_IFACE_HELP_STR_LEN, in set_iface_index_help()
66 return iface_help_buffer[idx - 1]; in set_iface_index_help()
69 static void iface_index_get(size_t idx, struct shell_static_entry *entry) in iface_index_get() argument
72 entry->help = set_iface_index_help(idx); in iface_index_get()
74 entry->syntax = set_iface_index_buffer(idx); in iface_index_get()