projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add the ability to dump all traffic going through route() over a control connection.
[tinc]
/
src
/
control.c
diff --git
a/src/control.c
b/src/control.c
index
ade012a
..
e03e67d
100644
(file)
--- a/
src/control.c
+++ b/
src/control.c
@@
-24,7
+24,11
@@
#include "control_common.h"
#include "graph.h"
#include "logger.h"
#include "control_common.h"
#include "graph.h"
#include "logger.h"
+#include "meta.h"
+#include "net.h"
#include "protocol.h"
#include "protocol.h"
+#include "route.h"
+#include "splay_tree.h"
#include "utils.h"
#include "xalloc.h"
#include "utils.h"
#include "xalloc.h"
@@
-116,6
+120,11
@@
bool control_h(connection_t *c, char *request) {
case REQ_DUMP_TRAFFIC:
return dump_traffic(c);
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);
}
default:
return send_request(c, "%d %d", CONTROL, REQ_INVALID);
}