summaryrefslogtreecommitdiff
path: root/polux/application/agent/src/agent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'polux/application/agent/src/agent.cpp')
-rwxr-xr-xpolux/application/agent/src/agent.cpp74
1 files changed, 74 insertions, 0 deletions
diff --git a/polux/application/agent/src/agent.cpp b/polux/application/agent/src/agent.cpp
new file mode 100755
index 0000000000..13628db3ff
--- /dev/null
+++ b/polux/application/agent/src/agent.cpp
@@ -0,0 +1,74 @@
+/*
+ ****************************************************************************
+ * PROGRAM MODULE
+ *
+ * $Workfile: agent.cpp $
+ * $Author: paris $
+ * $Date: 2007/11/22 14:37:47 $
+ *
+ * Copyright (C) 2004 by SPiDCOM Technologies All rights reserved.
+ *
+ ****************************************************************************
+ */
+
+#include <stdlib.h>
+
+#include <iostream>
+#include <signal.h>
+using namespace std;
+
+#include "processManager.h"
+
+#include "mib-common.h"
+#include "mib-interface.h"
+#include "systemmanager.h"
+
+#include "agent_pp/agent++.h"
+#include "agent_pp/system_group.h"
+
+#ifndef _NO_LOGGING
+#ifndef REMOTE_LOG
+#include <sys/stat.h> //for mkdir function
+#include <sys/types.h> //for mkdir function
+#endif
+#endif
+
+#ifdef REMOTE_LOG
+#include "agent_remote_log.h"
+#else
+#include "snmp_pp/log.h"
+#endif // REMOTE_LOG
+
+/*
+ * Define a macro for getting debug printouts... Since it's defined
+ * the way it is (handling a variable number of arguments) we need
+ * to call it with double parenthesis.
+ */
+#ifdef USE_DEBUG_PRINTF
+#include "dbgprintf.h"
+#define DBGPRINTF(s) dbgprintf s
+#else
+#define DBGPRINTF(s) do {} while(0)
+#endif //USE_DEBUG_PRINTF
+
+#ifdef AGENTPP_NAMESPACE
+using namespace Agentpp;
+#endif // AGENTPP_NAMESPACE
+
+// globals:
+u_short port = _DEFAULT_SNMP_AGENT_PORT;
+Mib* mib = 0;
+RequestList* reqList = 0;
+boolean run = TRUE;
+
+
+
+int main (int argc, char* argv[])
+{
+ int status;
+
+ processManager::instance()->initThreads(&port);
+
+ return 0;
+
+}