From owner-freebsd-doc Wed Apr 3 22:20:28 2002 Delivered-To: freebsd-doc@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 9F76837B440 for ; Wed, 3 Apr 2002 22:20:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g346K1l18523; Wed, 3 Apr 2002 22:20:01 -0800 (PST) (envelope-from gnats) Received: from tomts14-srv.bellnexxia.net (tomts14.bellnexxia.net [209.226.175.35]) by hub.freebsd.org (Postfix) with ESMTP id 9FE4F37B405 for ; Wed, 3 Apr 2002 22:12:35 -0800 (PST) Received: from khan.anarcat.dyndns.org ([65.94.191.9]) by tomts14-srv.bellnexxia.net (InterMail vM.4.01.03.23 201-229-121-123-20010418) with ESMTP id <20020404061234.EUFR21410.tomts14-srv.bellnexxia.net@khan.anarcat.dyndns.org> for ; Thu, 4 Apr 2002 01:12:34 -0500 Received: from lenny.anarcat.dyndns.org (lenny.anarcat.dyndns.org [192.168.0.4]) by khan.anarcat.dyndns.org (Postfix) with SMTP id 9F7C718B9; Thu, 4 Apr 2002 01:12:32 -0500 (EST) Received: by lenny.anarcat.dyndns.org (sSMTP sendmail emulation); Thu, 4 Apr 2002 01:11:31 -0500 Message-Id: <20020404061232.9F7C718B9@khan.anarcat.dyndns.org> Date: Thu, 4 Apr 2002 01:11:31 -0500 From: The Anarcat Reply-To: The Anarcat To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: docs/36724: ipnat(5) manpage grammar is incomplete and inconsistent Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 36724 >Category: docs >Synopsis: ipnat(5) manpage grammar is incomplete and inconsistent >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Apr 03 22:20:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: The Anarcat >Release: FreeBSD 4.5-STABLE i386 >Organization: Nada, Inc >Environment: System: FreeBSD lenny.anarcat.dyndns.org 4.5-STABLE FreeBSD 4.5-STABLE #1: Wed Mar 27 12:55:29 EST 2002 anarcat@lenny.anarcat.dyndns.org:/usr/src/sys/compile/LENNY i386 >Description: 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. >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. >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. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message