OSDN Git Service

Fix typo pointed out by Kohei TANUMA
[ultramonkey-l7/ultramonkey-l7-v2.git] / snmpagent / interproccom.h
1 #ifndef __INTERPROCCOM_H__
2 #define __INTERPROCCOM_H__
3
4 #include <string>
5 #include <pthread.h>
6
7 #include "l7ag_socket.h"
8 #include "tag_threadstat.h"
9 #include "dispatch_message.h"
10 #include "store_mibdata.h"
11
12 class   l7ag_subagent;
13
14 class   l7ag_interproccommunicate : public l7ag_socket
15 {
16 private:
17         l7ag_subagent * parent;
18         THREAD_STAT_TAG status;
19         bool            stop_flag;
20         
21         pthread_mutex_t mutex_sbuf;
22         pthread_mutex_t mutex_rbuf;
23         char *  buffer_send;
24         char *  buffer_recv;
25
26 protected:
27         l7ag_interproccommunicate();
28
29         static  void *  do_communicate( void * args );
30         
31 public:
32         l7ag_interproccommunicate( l7ag_subagent * p_subagent );
33         ~l7ag_interproccommunicate();
34         
35         void    set_parent( l7ag_subagent * p_subagent );
36
37         void    start_thread();
38         void    stop_thread(){stop_flag=true;}
39         
40         void    send_mibdatacollect( std::string oid );
41         bool    getStopFlag(){return stop_flag;}
42         void    setRequestMessage();
43 };
44
45 #endif //__INTERPROCCOM_H__
46