RFC2257 - Agent Extensibility (AgentX) Protocol Version 1(2)

时间:2005-02-15 来源: 作者: 点击:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | reserved | u.priority | u.range_subid | reserved | +-+-+-+-+-+-+-
  
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| <reserved> | u.priority | u.range_subid | <reserved> |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

(u.region)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| n_subid | prefix | 0 | <reserved> |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| sub-identifier #1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| sub-identifier #n_subid |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

(u.upper_bound)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| optional upper-bound sub-identifier |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

An agentx-Unregister-PDU contains the following fields:

u.context

An optional non-default context.

u.priority

The priority at which this region was originally registered.

u.region

Indicates a previously-registered region of the MIB that a
subagent no longer wishes to support.

6.2.5. The agentx-Get-PDU

(AgentX header)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.version (1) | h.type (5) | h.flags | <reserved> |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.sessionID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.transactionID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.packetID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.payload_length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

(g.context) OPTIONAL
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Octet String Length (L) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Octet 1 | Octet 2 | Octet 3 | Octet 4 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Octet L - 1 | Octet L | Padding (as required) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

(g.sr)

(start 1)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| n_subid | prefix | include | <reserved> |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| sub-identifier #1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| sub-identifier #n_subid |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

(end 1)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 0 | 0 | 0 | 0 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
...
(start n)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| n_subid | prefix | include | <reserved> |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| sub-identifier #1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
...

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| sub-identifier #n_subid |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

(end n)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 0 | 0 | 0 | 0 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

An agentx-Get-PDU contains the following fields:

g.context

An optional non-default context.

g.sr

A SearchRangeList containing the requested variables for this
subagent.

6.2.6. The agentx-GetNext-PDU

(AgentX header)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.version (1) | h.type (6) | h.flags | <reserved> |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.sessionID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.transactionID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.packetID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.payload_length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

(g.context) OPTIONAL
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Octet String Length (L) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Octet 1 | Octet 2 | Octet 3 | Octet 4 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Octet L - 1 | Octet L | Padding (as required) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

(g.sr)

(start 1)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| n_subid | prefix | include | <reserved> |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| sub-identifier #1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| sub-identifier #n_subid |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

(end 1)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| n_subid | prefix | 0 | <reserved> |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| sub-identifier #1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| sub-identifier #n_subid |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
...

(start n)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| n_subid | prefix | include | <reserved> |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| sub-identifier #1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| sub-identifier #n_subid |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

(end n)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| n_subid | prefix | 0 | <reserved> |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| sub-identifier #1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| sub-identifier #n_subid |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
...

6.2.7. The agentx-GetBulk-PDU

(AgentX header)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.version (1) | h.type (7) | h.flags | <reserved> |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.sessionID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.transactionID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.packetID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.payload_length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

(g.context) OPTIONAL
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Octet String Length (L) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Octet 1 | Octet 2 | Octet 3 | Octet 4 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Octet L - 1 | Octet L | Padding (as required) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| g.non_repeaters | g.max_repetitions |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

(g.sr) as in agentx-GetNext-PDU above
...

6.2.8. The agentx-TestSet-PDU

(AgentX header)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.version (1) | h.type (8) | h.flags | <reserved> |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.sessionID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.transactionID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.packetID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.payload_length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

(t.context) OPTIONAL
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Octet String Length (L) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Octet 1 | Octet 2 | Octet 3 | Octet 4 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Octet L - 1 | Octet L | Padding (as required) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

(t.vb)

(VarBind 1)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| v.type | <reserved> |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| n_subid | prefix | 0 | <reserved> |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| sub-identifier #1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| sub-identifier #n_subid |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| data |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| data |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
...

(VarBind n)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| v.type | <reserved> |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| n_subid | prefix | 0 | <reserved> |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| sub-identifier #1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| sub-identifier #n_subid |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| data |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| data |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

An agentx-TestSet-PDU contains the following fields:

t.context

An optional non-default context.

t.vb

A VarBindList containing the requested VarBinds for this
subagent.

6.2.9. The agentx-CommitSet, -UndoSet, -CleanupSet PDUs

