Re: [PATCH v2 net-next] netlink: specs: add conntrack dump and stats dump support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Florian Westphal <fw@xxxxxxxxx> writes:

> This adds support to dump the connection tracking table
> ("conntrack -L") and the conntrack statistics, ("conntrack -S").
>
> Example conntrack dump:
> tools/net/ynl/pyynl/cli.py --spec Documentation/netlink/specs/conntrack.yaml --dump get

Hi Florian,

Updates all look good, with one minor new point below.

Reviewed-by: Donald Hunter <donald.hunter@xxxxxxxxx>

> +operations:
> +  enum-model: directional
> +  list:
> +    -
> +      name: get
> +      doc: get / dump entries
> +      attribute-set: conntrack-attrs
> +      fixed-header: nfgenmsg
> +      do:
> +        request:
> +          value: 0x101
> +          attributes:
> +            - tuple-orig
> +            - tuple-reply
> +            - zone
> +        reply:
> +          value: 0x100
> +          attributes:

To avoid duplicating the attribute list in the dump reply, you can
reference this definition:

@@ -565,7 +565,7 @@ operations:
             - zone
         reply:
           value: 0x100
-          attributes:
+          attributes: &entries-attrs
             - tuple-orig
             - tuple-reply
             - status
@@ -598,28 +598,7 @@ operations:
             - zone
         reply:
           value: 0x100
-          attributes:
-            - tuple-orig
-            - tuple-reply
-            - status
-            - protoinfo
-            - help
-            - nat-src
-            - nat-dst
-            - timeout
-            - mark
-            - counter-orig
-            - counter-reply
-            - use
-            - id
-            - nat-dst
-            - tuple-master
-            - seq-adj-orig
-            - seq-adj-reply
-            - zone
-            - secctx
-            - labels
-            - synproxy
+          attributes: *entries-attrs
     -
       name: get-stats
       doc: dump pcpu conntrack stats




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux