summaryrefslogtreecommitdiff
path: root/tcp.h
diff options
context:
space:
mode:
authorAndrew Darqui <andrew.darqui@gmail.com>2016-01-12 12:32:55 -0500
committerFrancois-Xavier Le Bail <fx.lebail@yahoo.com>2016-04-26 11:00:21 +0200
commitfc213645d4399c986f1ce3d55e113828e73ee49d (patch)
treec57594dfc2cd419f366a6f752517928f90c4e55c /tcp.h
parent45a212f0a2292aabffbd60bf97d37a83c3117825 (diff)
downloadtcpdump-fc213645d4399c986f1ce3d55e113828e73ee49d.tar.gz
Initial support for the REdis Serialization Protocol known as RESP.
This commit adds support for RESP as defined in: http://redis.io/topics/protocol. It also supports inline commands and pipelining. Due to the popularity of RESP, numerous services are emerging that use this protocol. You may decode RESP packets on arbitrary ports using the "-T resp" option. Example captures can be found in tests/resp_*. A simple way to test this parser is to start redis-server and then run redis-cli commands such as "redis-cli set key value". Traditionally, redis-cli monitor is used to debug redis. Unfortunately, the "monitor" command can cause significant load on a redis-server in production. This parser may be used as a non-invasive alternative to redis-cli monitor.
Diffstat (limited to 'tcp.h')
-rw-r--r--tcp.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tcp.h b/tcp.h
index 24739622..02df6295 100644
--- a/tcp.h
+++ b/tcp.h
@@ -154,3 +154,6 @@ struct tcphdr {
#ifndef BEEP_PORT
#define BEEP_PORT 10288
#endif
+#ifndef REDIS_PORT
+#define REDIS_PORT 6379
+#endif