These PDUs consist of the AgentX header only.

The agentx-CommitSet-, -UndoSet-, and -Cleanup-PDUs are used in
processing an SNMP SetRequest operation.

6.2.10. The agentx-Notify-PDU

An agentx-Notify-PDU is sent by a subagent to cause the master agent
to forward a notification.

(AgentX header)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.version (1) | h.type (12) | h.flags | <reserved> |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.sessionID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.transactionID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.packetID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.payload_length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

(n.context) OPTIONAL
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Octet String Length (L) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Octet 1 | Octet 2 | Octet 3 | Octet 4 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Octet L - 1 | Octet L | Padding (as required) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

(n.vb)
...

An agentx-Notify-PDU contains the following fields:

n.context

An optional non-default context.

n.vb

A VarBindList whose contents define the actual PDU to be sent.
This memo places the following restrictions on its contents:

- If the subagent supplies sysUpTime.0, it must be
present as the first varbind.

- snmpTrapOID.0 must be present, as the second
varbind if sysUpTime.0 was supplied, as the first if it
was not.

6.2.11 The agentx-Ping-PDU

The agentx-Ping-PDU is sent by a subagent to the master agent to
monitor the master agent's ability to receive and send AgentX PDUs
over their AgentX session.

(AgentX header)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.version (1) | h.type (13) | h.flags | <reserved> |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.sessionID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.transactionID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.packetID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.payload_length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

(p.context) OPTIONAL
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Octet String Length (L) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Octet 1 | Octet 2 | Octet 3 | Octet 4 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Octet L - 1 | Octet L | Padding (as required) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

An agentx-Ping-PDU may contain the following field:

p.context

An optional non-default context.

Using p.context a subagent can retrieve the sysUpTime value for a
specific context, if required.

6.2.12. The agentx-IndexAllocate-PDU

An agentx-IndexAllocate-PDU is sent by a subagent to request
allocation of a value for specific index objects. Refer to section
7.1.3 (Using the agentx-IndexAllocate-PDU) for suggested usage.

(AgentX header)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.version (1) | h.type (14) | h.flags | <reserved> |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.sessionID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.transactionID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.packetID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.payload_length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

(i.context) OPTIONAL
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Octet String Length (L) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Octet 1 | Octet 2 | Octet 3 | Octet 4 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Octet L - 1 | Octet L | Padding (as required) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

(i.vb)
...

An agentx-IndexAllocate-PDU contains the following fields:

i.context

An optional non-default context.

i.vb

A VarBindList containing the index names and values requested
for allocation.

6.2.13. The agentx-IndexDeallocate-PDU

An agentx-IndexDeallocate-PDU is sent by a subagent to release
previously allocated index values.

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.version (1) | h.type (15) | h.flags | <reserved> |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.sessionID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.transactionID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.packetID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.payload_length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

(i.context) OPTIONAL
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Octet String Length (L) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Octet 1 | Octet 2 | Octet 3 | Octet 4 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Octet L - 1 | Octet L | Padding (as required) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

(i.vb)
...

An agentx-IndexDeallocate-PDU contains the following fields:

i.context

An optional non-default context.

i.vb

A VarBindList containing the index names and values to be
released.

6.2.14. The agentx-AddAgentCaps-PDU

An agentx-AddAgentCaps-PDU is generated by a subagent to inform the
master agent of its agent capabilities.

(AgentX header)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.version (1) | h.type (16) | h.flags | <reserved> |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.sessionID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.transactionID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.packetID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.payload_length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

(a.context) (OPTIONAL)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Octet String Length (L) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Octet 1 | Octet 2 | Octet 3 | Octet 4 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Octet L - 1 | Octet L | Optional Padding |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

(a.id)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| n_subid | prefix | 0 | <reserved> |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| sub-identifier #1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| sub-identifier #n_subid |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

(a.descr)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Octet String Length (L) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Octet 1 | Octet 2 | Octet 3 | Octet 4 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Octet L - 1 | Octet L | Optional Padding |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

