problem with ASN_IPADDRESS

Leonardo Cezar <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <CAAzqD7esgRUiuyhu74+q6KR-TixygdGj7APqOg9UHVqT0_L+=Q@mail.gmail.com>
Hi all,

We've made a simple snmp agent to get some important data from
olsrd[1] protocol. Everything seemed working fine until we need to use
the ASN_IPADDRESS type.

We have a struct like this:

struct foobar
{
  olsr_u16_t      count;
  in_addr_t        addr;
  const char      *teste;
  struct foobar *next;
};
and we always need to map the "addr" member to a table set in snmp.

Our row's code in the table set looks like it:

netsnmp_set_row_column(row, 2,  ASN_IPADDRESS, (u_char
*)&addr,sizeof(uint32_t));

However a request from snmpget such as:

snmpget -v 2c -c public localhost MessageSentSource.1

Returns this strange IP:

MY-MIB::MessageSentSource.1 = IpAddress: 8.70.65.196

when must to return 10.0.0.1

What's the wrong?

Thanks

1) http://www.olsr.org/

-Leo
-- 
Leonardo Cezar
http://postgreslogia.wordpress.com

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.