diff options
Diffstat (limited to 'nacl/curvecp/socket_bind.c')
-rw-r--r-- | nacl/curvecp/socket_bind.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/nacl/curvecp/socket_bind.c b/nacl/curvecp/socket_bind.c deleted file mode 100644 index 9e36925d..00000000 --- a/nacl/curvecp/socket_bind.c +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | #include <sys/types.h> | ||
2 | #include <sys/socket.h> | ||
3 | #include <netinet/in.h> | ||
4 | #include <errno.h> | ||
5 | #include "socket.h" | ||
6 | #include "byte.h" | ||
7 | |||
8 | int socket_bind(int fd,const unsigned char *ip,const unsigned char *port) | ||
9 | { | ||
10 | struct sockaddr_in sa; | ||
11 | byte_zero(&sa,sizeof sa); | ||
12 | byte_copy(&sa.sin_addr,4,ip); | ||
13 | byte_copy(&sa.sin_port,2,port); | ||
14 | return bind(fd,(struct sockaddr *) &sa,sizeof sa); | ||
15 | } | ||