Bug 36724 - ipnat(5) manpage grammar is incomplete and inconsistent
Summary: ipnat(5) manpage grammar is incomplete and inconsistent
Status: Open
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
Depends on:
Reported: 2002-04-04 07:20 UTC by AnarCat
Modified: 2018-04-10 23:01 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description AnarCat 2002-04-04 07:20:01 UTC
The ipnat(5) manpage features, on -stable, a section wrt the grammar
recognized by the ipnat parser.

This grammar is incomplete and does not represent properly ipnat

1- Undefined non-terminals:

a- Major:

these actually prevent one from clearly knowing what the syntax is

- portnum (which I guess is portnumbers)
- numports (idem)
- nummask

b- Minor (we can easily guess what these are):

bits, mask, ip, host-name, ipaddr, hexnumber, numbers

Note that ip and ipaddr seem to be redundant here.

2- inconsistence in the syntax

In the same grammar, curly brackets and brackest are used to represent
repetition, at least I guess.

For example, I guessed that:

ip [ "," ip ]

meant that ip could be repeated, seperated by commas.

But, on the other hand, we havge:

fname ::= 'A' - 'Z' { 'A' - 'Z' } numbers .

which I guessed means that "'A' - 'Z'" can be repeated any number of

I think this section of the manpage needs a complete rewrite.


Unknown. I will inspect the parser if I find the time, but since it's a
flat .c file (natparse.c) and not a .y, it's harder. ;)

Any idea why ipnat doesn't use something like yacc or bison?

I'm not sure what format the grammar is following right now, but it
would gain at following a standard notation such as the BNF.
Follow the grammar given in the grammar.

Also see:

docs/33371 guido    ipnat(5) requires mapped-to port in rdr rules
docs/36127 darrenr  ipnat(5) man page glitches

for other glitches.
Comment 1 Christian Brueffer freebsd_committer 2003-03-21 15:42:27 UTC
Responsible Changed
From-To: freebsd-doc->darrenr

darrenr is out ipfilter/ipnat guy
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2013-07-03 01:50:32 UTC
State Changed
From-To: open->open

commit bit has been taken in for safekeeping. 

Comment 3 Mark Linimon freebsd_committer freebsd_triage 2013-07-03 01:50:32 UTC
Responsible Changed
From-To: darrenr->freebsd-doc
Comment 4 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:59:15 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped