summaryrefslogtreecommitdiff
path: root/src/or/proto_control0.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/proto_control0.c')
-rw-r--r--src/or/proto_control0.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/or/proto_control0.c b/src/or/proto_control0.c
deleted file mode 100644
index 34e7ddb8d9..0000000000
--- a/src/or/proto_control0.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Copyright (c) 2001 Matej Pfajfar.
- * Copyright (c) 2001-2004, Roger Dingledine.
- * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
- * Copyright (c) 2007-2018, The Tor Project, Inc. */
-/* See LICENSE for licensing information */
-
-#include "or/or.h"
-#include "lib/container/buffers.h"
-#include "or/proto_control0.h"
-
-/** Return 1 iff buf looks more like it has an (obsolete) v0 controller
- * command on it than any valid v1 controller command. */
-int
-peek_buf_has_control0_command(buf_t *buf)
-{
- if (buf_datalen(buf) >= 4) {
- char header[4];
- uint16_t cmd;
- buf_peek(buf, header, sizeof(header));
- cmd = ntohs(get_uint16(header+2));
- if (cmd <= 0x14)
- return 1; /* This is definitely not a v1 control command. */
- }
- return 0;
-}
-