#include "control_common.h"
#include "graph.h"
#include "logger.h"
+#include "meta.h"
+#include "net.h"
#include "protocol.h"
+#include "route.h"
+#include "splay_tree.h"
#include "utils.h"
#include "xalloc.h"
return control_return(c, REQ_DISCONNECT, found ? 0 : -2);
}
+ case REQ_DUMP_TRAFFIC:
+ return dump_traffic(c);
+
+ case REQ_PCAP:
+ c->status.pcap = true;
+ pcap = true;
+ return true;
+
default:
return send_request(c, "%d %d", CONTROL, REQ_INVALID);
}
}
-bool init_control() {
+bool init_control(void) {
randomize(controlcookie, sizeof controlcookie / 2);
bin2hex(controlcookie, controlcookie, sizeof controlcookie / 2);
controlcookie[sizeof controlcookie - 1] = 0;
return true;
}
-void exit_control() {
+void exit_control(void) {
unlink(controlcookiename);
}