Subject: TAddress TC

From: [email-masked]
Date: Tue, 10 Nov 1998 12:44:19 -0600

I am posting this to both the AgentX and snmpv3 lists.

The TAddress TC indicates that the minimum len
for such values is 1.  However, there seem to be
cases where valid values of TAddress could be 0.
For example, the agentxConnTransportAddress object
in the draft AgentX MIB is defined as follows.

agentxConnTransportAddress OBJECT-TYPE
    SYNTAX       TAddress
    MAX-ACCESS   read-only
    STATUS       current
    DESCRIPTION
       "The transport address of the remote (subagent) end of this
        connection to the master agent. The object is likely to be      
 |
        null for unix-domain sockets, since the subagent need not bind  
 |
        a filename to its local socket."                                
 |
    ::= { agentxConnectionEntry 4 }

Seems that several options are available to solve this:

1. Change the TAddress TC to allow zero-length values.

2. Define a new standard TAddress-style TC that allows zero-length
values.

3. Change the agentxConnTransportAddress description
and all such objects in other affected MIBs that might
need zero-length TAddress values) to something more appropriate.

Also, I'd like to comment on a general practice I've seen
of defining standard TC's that disallow NULL values of the type.
Seems that the only advantage in doing so is to allow a very few MIB
designers to not have to include a SIZE spec on a very few MIB objects.
The disadvantages, on the other hand, seem greater.  It makes it harder
to implement MIBs (might not be able to set default values for a given
column or specify a wildcard for the value), and the designs of some MIB
objects might have to revert to tricks (i.e. define alternate TCs, or 
specify
a special non-zero-length value which shall serve as a NULL value) to be
implemented correctly.  To me, it would be SLIGHTLY analagous to the 
designers
of the C language forbidding NULL pointers.  I stress the word, 
slightly, in
the previous sentence. :)

I would hope that in the future we would be more suspicious of defining 
new TCs
that disallow a NULL value.

Thanks,
Lauren

------------------------------------------------------------------------
Lauren Heintz                 BMC Software, Inc. (Formerly PEER 
Networks) 
Voice: +1 408 616-3169        Silicon Valley Division 
Fax:   +1 408 616-3339        965 Stewart Drive 
Email: [email-masked]  Sunnyvale, California 94086 USA 
------------------------------------------------------------------------

---

From: "Randy Presuhn" <[email-masked]>
Date: Tue, 10 Nov 1998 14:43:57 -0800

Hi -

> From: [email-masked] [mailto:[email-masked]]
> Sent: Tuesday, 10 November, 1998 10:44
> To: [email-masked]; [email-masked]
> Subject: TAddress TC
...
> cases where valid values of TAddress could be 0.
...

We encountered a similar case in the Application MIB work.
We ended up defining a new TC, "ApplTAddress", which looks
suspiciously like TAddress, except that it allows length 0.

 -----------------------------------------------------------------------
 Randy Presuhn           Email: [email-masked] http://www.bmc.com
 Voice: +1 408 616-3100  BMC Software, Inc.           965 Stewart Drive
 Fax:   +1 408 616-3101  Sunnyvale, California 94086  USA
 -----------------------------------------------------------------------
 In accordance with the BMC Communications Systems Use and Security
 Policy, I explicitly state that although my affiliation with BMC may be
 apparent, implied, or provided, my opinions are not necessarily those
 of BMC Software and that all external representations on behalf of
 BMC must first be cleared with a member of "the top management team."
 -----------------------------------------------------------------------