An agentx-AddAgentCaps-PDU contains the following fields:

a.context

An optional non-default context.

a.id

An Object Identifier containing the value of an invocation of
the AGENT-CAPABILITIES macro, which the master agent exports as
a value of sysORID for the indicated context. (Recall that the
value of an invocation of an AGENT-CAPABILITIES macro is an
object identifier that describes a precise level of support
with respect to implemented MIB modules. A more complete
discussion of the AGENT-CAPABILITIES macro and related sysORID
values can be found in section 6 of RFC1904 [10].)

a.descr

An Octet String containing a DisplayString to be used as the
value of sysORDescr corresponding to the sysORID value above.

6.2.15. The agentx-RemoveAgentCaps-PDU

An agentx-RemoveAgentCaps-PDU is generated by a subagent to request
that the master agent stop exporting a particular value of sysORID.
This value must have previously been advertised by the subagent in an
agentx-AddAgentCaps-PDU.

(AgentX header)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.version (1) | h.type (17) | h.flags | <reserved> |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.sessionID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.transactionID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.packetID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.payload_length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

(a.context) (OPTIONAL)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Octet String Length (L) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Octet 1 | Octet 2 | Octet 3 | Octet 4 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Octet L - 1 | Octet L | Optional Padding |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

(a.id)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| n_subid | prefix | 0 | <reserved> |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| sub-identifier #1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| sub-identifier #n_subid |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

An agentx-RemoveAgentCaps-PDU contains the following fields:

a.context

An optional non-default context.

a.id

An ObjectIdentifier containing the value of sysORID that should
no longer be exported.

6.2.16. The agentx-Response-PDU

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.version (1) | h.type (18) | h.flags | <reserved> |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.sessionID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.transactionID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.packetID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| h.payload_length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| res.sysUpTime |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| res.error | res.index |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
...

An agentx-Response-PDU contains the following fields:

h.sessionID

If this is a response to a agentx-Open-PDU, then it contains
the new and unique sessionID (as assigned by the master agent)
for this session.

Otherwise it must be identical to the h.sessionID value in the
PDU to which this PDU is a response.

h.transactionID

Must be identical to the h.transactionID value in the PDU to
which this PDU is a response.

In an agentx response PDU from the master agent to the
subagent, the value of h.transactionID has no significance and
can be ignored by the subagent.

h.packetID

Must be identical to the h.packetID value in the PDU to which
this PDU is a response.

res.sysUpTime

This field contains the current value of sysUpTime for the
indicated context. It is relevant only in agentx response PDUs
sent from the master agent to a subagent in response to the
following agentx PDUs:

agentx-Open-PDU (1),
agentx-Close-PDU (2),
agentx-Register-PDU (3),
agentx-Unregister-PDU (4),
agentx-Ping-PDU (13),
agentx-IndexAllocate-PDU (14),
agentx-IndexDeallocate-PDU (15),
agentx-AddAgentCaps-PDU (16),
agentx-RemoveAgentCaps-PDU (17)

In an agentx response PDU from the subagent to the master
agent, the value of res.sysUpTime has no significance and is
ignored by the master agent.

res.error

