Dave,
Got it. However, I wanted to know the logic of how the agent converts the
long to four-octet binary. That will help me specify the correct long in the
mib-module,
Thanks and regards,
Arijit

-----Original Message-----
From: Dave Shield [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 02, 2004 3:14 PM
To: Mukherjee, Arijit (Arijit)
Cc: [EMAIL PROTECTED]
Subject: Re: Mapping between long and ASN_IPADDRESS 


> However, when queried from manager, the agent returns the . separated
> IPAddress.

No - the agent returns a four-octet binary string (ratehr than an
unsigned long).  It's the client that *displays* this as a dotted-quad.

Given the varbind ('vb') that's returned, the code is basically:

    printf( "IP Address is %d.%d.%d.%d\n",
                vb->val.string[0],
                vb->val.string[1],
                vb->val.string[2],
                vb->val.string[3] );

Dave


-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
>From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
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

Reply via email to