On Tue, 24 Jun 2008 23:06:20 +0400, rbondar@rich-logic.com wrote:
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.
-- !! This message is brought to you via the `scli' mailing list. !! Please do not reply to this message to unsubscribe. To unsubscribe or adjust !! your settings, send a mail message to scli-request@ibr.cs.tu-bs.de !! or look at https://mail.ibr.cs.tu-bs.de/mailman/listinfo/scli.
Here is requested tcpdump result. As you can see the only one row is requested, while the table contains 2 rows.
13:03:05.755075 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 420) localhost.35686 > localhost.snmp: [bad udp cksum 20e!] {
SNMPv2c { GetNextRequest(373) R=1804289386 E:20379.2.1.3.2.3.1.2 E:20379.2.1.3.2.3.1.3 E:20379.2.1.3.2.3.1.4 E:20379.2.1.3.2.3.1.5 E:20379.2.1.3.2.3.1.6 E:20379.2.1.3.2.3.1.7 E:20379.2.1.3.2.3.1.8 E:20379.2.1.3.2.3.1.9 E:20379.2.1.3.2.3.1.10 E:20379.2.1.3.2.3.1.11 E:20379.2.1.3.2.3.1.12 E:20379.2.1.3.2.3.1.13 E:20379.2.1.3.2.3.1.14 E:20379.2.1.3.2.3.1.15 E:20379.2.1.3.2.3.1.16 E:20379.2.1.3.2.3.1.17 E:20379.2.1.3.2.3.1.18 } } 13:03:05.757430 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 499) localhost.snmp > localhost.35686: [bad udp cksum 20d2!] { SNMPv2c { GetResponse(452) R=1804289386 E:20379.2.1.3.2.3.1.2=1 E:20379.2.1.3.2.3.1.3="proxy0" E:20379.2.1.3.2.3.1.4=192.168.1.1 E:20379.2.1.3.2.3.1.5=1 E:20379.2.1.3.2.3.1.6="guest" E:20379.2.1.3.2.3.1.7="guest" E:20379.2.1.3.2.3.1.8="guest" E:20379.2.1.3.2.3.1.9=1 E:20379.2.1.3.2.3.1.10="sipnet.ru" E:20379.2.1.3.2.3.1.11=212.53.40.40 E:20379.2.1.3.2.3.1.12="1212" E:20379.2.1.3.2.3.1.13=180 E:20379.2.1.3.2.3.1.14="localdomain" E:20379.2.1.3.2.3.1.15="remotedomain" E:20379.2.1.3.2.3.1.16="1212" E:20379.2.1.3.2.3.1.17=213.24.20.202 E:20379.2.1.3.2.3.1.18=1 } }
Best regards, Ruslan.