Sending real data [was Re: [SNMP4J] Newbie Agent help please]
Frank Fock
fock at agentpp.com
Fri Oct 26 00:35:25 CEST 2007
Hi David,
(1) configure the SNMP4J-Agent as target in MIB-Explorer.
(2) put the agent in simulation mode (use the
agentppSimMode object from AGENTPP-SIMULATION-MIB).
(3) open the snapshot and choose "Restore"
(4) Uncheck the option "Try to restore only..."
That's all.
Hope this helps.
Best regards,
Frank
dhay at lexmark.com wrote:
>
> Hi Frank,
>
> That sounds great! I managed to do the first part - took a snapshot of
> the real printer device...I now have a xxxmib.sf file.
>
> But not sure how I "apply the snapshot on the simulation agent"?
>
> Would you have a minute to explain a little further?
>
> cheers,
>
> David
>
>
>
> *Frank Fock <fock at agentpp.com>*
>
> 10/25/2007 04:21 PM
>
>
> To
> dhay at lexmark.com
> cc
> "Eugene R. Snider" <gene at cvtt.net>, snmp4j at agentpp.org
> Subject
> Re: Sending real data [was Re: [SNMP4J] Newbie Agent help please]
>
>
>
>
>
>
>
> Hi David,
>
> You could use MIB Explorer Pro to take a snapshot of the
> real printer device and then apply the snapshot on the
> SNMP4J-Agent simulation agent (the agent must use the
> SimMOFactory). For more information see:
> http://www.snmp4j.org/agent/doc/org/snmp4j/agent/mo/ext/SimMOFactory.html
>
> The ifTable is a table from the IF-MIB. It is just
> there for demonstration purposes, you can safely
> ignore it.
>
> Best regards,
> Frank
>
> dhay at lexmark.com wrote:
> > Thanks, Gene.
> >
> > I created my own version of TestAgent, and used AgenGen to create the
> Java
> > stubs for our MIB. My agent will now respond to SNMP requests, which is
> > great.
> >
> > I'm stuck at the next stage, however. I need for the agent to behave
> like
> > a particular printer, and respond accordingly. So, for example, when I
> > send .1.3.6.1.4.1.641.2.1.2.1.2.1 it currently returns prtgenFamilyId.0 -
> > however, I need it to respond with a String containing the model name of
> > the specific printer I'm simulating.
> >
> > How did I accomplish this? Is there an interface I can implement to do
> > this?
> >
> > Also, what is an ifTable?!
> >
> > cheers,
> >
> > David
> >
> >
> >
> >
> > "Eugene R. Snider" <gene at cvtt.net>
> > 10/20/2007 05:12 PM
> >
> > To
> > dhay at lexmark.com
> > cc
> >
> > Subject
> > Re: [SNMP4J] Newbie Agent help please
> >
> >
> >
> >
> >
> > I started off using the TestAgent and IfMIB code in snmp4j-agent.test.
> > This will give you a fully functional agent and ifTable. That worked
> > extremely well for me, although I did have issues related to v2c that I
> > don't fully understand.
> >
> > Gene
> >
> > dhay at lexmark.com wrote:
> >> Hi,
> >>
> >> I'm pretty new to SNMP, and have been asked to create a very simple SNMP
> >> agent that pretends to be a device and responds to 6 or 7 SNMP requests.
> >>
> >> I have created my own MultiIPSNMPServer which binds to an ip address and
> >> listens for requests on port 161. I'm a little stuck, however, on how
> > to
> >> proceed. I know the requests I'll receive, and the responses I want to
> >> send, so I think I'm just looking for the pieces to decode the SNMP
> >> request I receive and return the appropriate response.
> >>
> >> What is simplest way to proceed using SNMP4J Agent? I assume I need to
> >> extend BaseAgent, but what are the *minimum* pieces I need to add?
> >>
> >> Any help would be really appreciated...
> >>
> >> cheers,
> >>
> >> David
> >> _______________________________________________
> >> SNMP4J mailing list
> >> SNMP4J at agentpp.org
> >> http://lists.agentpp.org/mailman/listinfo/snmp4j
> >>
> >
> > _______________________________________________
> > SNMP4J mailing list
> > SNMP4J at agentpp.org
> > http://lists.agentpp.org/mailman/listinfo/snmp4j
>
> --
> AGENT++
> http://www.agentpp.com
> http://www.mibexplorer.com
> http://www.mibdesigner.com
>
--
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com
More information about the SNMP4J
mailing list