+ case REQ_DISCONNECT: {
+ char name[MAX_STRING_SIZE];
+ bool found = false;
+
+ if(sscanf(request, "%*d %*d " MAX_STRING, name) != 1) {
+ return control_return(c, REQ_DISCONNECT, -1);
+ }
+
+ for list_each(connection_t, other, &connection_list) {
+ if(strcmp(other->name, name)) {
+ continue;
+ }
+
+ terminate_connection(other, other->edge);
+ found = true;
+ }
+
+ return control_return(c, REQ_DISCONNECT, found ? 0 : -2);
+ }
+
+ case REQ_DUMP_TRAFFIC:
+ return dump_traffic(c);
+
+ case REQ_PCAP:
+ sscanf(request, "%*d %*d %d", &c->outmaclength);
+ c->status.pcap = true;
+ pcap = true;
+ return true;
+
+ case REQ_LOG: {
+ int level = 0, colorize = 0;
+ sscanf(request, "%*d %*d %d %d", &level, &colorize);
+ c->log_level = CLAMP(level, DEBUG_UNSET, DEBUG_SCARY_THINGS);
+ c->status.log = true;
+ c->status.log_color = colorize;
+ logcontrol = true;
+ return true;
+ }
+
+ default:
+ return send_request(c, "%d %d", CONTROL, REQ_INVALID);
+ }