Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / ACE / ASNMP / agent / agent_impl.h
blob5475bb3e161615d8a5eacbe8969c7e3b35791007
1 /* -*- C++ -*- */
3 //=============================================================================
4 /**
5 * @file agent_impl.h
7 * @author Michael R. MacFaden
8 */
9 //=============================================================================
12 #ifndef AGENT_IMPL_H
13 #define AGENT_IMPL_H
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>
20 #include <asnmp/vb.h>
22 class agent_impl : public sagent
24 public:
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();
41 private:
42 /// this agent's read, write community strings
43 UdpTarget tgt_;
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 */