Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


small fixes
[palacios.git] / palacios / include / palacios / vmm_socket.h
index bfc7123..bd88682 100644 (file)
@@ -42,7 +42,7 @@
       extern struct v3_socket_hooks * sock_hooks;      \
       V3_SOCK sock = 0;                                        \
       if ((sock_hooks) && (sock_hooks)->tcp_socket) {  \
-       sock = (sock_hooks)->tcp_socket(0,0);           \
+       sock = (sock_hooks)->tcp_socket(0,0,0);         \
       }                                                        \
       sock;                                            \
     })
     })
 
 
-#define V3_Accept_Socket() (-1)
-#define V3_Select_Socket() (-1)
+#define V3_Accept_Socket(sock, ip_ptr) ({                      \
+      extern struct v3_socket_hooks * sock_hooks;              \
+      int ret = -1;                                            \
+      if ((sock_hooks) && (sock_hooks)->accept) {              \
+       ret = (sock_hooks)->accept(sock, ip_ptr);               \
+      }                                                                \
+      ret;                                                     \
+    })
+
+
+#define V3_Select_Socket(rset,wset,eset,tv) ({                 \
+      extern struct v3_socket_hooks * sock_hooks;              \
+      int ret = -1;                                            \
+      if ((sock_hooks) && (sock_hooks)->select) {              \
+       ret = (sock_hooks)->select(rset, wset, eset, tv);       \
+      }                                                                \
+      ret;                                                     \
+    })
 
 
 
@@ -162,7 +178,7 @@ struct v3_timeval {
 struct v3_sock_entry {
   V3_SOCK sock;
   unsigned int is_set;
-  struct v3_sock_set * next;
+  struct v3_sock_entry * next;
 };
 
 struct v3_sock_set {