{
struct proto_shell_state *state;
struct proto_shell_handler *handler;
- const char *argv[5];
+ const char *argv[6];
char *config;
int ret;
argv[2] = "teardown";
argv[3] = config;
argv[4] = NULL;
+ if (proto->iface->main_dev.dev) {
+ argv[4] = proto->iface->main_dev.dev->ifname;
+ argv[5] = NULL;
+ }
switch(cmd) {
case PROTO_CMD_SETUP:
memcpy(state->config, attr, blob_pad_len(attr));
state->proto.free = proto_shell_free;
- state->proto.handler = proto_shell_handler;
+ state->proto.cb = proto_shell_handler;
state->handler = container_of(h, struct proto_shell_handler, proto);
return &state->proto;
proto->config_params = &handler->config;
proto->attach = proto_shell_attach;
+ tmp = get_field(obj, "no-device", json_type_boolean);
+ if (tmp && json_object_get_boolean(tmp))
+ handler->proto.flags |= PROTO_FLAG_NODEV;
+
config = get_field(obj, "config", json_type_array);
if (config)
handler->config_buf = proto_shell_parse_config(&handler->config, config);