Always obtain IP address during accept(), and not do it later as a call to getsockname().
Signed-off-by: Jan Vidar Krey <janvidar@extatic.org>
This commit is contained in:
@@ -83,8 +83,11 @@ extern int net_close(int fd);
|
||||
|
||||
/**
|
||||
* A wrapper for the accept() function call.
|
||||
* @param fd socket descriptor
|
||||
* @param ipaddr (in/out) if non-NULL the ip address of the
|
||||
* accepted peer is filled in.
|
||||
*/
|
||||
extern int net_accept(int fd);
|
||||
extern int net_accept(int fd, struct ip_addr_encap* ipaddr);
|
||||
|
||||
/**
|
||||
* A wrapper for the connect() call.
|
||||
|
||||
Reference in New Issue
Block a user