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.


*** empty log message ***
Jack Lange [Mon, 8 Sep 2008 20:09:08 +0000 (20:09 +0000)]
palacios/include/geekos/socket.h
palacios/src/geekos/socket.c

index 341c687..0bf1b08 100644 (file)
@@ -1,13 +1,13 @@
 #ifndef GEEKOS_SOCKET_H
 #define GEEKOS_SOCKET_H
 
-#include <geekos/queue.h>
+#include <geekos/ring_buffer.h>
 #include <uip/uip.h>
 
 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;
 };
 
index 63c3aef..4c4d44b 100644 (file)
@@ -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++){