The Assimilation Project
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Go to the documentation of this file.
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;
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 extern GRand* nano_random;
54 // Override this if you want to set up a non-standard deadtime agent. */
56 // Override this if you want to set up a non-standard receipt-of-heartbeat agent. */
58 // Override this if you want to set up a non-standard late heartbeat agent. */
59 void (*nanoprobe_warntime_agent)(HbListener*, guint64 howlate);
60 // Override this if you want to set up a non-standard returned-from-the-dead agent. */
61 void (*nanoprobe_comealive_agent)(HbListener*, guint64 howlate);
62 // Override if you need to use an HbListener subclass...
63 extern HbListener* (*nanoprobe_hblistener_new)(NetAddr*, ConfigContext*);
65 #define MARTIAN_TIMEOUT 10
67 #endif /* _NANOPROBE_H */
GRand * nano_random
Definition: nanoprobe.c:103
WINEXPORT PacketDecoder * nano_packet_decoder(void)
Return our nanoprobe packet decoder map.
Definition: nanoprobe.c:1180
WINEXPORT GMainLoop * mainloop
gtest01.c - miscellaneous glib mainloop-based tests.
Definition: nanoprobe.c:66
const char * procname
process name
Definition: nanoprobe.c:104
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:1216
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:102
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:1288
Implements Configuration Context class.
WINEXPORT NanoHbStats nano_hbstats
Definition: nanoprobe.c:63
void(* nanoprobe_warntime_agent)(HbListener *, guint64 howlate)
Definition: nanoprobe.h:59
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:124
guint dead_count
Definition: nanoprobe.h:34
void(* nanoprobe_comealive_agent)(HbListener *, guint64 howlate)
Definition: nanoprobe.h:61
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:1246
Implements NetIO GSource object.
guint martian_count
Definition: nanoprobe.h:37
void(* nanoprobe_heartbeat_agent)(HbListener *)
Definition: nanoprobe.h:57
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:55
Defines Heartbeat Listener interfaces.