Skip to content

docs/system/iptables: add iptables man page#3533

Closed
Zepp-Hanzj wants to merge 2 commits into
apache:masterfrom
Zepp-Hanzj:docs/iptables
Closed

docs/system/iptables: add iptables man page#3533
Zepp-Hanzj wants to merge 2 commits into
apache:masterfrom
Zepp-Hanzj:docs/iptables

Conversation

@Zepp-Hanzj

Copy link
Copy Markdown
Contributor

Summary

Add comprehensive documentation for the iptables command.

Changes

  • Add system/iptables/iptables_doc.rst with complete man page
  • Document all commands: -A, -D, -I, -L, -F, -P
  • Document all options: -t, -p, -s, -d, -j, -i, -o, --sport, --dport, --icmp-type
  • Include practical examples for common use cases
  • Reference Kconfig options: CONFIG_SYSTEM_IPTABLES, CONFIG_NET_IPTABLES, CONFIG_NET_IPv4

Documentation Structure

  • Name and synopsis
  • Description with targets and tables
  • Commands section with detailed explanations
  • Options section with all parameters
  • Examples section with real-world scenarios
  • Configuration requirements
  • See Also references

Testing

  • Verified documentation matches actual implementation in iptables.c and iptables_utils.c
  • All options and commands documented are present in the source code
  • Examples use correct syntax as shown in iptables_showusage()

Impact

  • New documentation only, no code changes
  • Improves discoverability and usability of iptables command

Related

  • Companion PR for ip6tables documentation will follow

Signed-off-by: hanzhijian hanzhijian@zepp.com

Introduce a new CONFIG_UORB_FORMAT Kconfig option to control whether
uORB format strings are compiled in. UORB_LISTENER, UORB_GENERATOR,
and DEBUG_UORB all select UORB_FORMAT automatically, so format strings
are included when any of these features are enabled.

This replaces the previous approach of guarding format strings with
CONFIG_DEBUG_UORB, which prevented uorb_listener from displaying
sensor data when debug output was disabled.

Signed-off-by: hanzj <hanzjian@zepp.com>
Add comprehensive documentation for the iptables command including:
- Name, synopsis, and description
- Targets (ACCEPT, DROP, RETURN)
- Tables (filter)
- Commands (-A, -D, -I, -L, -F, -P)
- Options (-t, -p, -s, -d, -j, -i, -o, --sport, --dport, --icmp-type)
- Practical examples
- Configuration requirements

The documentation is based on the actual implementation in
apps/system/iptables/iptables.c and iptables_utils.c.

Signed-off-by: hanzhijian <hanzhijian@zepp.com>
@acassis acassis requested review from acassis and linguini1 and removed request for acassis June 9, 2026 13:06
@@ -0,0 +1,242 @@
==============

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not move to nuttx/Documentation?

@linguini1 linguini1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please contribute this to the Documentation/ dir in the nuttx repo. Also, this PR includes unrelated commits.

@cederom cederom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @Zepp-Hanzj :-)

  • as in #3534.. we do not document this way, please update our main documentation at nuttx/Documentation as @xiaoxiang781216 noted :-)
  • PR should only contain related changes, when providing documentation do not touch any other areas (i.e. uorb defines) as @linguini1 noted :-)

There are two possible locations for the iptables as with ip6tables:

  1. https://nuttx.apache.org/docs/latest/applications/netutils/index.html
    1.1. https://nuttx.apache.org/docs/latest/applications/netutils/ip6tables/index.html <- this one needs to be created with the content you provided here.
    1.2. https://nuttx.apache.org/docs/latest/applications/netutils/iptables/index.html <- this one needs an update too if you have a moment please.
  2. https://nuttx.apache.org/docs/latest/components/net/ipfilter.html <- there is a mention of iptables here but you can reference description to the applications/netutils location when ready.

@Zepp-Hanzj Zepp-Hanzj closed this Jun 10, 2026
@Zepp-Hanzj

Copy link
Copy Markdown
Contributor Author

Moved to apache/nuttx#19073 (Documentation/applications/system/iptables). Closing this PR.

@Zepp-Hanzj Zepp-Hanzj deleted the docs/iptables branch June 10, 2026 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants