Bug 36724 - ipnat(5) manpage grammar is incomplete and inconsistent
Summary: ipnat(5) manpage grammar is incomplete and inconsistent
Status: Closed Overcome By Events
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)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-04 07:20 UTC by AnarCat
Modified: 2021-01-16 22:05 UTC (History)
2 users (show)

See Also:


Attachments

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
behavior.

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
times.

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

Fix: 

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.
How-To-Repeat: 
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
Comment 5 PauAmma freebsd_triage 2021-01-16 21:57:19 UTC
It looks like the grammar section was removed at some point, so this can probably be closed as OBE.

If not, then while there, maybe fix the "staus" typo in "See below for a list of proxies and their relative staus." and add a .Dd?
Comment 6 PauAmma freebsd_triage 2021-01-16 22:05:50 UTC
Marking OBE as directed by debdrup in IRC.