Subject: BFD MIB issues

From: "Vishwas Manral" <[email-masked]>
Date: Fri, 26 Sep 2008 12:04:52 +0530

Hi,

While working on the BFD code, I figured out that the Diagnostics code
point in the BFD spec and the BFD MIB do not match.

I think the two should match and this needs to be corrected in the MIB.

Thanks,
Vishwas

---

From: "Nobo Akiya (nobo)" <[email-masked]>
Date: Fri, 26 Sep 2008 01:00:44 -0700

Hello Vishwas.

Zero is normally a bad index to use. You should simply do +1 to map to
the diagnostic values described in the bfd base spec.

Thanx,
Nobo

> -----Original Message-----
> From: Vishwas Manral [mailto:[email-masked]] 
> Sent: Friday, September 26, 2008 3:35 PM
> To: Tom Nadeau; Zafar Ali (zali); Nobo Akiya (nobo)
> Cc: [email-masked]
> Subject: BFD MIB issues
> 
> Hi,
> 
> While working on the BFD code, I figured out that the 
> Diagnostics code point in the BFD spec and the BFD MIB do not match.
>

---

From: "Vishwas Manral" <[email-masked]>
Date: Fri, 26 Sep 2008 14:55:58 +0530

Hi Nobo,

Thanks for the prompt reply.

I agree using a key of 0, is not preferable, however the BfdDiag is
not the index into any table I could find.

I can not think of a case where using a value of 0 is bad? Can you
help me understand the same? Also because of this we have different
meaning for a value in a packet and in the MIB (for the same diag code
which may not be good).

Thanks,
Vishwas

---

From: "Nobo Akiya (nobo)" <[email-masked]>
Date: Fri, 26 Sep 2008 03:05:11 -0700

Hello Vishwas.

I've been taught from experienced personels that integer indexing of
zero is prefer to be avoided. Unfortunately I don't seem to recall
reasonings behind it. Perhaps others can comment on this?

Thanx,
Nobo

> Sent: Friday, September 26, 2008 6:26 PM
> To: Nobo Akiya (nobo)
> Cc: Tom Nadeau; Zafar Ali (zali); [email-masked]
> Subject: Re: BFD MIB issues
> 
> Hi Nobo,
> 
> I agree using a key of 0, is not preferable, however the 
> BfdDiag is not the index into any table I could find.
> 
> I can not think of a case where using a value of 0 is bad? 
> Can you help me understand the same? Also because of this we 
> have different meaning for a value in a packet and in the MIB 
> (for the same diag code which may not be good).
> 
> Thanks,
> Vishwas
> 
> >> While working on the BFD code, I figured out that the Diagnostics 
> >> code point in the BFD spec and the BFD MIB do not match.
> >>

---

From: Thomas Nadeau <[email-masked]>
Date: Fri, 26 Sep 2008 08:38:01 -0400

The use of 0 is perfectly reasonable IF you have a valid reason to do  
so.
I personally dislike shifting the values by one if there is a true  
value starting at
0 within the protocol because all of the code then has to handle this  
mapping function.
This is prone to errors if one forgets the mapping, which needs to be  
done in a number
of places within the the manager and at the agent code.  Instead, you  
can simply use a
signed value and define -1 as the out-of-bounds condition.  BUT this  
has to be well-defined
in the object definition or the MIB Gods will send lightning bolts  
down upon you. *)

	--Tom

---

From: Tetsuya Murakami <[email-masked]>
Date: Fri, 26 Sep 2008 22:48:09 +0900

Hi Vishwas and Nobo,

I agree with Viswas. Zero should not be used as a index for any table.  
However it is ok to use zero as a value of specified object. In this  
case, that object is not used as a index for any table. Hence I think  
zero can be used as a value of this object. I'm not sure why zero  
should not be used as a value of this object even though this object  
is not used as a index for any table. If I missed something, please  
let me know.

Thanks,
Tetsuya Murakami

---

From: "Nobo Akiya (nobo)" <[email-masked]>
Date: Sat, 27 Sep 2008 06:56:01 -0700

We sure would like to avoid angry MIB Gods =)

I've noted this change for the next revision.

Thanx,
Nobo 

> From: Thomas Nadeau [mailto:[email-masked]] 
> Sent: Friday, September 26, 2008 9:38 PM
> To: Nobo Akiya (nobo)
> Cc: Vishwas Manral; Tom Nadeau; [email-masked]; Zafar Ali (zali)
> 	The use of 0 is perfectly reasonable IF you have a 
> valid reason to do so.
> I personally dislike shifting the values by one if there is a 
> true value starting at 0 within the protocol because all of 
> the code then has to handle this mapping function.
> This is prone to errors if one forgets the mapping, which 
> needs to be done in a number of places within the the manager 
> and at the agent code.  Instead, you can simply use a signed 
> value and define -1 as the out-of-bounds condition.  BUT this 
> has to be well-defined in the object definition or the MIB 
> Gods will send lightning bolts down upon you. *)
> 
> 	--Tom
> 
> 
> BfdDiag is 
> >> Can you help me understand the same? Also because of this we have 
> >> different meaning for a value in a packet and in the MIB (for the 
> >> same diag code which may not be good).
> >>
> >> Thanks,
> >> Vishwas
> >>
> >> On Fri, Sep 26, 2008 at 1:30 PM, Nobo Akiya (nobo) 
> <[email-masked]> 
> >> wrote:
> >>>
> >>> Hello Vishwas.
> >>>
> Diagnostics 
> >>>> I think the two should match and this needs to be 
> corrected in the 
> >>>> MIB.
> >>>>
> >>>> Thanks,
> >>>> Vishwas
> >>>>
> >>>
> >>
> >
> 
>

---

From: "Tom Petch" <[email-masked]>
Date: Mon, 29 Sep 2008 20:43:33 +0200

----- Original Message -----
From: "Tetsuya Murakami" <[email-masked]>
To: "Nobo Akiya (nobo)" <[email-masked]>
Cc: "Tom Nadeau" <[email-masked]>; "Zafar Ali (zali)" <[email-masked]>;
<[email-masked]>
Sent: Friday, September 26, 2008 3:48 PM
Subject: Re: BFD MIB issues

> > reasonings behind it. Perhaps others can comment on this?

ASN.1 and SMI differentiate between an object and an instance thereof.

For a vector, the OID for the object is converted into the OID for the instance
by appending an OID fragment consisting of the index value(s).  For a scalar,
the corresponding OID fragment consists of ".0" so if an index value is
constrained never to end in zero, then it is easy when working at the BER.1
level to differentiate between the OID for a scalar and the OID for a vector ie
the value zero should not appear in a column that is used for an index (strictly
it is only necessary to restrict the column that forms the last index value in
the OID fragment).

To the same end, the OID for the object should not end in zero and this last is
specified in RFC2578.

As to avoiding the value zero in an index column, "It is acceptable to include
zero in the range when it is semantically significant" so that can be justified
at the expense of a loss of clarity in the BER.1.

Zero is also discouraged in enumerations but again "it is recommended that
enumerated values start at 1 and be numbered contiguously" but this can be
over-ridden when there is a good reason to do so.  Here it is less of a problem
as values and OIDs are readily distinguished in BER.1

Perhaps there are not so many people reading the BER.1 as there used to be.

Tom Petch

> >> <[email-masked]> wrote:

---

From: "Vishwas Manral" <[email-masked]>
Date: Tue, 30 Sep 2008 10:15:57 +0530

Hi Tom,

Thanks a lot to for enlightening us. It really helped me understand
(though my concepts are still not very clear).

We will update the MIB accordingly..

-Vishwas