16.12.2020, 08:58, "Jason Wang" :
> - Original Message -
>> Jason Wang writes:
>>
>> [...]
>> > One more stupid question, instead of generating the string via hard
>> > codes, is there any method (dict?) to iterate all the key/values
>> > automatically?
>>
>> QAPI visitors.
>>
>>
- Original Message -
> Jason Wang writes:
>
> [...]
> > One more stupid question, instead of generating the string via hard
> > codes, is there any method (dict?) to iterate all the key/values
> > automatically?
>
> QAPI visitors.
>
> The lazy way: use the QObject output visitor to c
Jason Wang writes:
[...]
> One more stupid question, instead of generating the string via hard
> codes, is there any method (dict?) to iterate all the key/values
> automatically?
QAPI visitors.
The lazy way: use the QObject output visitor to convert the QAPI type
(here: NetdevInfo) to QObject,
- Original Message -
> Hi!
>
> 07.12.2020, 08:52, "Jason Wang" :
> > On 2020/11/9 上午7:59, Alexey Kirillov wrote:
> >> +#ifdef CONFIG_SLIRP
> >> + case NET_BACKEND_USER: {
> >> + size_t len = strchr(ni->u.user.net, '/') - ni->u.user.net;
> >> + char *net = g_strndup(ni->u.user.net, l
Hi!
07.12.2020, 08:52, "Jason Wang" :
> On 2020/11/9 上午7:59, Alexey Kirillov wrote:
>> +#ifdef CONFIG_SLIRP
>> + case NET_BACKEND_USER: {
>> + size_t len = strchr(ni->u.user.net, '/') - ni->u.user.net;
>> + char *net = g_strndup(ni->u.user.net, len);
>> +
>> + info_str = g_strdup_printf("net
On 2020/11/9 上午7:59, Alexey Kirillov wrote:
+#ifdef CONFIG_SLIRP
+case NET_BACKEND_USER: {
+size_t len = strchr(ni->u.user.net, '/') - ni->u.user.net;
+char *net = g_strndup(ni->u.user.net, len);
+
+info_str = g_strdup_printf("net=%s,restrict=%s",
+
Replace usage of legacy field info_str of NetClientState for
backend network devices with result of QMP command query-netdev.
NIC and hubports still use legacy info_str field.
Signed-off-by: Alexey Kirillov
---
include/net/net.h | 3 +-
net/clients.h | 1 +
net/hub.c | 4 +-
ne