Indicates error status (including `noError'). Values are
limited to those defined for errors in the SNMPv2 SMI (RFC1905
[4]), and the following AgentX-specific values:

openFailed (256),
notOpen (257),
indexWrongType (258),
indexAlreadyAllocated (259),
indexNoneAvailable (260),
indexNotAllocated (261),
unsupportedContext (262),
duplicateRegistration (263),
unknownRegistration (264),
unknownAgentCaps (265)

res.index

In error cases, this is the index of the failed variable
binding within a received request PDU. (Note: As explained in
section 5.4, Value Representation, the index values of variable
bindings within a variable binding list are 1-based.)

A VarBindList may follow these latter two fields, depending on which
AgentX PDU is being responded to. These data are specified in the
subsequent elements of procedure.

7. Elements of Procedure

This section describes the actions of protocol entities (master
agents and subagents) implementing the AgentX protocol. Note,
however, that it is not intended to constrain the internal
architecture of any conformant implementation.

Specific error conditions and associated actions are described in
various places. Other error conditions not specifically mentioned
fall into one of two categories, "parse" errors and "protocol"
errors.

A parse error occurs when a receiving entity cannot decode the PDU.
For instance, a VarBind contains an unknown type, or a PDU contains a
malformed Object Identifier.

A protocol error occurs when a receiving entity can parse a PDU, but
the resulting data is unspecified. For instance, an agentx-
Response-PDU is successfully parsed, but contains an unknown
res.error value.

An implementation may choose either to ignore such messages, or to
close the session on which they are received, using the appropriate
reason code as defined in the agentx-Close-PDU.

The actions of AgentX protocol entities can be broadly categorized
under two headings, each of which is described separately:

(1) processing AgentX administrative messages (e.g., connection
requests from a subagent to a master agent); and

(2) processing SNMP messages (the coordinated actions of a
master agent and one or more subagents in processing, for
example, a received SNMP GetRequest-PDU).

7.1. Processing AgentX Administrative Messages

This subsection describes the actions of AgentX protocol entities in
processing AgentX administrative messages. Such messages include
those involved in establishing and terminating an AgentX session
between a subagent and a master agent, those by which a subagent
requests allocation of instance index values, and those by which a
subagent communicates to a master agent which MIB regions it
supports.

7.1.1. Processing the agentx-Open-PDU

When the master agent receives an agentx-Open-PDU, it processes it as
follows:

1) An agentx-Response-PDU is created and res.sysUpTime is set to
the value of sysUpTime.0 for the indicated context.

2) If the master agent is unable to open an AgentX session for
any reason, it may refuse the session establishment request,
sending in reply the agentx-Response-PDU, with res.error field set
to `openFailed'.

3) Otherwise: The master agent assigns a sessionID to the new
session and puts the value in the h.sessionID field of the
agentx-Response-PDU. This value must be unique among all existing
open sessions.

4) The master agent retains session-specific information
from the PDU for this subagent:

- The NETWORK_BYTE_ORDER value in h.flags is retained.
All subsequent AgentX protocol operations initiated by the
master agent for this session must use this byte ordering and
set this bit accordingly.

The subagent typically sets this bit to correspond to its
native byte ordering, and typically does not vary byte ordering
for an initiated session. The master agent must be able to
decode each PDU according to the h.flag NETWORK_BYTE_ORDER bit
in the PDU, but does not need to toggle its retained value for
the session if the subagent varies its byte ordering.

- The o.timeout value is used in calculating response
timeout conditions for this subagent.

- The o.id and o.descr fields are used for informational
purposes. (Such purposes are implementation-specific for now,
and may be used in a possible future standard AgentX MIB.)

5) The agentx-Response-PDU is sent with the res.error field
set to `noError'.

At this point, an AgentX session is considered established between
the master agent and the subagent. An AgentX session is a distinct
channel for the exchange of AgentX protocol messages between a master
agent and one subagent, qualified by the session-specific attributes
listed in 4) above. AgentX session establishment is initiated by the
subagent. An AgentX session can be terminated by either the master
agent or the subagent.

7.1.2. Processing the agentx-IndexAllocate-PDU

When the master agent receives an agentx-IndexAllocate-PDU, it
processes it as follows:

1) An agentx-Response-PDU is created and res.sysUpTime is set to
the value of sysUpTime.0 for the default context.

2) If h.sessionID does not correspond to a currently established
session with this subagent, the agentx-Response-PDU is sent in
reply with res.error set to `notOpen'.

3) If the NON_DEFAULT_CONTEXT bit is set, and the master agent
supports only a default context, the agentx-Response-PDU is
returned with res.error set to `unsupportedContext', and the
requested allocation fails. Otherwise: The value of res.sysUpTime
is set to the value of sysUpTime.0 for the indicated context.

4) Each VarBind in the VarBindList is processed until either all
are successful, or one fails. If any VarBind fails, the agentx-
Response-PDU is sent in reply containing the original VarBindList,
with res.index set to indicate the failed VarBind, and with
res.error set as described subsequently. All other VarBinds are
ignored; no index values are allocated.

VarBinds are processed as follows:

- v.name is the name of the index for which a value is to be
allocated.

- v.type is the syntax of the index object.

- v.data indicates the specific index value requested.
If the NEW_INDEX or the ANY_INDEX bit is set, the actual value
in v.data is ignored and an appropriate index value is
generated.

a) If there are no currently allocated index values for v.name
in the indicated context, and v.type does not correspond to a
valid index type value, the VarBind fails and res.error is set
to `indexWrongType'.

