* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2011, 2012, Intel Corporation.
+ * Copyright (c) 2011, 2014, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
#define DEBUG_SUBSYSTEM S_LNET
#include <libcfs/libcfs.h>
-#include <lnet/lnet.h>
+#include <lnet/nidstr.h>
#ifndef __KERNEL__
#ifdef HAVE_GETHOSTBYNAME
# include <netdb.h>
#endif
#endif
+/* max value for numeric network address */
+#define MAX_NUMERIC_VALUE 0xffffffff
+
#define IPSTRING_LENGTH 16
/* CAVEAT VENDITOR! Keep the canonical string representation of nets/nids
{/* .nf_type */ -1},
};
-const int libcfs_nnetstrfns = sizeof(libcfs_netstrfns)/sizeof(libcfs_netstrfns[0]);
+static const int libcfs_nnetstrfns =
+ sizeof(libcfs_netstrfns)/sizeof(libcfs_netstrfns[0]);
-int
+static int
libcfs_lo_str2addr(const char *str, int nob, __u32 *addr)
{
*addr = 0;
return 1;
}
-void
+static void
libcfs_ip_addr2str(__u32 addr, char *str)
{
#if 0 /* never lookup */
* fine, if it doesn't, then the scan ended at the end of the string, which is
* fine too :) */
-int
+static int
libcfs_ip_str2addr(const char *str, int nob, __u32 *addr)
{
unsigned int a;
return 0;
}
-void
+static void
libcfs_decnum_addr2str(__u32 addr, char *str)
{
snprintf(str, LNET_NIDSTR_SIZE, "%u", addr);
}
-void
+static void
libcfs_hexnum_addr2str(__u32 addr, char *str)
{
snprintf(str, LNET_NIDSTR_SIZE, "0x%x", addr);
}
-int
+static int
libcfs_num_str2addr(const char *str, int nob, __u32 *addr)
{
int n;
return 0;
}
-struct netstrfns *
+static struct netstrfns *
libcfs_lnd2netstrfns(int lnd)
{
int i;
return NULL;
}
-struct netstrfns *
+static struct netstrfns *
libcfs_namenum2netstrfns(const char *name)
{
struct netstrfns *nf;
return NULL;
}
-struct netstrfns *
+static struct netstrfns *
libcfs_name2netstrfns(const char *name)
{
int i;