Sending real data [was Re: [SNMP4J] Newbie Agent help please]
dhay at lexmark.com
dhay at lexmark.com
Thu Oct 25 17:10:22 CEST 2007
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
>
More information about the SNMP4J
mailing list