Hi Magnus-
On Sun, Aug 30, 2009 at 5:41 PM, Magnus Fromreide<
magfr@...> wrote:
> On Sun, 2009-08-30 at 13:48 -0400, Mark Ellison wrote:
>> On Sun, Aug 30, 2009 at 5:17 AM, Magnus Fromreide<
magfr@...> wrote:
>> > Hello.
>> >
>> > According to rfc2742 agentxRegContext (octet string) is
>> > "The context in which the session supports the objects in this
>> > region. A zero-length context indicates the default context.
>> > "
>> >
>> > Now I am would like to know how a zero-length context should be
>> > represented?
>> >
>> The default context is an OCTET STRING of zero-length.
>
> Not according to RFC 2741 6.1.1 §4.
>
> In agentxRegContext we are looking a AgentX registrations and in this
> domain it is explicitly stated that NON_DEFAULT_CONTEXT "" is distinct
> from DEFAULT_CONTEXT but I can see no provision for the MIB to represent
> that.
Thanks for this reference- your original question was in regard to RFC
2742. As the agentxRegContext object-type definition states, "A
zero-length context indicates the default context". I believe this is
consistent with my previous reply.
The 2741 section cited above applies to the AgentX header.
Effectively, for 2742 you won't have a zero-length context name for a
non default context.
In the SNMP, the AgentX context is mapped from the SNMPv3 contextName
in the scoped PDU (most current is 3411 sxn 3.3.3). Since every
contextName within an SNMP entity MUST be unique there can not be both
the default context and a non default context with a zero-length
string.
>
>> How to represent this depends upon where it is being represented.
>>
>> On the wire, the tag is "OCTET STRING" the length is zero(0) and the
>> value occupies no octets. There are numerous examples of OCTET
>> STRINGs that may be zero-length in IETF standard MIB modules.
>>
>> For example, in the UsmUserTable, the usmUserPublic may be a
>> zero-length string. In the USM MIB module, tthe usmUserPublic object
>> definition shows he zero-length string as represented by the DEFVAL
>> clause: { ''H } -- the empty string.
>>
>> A zero-length string and the empty-string are synonymous.
>
> This is about the specific case of AgentX - we are talking about a
> zero-length string and a non-existing string.
>
>> - Mark
>>
http://EllisonSoftware.com>