Index: Makefile
===================================================================
--- Makefile	(revision 8532f647e7fdbd3b5fc5cebf82732a8aa0f31074)
+++ Makefile	(revision 6ccf909157f91183a7790e6f8544755b2a6b4768)
@@ -1,7 +1,6 @@
 CC=g++
 CFLAGS = -g -DLINUX
-CXXFLAGS = -g -std=c++11
-# uncomment this for SunOS
-# LIBS = -lsocket -lnsl
+CXXFLAGS = -g -std=c++11 -pthread
+LIBS = -pthread -lmongoclient -lboost_thread -lboost_system -lssl -lcrypto
 
 all: netslow
Index: netslow.cpp
===================================================================
--- netslow.cpp	(revision 8532f647e7fdbd3b5fc5cebf82732a8aa0f31074)
+++ netslow.cpp	(revision 6ccf909157f91183a7790e6f8544755b2a6b4768)
@@ -5,4 +5,5 @@
 #include <sys/socket.h>
 #include <arpa/inet.h>
+#include "mongo/client/dbclient.h"
 #include "NetFlow9Processor.h"
 #include "FlowSet.h"
@@ -26,4 +27,5 @@
 	string filename = "/home/ian/projects/NetSlow/netslow.conf";	/* Configuration file - TODO: Add to CLI Arguments */
 	std::string name;
+	mongo::DBClientConnection c;
 
 	Config *config = new Config(filename, envp);
@@ -51,4 +53,11 @@
 	}
 
+	try {
+		c.connect("localhost");
+	}
+	catch (const mongo::DBException &e ) {
+		perror("DB Open failed");
+		return 255;
+	}
 
 	if (config->pBool("single_router")) {
