Re: Fails:: SNMPGetNext and GetBulk has the IP Address Index reversed in the request.

Dave Shield <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
On 24 August 2010 13:48,  <[email protected]> wrote:

>        snmp_set_var_typed_integer( idx, ASN_IPADDRESS, ntohl(entry->vplexDirectorPrimaryIpAddr) );

The SMI type  IpAddress  is not an integer-based type.
It is a (four-octet) binary string, which holds the address
in network-byte order.   See RFC 2758, section 7.1.5

You *might* be able to get away with treating it as an
integer in this way, but I certainly don't think you should
be  returning it in host order.

Dave

------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-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.