- if (unformat (line_input, "name %s", &args.name))
- ;
- else if (unformat (line_input, "host-ns %s", &args.host_namespace))
- ;
- else if (unformat (line_input, "host-bridge %s", &args.host_bridge))
- ;
- else if (unformat (line_input, "host-ip4-addr %U/%d",
- unformat_ip4_address, &args.host_ip4_addr,
- &args.host_ip4_prefix_len))
- ip_addr_set = 1;
- else if (unformat (line_input, "host-ip6-addr %U/%d",
- unformat_ip6_address, &args.host_ip6_addr,
- &args.host_ip6_prefix_len))
- ip_addr_set = 1;
- else if (unformat (line_input, "rx-ring-size %d", &args.rx_ring_sz))
- ;
- else if (unformat (line_input, "tx-ring-size %d", &args.tx_ring_sz))
- ;
- else if (unformat (line_input, "hw-addr %U",
- unformat_ethernet_address, args.hw_addr))
- args.hw_addr_set = 1;
- else
- return clib_error_return (0, "unknown input `%U'",
- format_unformat_error, input);
+
+ while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
+ {
+ if (unformat (line_input, "id %u", &args.id))
+ ;
+ else
+ if (unformat (line_input, "host-if-name %s", &args.host_if_name))
+ ;
+ else if (unformat (line_input, "host-ns %s", &args.host_namespace))
+ ;
+ else if (unformat (line_input, "host-mac-addr %U",
+ unformat_ethernet_address, args.host_mac_addr))
+ ;
+ else if (unformat (line_input, "host-bridge %s", &args.host_bridge))
+ ;
+ else if (unformat (line_input, "host-ip4-addr %U/%d",
+ unformat_ip4_address, &args.host_ip4_addr,
+ &args.host_ip4_prefix_len))
+ ip_addr_set = 1;
+ else if (unformat (line_input, "host-ip6-addr %U/%d",
+ unformat_ip6_address, &args.host_ip6_addr,
+ &args.host_ip6_prefix_len))
+ ip_addr_set = 1;
+ else if (unformat (line_input, "rx-ring-size %d", &args.rx_ring_sz))
+ ;
+ else if (unformat (line_input, "tx-ring-size %d", &args.tx_ring_sz))
+ ;
+ else if (unformat (line_input, "hw-addr %U",
+ unformat_ethernet_address, args.mac_addr))
+ args.mac_addr_set = 1;
+ else
+ return clib_error_return (0, "unknown input `%U'",
+ format_unformat_error, input);
+ }
+ unformat_free (line_input);