Hi,
As I said in my last post, i am able to get all things done correctly if I
have single session and I use single session APIs.
But for several SNMPv3 users, I need to create multiple sessions.
In this case, I am using function:
transport = netsnmp_tdomain_transport(port, 1, "udp")
Here, port is same always = 162 (or anything entered by user)
But, it returns valid pointer only on 1st call. After that, it always
returns NULL, due to which I am not able to add further sessions using call
:
snmp_sess_add(&session, transport, NULL, NULL)
Please help in this regard.
Thanks in advance.
Regards
Gaurav
On Thu, Jul 22, 2010 at 7:07 PM, Gaurav Chaturvedi <
gauravchaturve...@gmail.com> wrote:
> Hi,
>
> I got the problem solved for SNMPv3 support. Thanks.
>
> Now I want to know how to create sessions for different users in SNMPv3.
>
> Without setting the session variable "session.securityEngineID" before
> calling "snmp_sess_read", I am not able to call the callback function. So, I
> suppose for different users, I need to create multiple sessions at startup
> only?Is it true? If yes, how it is possible? I am taking user-name,password
> and engineId from my config file.
>
> Thanks
> Gaurav
>
>
> On Thu, Jul 22, 2010 at 12:48 PM, Dave Shield
> <d.t.shi...@liverpool.ac.uk>wrote:
>
>> On 22 July 2010 07:49, Gaurav Chaturvedi <gauravchaturve...@gmail.com>
>> wrote:
>> > If I send engine-id using command [snmptrap]:
>>
>> > This is stored in u_char * engine_id as engine_id[0] = 0x01
>> > engine_id[1] =
>> 0x02
>> > engine_id[2] =
>> 0x03
>> > engine_id[3] =
>> 0x04
>> > engine_id[4] =
>> 0x05
>> >
>> > and the length is 5.
>>
>> This is correct.
>> [Well - strictly speaking it's probably not a valid engineID value,
>> according to the description in the SnmpEngineID TC.
>> But that's not important right now]
>>
>>
>>
>> > Whereas, the engine-id we store in user database is session.engineId =
>> > "0x0102030405" and length is 12.
>>
>> Are you talking about the value in the session structure?
>> Or the value in the user database?
>>
>> In any case, you should be assigning a string of binary values,
>> not a printable string. Try configuring the engineID within your
>> application using the code I posted yesterday.
>>
>> Dave
>>
>
>
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users