On Tue, 24 Jun 2008 09:56:58 +0200, Juergen Schoenwaelder j.schoenwaelder@jacobs-university.de wrote:
On Tue, Jun 24, 2008 at 11:25:33AM +0400, rbondar@rich-logic.com wrote:
I have the following problem: When I'm trying to retreive the custom table from my SNMP agent the NULL
is
returned.
The code:
static int show_dgw_proto_sip_table(scli_interp_t *interp, int argc, char **argv) { sss_dgw_mib_sipProxyTableEntry_t **table=NULL; g_return_val_if_fail(interp, SCLI_ERROR);
if (argc != 2) return SCLI_SYNTAX; if (scli_interp_dry(interp)) return SCLI_OK; sss_dgw_mib_get_protocolSIPProxyTable(interp->peer, &table, 0); if (interp->peer->error_status) return SCLI_SNMP;
....
After this step I have no errors, but the table is NULL
Any suggestions?
This can happen if the table is empty so you have to check whether table is actually not NULL.
snort dump for request and agent responce is attached.
Since I have no tools to decipher snort dumps, I suggest you run things through tcpdump -s 0 -v -v -v (or tethereal with appropriate options) to see what has been going on. Or you privately send me the packets in question in pcap format.
/js
-- Juergen Schoenwaelder Jacobs University Bremen gGmbH Phone: +49 421 200 3587 Campus Ring 1, 28759 Bremen, Germany Fax: +49 421 200 3103 http://www.jacobs-university.de/
Hello, Juergen.
I'll send you the tcpdump log tommorow, when I'll be able to retreive it. But I can say. The table has 2 rows... It was checked with other tools. Also the SNMP agent is under development (author is me too), so I'm not fully sure the bug is in scli. But as far as I can understand the snort log the data is transmitted from agent to scli. This bug may lay near gsnmp, not scli. Because the gdb shows that the gsnmp is unable to retreive the data, and it returns the NULL value. And I suggested to write to the scli list because I think - it all linked together.
Thanks, Ruslan.