summaryrefslogtreecommitdiff
path: root/pgsnmpd.h
diff options
context:
space:
mode:
authorJoshua Tolley2010-11-26 17:22:01 +0000
committerJoshua Tolley2010-11-26 17:22:01 +0000
commitfe9d8f21bbdfb442b8233b4627a0c67dc458a8bd (patch)
treea88daa49fc47e64777af3d331cf142e0604c2d48 /pgsnmpd.h
Import from CVSHEADmaster
Diffstat (limited to 'pgsnmpd.h')
-rw-r--r--pgsnmpd.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/pgsnmpd.h b/pgsnmpd.h
new file mode 100644
index 0000000..1ac9236
--- /dev/null
+++ b/pgsnmpd.h
@@ -0,0 +1,57 @@
+/*-------------------------------------------------------------------------
+ * pgsnmpd.h
+ *
+ * Global definitions for the main PostgreSQL SNMP Daemon.
+ * This file should be included first in all pgsnmpd source files.
+ *
+ * Copyright (c) 2006, PostgreSQL Global Development Group
+ * Author: Joshua Tolley
+ *
+ * $Id: pgsnmpd.h,v 1.6 2007/12/12 01:24:06 h-saito Exp $
+ *-------------------------------------------------------------------------
+ */
+
+#ifndef PGSNMPD_H
+#define PGSNMPD_H
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+
+#include "postgres_fe.h"
+#include "libpq-fe.h"
+
+/* snmp include files expose the autoconf variables about the package, and
+ * so does the pg includes. Oops.
+ */
+#ifdef PACKAGE_BUGREPORT
+#undef PACKAGE_BUGREPORT
+#endif
+#ifdef PACKAGE_NAME
+#undef PACKAGE_NAME
+#endif
+#ifdef PACKAGE_STRING
+#undef PACKAGE_STRING
+#endif
+#ifdef PACKAGE_TARNAME
+#undef PACKAGE_TARNAME
+#endif
+#ifdef PACKAGE_VERSION
+#undef PACKAGE_VERSION
+#endif
+
+
+/*
+ * Global includes from net-snmp.
+ */
+#include <net-snmp/net-snmp-config.h>
+#include <net-snmp/net-snmp-includes.h>
+#include <net-snmp/agent/net-snmp-agent-includes.h>
+#include <net-snmp/agent/mib_modules.h>
+
+
+extern char *conninfo;
+extern PGconn *dbconn;
+bool IsAlive(void);
+
+#endif