Index: vtcross/branches/bhilburn/configure.ac
===================================================================
--- vtcross/branches/bhilburn/configure.ac	(revision 156)
+++ vtcross/branches/bhilburn/configure.ac	(revision 158)
@@ -17,5 +17,5 @@
           src/libvtcross/Makefile src/cognitive_engines/Makefile 
           src/policy_engines/Makefile src/service_management_layer/Makefile 
-          src/lib/tinyxml/Makefile  src/lib/sockets/Makefile src/include/Makefile
+          src/lib/tinyxml/Makefile  src/lib/socketcomm/Makefile src/include/Makefile
           src/include/vtcross/Makefile src/include/tinyxml/Makefile
           src/lib/Makefile)
Index: vtcross/branches/bhilburn/src/lib/socketcomm/socketcomm.cpp
===================================================================
--- vtcross/branches/bhilburn/src/lib/socketcomm/socketcomm.cpp	(revision 158)
+++ vtcross/branches/bhilburn/src/lib/socketcomm/socketcomm.cpp	(revision 158)
@@ -0,0 +1,165 @@
+/* Virginia Tech Cognitive Radio Open Source Systems
+ * Virginia Tech, 2009
+ *
+ * TODO LICENSE INFORMATION GOES HERE
+ */
+
+/* TODO DESCRIPTION OF FILE.
+ */
+
+#include <cstdlib>
+#include <cstring>
+#include <netdb.h>
+#include <netinet/in.h>
+#include <stdint.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+
+#include "vtcross/common.h"
+#include "vtcross/containers.h"
+#include "vtcross/debug.h"
+#include "vtcross/error.h"
+#include "vtcross/socketcomm.h"
+
+
+void
+ReadMessage(int32_t socketFD, char* msgBuffer)
+{
+    ssize_t msgLength = recv(socketFD, msgBuffer, 256, MSG_PEEK);
+
+    size_t i;
+    for(i = 0; i < 256; i++) {
+	    if(strcmp(&msgBuffer[i], "\0") == 0)
+            break;
+    }
+
+    msgLength = recv(socketFD, msgBuffer, i + 1, 0);
+    if (msgLength < 0)
+        ERROR(1, "Error reading from socket");
+}
+
+
+int32_t 
+ClientSocket(char* serverName, char* portNumber)
+{
+    int32_t socketFD;
+    int32_t portNo;
+
+    struct sockaddr_in serv_addr;
+    struct hostent *server;
+    
+    server = gethostbyname(serverName);
+    if(server == NULL)
+        ERROR(1, "No server found by that hostname.");
+
+    portNo = atoi(portNumber);
+
+    socketFD = socket(AF_INET, SOCK_STREAM, 0);
+    if(socketFD < 0) 
+        ERROR(1, "Error opening socket");
+
+    memset((void *) &serv_addr, 0, sizeof(serv_addr));
+    serv_addr.sin_family = AF_INET;
+    serv_addr.sin_port = htons(portNo);
+    memcpy((char *) &serv_addr.sin_addr.s_addr, (char *) server->h_addr, \
+            server->h_length);
+
+    if(connect(socketFD, (struct sockaddr *) &serv_addr, sizeof(serv_addr)) < 0) 
+        ERROR(1, "Error connecting to remote socket.");
+
+    return socketFD;
+}
+
+    
+int32_t
+SendMessage(int32_t socketFD, char* message) 
+{
+     
+    // TODO explain this. What, exactly, does the below line do and how does it
+    // affect the rest of the function?
+    strcat(message, "\0000");
+
+    ssize_t numSentBytes = send(socketFD, message, (strlen(message) + 1), 0);
+    if(numSentBytes < 0) {
+        ERROR(1, "Error sending to server.");
+    }
+    else if(numSentBytes == 0) {
+        LOG("socket_comm::SendMessage - Server closed the socket.\n");
+    }
+   
+    return numSentBytes;
+}
+
+
+// TODO This function is currently returning 1... always... is this necessary?
+// If we want a fail/success return type, then why aren't we ever returning a
+// failure?
+int32_t 
+GetParameter(int32_t socketFD, struct Parameter pList[], \
+        struct CE_Info *ce_info)
+{
+    char buffer[256];
+    memset(buffer, 0, 256);
+
+    ReadMessage(socketFD, buffer);
+    ce_info->numParameters = atoi(buffer);
+    LOG("socket_comm::GetParameter - Number of parameters: %d\n", \
+            ce_info->numParameters);
+    
+    for(size_t i = 0; i < ce_info->numParameters; i++) {
+        memset(buffer, 0, 256);
+        ReadMessage(socketFD, buffer);
+        LOG("socket_comm::GetParameter - Name: %s\n", buffer);
+        pList[i].name = std::string(buffer);
+    
+        memset(buffer, 0, 256);
+        ReadMessage(socketFD, buffer);
+        LOG("socket_comm::GetParameter - Units: %s\n", buffer);
+        pList[i].units = std::string(buffer);
+
+        memset(buffer, 0, 256);
+        ReadMessage(socketFD, buffer);
+        LOG("socket_comm::GetParameter - Min: %s\n", buffer);
+        pList[i].min = atof(buffer);
+    
+        memset(buffer, 0, 256);
+        ReadMessage(socketFD, buffer);
+        LOG("socket_comm::GetParameter - Max: %s\n", buffer);
+        pList[i].max = atof(buffer);
+    
+        memset(buffer, 0, 256);
+        ReadMessage(socketFD, buffer);
+        LOG("socket_comm::GetParameter - Step: %s\n", buffer);
+        pList[i].step = atof(buffer);
+    
+        memset(buffer, 0, 256);
+        ReadMessage(socketFD, buffer);
+        LOG("socket_comm::GetParameter - Value: %s\n", buffer);
+        pList[i].value = atof(buffer);
+    }
+
+    return 1;
+}
+
+
+// TODO if we are just returing fail/success here, then why not return a bool
+// instead of an entire 32 bit integer?  Seems wasteful.
+int32_t 
+GetRequest(int32_t socketFD, struct Parameter pList[], struct CE_Info *ce_info)
+{
+    char buffer[256];
+    memset(buffer, 0, 256);
+   
+    ReadMessage(socketFD, buffer);
+
+    if(strcmp(buffer, "val") != 0) {
+        LOG("socket_comm::GetRequest - Unexpected control data received.\n\n");
+        return 0;
+    }
+
+    LOG("socket_comm::GetRequest - Getting parameters.\n\n");
+    GetParameter(socketFD, pList, ce_info);
+
+    return 1;
+}
+
Index: vtcross/branches/bhilburn/src/lib/socketcomm/Makefile.am
===================================================================
--- vtcross/branches/bhilburn/src/lib/socketcomm/Makefile.am	(revision 158)
+++ vtcross/branches/bhilburn/src/lib/socketcomm/Makefile.am	(revision 158)
@@ -0,0 +1,4 @@
+INCLUDES = -I$(top_srcdir)/src/include
+
+noinst_LIBRARIES = libsocketcomm.a
+libsocketcomm_a_SOURCES = socketcomm.cpp
Index: vtcross/branches/bhilburn/src/lib/Makefile.am
===================================================================
--- vtcross/branches/bhilburn/src/lib/Makefile.am	(revision 156)
+++ vtcross/branches/bhilburn/src/lib/Makefile.am	(revision 158)
@@ -1,1 +1,1 @@
-SUBDIRS = sockets tinyxml
+SUBDIRS = socketcomm tinyxml
Index: vtcross/branches/bhilburn/src/lib/sockets/socketcomm.cpp
===================================================================
--- vtcross/branches/bhilburn/src/lib/sockets/socketcomm.cpp	(revision 156)
+++ 	(revision )
@@ -1,165 +1,0 @@
-/* Virginia Tech Cognitive Radio Open Source Systems
- * Virginia Tech, 2009
- *
- * TODO LICENSE INFORMATION GOES HERE
- */
-
-/* TODO DESCRIPTION OF FILE.
- */
-
-#include <cstdlib>
-#include <cstring>
-#include <netdb.h>
-#include <netinet/in.h>
-#include <stdint.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include "vtcross/common.h"
-#include "vtcross/containers.h"
-#include "vtcross/debug.h"
-#include "vtcross/error.h"
-#include "vtcross/socketcomm.h"
-
-
-void
-ReadMessage(int32_t socketFD, char* msgBuffer)
-{
-    ssize_t msgLength = recv(socketFD, msgBuffer, 256, MSG_PEEK);
-
-    size_t i;
-    for(i = 0; i < 256; i++) {
-	    if(strcmp(&msgBuffer[i], "\0") == 0)
-            break;
-    }
-
-    msgLength = recv(socketFD, msgBuffer, i + 1, 0);
-    if (msgLength < 0)
-        ERROR(1, "Error reading from socket");
-}
-
-
-int32_t 
-ClientSocket(char* serverName, char* portNumber)
-{
-    int32_t socketFD;
-    int32_t portNo;
-
-    struct sockaddr_in serv_addr;
-    struct hostent *server;
-    
-    server = gethostbyname(serverName);
-    if(server == NULL)
-        ERROR(1, "No server found by that hostname.");
-
-    portNo = atoi(portNumber);
-
-    socketFD = socket(AF_INET, SOCK_STREAM, 0);
-    if(socketFD < 0) 
-        ERROR(1, "Error opening socket");
-
-    memset((void *) &serv_addr, 0, sizeof(serv_addr));
-    serv_addr.sin_family = AF_INET;
-    serv_addr.sin_port = htons(portNo);
-    memcpy((char *) &serv_addr.sin_addr.s_addr, (char *) server->h_addr, \
-            server->h_length);
-
-    if(connect(socketFD, (struct sockaddr *) &serv_addr, sizeof(serv_addr)) < 0) 
-        ERROR(1, "Error connecting to remote socket.");
-
-    return socketFD;
-}
-
-    
-int32_t
-SendMessage(int32_t socketFD, char* message) 
-{
-     
-    // TODO explain this. What, exactly, does the below line do and how does it
-    // affect the rest of the function?
-    strcat(message, "\0000");
-
-    ssize_t numSentBytes = send(socketFD, message, (strlen(message) + 1), 0);
-    if(numSentBytes < 0) {
-        ERROR(1, "Error sending to server.");
-    }
-    else if(numSentBytes == 0) {
-        LOG("socket_comm::SendMessage - Server closed the socket.\n");
-    }
-   
-    return numSentBytes;
-}
-
-
-// TODO This function is currently returning 1... always... is this necessary?
-// If we want a fail/success return type, then why aren't we ever returning a
-// failure?
-int32_t 
-GetParameter(int32_t socketFD, struct Parameter pList[], \
-        struct CE_Info *ce_info)
-{
-    char buffer[256];
-    memset(buffer, 0, 256);
-
-    ReadMessage(socketFD, buffer);
-    ce_info->numParameters = atoi(buffer);
-    LOG("socket_comm::GetParameter - Number of parameters: %d\n", \
-            ce_info->numParameters);
-    
-    for(size_t i = 0; i < ce_info->numParameters; i++) {
-        memset(buffer, 0, 256);
-        ReadMessage(socketFD, buffer);
-        LOG("socket_comm::GetParameter - Name: %s\n", buffer);
-        pList[i].name = std::string(buffer);
-    
-        memset(buffer, 0, 256);
-        ReadMessage(socketFD, buffer);
-        LOG("socket_comm::GetParameter - Units: %s\n", buffer);
-        pList[i].units = std::string(buffer);
-
-        memset(buffer, 0, 256);
-        ReadMessage(socketFD, buffer);
-        LOG("socket_comm::GetParameter - Min: %s\n", buffer);
-        pList[i].min = atof(buffer);
-    
-        memset(buffer, 0, 256);
-        ReadMessage(socketFD, buffer);
-        LOG("socket_comm::GetParameter - Max: %s\n", buffer);
-        pList[i].max = atof(buffer);
-    
-        memset(buffer, 0, 256);
-        ReadMessage(socketFD, buffer);
-        LOG("socket_comm::GetParameter - Step: %s\n", buffer);
-        pList[i].step = atof(buffer);
-    
-        memset(buffer, 0, 256);
-        ReadMessage(socketFD, buffer);
-        LOG("socket_comm::GetParameter - Value: %s\n", buffer);
-        pList[i].value = atof(buffer);
-    }
-
-    return 1;
-}
-
-
-// TODO if we are just returing fail/success here, then why not return a bool
-// instead of an entire 32 bit integer?  Seems wasteful.
-int32_t 
-GetRequest(int32_t socketFD, struct Parameter pList[], struct CE_Info *ce_info)
-{
-    char buffer[256];
-    memset(buffer, 0, 256);
-   
-    ReadMessage(socketFD, buffer);
-
-    if(strcmp(buffer, "val") != 0) {
-        LOG("socket_comm::GetRequest - Unexpected control data received.\n\n");
-        return 0;
-    }
-
-    LOG("socket_comm::GetRequest - Getting parameters.\n\n");
-    GetParameter(socketFD, pList, ce_info);
-
-    return 1;
-}
-
Index: vtcross/branches/bhilburn/src/lib/sockets/Makefile.am
===================================================================
--- vtcross/branches/bhilburn/src/lib/sockets/Makefile.am	(revision 156)
+++ 	(revision )
@@ -1,4 +1,0 @@
-INCLUDES = -I$(top_srcdir)/src/include
-
-noinst_LIBRARIES = libsocketcomm.a
-libsocketcomm_a_SOURCES = socketcomm.cpp
Index: vtcross/branches/bhilburn/src/policy_engines/Makefile.am
===================================================================
--- vtcross/branches/bhilburn/src/policy_engines/Makefile.am	(revision 156)
+++ vtcross/branches/bhilburn/src/policy_engines/Makefile.am	(revision 158)
@@ -6,4 +6,4 @@
 
 policy_demo_SOURCES = PolicyEngine.cpp policy_demo.cpp
-policy_demo_LDADD = ../lib/sockets/libsocketcomm.a
+policy_demo_LDADD = ../lib/socketcomm/libsocketcomm.a
 