b) If there are currently allocated index values for v.name
in the indicated context, but the syntax of those values does
not match v.type, the VarBind fails and res.error is set to
`indexWrongType'.

c) Otherwise, if both the NEW_INDEX and ANY_INDEX bits are
clear, allocation of a specific index value is being requested.
If the requested index is already allocated for v.name in the
indicated context, the VarBind fails and res.error is set to
`indexAlreadyAllocated'.

d) Otherwise, if the NEW_INDEX bit is set, the master agent
should generate the next available index value for v.name in
the indicated context, with the constraint that this value must
not have been allocated (even if subsequently released) to any
subagent since the last re-initialization of the master agent.
If no such value can be generated, the VarBind fails and
res.error is set to `indexNoneAvailable'.

e) Otherwise, if the ANY_INDEX bit is set, the master agent
should generate an index value for v.name in the indicated
context, with the constraint that this value is not currently
allocated to any subagent. If no such value can be generated,
then the VarBind fails and res.error is set to
`indexNoneAvailable'.

5) If all VarBinds are processed successfully, the
agentx-Response-PDU is sent in reply with res.error set to
`noError'. A VarBindList is included that is identical to the one
sent in the agentx-IndexAllocate-PDU, except that VarBinds
requesting a NEW_INDEX or ANY_INDEX value are generated with an
appropriate value.

7.1.3. Using the agentx-IndexAllocate-PDU

Index allocation is a service provided by an AgentX master agent. It
provides generic support for sharing MIB conceptual tables among
subagents who are assumed to have no knowledge of each other.

Each subagent sharing a table should first request allocation of
index values, then use those index values to qualify MIB regions in
its subsequent registrations.

The master agent maintains a database of index objects (OIDs), and,
for each index, the values that have been allocated for it. It is
unaware of what MIB variables (if any) the index objects represent.

By convention, subagents use the MIB variable listed in the INDEX
clause as the index object for which values must be allocated. For
tables indexed by multiple variables, values may be allocated for
each index (although this is frequently unnecessary; see example 2
below). The subagent may request allocation of

- a specific index value - an index value that is not currently
allocated - an index value that has never been allocated

The last two alternatives reflect the uniqueness and constancy
requirements present in many MIB specifications for arbitrary integer
indexes (e.g., ifIndex in the IF MIB (RFC1573 [11]),
snmpFddiSMTIndex in the FDDI MIB (RFC1285 [12]), or
sysApplInstallPkgIndex in the System Application MIB [13]). The need
for subagents to share tables using such indexes is the main
motivation for index allocation in AgentX.

Example 1:

A subagent implements an interface, and wishes to register a
single row of the RFC1573 ifTable. It requests an allocation for
the index object "ifIndex", for a value that has never been
allocated (since ifIndex values must be unique). The master agent
returns the value "7".

The subagent now attempts to register row 7 of ifTable, by
specifying a MIB region in the agentx-Register-PDU of
1.3.6.1.2.1.2.2.1.[1-22].7. If the registration succeeds, no
further processing is required. The master agent will dispatch to
this subagent correctly.

But the registration may fail. Index allocation and MIB region
registration are not coupled in the master agent. Some other
subagent may have already registered ifTable row 7 without first
having requested allocation of the index. The current state of
index allocations is not considered when processing registration
requests, and the current registry is not considered when
processing index allocation requests. If subagents follow the
model of "first request allocation of an index, then register the
corresponding region", then a successful index allocation request
gives a subagent a good hint (but no guarantee) of what it should
be able to register.

If the registration failed, the subagent should request allocation
of a new index i, and attempt to register ifTable.[1-22].i, until
successful.

Example 2:

This same subagent wishes to register ipNetToMediaTable rows
corresponding to its interface (ifIndex i). Due to structure of
this table, no further index allocation need be done. The
subagent can register the MIB region ipNetToMediaTable.[1-4].i, It
is claiming responsibility for all rows of the table whose value
of ipNetToMediaIfIndex is i.

Example 3:

A network device consists of a set of processors, each of which
accepts network connections for a unique set of IP addresses.

Further, each processor contains a subagent that implements
tcpConnTable. In order to represent tcpConnTable for the entire
managed device, the subagents need to share tcpConnTable.

In this case, no index allocation need be done at all. Each
subagent can register a MIB region of tcpConnTable.[1-5].a.b.c.d,
where a.b.c.d represents an unique IP address of the individual
processor.

Each subagent is claiming responsibility for the region of
tcpConnTable where the value of tcpConnLocalAddress is a.b.c.d.

7.1.4 Processing the agentx-IndexDeallocate-PDU

When the master agent receives an agentx-IndexDeallocate-PDU, it
processes it as follows:

1) An agentx-Response-PDU is created and res.sysUpTime is set to
the value of sysUpTime.0 for the default context.

2) If h.sessionID does not correspond to a currently
established session with this subagent, the agentx-Response-PDU is
sent in reply with res.error set to `notOpen'.

