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 ***
[palacios.git] / palacios / include / geekos / socket.h
index cdd17d2..77c20b8 100644 (file)
@@ -5,12 +5,18 @@
 #include <uip/uip.h>
 #include <geekos/kthread.h>
 
+
+typedef enum {WAITING, CLOSED, LISTEN, ESTABLISHED} sock_state_t;
+
 struct socket {
   int in_use;
   struct Thread_Queue recv_wait_queue;
   struct ring_buffer *send_buf;
   struct ring_buffer *recv_buf;
   struct uip_conn *con;
+
+  sock_state_t state;
+
 };
 
 
@@ -21,4 +27,7 @@ int close(const int sockfd);
 int recv(int sockfd, void * buf, uint_t len);
 int send(int sockfd, void * buf, uint_t len);
 
+void set_ip_addr(uchar_t addr[4]);
+
+
 #endif