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 #define CMA_KEY_PREFIX "#CMA#"
42 #define CMA_IDENTITY_NAME "**CMA**"
44 
45 WINEXPORT void nano_start_full(const char *initdiscoverpath, guint discover_interval
47  gboolean (*)(const FrameSet*));
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 WINEXPORT void nanoprobe_associate_cma_key(const char *key_id, ConfigContext *cfg);
54 extern const char * procname;
55 WINEXPORT extern int errcount;
56 WINEXPORT extern GMainLoop* mainloop;
57 extern gboolean nano_shutting_down;
58 extern GRand* nano_random;
59 
60 // Override this if you want to set up a non-standard deadtime agent. */
62 // Override this if you want to set up a non-standard receipt-of-heartbeat agent. */
64 // Override this if you want to set up a non-standard late heartbeat agent. */
65 void (*nanoprobe_warntime_agent)(HbListener*, guint64 howlate);
66 // Override this if you want to set up a non-standard returned-from-the-dead agent. */
67 void (*nanoprobe_comealive_agent)(HbListener*, guint64 howlate);
68 // Override if you need to use an HbListener subclass...
69 extern HbListener* (*nanoprobe_hblistener_new)(NetAddr*, ConfigContext*);
70 
71 #define MARTIAN_TIMEOUT 10
72 
73 #endif /* _NANOPROBE_H */
GRand * nano_random
Definition: nanoprobe.c:106
WINEXPORT PacketDecoder * nano_packet_decoder(void)
Return our nanoprobe packet decoder map.
Definition: nanoprobe.c:1209
WINEXPORT GMainLoop * mainloop
gtest01.c - miscellaneous glib mainloop-based tests.
Definition: nanoprobe.c:67
const char * procname
process name
Definition: nanoprobe.c:107
WINEXPORT void nano_start_full(const char *initdiscoverpath, guint discover_interval, NetGSource *io, ConfigContext *config, gboolean(*)(const FrameSet *))
Here is how the startup process works:
Definition: nanoprobe.c:1245
WINEXPORT void nanoprobe_initialize_keys(void)
Definition: nanoprobe.c:1409
#define WINEXPORT
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:104
gboolean nano_shutting_down
Definition: nanoprobe.c:105
WINEXPORT int errcount
error count
Definition: nanoprobe.c:66
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:1324
Implements Configuration Context class.
WINEXPORT NanoHbStats nano_hbstats
Definition: nanoprobe.c:64
void(* nanoprobe_warntime_agent)(HbListener *, guint64 howlate)
Definition: nanoprobe.h:65
gboolean nano_connected
Definition: nanoprobe.c:65
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:128
WINEXPORT void nanoprobe_associate_cma_key(const char *key_id, ConfigContext *cfg)
Associate the given encryption key for all CMA addresses in the config we're given.
Definition: nanoprobe.c:1465
guint dead_count
Definition: nanoprobe.h:34
void(* nanoprobe_comealive_agent)(HbListener *, guint64 howlate)
Definition: nanoprobe.h:67
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:1281
Implements NetIO GSource object.
guint martian_count
Definition: nanoprobe.h:37
void(* nanoprobe_heartbeat_agent)(HbListener *)
Definition: nanoprobe.h:63
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:61
Defines Heartbeat Listener interfaces.