From f931d316a6360e8b0e760d60a0c8fcc01e3ded13 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 15 May 2021 15:53:40 +0200 Subject: conntrack: T3535: add op-mode commands for tracked connections" --- data/templates/conntrackd/conntrackd.op-mode.tmpl | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 data/templates/conntrackd/conntrackd.op-mode.tmpl (limited to 'data') diff --git a/data/templates/conntrackd/conntrackd.op-mode.tmpl b/data/templates/conntrackd/conntrackd.op-mode.tmpl new file mode 100644 index 000000000..82a4b09ad --- /dev/null +++ b/data/templates/conntrackd/conntrackd.op-mode.tmpl @@ -0,0 +1,13 @@ +Source Destination Protocol +{% for parsed in data if parsed.flow is defined and parsed.flow.meta is defined %} +{% for key in parsed.flow.meta %} +{% if key['@direction'] == 'original' %} +{% set saddr = key.layer3.src | bracketize_ipv6 %} +{% set sport = key.layer4.sport %} +{% set daddr = key.layer3.dst | bracketize_ipv6 %} +{% set dport = key.layer4.dport %} +{% set protocol = key.layer4['@protoname'] %} +{{ "%-48s" | format(saddr ~ ':' ~ sport) }} {{ "%-48s" | format(daddr ~ ':' ~ dport) }} {{ protocol }} +{% endif %} +{% endfor %} +{% endfor %} -- cgit v1.2.3