X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fgeekos%2Fsocket.h;h=77c20b80d546b47305c9e8b32ddb83fa608e7072;hb=c3bf21ce75d6ea7ffb74b2d548d0c0b2d2843ea7;hp=cdd17d2cab40a5c3c13f2b045f742d3f82b3e8cb;hpb=fb8c4864a1d840edf0be5a84ca30bc1517af8796;p=palacios-OLD.git diff --git a/palacios/include/geekos/socket.h b/palacios/include/geekos/socket.h index cdd17d2..77c20b8 100644 --- a/palacios/include/geekos/socket.h +++ b/palacios/include/geekos/socket.h @@ -5,12 +5,18 @@ #include #include + +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