Subject: CAP: integer in ABNF

From: [email-masked]
Date: Wed, 13 Nov 2002 13:54:37 -0500

The ABNF in CAP 09-submitted has several references to integer in it:

   latency-param    = ";" "LATENCY" "=" latency-sec
                    ; The value supplied in the time in seconds.
                    ; If latency is supplied then action MUST BE
                    ; supplied.

   latency-sec      = integer

and

    alarm-seq   = "SEQUENCE" alarmseqparam ":" integer CRLF

however there is no definition of 'integer' in the CAP ABNF.  There is no 
integer defined in the ABNF RFC so Im guessing that perhaps the definition 
from 2445 was assumed/intended?  Is this correct? 

If it was then I think its wrong as the ABNF in 2445 defines it as:

     integer    = (["+"] / "-") 1*DIGIT
[Snip]
                          The valid range for "integer" is -2147483648 to
     2147483647. If the sign is not specified, then the value is assumed
     to be positive.

so that would allow a negative value for nodes like latency-sec and 
alarm-seq.  Clearly this is not what we want.

I think that CAP should take a more proactive approach to defining the 
ABNF bits much like BEEP did with channel or  seqno:

   seqno      = 0..4294967295

This approach clearly delimits the upper and lower allowable values and 
prevents negatives where they should not be allowed.

Bruce
===========================================================================
Bruce Kahn                                INet: 
[email-masked]
Messaging & Collaboration                 Phone: 978.399.6496
IBM Software Group                         FAX: and nothing but the FAX...
Standard disclaimers apply, even where prohibited by law...

---

From: Doug Royer <[email-masked]>
Date: Wed, 13 Nov 2002 13:09:54 -0700

Yep - your right - also note that in iCAL, the REPEAT value is integer
allowing for (-12) instances :-)

So I added 'integer' to CAP to the text and say as defined in iCAL.

	 p-integer   = 1*DIGIT  ; Where DIGIT is defined in [iCAL]

And I changed both latency-sec and alarm-seq to use p-integer.

[email-masked] wrote:
> however there is no definition of 'integer' in the CAP ABNF.  There is 
> no integer defined in the ABNF RFC so Im guessing that perhaps the 
> definition from 2445 was assumed/intended?  Is this correct?  
> 
> Bruce Kahn                                INet: [email-masked]

-- 

  Doug Royer                     |   http://INET-Consulting.com
  -------------------------------|-----------------------------
  [email-masked]                 | Office: (208)612-INET
  http://Royer.com/People/Doug   |    Fax: (866)594-8574
                                 |   Cell: (208)520-4044

                 We Do Standards - You Need Standards

---

From: Andrea Campi <[email-masked]>
Date: Thu, 14 Nov 2002 19:47:59 +0100

> And I changed both latency-sec and alarm-seq to use p-integer.

This is just a small pet peeve... p-integer is ugly (IMHO), why
not use unsigned or uint?

Bye,
	Andrea

-- 
Andrea Campi                              mailto:[email-masked]
I.NET S.p.A. - BT Ignite                  http://www.inet.it
Technical Dept. - R&D			  phone: +39 02 32863 ext 1
v. Darwin, 85 - I-20019			  fax: +39 02 32863 ext 7705
Settimo Milanese (MI), Italy

---

From: [email-masked]
Date: Mon, 18 Nov 2002 12:03:58 -0500

> And I changed both latency-sec and alarm-seq to use p-integer.

This is crossing the threads a bit but that still allows for a LATENCY=0 
which means??

How about we use the "1..###" approach of BEEP and fix the maximum allowed 
at some reasonable value.??...

Bruce