summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp_format.c
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2017-04-20 17:50:39 -0400
committerDamjan Marion <dmarion.lists@gmail.com>2017-04-24 13:24:58 +0000
commit636815199a1f359fdd0da706985a74eca95254da (patch)
tree8d613f317624127fdd8ba42097fb60f1347bbb60 /src/vnet/tcp/tcp_format.c
parentb68ad1e99fb65f7ddb4a3211b47173f8c89b29c4 (diff)
Debug CLI to magically create / delete a TCP session
The session ends up in established state, and is hand-crafted to look like it was created by the builtin_server. This will come in handy for injecting packets into tcp46-established, along with ancillary debug CLI to adjust connection parameters. Immediate applications include screwball window cases, out of order segments, paws checking, and so on and so forth. Debug CLI script: loop create set int ip address loop0 6.0.1.1/8 set int state loop0 up set ip arp loop0 6.0.1.2 feed.face.babe test tcp server test tcp session packet-generator new { name tcp limit 1 node ip4-input size 100-100 interface loop0 no-recycle data { TCP: 6.0.1.2 -> 6.0.1.1 TCP: 11234 -> 1234 ACK window 2000 seqnum 0 acknum 0 incrementing 100 } } Change-Id: I866c2159376064b7d14f70531022c1fe949258c2 Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vnet/tcp/tcp_format.c')
-rw-r--r--src/vnet/tcp/tcp_format.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vnet/tcp/tcp_format.c b/src/vnet/tcp/tcp_format.c
index 994ccfd61ae..1ca2f58ea5d 100644
--- a/src/vnet/tcp/tcp_format.c
+++ b/src/vnet/tcp/tcp_format.c
@@ -45,7 +45,8 @@ format_tcp_flags (u8 * s, va_list * args)
{
int flags = va_arg (*args, int);
-#define _(f) if (flags & TCP_FLAG_##f) s = format (s, "%s, ", #f);
+ s = format (s, "0x%02x", flags);
+#define _(f) if (flags & TCP_FLAG_##f) s = format (s, " %s", #f);
foreach_tcp_flag
#undef _
return s;