X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fpalacios%2Fvmm_socket.h;h=bd8868272b559ec83c30075b110c1ab2fce16b22;hb=53f181096ad02cde9f79e30e2238ddad43ede574;hp=bfc71238a8f4d500adbd2f60f393dbbd52a2ae53;hpb=36fb65749158643467beb8ebc82276b2b29412d1;p=palacios.git diff --git a/palacios/include/palacios/vmm_socket.h b/palacios/include/palacios/vmm_socket.h index bfc7123..bd88682 100644 --- a/palacios/include/palacios/vmm_socket.h +++ b/palacios/include/palacios/vmm_socket.h @@ -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; \ }) @@ -68,8 +68,24 @@ }) -#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 {