From: Jack Lange Date: Mon, 8 Sep 2008 20:09:08 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: 1.0~43 X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=commitdiff_plain;h=7a1c54e7fb92e936bb8f5923ceda6f633ebf6077;p=palacios-OLD.git *** empty log message *** --- diff --git a/palacios/include/geekos/socket.h b/palacios/include/geekos/socket.h index 341c687..0bf1b08 100644 --- a/palacios/include/geekos/socket.h +++ b/palacios/include/geekos/socket.h @@ -1,13 +1,13 @@ #ifndef GEEKOS_SOCKET_H #define GEEKOS_SOCKET_H -#include +#include #include struct socket { int in_use; - struct gen_queue send_queue; - struct gen_queue recv_queue; + struct ring_buffer send_queue; + struct ring_buffer recv_queue; struct uip_conn *con; }; diff --git a/palacios/src/geekos/socket.c b/palacios/src/geekos/socket.c index 63c3aef..4c4d44b 100644 --- a/palacios/src/geekos/socket.c +++ b/palacios/src/geekos/socket.c @@ -129,30 +129,30 @@ static void newdata(int sockfd){ // not finished yet static void senddata(int sockfd){ - /*uchar_t *bufptr; - int len = 0; - addr_t pkt; - - struct sockets *sock = get_socket_from_fd(sockfd); - - pkt = dequeue(sock->send_queue); - if (pkt == 0) // no packet for send + uchar_t *bufptr; + int len = 0; + addr_t pkt; + + struct sockets *sock = get_socket_from_fd(sockfd); + + pkt = dequeue(sock->send_queue); + if (pkt == 0) // no packet for send return; - - bufptr = uip_appdata; - - if(len < uip_mss()) { + + bufptr = uip_appdata; + + if(len < uip_mss()) { // memcpy(bufptr, data, len); - } else { + } else { - }*/ + } //uip_send(uip_appdata,len); } //get the socket id by the local tcp port -static int get_socket_from_port(ushort_t lport) { +static int get_socket_from_port(ushort_t lport) { int i; for (i = 0; i < MAX_SOCKS; i++){