Re: Updated ABNF syntax comments

Flemming Andreasen <fandreas@cisco.com> Fri, 27 April 2001 14:29 UTC

Return-Path: <owner-confctrl>
Received: (from majordom@localhost) by zephyr.isi.edu (8.9.3/8.9.3) id HAA29672 for confctrl-outgoing; Fri, 27 Apr 2001 07:29:02 -0700 (PDT)
Received: from tnt.isi.edu (tnt.isi.edu [128.9.128.128]) by zephyr.isi.edu (8.9.3/8.9.3) with ESMTP id HAA29666 for <confctrl@zephyr.isi.edu>; Fri, 27 Apr 2001 07:29:01 -0700 (PDT)
Received: from sj-msg-core-1.cisco.com (sj-msg-core-1.cisco.com [171.71.163.11]) by tnt.isi.edu (8.11.2/8.11.2) with ESMTP id f3RET5P04851 for <confctrl@ISI.EDU>; Fri, 27 Apr 2001 07:29:05 -0700 (PDT)
Received: from sj-msg-av-3.cisco.com (sj-msg-av-3.cisco.com [171.69.2.19]) by sj-msg-core-1.cisco.com (8.11.3/8.9.1) with ESMTP id f3RET2m25849; Fri, 27 Apr 2001 07:29:02 -0700 (PDT)
Received: from mailman.cisco.com (localhost [127.0.0.1]) by sj-msg-av-3.cisco.com (8.10.1/8.10.1) with ESMTP id f3RESvv25191; Fri, 27 Apr 2001 07:28:57 -0700 (PDT)
Received: from cisco.com (ssh-sj1.cisco.com [171.68.225.134]) by mailman.cisco.com (8.9.3/CISCO.SERVER.1.2) with ESMTP id HAA19973; Fri, 27 Apr 2001 07:28:54 -0700 (PDT)
Message-ID: <3AE98316.7CAE6765@cisco.com>
Date: Fri, 27 Apr 2001 10:32:54 -0400
From: Flemming Andreasen <fandreas@cisco.com>
Organization: Cisco Systems
X-Mailer: Mozilla 4.76 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: Renee Revis <drrevis@cisco.com>
CC: confctrl@ISI.EDU, Colin Perkins <C.Perkins@cs.ucl.ac.uk>, Jonathan Lennox <lennox@cs.columbia.edu>
Subject: Re: Updated ABNF syntax comments
References: <200104131933.PAA26260@cisco.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: owner-confctrl@zephyr.isi.edu
Precedence: bulk

Reposting as I haven't seen any responses.

Anybody ?

-- Flemming

Renee Revis wrote:

