return NULL;
}
-
-/**
- * Match string as a candidate IPv4 address.
- *
- * \param address The string to match.
- * \return True if \a address has "dot-quad" format.
- */
static bool is_v4_dot_quad(const char *address)
{
bool result;
#define SOCK_DCCP 6 /**< Linux socket type. */
#endif
-/**
- * Determine the socket type for a given layer-4 protocol.
- *
- * \param l4type The symbolic name of the transport-layer protocol.
- *
- * \sa ip(7), socket(2).
+/*
+ * Determine the socket type, given the symbolic name of the transport-layer
+ * protocol. See ip(7), socket(2).
*/
static inline int sock_type(const unsigned l4type)
{
return -1; /* not supported here */
}
-/**
- * Pretty-print transport-layer name.
- */
+/* Pretty-print transport-layer name. */
static const char *layer4_name(const unsigned l4type)
{
switch (l4type) {
list_add_tail(&new->node, &fo->sockopts);
}
-/** Set the entire bunch of pre-connection options at once. */
+/* Set the entire bunch of pre-connection options at once. */
static void flowopt_setopts(int sockfd, struct flowopts *fo)
{
struct pre_conn_opt *pc;
return para_listen(l4type, NULL, port);
}
-/**
- * Determine IPv4/v6 socket address length.
- * \param sa Container of IPv4 or IPv6 address.
- * \return Address-family dependent address length.
- */
+/* Compute the address-family dependent address length of an IPv4/v6 socket. */
static socklen_t salen(const struct sockaddr *sa)
{
assert(sa->sa_family == AF_INET || sa->sa_family == AF_INET6);
: sizeof(struct sockaddr_in);
}
-/** True if @ss holds a v6-mapped-v4 address (RFC 4291, 2.5.5.2) */
+/* True if ss holds a v6-mapped-v4 address (RFC 4291, 2.5.5.2) */
static bool SS_IS_ADDR_V4MAPPED(const struct sockaddr_storage *ss)
{
const struct sockaddr_in6 *ia6 = (const struct sockaddr_in6 *)ss;
return ss->ss_family == AF_INET6 && IN6_IS_ADDR_V4MAPPED(&ia6->sin6_addr);
}
-/**
+/*
* Process IPv4/v6 address, turn v6-mapped-v4 address into normal IPv4 address.
- * \param ss Container of IPv4/6 address.
- * \return Pointer to normalized address (may be static storage).
+ * ss: Container of IPv4/6 address.
+ * Returns: Pointer to normalized address (may be static storage).
*
* \sa RFC 3493.
*/
return (const struct sockaddr *)ss;
}
-/**
+/*
* Generic/fallback MTU values
*
* These are taken from RFC 1122, RFC 2460, and RFC 5405.
return af_type == AF_INET6 ? 1280 : 576;
}
-/** Crude approximation of IP header overhead - neglecting options. */
+/* Crude approximation of IP header overhead - neglecting options. */
static inline int estimated_header_overhead(const int af_type)
{
return af_type == AF_INET6 ? 40 : 20;