3) If the NON_DEFAULT_CONTEXT bit is set, and the master agent
supports only a default context, the agentx-Response-PDU is
returned with res.error set to `unsupportedContext', and the
requested deallocation fails. Otherwise: The value of
res.sysUpTime is set to the value of sysUpTime.0 for the indicated
context.

4) Each VarBind in the VarBindList is processed until either all
are successful, or one fails. If any VarBind fails, the agentx-
Response-PDU is sent in reply, containing the original
VarBindList, with res.index set to indicate the failed VarBind,
and with res.error set as described subsequently. All other
VarBinds are ignored; no index values are released.

VarBinds are processed as follows:

- v.name is the name of the index for which a value is to be
released

- v.type is the syntax of the index object

- v.data indicates the specific index value to be released.
The NEW_INDEX and ANY_INDEX bits are ignored.

a) If the index value for the named index is not currently
allocated to this subagent, the VarBind fails and res.error is
set to `indexNotAllocated'.

5) If all VarBinds are processed successfully, res.error is
set to `noError' and the agentx-Response-PDU is sent. A
VarBindList is included which is identical to the one sent in the
agentx-IndexDeallocate-PDU.

All released index values are now available, and may be used in
response to subsequent allocation requests for ANY_INDEX values
for the particular index.

7.1.5. Processing the agentx-Register-PDU

When the master agent receives an agentx-Register-PDU, it processes
it as follows:

1) An agentx-Response-PDU is created and res.sysUpTime is set to
the value of sysUpTime.0 for the default context.

2) If h.sessionID does not correspond to a currently
established session with this subagent, the agentx-Response-PDU is
sent in reply with res.error set to `notOpen'.

3) If the NON_DEFAULT_CONTEXT bit is set, and the master agent
supports only a default context, the agentx-Response-PDU is
returned with res.error set to `unsupportedContext', and the
requested registration fails. Otherwise: The value of
res.sysUpTime is set to the value of sysUpTime.0 for the indicated
context.

Note: Non-default contexts might be added on the fly by
the master agent, or the master agent might require such
non-default contexts to be pre-configured. The choice is
implementation-specific.

4) Characterize the request.

If r.region (or any of its set of Object Identifiers, if r.range
is non-zero) is exactly the same as any currently registered value
of r.region (or any of its set of Object Identifiers), this
registration is termed a duplicate region.

If r.region (or any of its set of Object Identifiers, if r.range
is non-zero) is a subtree of, or contains, any currently
registered value of r.region (or any of its set of Object
Identifiers), this registration is termed an overlapping region.

If the NON_DEFAULT_CONTEXT bit is set, this region is to be
logically registered within the context indicated by r.context.

Otherwise this region is to be logically registered within the
default context.

A registration that would result in a duplicate region with the
same priority and within the same context as that of a current
registration is termed a duplicate registration.

5) Otherwise, if this is a duplicate registration, the
agentx-Response-PDU is returned with res.error set to
`duplicateRegistration', and the requested registration fails.

