On Tue, Aug 13, 2024 at 02:08:50PM +0530, Aditya Kumar Singh wrote: > Add MLD level 'status' command. Currently each link level socket has got > 'status' command. When the same is passed on MLD level socket without any > link id, it routes it to first BSS of the MLD if available. Handle this > now properly. > > If link id is not passed then it will be treated as MLD level status > command. This is not a hostapd_cli change, but a hostapd change to add a STATUS control interface command. Sure, that new command could be used with hostapd_cli, but this patch does not introduce any new hostapd_cli changes. The commit message should be clearer on that. > > status > name=wlan0 > mld_address=AA:BB:CC:DD:EE:FF > num_links=2 > LINK INFORMATION That "LINK INFORMATION" line feels a bit strange. Why would it be needed here? > link_id=0 > link_addr=AA:BB:CC:DD:EE:EE > link_id=1 > link_addr=AA:BB:CC:DD:FF:FF link_addr[0]=AA:BB:CC:DD:EE:EE link_addr[1]=AA:BB:CC:DD:FF:FF Might be easier to use in a parser since that would provide unique <name>=<value> lines from the command. > diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c > @@ -4724,6 +4724,49 @@ done: > +int hostapd_ctrl_mld_iface_status(struct hostapd_mld *mld, char *buf, > + size_t buflen) > + if (!mld->fbss) { > + ret = os_snprintf(buf + len, buflen - len, > + "\n No Link information present\n"); > + if (os_snprintf_error(buflen - len, ret)) > + return len; > + len += ret; > + } What is that " No Link information present" supposed to do here and why does this continue printing "LINK INFORMATION" after this? That initial space on the line and now equals sign makes this somewhat inconvenient if one were to want to use a generic parser of <name>=<value> pairs. > + ret = os_snprintf(buf + len, buflen - len, > + "LINK INFORMATION\n"); This would be added after that " No Link information present" line.. -- Jouni Malinen PGP id EFC895FA _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap