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.


fixed toc_length initialization bug
[palacios.git] / palacios / include / geekos / socket.h
index 77c20b8..fbc47ed 100644 (file)
@@ -1,10 +1,15 @@
+/* (c) 2008, Jack Lange <jarusl@cs.northwestern.edu> */
+/* (c) 2008, The V3VEE Project <http://www.v3vee.org> */
+
 #ifndef GEEKOS_SOCKET_H
 #define GEEKOS_SOCKET_H
 
 #include <geekos/ring_buffer.h>
-#include <uip/uip.h>
 #include <geekos/kthread.h>
 
+#ifdef UIP
+#include <uip/uip.h>
+
 
 typedef enum {WAITING, CLOSED, LISTEN, ESTABLISHED} sock_state_t;
 
@@ -20,7 +25,7 @@ struct socket {
 };
 
 
-void init_network();
+void init_socket_layer();
 
 int connect(const uchar_t ip_addr[4], ushort_t port);
 int close(const int sockfd);
@@ -29,5 +34,7 @@ int send(int sockfd, void * buf, uint_t len);
 
 void set_ip_addr(uchar_t addr[4]);
 
+#endif /* UIP */
+
 
 #endif