[snmp] SnmpContext question
Brian Jewell
brian.jewell at modius.com
Wed Aug 22 08:44:10 BST 2007
Birgit,
Thank you for your response.
--Brian
-----Original Message-----
From: snmp-bounces at snmp.westhawk.co.uk
[mailto:snmp-bounces at snmp.westhawk.co.uk] On Behalf Of Birgit Arkesteijn
Sent: Wednesday, August 22, 2007 3:07 AM
To: List for discussion of the Westhawk SNMP stack
Subject: Re: [snmp] SnmpContext question
Hi Brian,
On 21/08/07 18:36, Brian Jewell wrote:
> Hi,
>
> I'm having a little trouble understanding the use of SnmpContexts and
> SnmpContextPool's.
>
> 1) When sending GET requests to the same host, is it correct to call "new
> SnmpContextPool()" to retrieve a context each time a PDU is to be sent?
That is correct.
See
uk.co.westhawk.examplev2c.set_one.createContext(..)
> 2) If an SnmpContext is created for receiving traps, and a trap listener
is
> added with
>
> SnmpContext context = new SnmpContext(.);
> context.addListener(.);
>
>
> When I wish to stop receiving traps from a specified host, do I need to
call
> removeTrapListener() using the *same* context (as I used for calling
> addListener(), or is it ok to create a *new* SnmpContext (with the same
> properties) and use it for calling removeTrapListener()?
You'll have to use the *same* context, since the listener is associated
with that context (and that context only). *new* SnmpContext won't do
the trick.
>
> Thanks for your help.
>
> --Brian
Cheers, Birgit
--
-- Birgit Arkesteijn, birgit at westhawk.co.uk,
-- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK
-- Company no: 1769350
-- Registered Office:
-- 15 London Road, Stockton Heath, Warrington WA4 6SJ. UK.
-- tel.: +44 (0)161 237 0660
-- <URL: http://www.westhawk.co.uk>
_______________________________________________
snmp mailing list
snmp at snmp.westhawk.co.uk
http://snmp.westhawk.co.uk/mailman/listinfo/snmp
More information about the snmp
mailing list