|
The Assimilation Monitoring Project
|
nanoprobe main program. More...
#include <projectcommon.h>#include <stdlib.h>#include <string.h>#include <signal.h>#include <errno.h>#include <framesettypes.h>#include <frameset.h>#include <ctype.h>#include <netgsource.h>#include <reliableudp.h>#include <netaddr.h>#include <authlistener.h>#include <signframe.h>#include <cryptframe.h>#include <compressframe.h>#include <intframe.h>#include <addrframe.h>#include <cstringframe.h>#include <frametypes.h>#include <misc.h>#include <nanoprobe.h>
Go to the source code of this file.
Macros | |
| #define | SEP "/" |
| #define | HAS_FORK |
Functions | |
| FSTATIC void | catch_a_signal (int signum) |
| Signal reception function - signals stop by here... More... | |
| FSTATIC gboolean | check_for_signals (gpointer ignored) |
| Check for signals periodically. More... | |
| FSTATIC gboolean | gotnetpkt (Listener *l,FrameSet *fs,NetAddr *srcaddr) |
| Test routine called when an otherwise-unclaimed NetIO packet is received. More... | |
| FSTATIC void | usage (const char *cmdname) |
| int | main (int argc, char **argv) |
| Nanoprobe main program. More... | |
Variables | |
| const char * | localaddr = NULL |
| const char * | cmaaddr = NULL |
| const char * | procname = "nanoprobe" |
| process name More... | |
| gint64 | pktcount = 0 |
| NetIO * | nettransport |
| NetGSource * | netpkt |
| NetAddr * | destaddr |
| NetAddr * | localbindaddr |
| int | heartbeatcount = 0 |
| int | pcapcount = 0 |
| int | wirepktcount = 0 |
| gboolean | sigint = FALSE |
| gboolean | sigterm = FALSE |
| gboolean | sighup = FALSE |
| gboolean | sigusr1 = FALSE |
| gboolean | sigusr2 = FALSE |
nanoprobe main program.
Starts up a nanoprobe and does nanoprobie things - deferring most of the work to others.
This file is part of the Assimilation Project.
The Assimilation software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with the Assimilation Project software. If not, see http://www.gnu.org/licenses/
Definition in file nanoprobe/nanoprobe.c.
| #define HAS_FORK |
Definition at line 62 of file nanoprobe/nanoprobe.c.
| #define SEP "/" |
Definition at line 61 of file nanoprobe/nanoprobe.c.
Referenced by main().
| FSTATIC void catch_a_signal | ( | int | signum | ) |
Signal reception function - signals stop by here...
Definition at line 125 of file nanoprobe/nanoprobe.c.
References proj_class_decr_debug(), proj_class_incr_debug(), sighup, sigint, sigterm, sigusr1, and sigusr2.
Referenced by main().


| FSTATIC gboolean check_for_signals | ( | gpointer | ignored | ) |
Check for signals periodically.
Definition at line 154 of file nanoprobe/nanoprobe.c.
References nano_initiate_shutdown(), procname, sigint, sigterm, sigusr1, and sigusr2.
Referenced by main().


Test routine called when an otherwise-unclaimed NetIO packet is received.
| [in,out] | l | Input GSource |
| [in,out] | fs | FrameSets received |
| [in] | srcaddr | Source address of this packet |
Definition at line 95 of file nanoprobe/nanoprobe.c.
References __FUNCTION__, _NetAddr::baseclass, _FrameSet::baseclass, DEBUGMSG3, DUMP3, FRAMESETTYPE_HBBACKALIVE, FRAMESETTYPE_SENDHB, FRAMESETTYPE_STARTUP, _FrameSet::fstype, UNREF, and wirepktcount.
Referenced by main().

| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Nanoprobe main program.
It leaves most of the work of starting up the nanoprobe code to nano_start_full()
Shut down object system to make valgrind happy :-D
Definition at line 198 of file nanoprobe/nanoprobe.c.
References _NetGSource::addListener, anyaddr, are_we_already_running(), assimilation_openlog(), _Listener::associate, _NetIOudp::baseclass, _SignFrame::baseclass, _NetAddr::baseclass, _ReliableUDP::baseclass, _NetGSource::baseclass, _NetIO::bindaddr(), BINDDEBUG, _NetIO::boundaddr, catch_a_signal(), check_for_signals(), cmaaddr, CMAADDR, cma.cma::config, configcontext_new(), CONFIGNAME_CMAINIT, CONFIGNAME_OUTSIG, daemonize_me(), errcount, g_info, get_default_pid_fileName(), _Listener::got_frameset, gotnetpkt(), _NetAddr::ismcast, kill_pid_service(), listener_new(), localaddr, LONG_LICENSE_STRING, mainloop, nano_packet_decoder(), nano_shutdown(), nano_start_full(), NANOLISTENADDR, netaddr_ipv6_new(), netaddr_string_new(), netgsource_new(), netio_is_dual_ipv4v6_stack(), pidrunningstat_to_status(), _NetAddr::port, procname, proj_class_dump_live_objects(), proj_class_finalize_sys(), proj_class_incr_debug(), proj_class_live_object_count(), cma.cma::rc, reliableudp_new(), remove_pid_file(), SEP, _ConfigContext::setaddr, _ConfigContext::setframe, _NetIO::setmcast_ttl(), signal, signframe_new(), _AssimObj::toString, UNREF, UNREF2, usage(), VERSION_STRING, and wirepktcount.

| void usage | ( | const char * | cmdname | ) |
Definition at line 172 of file nanoprobe/nanoprobe.c.
Referenced by main().

| const char* cmaaddr = NULL |
Definition at line 66 of file nanoprobe/nanoprobe.c.
Referenced by main().
| NetAddr* destaddr |
Definition at line 72 of file nanoprobe/nanoprobe.c.
Referenced by _fsprotocol_find(), and nanoobey_stopexpecthb().
| int heartbeatcount = 0 |
Definition at line 74 of file nanoprobe/nanoprobe.c.
| const char* localaddr = NULL |
Definition at line 65 of file nanoprobe/nanoprobe.c.
Referenced by main().
| NetAddr* localbindaddr |
Definition at line 73 of file nanoprobe/nanoprobe.c.
| NetGSource* netpkt |
Definition at line 71 of file nanoprobe/nanoprobe.c.
Referenced by main().
| NetIO* nettransport |
Definition at line 70 of file nanoprobe/nanoprobe.c.
| int pcapcount = 0 |
Definition at line 75 of file nanoprobe/nanoprobe.c.
| gint64 pktcount = 0 |
Definition at line 69 of file nanoprobe/nanoprobe.c.
| gboolean sighup = FALSE |
Definition at line 82 of file nanoprobe/nanoprobe.c.
Referenced by catch_a_signal().
| gboolean sigint = FALSE |
Definition at line 80 of file nanoprobe/nanoprobe.c.
Referenced by catch_a_signal(), and check_for_signals().
| gboolean sigterm = FALSE |
Definition at line 81 of file nanoprobe/nanoprobe.c.
Referenced by catch_a_signal(), and check_for_signals().
| gboolean sigusr1 = FALSE |
Definition at line 83 of file nanoprobe/nanoprobe.c.
Referenced by catch_a_signal(), and check_for_signals().
| gboolean sigusr2 = FALSE |
Definition at line 84 of file nanoprobe/nanoprobe.c.
Referenced by catch_a_signal(), and check_for_signals().
| int wirepktcount = 0 |
Definition at line 76 of file nanoprobe/nanoprobe.c.
Referenced by gotnetpkt(), and main().