From: Razvan Deaconescu Date: Sat, 4 Jun 2011 17:18:38 +0000 (+0300) Subject: raw: Remove old list-based socket management header. X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=commitdiff_plain;h=745bdfe7446c92353c92ade6d483d7aba8993586;hp=62d134e27244c31bb797981b04dd2b6f5aa0eac2;p=swifty.git raw: Remove old list-based socket management header. --- diff --git a/src/raw/include/swift_list.h b/src/raw/include/swift_list.h deleted file mode 100644 index 62d547c..0000000 --- a/src/raw/include/swift_list.h +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef __SOCK_LIST - -#define __SOCK_LIST - -enum sock_bind_state { - STATE_NOTBOUND, - STATE_BOUND -}; - -/* socket management structure */ -struct sock_list { - int s; - struct sockaddr_sw addr; - enum sock_bind_state bind_state; - struct sock_list *next; - struct sock_list *prev; -}; - -static struct sock_list sock_list_head = { - .next = &sock_list_head, - .prev = &sock_list_head -}; - -/* - * Add new socket to list. Called by sw_socket "syscall". - */ -struct sock_list *list_add_socket(int s); - -/* - * Bind socket to given address. Called by sw_bind "syscall". - */ - -struct sock_list *list_update_socket_address(int s, __CONST_SOCKADDR_ARG addr); - -/* - * Get list element containing socket s. Called by sw_send* "syscalls". - */ - -struct sock_list *list_elem_from_socket(int s); - -/* - * Get list element containing address addr. Called by sw_bind "syscall". - */ - -struct sock_list *list_elem_from_address(__CONST_SOCKADDR_ARG addr); - -/* - * Remove socket from list. Called by sw_close "syscall". - */ - -int list_remove_socket(int s); - -/* - * Check if a socket is bound. - */ -int list_socket_is_bound(int s); - -#endif