X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=net.c;h=49026db0ec91a7b4a1d3d0917723720eb8d0ba30;hp=2f720b10477aee8214cac5a5223ca4378b29bd5f;hb=89f2de1016601e523fd456e0e2fa650fa695ecaa;hpb=74f1e057c1579d880becb6a32acd43641b1a8c2b diff --git a/net.c b/net.c index 2f720b10..49026db0 100644 --- a/net.c +++ b/net.c @@ -576,8 +576,14 @@ static inline int estimated_header_overhead(const int af_type) } /** - * Maximum transport-layer message size (MMS_S) as per RFC 1122, 3.3.3 - * Socket must be connected. + * Get the maximum transport-layer message size (MMS_S). + * + * \param sockfd The socket file descriptor. + * + * The socket must be connected. See RFC 1122, 3.3.3. If the protocol familiy + * could not be determined, \p AF_INET is assumed. + * + * \return The maximum message size of the address family type. */ int generic_max_transport_msg_size(int sockfd) { @@ -607,8 +613,7 @@ int generic_max_transport_msg_size(int sockfd) * \sa getsockname(2), getpeername(2), parse_url(), getnameinfo(3), * services(5), nsswitch.conf(5). */ -static char *__get_sock_name(int fd, int (*getname)(int, struct sockaddr*, - socklen_t *)) +static char *__get_sock_name(int fd, typeof(getsockname) getname) { struct sockaddr_storage ss; const struct sockaddr *sa;