The Assimilation Project  based on Assimilation version
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;
41 #define CMA_KEY_PREFIX "#CMA#"
42 #define CMA_IDENTITY_NAME "**CMA**"
45 WINEXPORT void nano_start_full(const char *initdiscoverpath, guint discover_interval
47  gboolean (*)(const FrameSet*, NetAddr*));
48 WINEXPORT void nano_shutdown(gboolean statreport);
50 WINEXPORT gboolean nano_initiate_shutdown(void);
51 WINEXPORT void nanoprobe_report_upstream(guint16 reporttype, NetAddr* who, const char * sysname, guint64 howlate);
53 extern const char * procname;
54 WINEXPORT extern int errcount;
55 WINEXPORT extern GMainLoop* mainloop;
56 extern gboolean nano_shutting_down;
57 extern GRand* nano_random;
59 // Override this if you want to set up a non-standard deadtime agent. */
61 // Override this if you want to set up a non-standard receipt-of-heartbeat agent. */
63 // Override this if you want to set up a non-standard late heartbeat agent. */
64 void (*nanoprobe_warntime_agent)(HbListener*, guint64 howlate);
65 // Override this if you want to set up a non-standard returned-from-the-dead agent. */
66 void (*nanoprobe_comealive_agent)(HbListener*, guint64 howlate);
67 // Override if you need to use an HbListener subclass...
68 extern HbListener* (*nanoprobe_hblistener_new)(NetAddr*, ConfigContext*);
70 #define MARTIAN_TIMEOUT 10
72 #endif /* _NANOPROBE_H */
GRand * nano_random
Definition: nanoprobe.c:112
WINEXPORT PacketDecoder * nano_packet_decoder(void)
Return our nanoprobe packet decoder map.
Definition: nanoprobe.c:1319
WINEXPORT GMainLoop * mainloop
gtest01.c - miscellaneous glib mainloop-based tests.
Definition: nanoprobe.c:68
const char * procname
process name
Definition: nanoprobe.c:113
WINEXPORT void nanoprobe_initialize_keys(void)
Definition: nanoprobe.c:1520
Definition: projectcommon.h:45
Defines an abstract Network I/O class.
guint64 heartbeat_count
Definition: nanoprobe.h:33
CryptFramePublicKey * preferred_cma_key_id
Definition: nanoprobe.c:109
gboolean nano_shutting_down
Definition: nanoprobe.c:110
WINEXPORT int errcount
error count
Definition: nanoprobe.c:67
void(* nanoprobe_warntime_agent)(HbListener *, guint64 howlate)
Definition: nanoprobe.h:64
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:1435
Implements Configuration Context class.
WINEXPORT NanoHbStats nano_hbstats
Definition: nanoprobe.c:65
void(* nanoprobe_deadtime_agent)(HbListener *)
Definition: nanoprobe.h:60
void(* nanoprobe_comealive_agent)(HbListener *, guint64 howlate)
Definition: nanoprobe.h:66
gboolean nano_connected
Definition: nanoprobe.c:66
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:134
guint dead_count
Definition: nanoprobe.h:34
FrameSet class - used for collecting Frames when not on the wire, and for marshalling/demarshalling t...
Definition: frameset.h:46
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:1392
WINEXPORT void nano_start_full(const char *initdiscoverpath, guint discover_interval, NetGSource *io, ConfigContext *config, gboolean(*)(const FrameSet *, NetAddr *))
Here is how the startup process works:
Definition: nanoprobe.c:1355
Implements NetIO GSource object.
guint martian_count
Definition: nanoprobe.h:37
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_heartbeat_agent)(HbListener *)
Definition: nanoprobe.h:62
Defines Heartbeat Listener interfaces.