6) Otherwise, the agentx-Response-PDU is returned with res.error
set to `noError'.

The master agent adds this region to its registered OID space for
the indicated context, to be considered during the dispatching
phase for subsequently received SNMP protocol messages.

Note: The following algorithm describes maintaining a set of OID
ranges derived from "splitting" registered regions. The algorithm
for operational dispatching is also stated in terms of these OID
ranges.

These OID ranges are a useful explanatory device, but are not
required for a correct implementation.

- If r.region (R1) is a subtree of a currently registered
region (R2), split R2 into 3 new regions (R2a, R2b, and R2c)
such that R2b is an exact duplicate of R1. Now remove R2 and
add R1, R2a, R2b, and R2c to the master agent's
lexicographically ordered set of ranges (the registered OID
space). Note: Though newly-added ranges R1 and R2b are
identical in terms of the MIB objects they contain, they are
registered by different subagents, possibly at different
priorities.

For instance, if subagent S2 registered "ip" (R2 is
1.3.6.1.2.1.4) and subagent S1 subsequently registered
"ipNetToMediaTable" (R1 is 1.3.6.1.2.1.4.22), the resulting set
of registered regions would be:

1.3.6.1.2.1.4 up to but not including 1.3.6.1.2.1.4.22 (by S2)
1.3.6.1.2.1.4.22 up to but not including 1.3.6.1.2.1.4.23 (by S2)
1.3.6.1.2.1.4.22 up to but not including 1.3.6.1.2.1.4.23 (by S1)
1.3.6.1.2.1.4.23 up to but not including 1.3.6.1.2.1.5 (by S2)

- If r.region (R1) overlaps one or more currently registered
regions, then for each overlapped region (R2) split R1 into 3
new ranges (R1a, R1b, R1c) such that R1b is an exact
duplicate of R2. Add R1b and R2 into the lexicographically
ordered set of regions. Apply (5) above iteratively to R1a and
R1c (since they may overlap, or be subtrees of, other regions).

For instance, given the currently registered regions in the
example above, if subagent S3 now registers mib-2 (R1 is
1.3.6.1.2.1) the resulting set of regions would be:

1.3.6.1.2.1 up to but not including 1.3.6.1.2.1.4 (by S3)
1.3.6.1.2.1.4 up to but not including 1.3.6.1.2.1.4.22 (by S2)
1.3.6.1.2.1.4 up to but not including 1.3.6.1.2.1.4.22 (by S3)
1.3.6.1.2.1.4.22 up to but not including 1.3.6.1.2.1.4.23 (by S2)
1.3.6.1.2.1.4.22 up to but not including 1.3.6.1.2.1.4.23 (by S1)
1.3.6.1.2.1.4.22 up to but not including 1.3.6.1.2.1.4.23 (by S3)
1.3.6.1.2.1.4.23 up to but not including 1.3.6.1.2.1.5 (by S2)
1.3.6.1.2.1.4.23 up to but not including 1.3.6.1.2.1.5 (by S3)
1.3.6.1.2.1.5 up to but not including 1.3.6.1.2.2 (by S3)

Note that at registration time a region may be split into multiple
OID ranges due to pre-existing registrations, or as a result of any
subsequent registration. This region splitting is transparent to
subagents. Hence the master agent must always be able to associate
any OID range with the information contained in its original agentx-
Register-PDU.

7.1.5.1. Handling Duplicate OID Ranges

As a result of this registration algorithm there are likely to be
duplicate OID ranges (regions of identical MIB objects registered to
different subagents) in the master agent's registered OID space.
Whenever the master agent's dispatching algorithm (see 7.2.1,
Dispatching AgentX PDUs) results in a duplicate OID range, the
master agent selects one to use, termed the 'authoritative region',
as follows:

1) Choose the one whose original agentx-Register-PDU
r.region contained the most subids, i.e., the most specific
r.region. Note: The presence or absence of a range subid has
no bearing on how "specific" one object identifier is compared
to another.

2) If still ambiguous, there were duplicate regions. Choose the
one whose original agentx-Register-PDU specified the smaller
value of r.priority.

7.1.6. Processing the agentx-Unregister-PDU

1) An agentx-Response-PDU is created and res.sysUpTime is set to
the value of sysUpTime.0 for the default context.

2) If h.sessionID does not correspond to a currently
established session with this subagent, the agentx-Response-PDU is
sent in reply with res.error set to `notOpen'.

