On Tue, Jul 08, 2008 at 04:26:33PM +0400, rbondar@rich-logic.com wrote:
I have a problem with setting the IpAddress with scli. Accordingly to the RFC:
The IpAddress type represents a 32-bit internet address. It is represented as an OCTET STRING of length 4, in network byte-order.
And I'm using the inet_aton function to convert the string representation. But tcpdump says that the value is not 4 bytes length, and agent sets the random value.
So what is actually contained in the packet?
The pieces of code follows:
struct in_addr addr; inet_aton(argv[2], &addr);
... if (info && info[idx]) { info[idx]->sipProxyTableOutAddr=&addr; sss_dgw_mib_set_sipProxyTableEntry(interp->peer, info[idx], SSS_DGW_MIB_SIPPROXYTABLEOUTADDR); }
Where argv[2] is string representation (i.e. "127.0.0.1") of IP address. info contains previously retreived value.
The code snippet is not sufficient to figure this out; it is for example unclear whether sipProxyTableOutAddr is part of an instance identifier.
/js
PS: If this is a MIB under development, please avoid using IpAddress and instead use the version neutral InetAddress.