int count = 0;
while (*addr) {
- if (*addr != '.' && !isdigit(*addr))
+ if (*addr != '.' && !isdigit((int)*addr))
return FALSE;
if (*addr == '.')
count++;
{
/* XXX does this work with all kinds of IPv6 addresses? */
while (*addr) {
- if (*addr != ':' && !isxdigit(*addr))
+ if (*addr != ':' && !isxdigit((int)*addr))
return FALSE;
addr++;
}
/* Resolves hostname by IP address. */
-SilcBool silc_net_gethostbyaddr(const char *addr, char *name, SilcUInt32 name_len)
+SilcBool silc_net_gethostbyaddr(const char *addr, char *name,
+ SilcUInt32 name_len)
{
#ifdef HAVE_IPV6
struct addrinfo req, *ai;
silc_thread_create(silc_net_gethostbyaddr_thread, r, FALSE);
}
+#ifndef SILC_SYMBIAN
+
/* Performs lookups for remote name and IP address. This peforms reverse
lookup as well to verify that the IP has FQDN. */
-SilcBool silc_net_check_host_by_sock(int sock, char **hostname, char **ip)
+SilcBool silc_net_check_host_by_sock(SilcSocket sock, char **hostname,
+ char **ip)
{
char host[1024];
int rval, len;
/* Performs lookups for local name and IP address. This peforms reverse
lookup as well to verify that the IP has FQDN. */
-SilcBool silc_net_check_local_by_sock(int sock, char **hostname, char **ip)
+SilcBool silc_net_check_local_by_sock(SilcSocket sock, char **hostname,
+ char **ip)
{
char host[1024];
int rval, len;
/* Return remote port by socket. */
-SilcUInt16 silc_net_get_remote_port(int sock)
+SilcUInt16 silc_net_get_remote_port(SilcSocket sock)
{
#ifdef HAVE_IPV6
struct sockaddr_storage remote;
/* Return local port by socket. */
-SilcUInt16 silc_net_get_local_port(int sock)
+SilcUInt16 silc_net_get_local_port(SilcSocket sock)
{
#ifdef HAVE_IPV6
struct sockaddr_storage local;
return ntohs(local.sin_port);
#endif
}
+#endif /* !SILC_SYMBIAN */
/* Return name of localhost. */