Separated E2Sim lib from E2SM-specific code

Issue-ID: SIM-18

Signed-off-by: Ron Shacham <rshacham@research.att.com>
Change-Id: Ic4b1edc9011130a5f92a169012cbaeab56f9bc1d
Signed-off-by: Ron Shacham <rshacham@research.att.com>
diff --git a/e2sim/src/SCTP/e2sim_sctp.cpp b/e2sim/src/SCTP/e2sim_sctp.cpp
index de68ec7..ce9d649 100644
--- a/e2sim/src/SCTP/e2sim_sctp.cpp
+++ b/e2sim/src/SCTP/e2sim_sctp.cpp
@@ -206,6 +206,7 @@
 
   //Blocking call
   client_fd = accept(server_fd, &client_addr, &client_addr_size);
+  fprintf(stderr, "client fd is %d\n", client_fd);
   if(client_fd == -1){
     perror("accept()");
     close(client_fd);
@@ -231,7 +232,10 @@
 
 int sctp_send_data(int &socket_fd, sctp_buffer_t &data)
 {
+  fprintf(stderr,"in sctp send data func\n");
+  fprintf(stderr,"data.len is %d", data.len);
   int sent_len = send(socket_fd, (void*)(&(data.buffer[0])), data.len, 0);
+  fprintf(stderr,"after getting sent_len\n");
 
   if(sent_len == -1) {
     perror("[SCTP] sctp_send_data");
@@ -243,6 +247,7 @@
 
 int sctp_send_data_X2AP(int &socket_fd, sctp_buffer_t &data)
 {
+  /*
   int sent_len = sctp_sendmsg(socket_fd, (void*)(&(data.buffer[0])), data.len,
                   NULL, 0, (uint32_t) X2AP_PPID, 0, 0, 0, 0);
 
@@ -250,7 +255,8 @@
     perror("[SCTP] sctp_send_data");
     exit(1);
   }
-
+  */
+  return 1;
 }
 
 /*
@@ -263,11 +269,15 @@
 int sctp_receive_data(int &socket_fd, sctp_buffer_t &data)
 {
   //clear out the data before receiving
+  fprintf(stderr, "receive data1\n");
   memset(data.buffer, 0, sizeof(data.buffer));
+  fprintf(stderr, "receive data2\n");  
   data.len = 0;
 
   //receive data from the socket
   int recv_len = recv(socket_fd, &(data.buffer), sizeof(data.buffer), 0);
+  fprintf(stderr, "receive data3\n");
+  
   if(recv_len == -1)
   {
     perror("[SCTP] recv");