[AGENT++] subagent mib register with context and net-snmp does not work?
Claus Klein
claus.klein at arcormail.de
Fri Aug 6 23:34:50 CEST 2010
Hi Frank,
again, I am sure that is the Problem!
Check this diff with and without context get request:
claus-kleins-macbook-pro:AgentPro clausklein$ diff -y agentx-get-*.log
agentx/master: request for variable (DISMAN-EVENT-MIB::sysUpT agentx/
master: request for variable (DISMAN-EVENT-MIB::sysUpT
agentx: sending pdu (req=0x3,trans=0x2,sess=0x8) agentx: sending pdu
(req=0x3,trans=0x2,sess=0x8)
dumph_send: AgentX Header dumph_send: AgentX Header
dumpx_send: 01 05 00 00 | dumpx_send: 01 05 08 00
dumpv_send: Version: 1 dumpv_send: Version: 1
dumpv_send: Command: 5 (Get) dumpv_send:
Command: 5 (Get)
dumpv_send: Flags: 00 | dumpv_send:
Flags: 08 <<<<<<<<<<<<<<<<<<OK
dumph_send: Session ID dumph_send: Session ID
dumpx_send: 08 00 00 00 dumpx_send: 08 00 00 00
dumpv_send: Integer: 8 (0x08) dumpv_send:
Integer: 8 (0x08)
dumph_send: Transaction ID dumph_send: Transaction ID
dumpx_send: 02 00 00 00 dumpx_send: 02 00 00 00
dumpv_send: Integer: 2 (0x02) dumpv_send:
Integer: 2 (0x02)
dumph_send: Request ID dumph_send: Request ID
dumpx_send: 03 00 00 00 dumpx_send: 03 00 00 00
dumpv_send: Integer: 3 (0x03) dumpv_send:
Integer: 3 (0x03)
dumph_send: Dummy Length :-( dumph_send: Dummy Length :-(
dumpx_send: 00 00 00 00 dumpx_send: 00 00 00 00
dumpv_send: Integer: 0 (0x00) dumpv_send:
Integer: 0 (0x00)
> dumph_send: Community
> dumph_send: Build String
> dumph_send: length
> dumpx_send: 08 00 00 00
> dumpv_send: Integer: 8 (0x08)
> dumpx_send: 73 75 62 61 67 65 6E 74
> dumpv_send: String: subagent
dumph_send: AgentX Payload dumph_send: AgentX Payload
dumph_send: Get* Variable List dumph_send: Get* Variable List
dumpv_send: OID: DISMAN-EVENT-MIB::sysUpTimeInstance
dumpv_send: OID: DISMAN-EVENT-MIB::sysUpTimeInstance
dumph_send: OID Header dumph_send: OID Header
dumpx_send: 04 02 00 00 dumpx_send: 04 02 00 00
dumpv_send: # subids: 4 (0x04) dumpv_send: #
subids: 4 (0x04)
dumpv_send: prefix: 2 (0x02) dumpv_send:
prefix: 2 (0x02)
dumpv_send: inclusive: 0 (0x00)
dumpv_send: inclusive: 0 (0x00)
dumph_send: OID Segments dumph_send: OID Segments
dumpx_send: 01 00 00 00 dumpx_send: 01 00 00 00
dumpv_send: Integer: 1 (0x01) dumpv_send:
Integer: 1 (0x01)
dumpx_send: 01 00 00 00 dumpx_send: 01 00 00 00
dumpv_send: Integer: 1 (0x01) dumpv_send:
Integer: 1 (0x01)
dumpx_send: 03 00 00 00 dumpx_send: 03 00 00 00
dumpv_send: Integer: 3 (0x03) dumpv_send:
Integer: 3 (0x03)
dumpx_send: 00 00 00 00 dumpx_send: 00 00 00 00
dumpv_send: Integer: 0 (0x00) dumpv_send:
Integer: 0 (0x00)
dumpv_send: OID: ccitt dumpv_send: OID: ccitt
dumph_send: OID Header dumph_send: OID Header
dumpx_send: 00 00 00 00 dumpx_send: 00 00 00 00
dumpv_send: # subids: 0 (0x00) dumpv_send: #
subids: 0 (0x00)
dumpv_send: prefix: 0 (0x00) dumpv_send:
prefix: 0 (0x00)
dumpv_send: inclusive: 0 (0x00)
dumpv_send: inclusive: 0 (0x00)
dumph_send: OID Segments dumph_send: OID Segments
dumpx_send: 18 00 00 00 | dumpx_send: 24 00 00 00
dumpv_send: Integer: 24 (0x18) | dumpv_send: Integer: 36
(0x24)
agentx_build: packet built okay agentx_build: packet built okay
dumpx_recv: 24 00 00 00 dumpx_recv: 24 00 00 00
dumpv_recv: Integer: 36 (0x24) dumpv_recv: Integer: 36 (0x24)
dumph_recv: AgentX Header dumph_recv: AgentX Header
dumph_recv: Version dumph_recv: Version
dumpx_recv: 01 dumpx_recv: 01
dumpv_recv: Version: 1 dumpv_recv: Version: 1
dumph_recv: Command dumph_recv: Command
dumpx_recv: 12 dumpx_recv: 12
dumpv_recv: Command: 18 (Response) dumpv_recv:
Command: 18 (Response)
dumph_recv: Flags dumph_recv: Flags
dumpx_recv: 00 | dumpx_recv: 08
dumpv_recv: Flags: 0x0 | dumpv_recv:
Flags: 0x8 <<<<<<<<<<<<<<<<wrong
dumph_recv: Reserved Byte dumph_recv: Reserved Byte
dumpx_recv: 00 dumpx_recv: 00
dumpv_recv: Reserved: 0x0 dumpv_recv: Reserved:
0x0
dumph_recv: Session ID dumph_recv: Session ID
dumpx_recv: 08 00 00 00 dumpx_recv: 08 00 00 00
dumpv_recv: Integer: 8 (0x08) dumpv_recv:
Integer: 8 (0x08)
dumph_recv: Transaction ID dumph_recv: Transaction ID
dumpx_recv: 02 00 00 00 dumpx_recv: 02 00 00 00
dumpv_recv: Integer: 2 (0x02) dumpv_recv:
Integer: 2 (0x02)
dumph_recv: Packet ID dumph_recv: Packet ID
dumpx_recv: 03 00 00 00 dumpx_recv: 03 00 00 00
dumpv_recv: Integer: 3 (0x03) dumpv_recv:
Integer: 3 (0x03)
dumph_recv: Payload Length dumph_recv: Payload Length
dumpx_recv: 24 00 00 00 dumpx_recv: 24 00 00 00
dumpv_recv: Integer: 36 (0x24) dumpv_recv:
Integer: 36 (0x24)
> dumph_recv: Context
> dumpx_recv: 00 00 00 00
> dumpv_recv: Integer: 0 (0x00)
> dumpx_recv: 00 00 00 00
> dumpv_recv: String:
dumph_recv: PDU dumph_recv: PDU
dumpx_recv: 00 00 00 00 dumpx_recv: 00 00 00 00
dumpv_recv: Integer: 0 (0x00) dumpv_recv:
Integer: 0 (0x00)
dumpx_recv: 00 00 | dumpx_recv: 43 00
dumpv_recv: Short: 0 (0x00) | dumpv_recv:
Short: 67 (0x43)
dumpx_recv: 00 00 dumpx_recv: 00 00
dumpv_recv: Short: 0 (0x00) dumpv_recv:
Short: 0 (0x00)
dumph_recv: VarBindList dumph_recv: VarBindList
dumph_recv: VarBind: dumph_recv: VarBind:
dumph_recv: Type dumph_recv: Type
dumpx_recv: 43 00 | dumpx_recv: 04 02
dumpv_recv: Short: 67 (0x43) |
dumpv_recv: Short: 516 (0x204)
dumph_recv: OID Header dumph_recv: OID Header
dumpx_recv: 04 02 00 00 |
dumpx_recv: 01 00 00 00
dumpv_recv: # subids: 4 (0x04) |
dumpv_recv: # subids: 1 (0x01)
dumpv_recv: prefix: 2 (0x02) |
dumpv_recv: prefix: 0 (0x00)
dumpv_recv: inclusive: 0 (0x00)
dumpv_recv: inclusive: 0 (0x00)
dumph_recv: OID Segments dumph_recv: OID
Segments
dumpx_recv: 01 00 00 00 dumpx_recv: 01 00
00 00
dumpv_recv: Integer: 1 (0x01)
dumpv_recv: Integer: 1 (0x01)
dumpx_recv: 01 00 00 00 | dumpv_recv:
OID: iso
dumpv_recv: Integer: 1 (0x01) | agentx/
master: timeout on session 00A514B8
dumpx_recv: 03 00 00 00 | agentx/master: close
00A514B8, -1
dumpv_recv: Integer: 3 (0x03) |
dumpx_recv: 00 00 00 00 <
dumpv_recv: Integer: 0 (0x00) <
dumpv_recv: OID: DISMAN-EVENT-MIB::sysUpTimeInsta <
dumpx_recv: AC 2D 00 00 <
dumpv_recv: Integer: 11692 (0x2DAC) <
agentx/master: got response errstat=0, (req=0x3,trans=0x2,ses <
agentx/master: agentx_got_response() beginning... <
agentx/master: handle_agentx_response: processing: DISMAN-E <
agentx/master: handle_agentx_response() finishing... <
claus-kleins-macbook-pro:AgentPro clausklein$
On 06.08.2010, at 22:39, Claus Klein wrote:
> Hi Frank,
>
> for me it is a AgentX++ problem.
> Did you receive my log file?
>
> The subagent AgentX Response is wrong coded in case of a get request
> with context:
>
> There is an invalid nonDefaultContext flag set, what is not allowed!
> And the context is empty too or the rest fields?
>
> I think, the res.sysuptime is also missing?
>
> see http://tools.ietf.org/html/rfc2741#page-43
>
> RFC 2741 AgentX January
> 2000
>
>
> 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 |
> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
> ...
>
> dumpx_recv: 24 00 00 00
> dumpv_recv: Integer: 36 (0x24)
> dumph_recv: AgentX Header
> dumph_recv: Version
> dumpx_recv: 01
> dumpv_recv: Version: 1
> dumph_recv: Command
> dumpx_recv: 12
> dumpv_recv: Command: 18 (Response)
> dumph_recv: Flags
> dumpx_recv: 08
> dumpv_recv: Flags: 0x8 <<<<<<<<<<<<<< wrong!
> dumph_recv: Reserved Byte
> dumpx_recv: 00
> dumpv_recv: Reserved: 0x0
> dumph_recv: Session ID
> dumpx_recv: 08 00 00 00
> dumpv_recv: Integer: 8 (0x08)
> dumph_recv: Transaction ID
> dumpx_recv: 02 00 00 00
> dumpv_recv: Integer: 2 (0x02)
> dumph_recv: Packet ID
> dumpx_recv: 03 00 00 00
> dumpv_recv: Integer: 3 (0x03)
> dumph_recv: Payload Length
> dumpx_recv: 24 00 00 00
> dumpv_recv: Integer: 36 (0x24)
> dumph_recv: Context <<<<<<<<<<<<< misinterpreted by net-snmp?
> dumpx_recv: 00 00 00 00
> dumpv_recv: Integer: 0 (0x00)
> dumpx_recv: 00 00 00 00
> dumpv_recv: String:
> dumph_recv: PDU
> dumpx_recv: 00 00 00 00
> dumpv_recv: Integer: 0 (0x00)
> dumpx_recv: 43 00
> dumpv_recv: Short: 67 (0x43)
> dumpx_recv: 00 00
> dumpv_recv: Short: 0 (0x00)
> dumph_recv: VarBindList
> dumph_recv: VarBind:
> dumph_recv: Type
> dumpx_recv: 04 02
> dumpv_recv: Short: 516 (0x204)
> dumph_recv: OID Header
> dumpx_recv: 01 00 00 00
> dumpv_recv: # subids: 1 (0x01)
> dumpv_recv: prefix: 0 (0x00)
> dumpv_recv: inclusive: 0 (0x00)
> dumph_recv: OID Segments
> dumpx_recv: 01 00 00 00
> dumpv_recv: Integer: 1 (0x01)
> dumpv_recv: OID: iso
> agentx/master: timeout on session 00A514B8
> agentx/master: close 00A514B8, -1
>
More information about the AGENTPP
mailing list