+proto_shell_setup_cb(struct uloop_process *p, int ret)
+{
+ struct proto_shell_state *state;
+
+ state = container_of(p, struct proto_shell_state, setup_task);
+ if (state->teardown_pending) {
+ state->teardown_pending = 0;
+ proto_shell_handler(&state->proto, PROTO_CMD_TEARDOWN, false);
+ }
+}
+
+static void
+proto_shell_teardown_cb(struct uloop_process *p, int ret)
+{
+ struct proto_shell_state *state;
+
+ state = container_of(p, struct proto_shell_state, teardown_task);
+ state->proto.proto_event(&state->proto, IFPEV_DOWN);
+}
+
+static void