* [nft PATCH 0/4] small updates to documentation
@ 2014-05-14 15:36 Arturo Borrero Gonzalez
2014-05-14 15:36 ` [nft PATCH 1/4] doc: fix indendation of examples Arturo Borrero Gonzalez
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Arturo Borrero Gonzalez @ 2014-05-14 15:36 UTC (permalink / raw)
To: netfilter-devel
The following series implements some small updates to the nft documentation.
The nft manpage is a bit outdated.
Also, the first patch is a small fix.
Comments welcome.
---
Arturo Borrero Gonzalez (4):
doc: fix indendation of examples
doc: update return code for NFT_EXIT_NONL
doc: document export op
doc: document monitor op
doc/nft.xml | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 67 insertions(+), 3 deletions(-)
--
Arturo Borrero Gonzalez
^ permalink raw reply [flat|nested] 5+ messages in thread
* [nft PATCH 1/4] doc: fix indendation of examples
2014-05-14 15:36 [nft PATCH 0/4] small updates to documentation Arturo Borrero Gonzalez
@ 2014-05-14 15:36 ` Arturo Borrero Gonzalez
2014-05-14 15:36 ` [nft PATCH 2/4] doc: update return code for NFT_EXIT_NONL Arturo Borrero Gonzalez
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Arturo Borrero Gonzalez @ 2014-05-14 15:36 UTC (permalink / raw)
To: netfilter-devel
Let's fix the indendation of examples.
Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
---
doc/nft.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/nft.xml b/doc/nft.xml
index 702891c..958abbc 100644
--- a/doc/nft.xml
+++ b/doc/nft.xml
@@ -2097,7 +2097,7 @@ filter input iif eth0 drop
<programlisting>
<cmdline>:1:19-22: Error: Interface does not exist
filter output oif eth0
-^^^
+ ^^^^
</programlisting>
</example>
<example>
@@ -2105,7 +2105,7 @@ filter output oif eth0
<programlisting>
<cmdline>:1:28-36: Error: Right hand side of relational expression (==) must be constant
filter output tcp dport == tcp dport
-~~ ^^^^^^^^^
+ ~~ ^^^^^^^^^
</programlisting>
</example>
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [nft PATCH 2/4] doc: update return code for NFT_EXIT_NONL
2014-05-14 15:36 [nft PATCH 0/4] small updates to documentation Arturo Borrero Gonzalez
2014-05-14 15:36 ` [nft PATCH 1/4] doc: fix indendation of examples Arturo Borrero Gonzalez
@ 2014-05-14 15:36 ` Arturo Borrero Gonzalez
2014-05-14 15:36 ` [nft PATCH 3/4] doc: document export op Arturo Borrero Gonzalez
2014-05-14 15:36 ` [nft PATCH 4/4] doc: document monitor op Arturo Borrero Gonzalez
3 siblings, 0 replies; 5+ messages in thread
From: Arturo Borrero Gonzalez @ 2014-05-14 15:36 UTC (permalink / raw)
To: netfilter-devel
If we exit with NFT_EXIT_NONL, we return 3.
Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
---
doc/nft.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/nft.xml b/doc/nft.xml
index 958abbc..1de4b3f 100644
--- a/doc/nft.xml
+++ b/doc/nft.xml
@@ -2124,7 +2124,7 @@ filter output oif wlan0
<para>
On success, nft exits with a status of 0. Unspecified
errors cause it to exit with a status of 1, memory allocation
- errors with a status of 2.
+ errors with a status of 2, unable to open Netlink socket with 3.
</para>
</refsect1>
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [nft PATCH 3/4] doc: document export op
2014-05-14 15:36 [nft PATCH 0/4] small updates to documentation Arturo Borrero Gonzalez
2014-05-14 15:36 ` [nft PATCH 1/4] doc: fix indendation of examples Arturo Borrero Gonzalez
2014-05-14 15:36 ` [nft PATCH 2/4] doc: update return code for NFT_EXIT_NONL Arturo Borrero Gonzalez
@ 2014-05-14 15:36 ` Arturo Borrero Gonzalez
2014-05-14 15:36 ` [nft PATCH 4/4] doc: document monitor op Arturo Borrero Gonzalez
3 siblings, 0 replies; 5+ messages in thread
From: Arturo Borrero Gonzalez @ 2014-05-14 15:36 UTC (permalink / raw)
To: netfilter-devel
Let's document the `nft export [xml|json]' command.
Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
---
doc/nft.xml | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/doc/nft.xml b/doc/nft.xml
index 1de4b3f..61ca03a 100644
--- a/doc/nft.xml
+++ b/doc/nft.xml
@@ -2080,6 +2080,28 @@ filter input iif eth0 drop
</refsect1>
<refsect1>
+ <title>Additional commands</title>
+ <para>
+ These are some additional commands included in nft.
+ </para>
+ <refsect2>
+ <title>export</title>
+ <para>
+ Export your current ruleset in XML or JSON format to stdout.
+ </para>
+ <para>
+ Examples:
+ <programlisting>
+% nft export xml
+[...]
+% nft export json
+[...]
+ </programlisting>
+ </para>
+ </refsect2>
+ </refsect1>
+
+ <refsect1>
<title>Error reporting</title>
<para>
When an error is detected, nft shows the line(s) containing the error, the position
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [nft PATCH 4/4] doc: document monitor op
2014-05-14 15:36 [nft PATCH 0/4] small updates to documentation Arturo Borrero Gonzalez
` (2 preceding siblings ...)
2014-05-14 15:36 ` [nft PATCH 3/4] doc: document export op Arturo Borrero Gonzalez
@ 2014-05-14 15:36 ` Arturo Borrero Gonzalez
3 siblings, 0 replies; 5+ messages in thread
From: Arturo Borrero Gonzalez @ 2014-05-14 15:36 UTC (permalink / raw)
To: netfilter-devel
Let's add some documentation about the monitor operation.
Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
---
doc/nft.xml | 42 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/doc/nft.xml b/doc/nft.xml
index 61ca03a..41c0840 100644
--- a/doc/nft.xml
+++ b/doc/nft.xml
@@ -2099,6 +2099,48 @@ filter input iif eth0 drop
</programlisting>
</para>
</refsect2>
+ <refsect2>
+ <title>monitor</title>
+ <para>
+ The monitor command allows you to listen to Netlink events produced
+ by the nf_tables subsystem, related to creation and deletion of objects.
+ When they ocurr, nft will print to stdout the monitored events in either
+ XML, JSON or native nft format.
+ </para>
+ <para>
+ To filter events related to a concrete object, use one of the keywords 'tables', 'chains', 'sets', 'rules', 'elements'.
+ </para>
+ <para>
+ To filter events related to a concrete action, use keyword 'new' or 'destroy'.
+ </para>
+ <para>
+ Hit ^C to finish the monitor operation.
+ </para>
+ <example>
+ <title>Listen to all events, report in native nft format</title>
+ <programlisting>
+% nft monitor
+ </programlisting>
+ </example>
+ <example>
+ <title>Listen to added tables, report in XML format</title>
+ <programlisting>
+% nft monitor new tables xml
+ </programlisting>
+ </example>
+ <example>
+ <title>Listen to deleted rules, report in JSON format</title>
+ <programlisting>
+% nft monitor destroy rules json
+ </programlisting>
+ </example>
+ <example>
+ <title>Listen to both new and destroyed chains, in native nft format</title>
+ <programlisting>
+% nft monitor chains
+ </programlisting>
+ </example>
+ </refsect2>
</refsect1>
<refsect1>
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-05-14 15:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-14 15:36 [nft PATCH 0/4] small updates to documentation Arturo Borrero Gonzalez
2014-05-14 15:36 ` [nft PATCH 1/4] doc: fix indendation of examples Arturo Borrero Gonzalez
2014-05-14 15:36 ` [nft PATCH 2/4] doc: update return code for NFT_EXIT_NONL Arturo Borrero Gonzalez
2014-05-14 15:36 ` [nft PATCH 3/4] doc: document export op Arturo Borrero Gonzalez
2014-05-14 15:36 ` [nft PATCH 4/4] doc: document monitor op Arturo Borrero Gonzalez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).