The Assimilation Project
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nanoprobe.h
Go to the documentation of this file.
1 
24 #ifndef _NANOPROBE_H
25 #define _NANOPROBE_H
26 #include <projectcommon.h>
27 #include <hblistener.h>
28 #include <netio.h>
29 #include <netgsource.h>
30 #include <configcontext.h>
31 typedef struct _NanoHbStats NanoHbStats;
32 struct _NanoHbStats {
33  guint64 heartbeat_count;
34  guint dead_count;
38 };
40 extern gboolean nano_connected;
41 
42 WINEXPORT void nano_start_full(const char *initdiscoverpath, guint discover_interval
44 WINEXPORT void nano_shutdown(gboolean statreport);
46 WINEXPORT gboolean nano_initiate_shutdown(void);
47 WINEXPORT void nanoprobe_report_upstream(guint16 reporttype, NetAddr* who, const char * sysname, guint64 howlate);
48 extern const char * procname;
49 WINEXPORT extern int errcount;
50 WINEXPORT extern GMainLoop* mainloop;
51 extern gboolean nano_shutting_down;
52 
53 // Override this if you want to set up a non-standard deadtime agent. */
55 // Override this if you want to set up a non-standard receipt-of-heartbeat agent. */
57 // Override this if you want to set up a non-standard late heartbeat agent. */
58 void (*nanoprobe_warntime_agent)(HbListener*, guint64 howlate);
59 // Override this if you want to set up a non-standard returned-from-the-dead agent. */
60 void (*nanoprobe_comealive_agent)(HbListener*, guint64 howlate);
61 // Override if you need to use an HbListener subclass...
62 extern HbListener* (*nanoprobe_hblistener_new)(NetAddr*, ConfigContext*);
63 
64 #define MARTIAN_TIMEOUT 10
65 
66 #endif /* _NANOPROBE_H */
WINEXPORT PacketDecoder * nano_packet_decoder(void)
Return our nanoprobe packet decoder map.
Definition: nanoprobe.c:1137
WINEXPORT GMainLoop * mainloop
gtest01.c - miscellaneous glib mainloop-based tests.
Definition: nanoprobe.c:66
const char * procname
process name
Definition: nanoprobe.c:102
WINEXPORT void nano_start_full(const char *initdiscoverpath, guint discover_interval, NetGSource *io, ConfigContext *config)
Here is how the startup process works:
Definition: nanoprobe.c:1173
#define WINEXPORT
Definition: projectcommon.h:45
Defines an abstract Network I/O class.
guint64 heartbeat_count
Definition: nanoprobe.h:33
gboolean nano_shutting_down
Definition: nanoprobe.c:101
WINEXPORT int errcount
error count
Definition: nanoprobe.c:65
This is the base HbListener class. object - which listens for heartbeats from a particular sender...
Definition: hblistener.h:44
Project common header file.
WINEXPORT gboolean nano_initiate_shutdown(void)
Initiate shutdown - return TRUE if we have shut down immediately...
Definition: nanoprobe.c:1261
Implements Configuration Context class.
WINEXPORT NanoHbStats nano_hbstats
Definition: nanoprobe.c:63
void(* nanoprobe_warntime_agent)(HbListener *, guint64 howlate)
Definition: nanoprobe.h:58
gboolean nano_connected
Definition: nanoprobe.c:64
The NetAddr class class represents a general network address - whether IP, MAC, or any other type of ...
Definition: netaddr.h:43
WINEXPORT void nanoprobe_report_upstream(guint16 reporttype, NetAddr *who, const char *sysname, guint64 howlate)
Construct a frameset reporting something - and send it upstream.
Definition: nanoprobe.c:122
guint dead_count
Definition: nanoprobe.h:34
void(* nanoprobe_comealive_agent)(HbListener *, guint64 howlate)
Definition: nanoprobe.h:60
guint comealive_count
Definition: nanoprobe.h:36
WINEXPORT void nano_shutdown(gboolean statreport)
Shut down the things started up by nano_start_full() - mainly free storage to make valgrind happy...
Definition: nanoprobe.c:1217
Implements NetIO GSource object.
guint martian_count
Definition: nanoprobe.h:37
void(* nanoprobe_heartbeat_agent)(HbListener *)
Definition: nanoprobe.h:56
The NetGSource class objects integrate NetIO class objects into the g_main_loop paradigm.
Definition: netgsource.h:43
guint warntime_count
Definition: nanoprobe.h:35
void(* nanoprobe_deadtime_agent)(HbListener *)
Definition: nanoprobe.h:54
Defines Heartbeat Listener interfaces.