>     I'm just jumping in here, but have a few comments/questions on this
> updated syntax relative to the current version of draft-ietf-mmusic-sdp-new-01.
> txt.
>
> 1) s= line.  The draft says one and only one s= line is required per
> session description, but the syntax below shows it as optional.
>
> 2) The draft says that either an email field or a phone field must be
> specified, but this isn't shown in the syntax below.  I'm not suggesting
> that it should be.  My take would be to remove this requirement from the
> text.
>
> 3) Multiple b= lines are allowed by the syntax at either the session
> level or the media levels, but there is no mention in the draft of how
> an application should interpret this.  Are multiple b= lines really
> allowed at each level?  If so, what is the intended meaning, in
> particular if the same modifier is specified more than once?  If this
> is allowed, it might be good to mention this case in the draft.
>
> 4) The m= media line shows the port as allowing only one '/' character.
> Some transport types may want to allow more than that - e.g. for some
> ATM transport types.  May want to modify this to:
>     port *("/" integer)  instead of port ["/" integer ]
>
> Also with this, I'm curious as to why the port rule specifies 1*DIGIT
> instead of integer as in the media-field rule.
>
> 5) As for the proto rule, I would vote for the latter option - i.e.,
> token *("/" token).  The other, 1*(token-char|"/"), would allow /AVP which I
> don't think is really intended.
>
> >   Alternately, we could define it as 1*(token-char|"/"), or as
> >   token *("/" token).  What semantics does the group want for this field?
>
>                            Renee Revis
>
> Jonathan Lennox wrote:
>
> > On Sunday, April 1 2001, "Flemming Andreasen" wrote to "Jonathan Lennox, Tom-PT Taylor, confctrl" saying:
> >
> > > > I've been playing around with this off and on, and have a re-worked ABNF
> > > > largely done. I can send this to the list on Monday
> > >
> > > That would be most welcome.
> >
> > Here it is.
> >
> > A few notes on it:
> >
> > * The ABNF syntax used complies with RFC 2234, with two exceptions:
> >   "|" rather than "/" is the alternation character, and literal strings are
> >   case-sensitive.  The RFC 2234 "core" productions (ALPHA, DIGIT, CRLF, SP,
> >   VCHAR) are used where appropriate.
> >
> > * Since the group decided that the "media" and "fmt" parameters would be
> >   MIME types, I've aligned their ABNF definitions to align with those of RFC
> >   2045.  (Before they were just "alphanum", which was too restrictive.)
> >   This introduced the "token" production, which I've then also used in other
> >   places that used to have a too-restrictive alphanum.
> >
> > * Grammar components that come from external sources (IPv4 and v6 addresses,
> >   e-mail addresses, and URIs) are included by reference rather than by
> >   value.
> >
> > * The "addr-spec" production (e-mail addresses, from the RFC 822bis draft)
> >   says "modified to remove CFWS".  This is because 822bis allows addresses
> >   to contain folding whitespace, which obviously can't be allowed in SDP.
> >   I'm wondering if maybe the syntax should be some core of a mailto: URL
> >   instead.
> >
> > * I've added an "addr = extension-addr" production to allow for the PINT and
> >   ATM extensions to SDP.  I *believe* that this grammar will fully accept
> >   PINT and ATM SDP messages.
> >
> > * I've added IPv6.  I think this is the same as the syntax defined by
> >   draft-olson-sdp-ipv6, but I'm not positive.
> >
> > * For the specific issue raised by the beginning of this thread -- the fact
> >   that "RTP/AVP" doesn't match the production for "proto" -- I've redefined
> >   "proto" as
> >           proto = token "/" token
> >                 | token
> >
> >   Alternately, we could define it as 1*(token-char|"/"), or as
> >   token *("/" token).  What semantics does the group want for this field?
> >
> > Comments are welcome.
> >
> >   ------------------------------------------------------------------------
> >    ; SDP Syntax (cleaned up)
> >    announcement =        proto-version
> >                          origin-field
> >                          session-name-field
> >                          information-field
> >                          uri-field
> >                          email-fields
> >                          phone-fields
> >                          connection-field
> >                          bandwidth-fields
> >                          time-fields
> >                          key-field
> >                          attribute-fields
> >                          media-descriptions
> >
> >    proto-version =       "v=" 1*DIGIT CRLF
> >                          ;this memo describes version 0
> >
> >    origin-field =        "o=" username SP sess-id SP sess-version SP
> >                          nettype SP addrtype SP addr CRLF
> >
> >    session-name-field =  ["s=" text CRLF]
> >
> >    information-field =   ["i=" text CRLF]
> >
> >    uri-field =           ["u=" uri CRLF]
> >
> >    email-fields =        *("e=" email-address CRLF)
> >
> >    phone-fields =        *("p=" phone-number CRLF)
> >
> >    connection-field =    ["c=" nettype SP addrtype SP
> >                          connection-address CRLF]
> >                          ;a connection field must be present
> >                          ;in every media description or at the
> >                          ;session-level
> >
> >    bandwidth-fields =    *("b=" bwtype ":" bandwidth CRLF)
> >
> >    time-fields =         1*( "t=" start-time SP stop-time
> >                          *(CRLF repeat-fields) CRLF)
> >                          [zone-adjustments CRLF]
> >
> >    repeat-fields =       "r=" repeat-interval SP typed-time
> >                          1*(SP typed-time)
> >
> >    zone-adjustments =    "z=" time SP ["-"] typed-time
> >                          *(SP time SP ["-"] typed-time)
> >
> >    key-field =           ["k=" key-type CRLF]
> >
> >    attribute-fields =    *("a=" attribute CRLF)
> >
> >    media-descriptions =  *( media-field
> >                          information-field
> >                          *connection-field
> >                          bandwidth-fields
> >                          key-field
> >                          attribute-fields )
> >
> >    media-field =         "m=" media SP port ["/" integer]
> >                          SP proto 1*(SP fmt) CRLF
> >
> >    ; sub-rules of 'o='
> >    username =            non-ws-string
> >                          ;pretty wide definition, but doesn't include space
> >
> >    sess-id =             1*DIGIT
> >                          ;should be unique for this originating username/host
> >
> >    sess-version =        1*DIGIT
> >                          ;0 is a new session
> >
> >    nettype =             token
> >                          ;typically "IN"
> >
> >    addrtype =            token
> >                          ;typically "IP4" or "IP6"
> >
> >    ; sub-rules of 'u='
> >    uri =                 URI-reference; defined in RFC2396/2732
> >
> >    ; sub-rules of 'e='
> >    email-address =       email *SP "(" 1*email-safe ")" |
> >                          1*email-safe "<" email ">" |
> >                          email
> >
> >    email =               addr-spec ; defined in drums msgfmt (RFC822bis)
> >                                    ; modified to remove CFWS
> >
> >    ; sub-rules of 'p='
> >    phone-number =        phone *SP "(" 1*email-safe ")" |
> >                          1*email-safe "<" phone ">" |
> >                          phone
> >
> >    phone =               "+" POS-DIGIT 1*(SP | "-" | DIGIT)
> >                          ;there must be a space or hyphen between the
> >                          ;international code and the rest of the number.
> >
> >                          ; Should this use the tel: URL syntax?
> >
> >    ; sub-rules of 'c='
> >    connection-address =  multicast-address
> >                          | addr
> >
> >    ; sub-rules of 'b='
> >    bwtype =              token
> >
> >    bandwidth =           1*DIGIT
> >
> >    ; sub-rules of 't='
> >    start-time =          time | "0"
> >
> >    stop-time =           time | "0"
> >
> >    time =                POS-DIGIT 9*DIGIT
> >                          ; 10-digit NTP time represents times between
> >                          ; 1931 and 5068 AD.  9* allows times after that
> >                          ; as well.
> >
> >    ; sub-rules of 'r=' and 'z='
> >    repeat-interval =     typed-time
> >
> >    typed-time =          POS-DIGIT *DIGIT [fixed-len-time-unit]
> >
> >    fixed-len-time-unit = "d" | "h" | "m" | "s"
> >
> >    ; sub-rules of 'k='
> >    key-type =            "prompt" |
> >                          "clear:" text |
> >                          "base64:" base64 |
> >                          "uri:" uri |
> >                          key-method [ ":" text ]
> >
> >    base64      =         *base64-unit [base64-pad]
> >    base64-unit =         4base64-char
> >    base64-pad  =         2base64-char "==" | 3base64-char "="
> >    base64-char =         ALPHA | DIGIT | "+" | "/"
> >
> >    key-method =          token
> >
> >    ; sub-rules of 'a='
> >    attribute =           (att-field ":" att-value) | att-field
> >
> >    att-field =           token
> >
> >    att-value =           byte-string
> >
> >    ; sub-rules of 'm='
> >    media =               token
> >                          ;typically "audio", "video", "application"
> >                          ;or "data"
> >
> >    fmt =                 token
> >                          ;typically an RTP payload type for audio
> >                          ;and video media
> >
> >    proto  =              token "/" token
> >                          | token
> >                          ;typically "RTP/AVP" or "udp" for IP4
> >
> >    port =                1*DIGIT
> >                          ;should in the range "1024" to "65535" inclusive
> >                          ;for UDP based media
> >
> >    ; generic sub-rules: addressing
> >    multicast-address =   addr "/" ttl [ "/" integer ]
> >                          ;IPv4 multicast addresses must be in the range
> >                          ;224.0.0.0 to 239.255.255.255
> >                          ;IPv6 multicast addresses must begin with the byte
> >                          ;FF or include an IPv4 multicast address
> >
> >    ttl =                 (POS-DIGIT *2DIGIT) | "0"
> >
> >    addr =                IPv4address | IPv6address | FQDN | extension-addr
> >
> >    FQDN =                *( domainlabel "." ) toplabel
> >
> >    domainlabel =         alpha-numeric restoflabel
> >
> >    toplabel =            ALPHA restoflabel
> >
> >    restoflabel =         *(*("-") alpha-numeric)
> >
> >    extension-addr =      non-ws-string
> >
> >    ; generic sub-rules: datatypes
> >    text =                byte-string
> >                          ;default is to interpret this as IS0-10646 UTF8
> >                          ;ISO 8859-1 requires a "a=charset:ISO-8859-1"
> >                          ;session-level attribute to be used
> >
> >    byte-string =         1*(%x01-09|%x0b-0c|%x0e-ff)
> >                          ;any byte except NUL, CR or LF
> >
> >    non-ws-string =       1*(VCHAR|%x80-ff)
> >                          ;string of visible US-ASCII, or high-bit, characters
> >
> >    token-char =          %x21|%x23-27|%x2a-2b|%x2d-2e|%x30-39|
> >                              %x41-5a|%x5e-7e
> >                          ; definition from RFC 2045 -
> >                          ; "any (US-ASCII) CHAR except SPACE, CTLs,
> >                          ; or tspecials".
> >                          ; the tspecials are ()<>@,;:\"/[]?=
> >
> >    token =               1*(token-char)
> >
> >    email-safe =          1*(%x01-09|%x0b-0c|%x0e-27|
> >                             %x2a-3b|%x3d|%x3e-ff)
> >                          ;any byte except NUL, CR, LF, or the quoting
> >                          ;characters ()<>
> >
> >    integer =             POS-DIGIT *DIGIT
> >
> >    ; generic sub-rules: primitives
> >
> >    alpha-numeric =       ALPHA | DIGIT
> >
> >    POS-DIGIT =           %x31-39 ; 1 - 9
> >
> >    ; external references:
> >    ; addr-spec: from draft-ietf-drums-msg-format (RFC822bis)
> >    ; IPv4address, IPv6address: From RFC 2373
> >    ; URI-reference: from RFC 2396, as modified by RFC 2732
> >    ; ALPHA, DIGIT, CRLF, SP, VCHAR: from RFC 2234
> >
> >   ------------------------------------------------------------------------
> >
> > --
> > Jonathan Lennox
> > lennox@cs.columbia.edu

--
Flemming Andreasen
Cisco Systems