ietf-822
[Top] [All Lists]

Re: Source routing syntax

2001-12-06 15:30:58

On 12/6/01 at 11:39 PM +0100, Florian Weimer wrote:

RFC 822 route-addr:      <@host1(_at_)host2:user(_at_)target>
RFC 2822 obs-angle-addr: <@host1(_at_)host2:user(_at_)target>
                         <@host1,@host2:user(_at_)target>
                         <@host1 @host2:user(_at_)target>
                         <@host1,,@host2:user(_at_)target>

Nope, the above is just wrong. You've misread the ABNF. In 822:

     route-addr  =  "<" [route] addr-spec ">"

     route       =  1#("@" domain) ":"           ; path-relative

In 822 ABNF, # is defined as follows:

     2.7.  #RULE:  LISTS

          A construct "#" is defined, similar to "*", as follows:

                              <l>#<m>element

     indicating at least <l> and at most <m> elements, each  separated
     by  one  or more commas (","). This makes the usual form of lists
     very easy; a rule such as '(element *("," element))' can be shown
     as  "1#element".   Wherever this construct is used, null elements
     are allowed, but do not  contribute  to  the  count  of  elements
     present.   That  is,  "(element),,(element)"  is  permitted,  but
     counts as only two elements.  Therefore, where at least one  ele-
     ment  is required, at least one non-null element must be present.
     Default values are 0 and infinity so that "#(element)" allows any
     number,  including  zero;  "1#element" requires at least one; and
     "1#2element" allows one or two.

And, in 822 you are allowed free whitespace. So, in both 822 and 2822, the following are legal as addresses with routes:

<@host1,@host2:user(_at_)target>
<@host1   ,     @host2:user(_at_)target>
<@host1,,@host2:user(_at_)target>

The comma between elements is required in both, any number of commas may appear between elements in both, and spaces are allowed around the commas in both.

pr
--
Pete Resnick <mailto:presnick(_at_)qualcomm(_dot_)com>
QUALCOMM Incorporated - Direct phone: (858)651-4478, Fax: (858)651-1102

<Prev in Thread] Current Thread [Next in Thread>