getsockname() implemented

This commit is contained in:
Joseph Henry 2015-12-09 12:20:38 -08:00
commit a730c86907
4 changed files with 90 additions and 7 deletions

View file

@ -56,6 +56,7 @@
#define RPC_LISTEN 10
#define RPC_SOCKET 11
#define RPC_SHUTDOWN 12
#define RPC_GETSOCKNAME 13
/* Administration RPC codes */
#define RPC_MAP 20 /* Give the service the value we "see" for the new buffer fd */
@ -175,6 +176,14 @@ struct shutdown_st
int how;
};
struct getsockname_st
{
int sockfd;
struct sockaddr addr;
socklen_t addrlen;
};
#define CONNECT_SOCKARG struct sockaddr *
#define SELECT_SIG int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout
#define IOCTL_SIG int __fd, unsigned long int __request, ...