X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fgeekos%2Fsocket.h;h=77c20b80d546b47305c9e8b32ddb83fa608e7072;hb=c3bf21ce75d6ea7ffb74b2d548d0c0b2d2843ea7;hp=341c687522525ca2e048e6556ae8c5f005cbcb5b;hpb=410089191febd4884a3a5a513052b0ae12aa7ebf;p=palacios-OLD.git diff --git a/palacios/include/geekos/socket.h b/palacios/include/geekos/socket.h index 341c687..77c20b8 100644 --- a/palacios/include/geekos/socket.h +++ b/palacios/include/geekos/socket.h @@ -1,16 +1,23 @@ #ifndef GEEKOS_SOCKET_H #define GEEKOS_SOCKET_H -#include +#include #include +#include + + +typedef enum {WAITING, CLOSED, LISTEN, ESTABLISHED} sock_state_t; struct socket { int in_use; - struct gen_queue send_queue; - struct gen_queue recv_queue; + struct Thread_Queue recv_wait_queue; + struct ring_buffer *send_buf; + struct ring_buffer *recv_buf; struct uip_conn *con; -}; + sock_state_t state; + +}; void init_network(); @@ -20,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