3 //=============================================================================
7 * @author Michael R. MacFaden
9 //=============================================================================
15 #include <ace/Event_Handler.h>
16 #include <ace/SOCK_Dgram.h>
17 #include <ace/INET_Addr.h>
18 #include <ace/High_Res_Timer.h>
19 #include <asnmp/sagent.h>
22 class agent_impl
: public sagent
25 agent_impl(unsigned short port
, const char *rd
, const char *wr
);
26 virtual ~agent_impl();
28 /// retrieve data from a peer agent for a given list of oid values
29 virtual int handle_get( Pdu
&pdu
, UdpTarget
&target
);
31 /// retrieve data lexically adjacent to the oids specified in the pdu
32 /// from the peer agent
33 virtual int handle_get_next( Pdu
&pdu
, UdpTarget
&target
);
35 /// set data in the agent from the list of oids in the pdu
36 virtual int handle_set( Pdu
&pdu
, UdpTarget
&target
);
38 /// main loop here using a reactor object
39 int process_requests();
42 /// this agent's read, write community strings
44 /// set values for a "get" cmd
45 int get_response(Vb
& vb
);
46 /// agent "uptime" ticks reported in 1/100 second
47 ACE_High_Res_Timer agent_clock_
;
50 #endif /* AGENT_IMPL_H */