/* It checks if the sockaddr variable contains a multicast address. 
So, on Windows, if we don't have ssize_t defined, define it as an int, so we can use it, on all platforms, as the type of variables that hold the return values from send() and recv(). */
static int sock_ismcastaddr(const struct sockaddr *saddr)
/* It checks if the sockaddr variable contains a multicast address. 
So, on Windows, if we don't have ssize_t defined, define it as an int, so we can use it, on all platforms, as the type of variables that hold the return values from send() and recv(). */
static int sock_ismcastaddr(const struct sockaddr *saddr)
{
	if (saddr->sa_family == PF_INET)
	{
		struct sockaddr_in *saddr4 = (struct sockaddr_in *) saddr;
		if (IN_MULTICAST(ntohl(saddr4->sin_addr.s_addr))) return 0;
		else return -1;
	}
	else
	{
		struct sockaddr_in6 *saddr6 = (struct sockaddr_in6 *) saddr;
		if (IN6_IS_ADDR_MULTICAST(&saddr6->sin6_addr)) return 0;
		else return -1;
	}
}