3) If the NON_DEFAULT_CONTEXT bit is set, and the master agent
supports only a default context, the agentx-Response-PDU is
returned with res.error set to `unsupportedContext', and the
requested unregistration fails. Otherwise: The value of
res.sysUpTime is set to the value of sysUpTime.0 for the indicated
context.

4) If u.region, u.priority, and the indicated context do not match
an existing registration made during this session, the agentx-
Response-PDU is returned with res.error set to
`unknownRegistration'.

5) Otherwise, the agentx-Response-PDU is sent in reply with res.error
set to `noError', and the previous registration is removed:

- The master agent removes u.region from its registered OID space
within the indicated context. If the original region had been
split, all such related regions are removed.

For instance, given the example registry above, if subagent S2
unregisters "ip", the resulting registry would be:

1.3.6.1.2.1 up to but not including 1.3.6.1.2.1.4 (by S3)
1.3.6.1.2.1.4 up to but not including 1.3.6.1.2.1.4.22 (by S3)
1.3.6.1.2.1.4.22 up to but not including 1.3.6.1.2.1.4.23 (by S1)
1.3.6.1.2.1.4.22 up to but not including 1.3.6.1.2.1.4.23 (by S3)
1.3.6.1.2.1.4.23 up to but not including 1.3.6.1.2.1.5 (by S3)
1.3.6.1.2.1.5 up to but not including 1.3.6.1.2.2 (by S3)

7.1.7. Processing the agentx-AddAgentCaps-PDU

When the master agent receives an agentx-AddAgentCaps-PDU, it
processes it as follows:

1) An agentx-Response-PDU is created and res.sysUpTime is set to
the value of sysUpTime.0 for the default context.

2) If h.sessionID does not correspond to a currently
established session with this subagent, the agentx-Response-PDU is
sent in reply with res.error set to `notOpen'.

3) If the NON_DEFAULT_CONTEXT bit is set, and the master agent
supports only a default context, the agentx-Response-PDU is
returned with res.error set to `unsupportedContext', and the
requested operation fails. Otherwise: The value of res.sysUpTime
is set to the value of sysUpTime.0 for the indicated context.

4) Otherwise, the master agent adds the subagent's capabilities
information to the sysORTable for the indicated context. An
agentx-Response-PDU is sent in reply with res.error set to
`noError'.

7.1.8. Processing the agentx-RemoveAgentCaps-PDU

1) An agentx-Response-PDU is created and res.sysUpTime is set to
the value of sysUpTime.0 for the default context.

2) If h.sessionID does not correspond to a currently
established session with this subagent, the agentx-Response-PDU is
sent in reply with res.error set to `notOpen'.

3) If the NON_DEFAULT_CONTEXT bit is set, and the master agent
supports only a default context, the agentx-Response-PDU is
returned with res.error set to `unsupportedContext', and the
requested operation fails. Otherwise: The value of res.sysUpTime
is set to the value of sysUpTime.0 for the indicated context.

4) If the combination of a.id and the optional a.context does not
represent a sysORTable entry that was added by this subagent,
during this session, the agentx-Response-PDU is returned with
res.error set to `unknownAgentCaps'.

5) Otherwise the master agent deletes the corresponding sysORTable
------分隔线----------------------------
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
最新评论 查看所有评论
发表评论 查看所有评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 密码: 验证码:
推荐内容