From 22535a98470a908b879db8fc0354c5f2bbb3984e Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 28 Feb 2017 13:31:54 +0100 Subject: src: revisit tcp options support Rework syntax, add tokens so we can extend the grammar more easily. This has triggered several syntax changes with regards to the original patch, specifically: tcp option sack0 left 1 There is no space between sack and the block number anymore, no more offset field, now they are a single field. Just like we do with rt, rt0 and rt2. This simplifies our grammar and that is good since it makes our life easier when extending it later on to accomodate new features. I have also renamed sack_permitted to sack-permitted. I couldn't find any option using underscore so far, so let's keep it consistent with what we have. Signed-off-by: Pablo Neira Ayuso --- src/exthdr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/exthdr.c') diff --git a/src/exthdr.c b/src/exthdr.c index cfc6bb60..ddda1b87 100644 --- a/src/exthdr.c +++ b/src/exthdr.c @@ -33,7 +33,7 @@ static void exthdr_expr_print(const struct expr *expr) char buf[3] = {0}; if (offset) - snprintf(buf, sizeof buf, " %d", offset); + snprintf(buf, sizeof buf, "%d", offset); printf("tcp option %s%s %s", expr->exthdr.desc->name, buf, expr->exthdr.tmpl->token); } -- cgit v1.2.3